commit 2302748c873736f9df42aff9a996e31cb95fb7bc Author: Michaël Date: Thu Jan 29 14:13:11 2026 -0300 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f505f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,56 @@ +# Dependencies +node_modules/ +.pnp +.pnp.js + +# Build outputs +dist/ +.next/ +out/ +build/ + +# Database +*.db +*.sqlite +backend/data/ + +# Environment files +.env +.env.* +.env.local +.env.development.local +.env.test.local +.env.production.local +!.env.example +!**/.env.example + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# Runtime uploads / user-generated content +backend/uploads/ + +# Tooling +.turbo/ +.cursor/ + +# OS +.DS_Store +Thumbs.db + +# Logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# TypeScript +*.tsbuildinfo + +# Testing +coverage/ + +# Misc +*.pem diff --git a/README.md b/README.md new file mode 100644 index 0000000..53fbb34 --- /dev/null +++ b/README.md @@ -0,0 +1,209 @@ +# Spanglish - Language Exchange Event Platform + +A full-stack web application for organizing and managing language exchange events in Asunción, Paraguay. + +## Features + +### Public Website +- **Homepage** - Hero section with next event, about section, newsletter signup +- **Events** - Browse upcoming and past events, view event details +- **Booking** - Book tickets for events with payment options +- **Community** - WhatsApp and social media links, community guidelines +- **Contact** - Contact form for inquiries +- **Multi-language** - English and Spanish support with easy extensibility + +### Admin Dashboard (`/admin`) +- **Dashboard** - Overview stats, alerts, quick actions +- **Events** - Create, edit, publish, and manage events +- **Tickets** - View bookings, check-in attendees, manage ticket status +- **Users** - Manage user accounts and roles +- **Payments** - View and confirm payments, process refunds +- **Messages** - View and respond to contact form submissions + +### API +- **API Docs** - Swagger UI at `/api-docs` +- **OpenAPI Spec** - JSON specification at `/openapi.json` +- Full REST API with JWT authentication + +## Tech Stack + +### Backend +- **Runtime**: Node.js with TypeScript +- **Framework**: Hono (fast, lightweight) +- **Database**: SQLite (default) or PostgreSQL +- **ORM**: Drizzle ORM +- **Authentication**: JWT with bcrypt password hashing +- **API Documentation**: OpenAPI 3.0 / Swagger UI + +### Frontend +- **Framework**: Next.js 14 (App Router) +- **Styling**: Tailwind CSS +- **Icons**: Heroicons +- **State Management**: React Context +- **HTTP Client**: SWR / Fetch API +- **Notifications**: React Hot Toast + +## Getting Started + +### Prerequisites +- Node.js 18+ +- npm or yarn + +### Installation + +1. Clone the repository: +```bash +git clone +cd Spanglish +``` + +2. Install dependencies: +```bash +npm install +``` + +3. Set up environment variables: +```bash +# Backend +cp backend/.env.example backend/.env +# Edit backend/.env with your settings +``` + +4. Initialize the database: +```bash +npm run db:migrate +``` + +5. Start the development servers: +```bash +npm run dev +``` + +The application will be available at: +- Frontend: http://localhost:3002 +- Backend API: http://localhost:3001 +- API Docs: http://localhost:3001/api-docs + +### First User = Admin + +The first user to register becomes the admin. Register at `/register` to create the admin account. + +## Database Configuration + +### SQLite (Default) +No additional configuration needed. Database file is created at `backend/data/spanglish.db`. + +### PostgreSQL +Update `backend/.env`: +```env +DB_TYPE=postgres +DATABASE_URL=postgresql://user:password@localhost:5432/spanglish +``` + +## Project Structure + +``` +Spanglish/ +├── backend/ +│ ├── src/ +│ │ ├── db/ # Database schema and migrations +│ │ ├── lib/ # Utilities (auth, helpers) +│ │ ├── routes/ # API routes +│ │ └── index.ts # Server entry point +│ └── drizzle.config.ts +├── frontend/ +│ ├── src/ +│ │ ├── app/ # Next.js pages +│ │ │ ├── (public)/ # Public pages +│ │ │ └── admin/ # Admin dashboard +│ │ ├── components/ # React components +│ │ ├── context/ # React contexts +│ │ ├── i18n/ # Internationalization +│ │ └── lib/ # API client, utilities +│ └── tailwind.config.js +└── package.json # Monorepo workspace config +``` + +## Adding New Languages + +The i18n system is designed for easy extensibility: + +1. Create a new locale file at `frontend/src/i18n/locales/{code}.json` +2. Copy structure from `en.json` and translate +3. Update `frontend/src/i18n/index.ts`: + +```typescript +import pt from './locales/pt.json'; + +export type Locale = 'en' | 'es' | 'pt'; + +export const locales: Record = { + en, + es, + pt, // Add new locale +}; + +export const localeNames: Record = { + en: 'English', + es: 'Español', + pt: 'Português', // Add display name +}; + +export const localeFlags: Record = { + en: '🇺🇸', + es: '🇪🇸', + pt: '🇧🇷', // Add flag +}; +``` + +## API Endpoints + +### Authentication +- `POST /api/auth/register` - Register new user +- `POST /api/auth/login` - Login +- `GET /api/auth/me` - Get current user + +### Events +- `GET /api/events` - List events +- `GET /api/events/:id` - Get event +- `POST /api/events` - Create event (admin) +- `PUT /api/events/:id` - Update event (admin) +- `DELETE /api/events/:id` - Delete event (admin) + +### Tickets +- `POST /api/tickets` - Book ticket +- `GET /api/tickets/:id` - Get ticket +- `POST /api/tickets/:id/checkin` - Check in (staff) + +### Users +- `GET /api/users` - List users (admin) +- `PUT /api/users/:id` - Update user + +### Payments +- `GET /api/payments` - List payments (admin) +- `PUT /api/payments/:id` - Update payment status +- `POST /api/payments/:id/refund` - Process refund + +### Contacts +- `POST /api/contacts` - Submit contact form +- `POST /api/contacts/subscribe` - Subscribe to newsletter + +## User Roles + +- **admin** - Full access to all features +- **organizer** - Manage events, tickets, view payments +- **staff** - Check-in attendees, view ticket info +- **marketing** - Access to subscriber lists, analytics +- **user** - Public user, can book events + +## Brand Colors + +- Primary Yellow: `#FFD84D` +- Primary Dark: `#111111` +- Primary White: `#FFFFFF` +- Secondary Gray: `#F5F5F5` +- Accent Blue: `#2F80ED` + +## License + +MIT diff --git a/about/FUNCTIONAL_SPEC.md b/about/FUNCTIONAL_SPEC.md new file mode 100644 index 0000000..2f315e5 --- /dev/null +++ b/about/FUNCTIONAL_SPEC.md @@ -0,0 +1,417 @@ +# Spanglish Website – Functional Specification + +## 1. Purpose + +This document defines the functional behavior of the Spanglish website and admin system. + +It specifies what the system must do, how users interact with it, and how core workflows operate. + +--- + +## 2. User Roles + +### 2.1 Public User + +* Can browse the website +* Can view events +* Can book tickets +* Can join community channels +* Can contact organizers + +### 2.2 Admin + +* Full system access +* Manages events +* Manages users +* Manages payments +* Manages communications +* Manages settings + +### 2.3 Organizer + +* Manages assigned events +* Views attendees +* Sends event emails +* Manages check-in + +### 2.4 Staff + +* Access to check-in system +* Limited attendee viewing + +### 2.5 Marketing + +* Access to email tools +* Access to analytics +* Access to media library + +--- + +## 3. Public Website Features + +### 3.1 Homepage + +The homepage must display: + +* Hero section with next event +* Primary call-to-action button +* Brief description of Spanglish +* Photo gallery +* Community links +* Email signup form +* Contact information + +Behavior: + +* Automatically shows the next upcoming event +* Updates dynamically when events change + +--- + +### 3.2 Events Listing Page + +The events page must display: + +* List of upcoming events +* List of past events +* Basic filtering by date + +Each event card shows: + +* Title +* Date +* Location +* Status +* Booking button + +--- + +### 3.3 Event Detail Page + +Each event page must include: + +* Event title +* Description +* Date and time +* Location with map +* Price +* Available seats +* Booking button +* FAQ section +* Social sharing buttons + +Behavior: + +* Booking disabled when sold out +* Status shown when cancelled + +--- + +### 3.4 Community Page + +The community page must include: + +* WhatsApp invite links +* Instagram link +* Participation guidelines +* Volunteer information + +--- + +### 3.5 Contact Page + +The contact page must include: + +* Contact form +* Email address +* Social media links + +Behavior: + +* Form submissions stored in database +* Admin receives notification + +--- + +## 4. Booking System + +### 4.1 Booking Flow + +1. User clicks "Join" on event page +2. Booking form is displayed +3. User enters personal details +4. User selects payment method +5. Payment is processed or recorded +6. Ticket is generated +7. Confirmation is sent +8. User appears in admin system + +--- + +### 4.2 Booking Form + +The booking form collects: + +* Full name +* Email address +* Phone number +* Language preference (optional) +* Payment method + +Validation: + +* Email format check +* Required field validation +* Duplicate booking prevention + +--- + +### 4.3 Ticket Generation + +After successful booking: + +* Unique ticket ID is generated +* Ticket linked to user and event +* QR code created (optional) +* Ticket stored in database + +--- + +## 5. Payment Management + +### 5.1 Supported Payment Methods + +Initial support: + +* Stripe / MercadoPago +* Bank transfer +* Cash (manual entry) + +Future support: + +* Lightning +* Cashu +* Nostr payments + +--- + +### 5.2 Payment Workflow + +* Payment initiated during booking +* Payment status tracked +* Manual confirmation supported +* Refunds supported + +Statuses: + +* Pending +* Paid +* Refunded +* Failed + +--- + +## 6. Admin Dashboard + +### 6.1 Dashboard Overview + +The main dashboard displays: + +* Upcoming events +* Ticket sales +* Revenue summary +* Pending payments +* Alerts + +--- + +### 6.2 Event Management Module + +Features: + +* Create event +* Edit event +* Publish event +* Archive event +* Duplicate event + +Event fields: + +* Title +* Description +* Date +* Time +* Location +* Price +* Capacity +* Banner image +* Status + +--- + +### 6.3 Ticket Management Module + +Features: + +* View attendee list +* Search attendees +* Edit attendee info +* Manual ticket creation +* Cancel tickets +* Export CSV +* Check-in system + +Check-in: + +* Manual toggle +* QR scanning (optional) +* Timestamp logging + +--- + +### 6.4 Payment Management Module + +Features: + +* View transactions +* Manual payment entry +* Refund processing +* Revenue reports +* Export financial data + +--- + +### 6.5 Email & Messaging Module + +Features: + +* Email templates +* Mass mailing +* Automated reminders +* Event notifications +* Contact segmentation + +Automated emails: + +* Booking confirmation +* Event reminder +* Cancellation notice +* Post-event follow-up + +--- + +### 6.6 Community Management Module + +Features: + +* User profiles +* Attendance history +* Notes system +* Tagging +* Segmentation + +--- + +### 6.7 Media Management Module + +Features: + +* Upload images +* Organize galleries +* Assign images to events +* Homepage gallery management + +--- + +### 6.8 Role & Permission Management + +Features: + +* Create roles +* Assign permissions +* Assign users to roles +* Audit access + +--- + +## 7. Reporting & Analytics + +The system must provide: + +* Event attendance reports +* Revenue reports +* User growth reports +* Conversion metrics +* Email engagement statistics + +--- + +## 8. Error Handling + +The system must handle: + +* Failed payments +* Overbooking attempts +* Network failures +* Invalid input +* Unauthorized access + +Behavior: + +* Display user-friendly messages +* Log technical errors +* Notify admins when critical + +--- + +## 9. Notifications + +System notifications include: + +* New booking alerts +* Payment failures +* Low capacity warnings +* System errors + +Delivery channels: + +* Email +* Admin dashboard alerts + n + +--- + +## 10. Audit Logging + +The system must record: + +* Admin actions +* Payment changes +* Event modifications +* User updates + +Logs must include: + +* Timestamp +* User ID +* Action type +* Target record + +--- + +## 11. Accessibility + +The public website must: + +* Support mobile devices +* Provide readable fonts +* Support screen readers +* Maintain color contrast + +--- + +## 12. Summary + +This functional specification defines the operational behavior of the Spanglish platform. + +All implemented features must comply with this document to ensure consistency, reliability, and scalability. diff --git a/about/TECH_SPEC.md b/about/TECH_SPEC.md new file mode 100644 index 0000000..8686abc --- /dev/null +++ b/about/TECH_SPEC.md @@ -0,0 +1,339 @@ +# Spanglish Website – Technical Specification + +## 1. Purpose + +This document defines the technical architecture, technology stack, and implementation guidelines for the Spanglish website and admin system. + +It serves as the reference for developers responsible for building, deploying, and maintaining the platform. + +--- + +## 2. System Architecture + +### 2.1 High-Level Architecture + +The system follows a client-server architecture: + +Browser (Public/Admin) +→ Frontend Application +→ Backend API +→ Database +→ External Services + +External services include payment providers and email delivery systems. + +--- + +### 2.2 Component Overview + +* Frontend: Public website and admin interface +* Backend: REST API and business logic +* Database: Central data storage +* Payment Services: External processors +* Email Service: Transactional and bulk email +* Media Storage: Image and file storage + +--- + +## 3. Technology Stack + +### 3.1 Frontend + +* Framework: Next.js (React) +* Styling: Tailwind CSS +* State Management: React Context / Query +* Build Tool: Vite / Next Build +* Image Optimization: Next Image + +### 3.2 Backend + +* Framework: FastAPI (Python) +* API Style: REST +* Authentication: JWT +* ORM: SQLAlchemy +* Validation: Pydantic + +### 3.3 Database + +* System: PostgreSQL +* Migration Tool: Alembic +* Backup: Automated daily backups + +### 3.4 Infrastructure + +* Hosting: VPS (Linux) +* Reverse Proxy: Nginx +* SSL: Let’s Encrypt +* CDN: Optional (Cloudflare) +* Containerization: Docker + +### 3.5 External Services + +* Payments: Stripe / MercadoPago +* Email: Resend / Postmark / Mailgun +* Analytics: Plausible / GA + +--- + +## 4. Database Design + +### 4.1 Core Tables + +#### users + +* id (UUID) +* name +* email +* phone +* role +* created_at +* updated_at + +#### events + +* id (UUID) +* title +* description +* start_datetime +* end_datetime +* location +* price +* capacity +* status +* banner_url +* created_at + +#### tickets + +* id (UUID) +* user_id +* event_id +* status +* checkin_at +* created_at + +#### payments + +* id (UUID) +* ticket_id +* provider +* amount +* currency +* status +* reference +* created_at + +#### emails + +* id (UUID) +* user_id +* subject +* body +* status +* sent_at + +#### media + +* id (UUID) +* file_url +* type +* related_id +* created_at + +#### audit_logs + +* id (UUID) +* user_id +* action +* target +* timestamp + +--- + +## 5. API Design + +### 5.1 Authentication + +POST /api/auth/login +POST /api/auth/refresh +POST /api/auth/logout + +JWT tokens are used for session management. + +--- + +### 5.2 Event Endpoints + +GET /api/events +GET /api/events/{id} +POST /api/events +PUT /api/events/{id} +DELETE /api/events/{id} + +--- + +### 5.3 Ticket Endpoints + +POST /api/tickets +GET /api/tickets/{id} +GET /api/events/{id}/tickets +PUT /api/tickets/{id} + +--- + +### 5.4 Payment Endpoints + +POST /api/payments/initiate +POST /api/payments/webhook +GET /api/payments/{id} +POST /api/payments/refund + +--- + +### 5.5 User & Community Endpoints + +GET /api/users +GET /api/users/{id} +PUT /api/users/{id} +GET /api/users/{id}/history + +--- + +### 5.6 Media Endpoints + +POST /api/media/upload +GET /api/media/{id} +DELETE /api/media/{id} + +--- + +## 6. Authentication & Authorization + +* JWT-based authentication +* Refresh tokens +* Role-based access control +* Password hashing (bcrypt/argon2) +* Optional OAuth/Nostr integration + +--- + +## 7. Security + +### 7.1 Application Security + +* Input validation +* CSRF protection +* CORS policies +* Rate limiting +* SQL injection prevention + +### 7.2 Infrastructure Security + +* Firewall rules +* Fail2ban +* Encrypted backups +* Secure secrets storage + +--- + +## 8. Deployment + +### 8.1 Environment Structure + +* Development +* Staging +* Production + +Each environment uses separate databases and credentials. + +--- + +### 8.2 Deployment Process + +1. Build frontend +2. Build backend container +3. Run database migrations +4. Deploy containers +5. Reload Nginx +6. Verify health checks + +--- + +### 8.3 CI/CD (Optional) + +* GitHub Actions +* Automated testing +* Automated deployment + +--- + +## 9. Monitoring & Logging + +* Application logs +* Error tracking +* Performance monitoring +* Uptime monitoring + +Recommended tools: + +* Sentry +* Prometheus +* Grafana +* Uptime Kuma + +--- + +## 10. Backup & Recovery + +* Daily database backups +* Weekly full backups +* Offsite storage +* Restore testing + +--- + +## 11. Performance Optimization + +* Database indexing +* Query optimization +* CDN caching +* Image compression +* Lazy loading + +--- + +## 12. Development Guidelines + +* Follow PEP8 (Backend) +* Use type hints +* Write unit tests +* Document endpoints +* Use environment variables + +--- + +## 13. Versioning & Updates + +* Semantic versioning +* Backward-compatible APIs +* Migration scripts +* Change logs + +--- + +## 14. Future Extensions + +* Mobile application +* Membership system +* Lightning integration +* Cashu payments +* Nostr identity +* Multi-city deployment + +--- + +## 15. Summary + +This technical specification defines the architecture and implementation standards for the Spanglish platform. + +All development must follow this document to ensure security, maintainability, and scalability. diff --git a/about/booking_fow.md b/about/booking_fow.md new file mode 100644 index 0000000..e06d0bd --- /dev/null +++ b/about/booking_fow.md @@ -0,0 +1,368 @@ +# Spanglish Website – Booking & Payment Flow + +## 1. Purpose + +This document defines the complete booking and payment flow for Spanglish events. + +It ensures a fast, reliable, and user-friendly process for participants and a clear management workflow for organizers. + +The system supports the following payment methods: + +* TPago / Bancard (Credit & Debit Cards) +* Bitcoin Lightning (BTCPay) +* Cash at Event + +--- + +## 2. Core Objectives + +The booking system must: + +* Allow users to reserve a seat in under 60 seconds +* Minimize drop-off during payment +* Provide clear confirmation +* Support mobile-first usage +* Reduce manual coordination +* Integrate cleanly with the admin dashboard + +--- + +## 3. High-Level Booking Flow + +1. User visits an event page +2. User clicks "Join Event" +3. Booking page opens +4. User enters personal details +5. User selects payment method +6. Payment or reservation is processed +7. Ticket is generated +8. Confirmation is sent +9. User appears in admin dashboard + +--- + +## 4. Booking Page Structure + +The booking page is available at: + +/book/{event-id} + +It consists of a single vertical flow optimized for mobile devices. + +### 4.1 Event Summary Section + +Displayed at the top and always visible: + +* Event title +* Date and time +* Location +* Remaining seats +* Price + +This section helps users verify they selected the correct event. + +--- + +### 4.2 User Information Section + +The booking form collects: + +* Full name (required) +* Email address (required) +* Phone / WhatsApp number (required) +* Preferred language (optional) + +Validation rules: + +* All required fields must be filled +* Email format validation +* Phone number format validation +* Duplicate booking prevention + +--- + +### 4.3 Payment Selection Section + +Users choose one of the following payment methods using selectable cards. + +Each option is presented as a large, tap-friendly card with icon and description. + +Available options: + +1. TPago / Bancard +2. Bitcoin Lightning +3. Cash at Event + +Only one option may be selected. + +--- + +## 5. Payment Methods + +### 5.1 TPago / Bancard (Credit & Debit Card) + +#### User Flow + +1. User selects "TPago / Bancard" +2. User clicks "Pay with Card" +3. User is redirected to Bancard checkout +4. User completes payment +5. User is redirected back to Spanglish +6. Payment is verified via webhook +7. Ticket is confirmed + +#### System Behavior + +* Payment intent is created before redirect +* Payment reference is stored +* Webhook validation is mandatory +* Only verified payments mark tickets as paid + +Status: Paid + +--- + +### 5.2 Bitcoin Lightning (BTCPay) + +#### User Flow + +1. User selects "Bitcoin Lightning" +2. Invoice is generated +3. QR code and invoice string are displayed +4. User pays with Lightning wallet +5. Payment is detected via webhook +6. Ticket is confirmed automatically + +#### Display Requirements + +* QR code +* Amount in sats +* Expiry countdown +* Copy invoice button + +#### System Behavior + +* Invoice created via BTCPay API +* Webhook confirmation required +* Automatic ticket confirmation + +Status: Paid + +--- + +### 5.3 Cash at Event + +#### User Flow + +1. User selects "Cash at Event" +2. User confirms reservation +3. Booking is created +4. Ticket is generated +5. User receives confirmation +6. User pays in cash at the event entrance + +#### System Behavior + +* Booking is stored as unpaid +* Seat is reserved immediately +* No automatic expiration is applied +* Admin marks payment as received manually + +Status: Pending (until marked Paid by staff) + +--- + +## 6. Ticket Generation + +After successful booking: + +* A unique ticket ID is generated +* Ticket is linked to user and event +* Ticket status is assigned +* QR code may be generated +* Ticket is stored permanently + +Ticket statuses: + +* Pending +* Paid +* Cancelled +* Refunded + +--- + +## 7. Confirmation & Notifications + +### 7.1 Booking Confirmation + +Sent immediately after booking. + +Channels: + +* Email +* Optional WhatsApp integration + +Content includes: + +* Event details +* Payment method +* Ticket ID +* Check-in instructions + n + +--- + +### 7.2 Payment Confirmation + +Sent when payment is completed (Card / Lightning). + +Includes: + +* Payment receipt +* Ticket confirmation +* Calendar link + +--- + +### 7.3 Event Reminder + +Sent automatically before the event. + +Includes: + +* Date and time +* Location map +* Payment reminder for cash users + +--- + +## 8. Admin Management Flow + +### 8.1 Admin View + +Admins can view all bookings with: + +* Name +* Event +* Payment method +* Status +* Contact info +* Check-in status + +Color coding: + +* Green: Paid +* Yellow: Pending +* Red: Cancelled + +--- + +### 8.2 Manual Payment Processing + +For cash payments: + +* Admin locates ticket +* Marks as Paid +* Timestamp is recorded +* Receipt may be attached + +--- + +### 8.3 Refund Handling + +Admins may: + +* Mark tickets as Refunded +* Trigger payment provider refunds +* Send notification to user + +--- + +## 9. Capacity Management + +* Each event has a fixed capacity +* Seats are reserved immediately on booking +* Overbooking is prevented +* Sold-out events disable booking + +--- + +## 10. Anti-Abuse Measures + +The system must implement: + +* Duplicate booking detection +* Rate limiting on bookings +* Email verification (optional) +* Admin override tools + +--- + +## 11. Error Handling + +The system must handle: + +* Failed payments +* Interrupted redirects +* Invoice expiration +* Network issues +* Invalid input + +Behavior: + +* Clear user-facing messages +* Automatic retry options +* Error logging + +--- + +## 12. Audit Logging + +All booking-related actions must be logged: + +* Ticket creation +* Payment updates +* Manual status changes +* Refunds +* Cancellations + +Each log entry includes: + +* User ID +* Admin ID (if applicable) +* Timestamp +* Action type + n + +--- + +## 13. Security Requirements + +* Secure payment redirects +* Webhook signature verification +* Encrypted data storage +* PCI compliance via provider +* No sensitive card data stored + +--- + +## 14. Future Extensions + +The booking system is designed to support: + +* Subscriptions +* Membership passes +* Promo codes +* Group bookings +* Lightning Address payments +* Cashu payments + +--- + +## 15. Summary + +This booking and payment flow is designed to be fast, reliable, and scalable. + +It supports local payment methods, Bitcoin Lightning, and cash while maintaining professional standards. + +All implementations must follow this document to ensure consistency and trust. diff --git a/about/brand.md b/about/brand.md new file mode 100644 index 0000000..8897a49 --- /dev/null +++ b/about/brand.md @@ -0,0 +1,441 @@ +# Spanglish Website – Brand & Design Guide + +## 1. Purpose + +This document defines the visual identity, branding rules, and design direction for the Spanglish website. + +It ensures consistent appearance across the public website, admin dashboard, emails, and marketing materials. + +All designers and developers must follow this guide. + +--- + +## 2. Brand Identity + +### 2.1 Brand Personality + +Spanglish is: + +* Friendly +* International +* Social +* Modern +* Trustworthy +* Community-driven +* Inclusive + +The visual identity must reflect openness, warmth, and professionalism. + +--- + +### 2.2 Brand Values + +* Accessibility +* Simplicity +* Human connection +* Cultural exchange +* Reliability +* Growth + +These values guide all design decisions. + +--- + +## 3. Visual Direction + +### 3.1 Overall Look + +The website must feel: + +* Clean +* Modern +* Light +* Welcoming +* Organized + +The design is inspired by: + +* Café culture +* International meetups +* Modern SaaS landing pages +* Community platforms + +The hero section uses strong contrast, large typography, and real photography. + +--- + +### 3.2 Layout Philosophy + +* Mobile-first +* One-column dominant layout +* Large sections with breathing room +* Consistent spacing +* Clear visual hierarchy + +Avoid clutter and unnecessary elements. + +--- + +## 4. Color System + +### 4.1 Primary Colors + +Primary Yellow (Brand Anchor) + +* Hex: #FFD84D +* Usage: CTAs, highlights, logo accents + +Primary Dark (Text & Contrast) + +* Hex: #111111 +* Usage: Headings, main text, navigation + +Primary White (Background) + +* Hex: #FFFFFF +* Usage: Main backgrounds + +--- + +### 4.2 Secondary Colors + +Soft Gray (Background Sections) + +* Hex: #F5F5F5 + +Light Gray (Borders) + +* Hex: #E5E5E5 + +Accent Blue (Links) + +* Hex: #2F80ED + +Warm Brown (Coffee Accent) + +* Hex: #6B4A2B + +--- + +### 4.3 Color Usage Rules + +* Yellow is used sparingly +* White is dominant +* Dark is used for contrast +* Avoid heavy gradients +* Avoid neon colors +* Avoid dark backgrounds on public pages + +Admin dashboard may use darker neutral tones. + +--- + +## 5. Typography + +### 5.1 Primary Font + +Recommended: + +* Inter +* Poppins +* Montserrat + +Usage: + +* Headings: Semi-bold / Bold +* Body: Regular + +--- + +### 5.2 Body Font + +Recommended: + +* Inter +* Roboto +* System UI + +Line height: 1.5 – 1.7 + +Avoid decorative fonts. + +--- + +### 5.3 Font Hierarchy + +Example: + +H1: 48–56px +H2: 36–40px +H3: 24–28px +Body: 16–18px +Small: 14px + +Responsive scaling required. + +--- + +## 6. Logo Usage + +### 6.1 Logo Style + +* Simple +* Flat +* Works in monochrome +* Works on light backgrounds + +--- + +### 6.2 Logo Placement + +* Top-left in navigation +* Footer +* Emails +* Tickets +* Posters + +Minimum clear space: Logo height x 0.5 + +--- + +## 7. Photography Style + +### 7.1 Photo Characteristics + +Use: + +* Real participants +* Natural lighting +* Smiling faces +* Conversation scenes +* Coffee and table shots +* Multicultural groups + +Avoid: + +* Stock photos +* Posed portraits +* Empty rooms +* Artificial lighting + +--- + +### 7.2 Image Treatment + +* Slight warm tone +* Balanced contrast +* No heavy filters +* Consistent cropping + +--- + +## 8. Iconography + +### 8.1 Style + +* Flat +* Rounded +* Line-based +* Minimal detail + +Recommended sets: + +* Heroicons +* Lucide +* Feather + +--- + +### 8.2 Usage + +Icons support content. +They must not replace text. + +--- + +## 9. UI Components + +### 9.1 Buttons + +Primary Button: + +* Background: #FFD84D +* Text: #111111 +* Border-radius: 10–14px +* Padding: 12px 24px + +Secondary Button: + +* Border: 1px solid #111111 +* Background: Transparent + +Hover: + +* Slight darkening +* Soft shadow + +--- + +### 9.2 Cards + +* White background +* Rounded corners (16–20px) +* Soft shadow +* Internal padding + +Used for: + +* Events +* Testimonials +* Stats + +--- + +### 9.3 Forms + +* Large input fields +* Clear labels +* Rounded corners +* Inline validation + +--- + +## 10. Hero Section Design + +### 10.1 Structure + +Left Side: + +* Main headline +* Subheading +* CTA button +* Event info + +Right Side: + +* Photo collage +* Group images +* Rounded corners + +--- + +### 10.2 Hero Content Style + +Headline: + +* Bold +* Clear +* Positive + +Example: +"Practice English & Spanish in Asunción" + +Subheadline: +"Meet people. Learn languages. Have fun." + +CTA: +"Join Next Event" + +--- + +### 10.3 Background + +* White or very light gray +* Yellow accents +* Subtle shapes + +Avoid full-color backgrounds. + +--- + +## 11. Navigation Design + +* Sticky top navigation +* White background +* Subtle shadow +* Clear links + +Menu items: + +* Home +* Events +* Community +* Contact +* Join + +CTA highlighted in yellow. + +--- + +## 12. Footer Design + +* Light gray background +* Minimal links +* Social icons +* Copyright info + +--- + +## 13. Admin Dashboard Style + +### 13.1 Visual Tone + +* Neutral +* Productivity-focused +* Low distraction + +### 13.2 Colors + +* White / Gray backgrounds +* Blue accents +* Minimal yellow + +--- + +## 14. Email Design + +* White background +* Logo header +* Clear typography +* Single CTA +* Mobile-friendly + +--- + +## 15. Accessibility + +* Minimum contrast ratio 4.5:1 +* Large tap targets +* Keyboard navigation +* Alt text for images + +--- + +## 16. Consistency Rules + +* Reuse components +* Follow spacing system +* Use defined colors only +* No custom fonts without approval +* No random color usage + +--- + +## 17. Future Branding Extensions + +* City-specific color accents +* Event themes +* Seasonal variations +* Partner branding + +All extensions must respect core identity. + +--- + +## 18. Summary + +This brand and design guide defines how Spanglish should look and feel. + +It ensures a consistent, modern, and welcoming experience across all touchpoints. + +All visual implementations must comply with this document. diff --git a/about/email_spec.md b/about/email_spec.md new file mode 100644 index 0000000..7bc8426 --- /dev/null +++ b/about/email_spec.md @@ -0,0 +1,299 @@ +# Spanglish Website – Email System Specification + +## 1. Purpose + +This document defines all email communications sent by the Spanglish platform. + +The goal is to provide clear, reliable communication without unnecessary automation or spam. + +All emails must support event management, trust, and community growth. + +--- + +## 2. Core Principles + +* Bookings are only confirmed after payment +* No automatic reminders based on cron jobs +* No automatic cash reminders +* Follow-up emails are sent manually +* Event-specific communication must be possible +* Emails must be intentional and relevant + +--- + +## 3. Booking Confirmation Policy + +### 3.1 Payment Requirement + +A booking is considered "Confirmed" only when: + +* Card payment is verified, or +* Lightning payment is verified, or +* Cash payment is marked as received by staff + +Unpaid cash reservations are not considered confirmed. + +--- + +### 3.2 Confirmation Email + +Sent only after payment is confirmed. + +Trigger: + +* Payment webhook (Card / Lightning) +* Manual admin confirmation (Cash) + +Purpose: + +* Official confirmation +* Proof of participation + +--- + +## 4. Supported Email Types + +### 4.1 Booking Confirmation (Automatic) + +Sent when payment is confirmed. + +Trigger: + +* Payment verification +* Manual confirmation + +Subject Example: +Your Spanglish ticket is confirmed 🎉 + +Content includes: + +* Event name +* Date and time +* Location and map +* Payment method +* Ticket ID +* Contact info + +--- + +### 4.2 Payment Receipt (Automatic) + +Sent for Card and Lightning payments. + +Trigger: + +* Payment provider webhook + +Purpose: + +* Financial confirmation +* Transparency + +Content includes: + +* Amount +* Method +* Reference ID + +--- + +### 4.3 Event Update / Custom Message (Manual) + +Sent manually by admin per event. + +Trigger: + +* Admin action + +Purpose: + +* Inform attendees about changes +* Share important information +* Handle exceptional situations + +Examples: + +* Location change +* Time change +* Special instructions +* Delays +* Guest speakers + +Admin must be able to: + +* Write custom subject +* Write custom body +* Select target event +* Preview before sending + +--- + +### 4.4 Post-Event Follow-Up (Manual) + +Sent manually after the event. + +Trigger: + +* Admin action + +Purpose: + +* Thank attendees +* Share photos +* Promote next event +* Build loyalty + +This email is never automated. + +--- + +## 5. Disabled / Unsupported Emails + +The system must NOT send: + +* Automatic cash payment reminders +* Automated event reminders +* Cron-based scheduled emails +* Repeated promotional spam + +All non-critical communication is manual. + +--- + +## 6. Admin Email Interface + +### 6.1 Email Center + +The admin dashboard must include an Email Center with: + +* List of past emails +* Draft editor +* Template library +* Recipient selector +* Preview mode +* Send confirmation + +--- + +### 6.2 Recipient Selection + +Admins must be able to target: + +* All attendees of an event +* Only confirmed attendees +* Only unpaid attendees +* Custom subsets + +Selection must be explicit before sending. + +--- + +## 7. Templates + +### 7.1 Default Templates + +System-provided templates: + +* Booking confirmation +* Payment receipt +* Event update +* Follow-up + +Templates are editable. + +--- + +### 7.2 Custom Templates + +Admins may create custom templates per event. + +Templates support: + +* Variables (name, event, date) +* Preview rendering +* Versioning + +--- + +## 8. Sending Logic + +### 8.1 Manual Sending + +Most emails are sent manually from the admin panel. + +The system must require: + +* Explicit confirmation +* Recipient preview +* Final approval + +--- + +### 8.2 Automatic Sending + +Only the following emails may be automatic: + +* Booking confirmation (after payment) +* Payment receipt + +No other automatic emails are allowed. + +--- + +## 9. Logging & Auditing + +All email activity must be logged: + +* Sender (admin) +* Recipients +* Subject +* Timestamp +* Event reference +* Delivery status + +Logs are visible to admins. + +--- + +## 10. Deliverability Requirements + +* Use verified sender domain +* DKIM and SPF enabled +* Bounce handling +* Unsubscribe support + +--- + +## 11. Design Rules + +All emails must follow brand guidelines: + +* White background +* Logo header +* Clean typography +* Mobile-friendly layout +* One main CTA +* No clutter + +--- + +## 12. Future Extensions + +Possible future additions: + +* WhatsApp integration +* SMS notifications +* Smart segmentation +* Automated campaigns (opt-in only) + +All future automation requires explicit approval. + +--- + +## 13. Summary + +The Spanglish email system prioritizes clarity, trust, and human control. + +Only critical confirmations are automated. + +All community and relationship communication remains manual and intentional. diff --git a/about/lnbits_api.json b/about/lnbits_api.json new file mode 100644 index 0000000..73d2bc2 --- /dev/null +++ b/about/lnbits_api.json @@ -0,0 +1,59199 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "LNbits API", + "description": "API for LNbits, the free and open source bitcoin wallet and accounts system with plugins.", + "license": { + "name": "MIT License", + "url": "https://raw.githubusercontent.com/lnbits/lnbits/main/LICENSE" + }, + "version": "1.4.1rc2" + }, + "paths": { + "/watchonly/": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Index", + "operationId": "index_watchonly__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/watchonly/api/v1/wallet": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Api Wallets Retrieve", + "operationId": "api_wallets_retrieve_watchonly_api_v1_wallet_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Network", + "default": "Mainnet" + }, + "name": "network", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/WalletAccount" + }, + "type": "array", + "title": "Response Api Wallets Retrieve Watchonly Api V1 Wallet Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "watchonly" + ], + "summary": "Api Wallet Create Or Update", + "operationId": "api_wallet_create_or_update_watchonly_api_v1_wallet_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__CreateWallet" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletAccount" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/wallet/{wallet_id}": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Api Wallet Retrieve", + "operationId": "api_wallet_retrieve_watchonly_api_v1_wallet__wallet_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletAccount" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "watchonly" + ], + "summary": "Api Wallet Delete", + "operationId": "api_wallet_delete_watchonly_api_v1_wallet__wallet_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/address/{wallet_id}": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Api Fresh Address", + "operationId": "api_fresh_address_watchonly_api_v1_address__wallet_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__Address" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/address/{address_id}": { + "put": { + "tags": [ + "watchonly" + ], + "summary": "Api Update Address", + "operationId": "api_update_address_watchonly_api_v1_address__address_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/addresses/{wallet_id}": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Api Get Addresses", + "operationId": "api_get_addresses_watchonly_api_v1_addresses__wallet_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__Address" + }, + "type": "array", + "title": "Response Api Get Addresses Watchonly Api V1 Addresses Wallet Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/psbt": { + "post": { + "tags": [ + "watchonly" + ], + "summary": "Api Psbt Create", + "operationId": "api_psbt_create_watchonly_api_v1_psbt_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePsbt" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/psbt/utxos": { + "put": { + "tags": [ + "watchonly" + ], + "summary": "Api Psbt Utxos Tx", + "description": "Extract previous unspent transaction outputs (tx_id, vout) from PSBT", + "operationId": "api_psbt_utxos_tx_watchonly_api_v1_psbt_utxos_put", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/psbt/extract": { + "put": { + "tags": [ + "watchonly" + ], + "summary": "Api Psbt Extract Tx", + "operationId": "api_psbt_extract_tx_watchonly_api_v1_psbt_extract_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtractPsbt" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignedTransaction" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/tx/extract": { + "put": { + "tags": [ + "watchonly" + ], + "summary": "Api Extract Tx", + "operationId": "api_extract_tx_watchonly_api_v1_tx_extract_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtractTx" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/tx": { + "post": { + "tags": [ + "watchonly" + ], + "summary": "Api Tx Broadcast", + "operationId": "api_tx_broadcast_watchonly_api_v1_tx_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SerializedTransaction" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/watchonly/api/v1/config": { + "get": { + "tags": [ + "watchonly" + ], + "summary": "Api Get Config", + "operationId": "api_get_config_watchonly_api_v1_config_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__Config" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "watchonly" + ], + "summary": "Api Update Config", + "operationId": "api_update_config_watchonly_api_v1_config_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__Config" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__watchonly__models__Config" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/where39/": { + "get": { + "tags": [ + "where39" + ], + "summary": "Index", + "operationId": "index_where39__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/where39/shared": { + "get": { + "tags": [ + "where39" + ], + "summary": "Where39", + "operationId": "where39_where39_shared_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/where39/manifest/shared.webmanifest": { + "get": { + "tags": [ + "where39" + ], + "summary": "Manifest", + "operationId": "manifest_where39_manifest_shared_webmanifest_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/jukebox/": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Index", + "operationId": "index_jukebox__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/jukebox/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Connect To Jukebox", + "operationId": "connect_to_jukebox_jukebox__juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukeboxs", + "operationId": "api_get_jukeboxs_jukebox_api_v1_jukebox_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Jukebox" + }, + "type": "array", + "title": "Response Api Get Jukeboxs Jukebox Api V1 Jukebox Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "jukebox" + ], + "summary": "Api Create Jukebox", + "operationId": "api_create_jukebox_jukebox_api_v1_jukebox_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJukeLinkData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jukebox" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/jukebox/api/v1/jukebox/spotify/cb/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Check Credentials Callbac", + "operationId": "api_check_credentials_callbac_jukebox_api_v1_jukebox_spotify_cb__juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Code" + }, + "name": "code", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Access Token" + }, + "name": "access_token", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Refresh Token" + }, + "name": "refresh_token", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Check Credentials Check", + "operationId": "api_check_credentials_check_jukebox_api_v1_jukebox__juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "jukebox" + ], + "summary": "Api Update Jukebox", + "operationId": "api_update_jukebox_jukebox_api_v1_jukebox__juke_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJukeLinkData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jukebox" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "jukebox" + ], + "summary": "Api Delete Item", + "operationId": "api_delete_item_jukebox_api_v1_jukebox__juke_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/jukebox/api/v1/jukebox/jb/playlist/{juke_id}/{sp_playlist}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Song", + "operationId": "api_get_jukebox_song_jukebox_api_v1_jukebox_jb_playlist__juke_id___sp_playlist__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Sp Playlist" + }, + "name": "sp_playlist", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Retry", + "default": false + }, + "name": "retry", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/jb/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Device Check", + "operationId": "api_get_jukebox_device_check_jukebox_api_v1_jukebox_jb__juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Retry", + "default": false + }, + "name": "retry", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/jb/invoice/{juke_id}/{song_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Invoice", + "operationId": "api_get_jukebox_invoice_jukebox_api_v1_jukebox_jb_invoice__juke_id___song_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Song Id" + }, + "name": "song_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/jb/checkinvoice/{pay_hash}/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Invoice Check", + "operationId": "api_get_jukebox_invoice_check_jukebox_api_v1_jukebox_jb_checkinvoice__pay_hash___juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pay Hash" + }, + "name": "pay_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/jb/invoicep/{song_id}/{juke_id}/{pay_hash}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Invoice Paid", + "operationId": "api_get_jukebox_invoice_paid_jukebox_api_v1_jukebox_jb_invoicep__song_id___juke_id___pay_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Song Id" + }, + "name": "song_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pay Hash" + }, + "name": "pay_hash", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Retry", + "default": false + }, + "name": "retry", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/jukebox/api/v1/jukebox/jb/queue/{juke_id}": { + "get": { + "tags": [ + "jukebox" + ], + "summary": "Api Get Jukebox Queue", + "operationId": "api_get_jukebox_queue_jukebox_api_v1_jukebox_jb_queue__juke_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Juke Id" + }, + "name": "juke_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/": { + "get": { + "tags": [ + "Events" + ], + "summary": "Index", + "operationId": "index_events__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/events/{event_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Display", + "operationId": "display_events__event_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/ticket/{ticket_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Ticket", + "operationId": "ticket_events_ticket__ticket_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Ticket Id" + }, + "name": "ticket_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/register/{event_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Register", + "operationId": "register_events_register__event_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/events": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Events", + "operationId": "api_events_events_api_v1_events_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "Events" + ], + "summary": "Api Event Create", + "operationId": "api_event_create_events_api_v1_events_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvent" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/events/api/v1/events/{event_id}": { + "put": { + "tags": [ + "Events" + ], + "summary": "Api Event Create", + "operationId": "api_event_create_events_api_v1_events__event_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvent" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Events" + ], + "summary": "Api Form Delete", + "operationId": "api_form_delete_events_api_v1_events__event_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/events/api/v1/tickets": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Tickets", + "operationId": "api_tickets_events_api_v1_tickets_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__events__models__Ticket" + }, + "type": "array", + "title": "Response Api Tickets Events Api V1 Tickets Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/events/api/v1/tickets/{event_id}": { + "post": { + "tags": [ + "Events" + ], + "summary": "Api Ticket Create", + "operationId": "api_ticket_create_events_api_v1_tickets__event_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTicket" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/tickets/{event_id}/{name}/{email}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Ticket Make Ticket", + "operationId": "api_ticket_make_ticket_events_api_v1_tickets__event_id___name___email__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Name" + }, + "name": "name", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Email" + }, + "name": "email", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/tickets/{event_id}/{payment_hash}": { + "post": { + "tags": [ + "Events" + ], + "summary": "Api Ticket Send Ticket", + "operationId": "api_ticket_send_ticket_events_api_v1_tickets__event_id___payment_hash__post", + "parameters": [ + { + "required": true, + "schema": { + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/tickets/{ticket_id}": { + "delete": { + "tags": [ + "Events" + ], + "summary": "Api Ticket Delete", + "operationId": "api_ticket_delete_events_api_v1_tickets__ticket_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ticket Id" + }, + "name": "ticket_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/events/api/v1/purge/{event_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Event Purge Tickets", + "operationId": "api_event_purge_tickets_events_api_v1_purge__event_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/eventtickets/{event_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Event Tickets", + "operationId": "api_event_tickets_events_api_v1_eventtickets__event_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__events__models__Ticket" + }, + "type": "array", + "title": "Response Api Event Tickets Events Api V1 Eventtickets Event Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/events/api/v1/register/ticket/{ticket_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Api Event Register Ticket", + "operationId": "api_event_register_ticket_events_api_v1_register_ticket__ticket_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Ticket Id" + }, + "name": "ticket_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__events__models__Ticket" + }, + "type": "array", + "title": "Response Api Event Register Ticket Events Api V1 Register Ticket Ticket Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/splitpayments/": { + "get": { + "tags": [ + "splitpayments" + ], + "summary": "Index", + "operationId": "index_splitpayments__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/splitpayments/api/v1/targets": { + "get": { + "tags": [ + "splitpayments" + ], + "summary": "Api Targets Get", + "operationId": "api_targets_get_splitpayments_api_v1_targets_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Target" + }, + "type": "array", + "title": "Response Api Targets Get Splitpayments Api V1 Targets Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "splitpayments" + ], + "summary": "Api Targets Set", + "operationId": "api_targets_set_splitpayments_api_v1_targets_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TargetPutList" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "splitpayments" + ], + "summary": "Api Targets Delete", + "operationId": "api_targets_delete_splitpayments_api_v1_targets_delete", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/": { + "get": { + "tags": [ + "boltz" + ], + "summary": "Index", + "operationId": "index_boltz__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/boltz/api/v1/swap": { + "get": { + "tags": [ + "boltz" + ], + "summary": "get a list of swaps a swap", + "description": "This endpoint gets a list of normal swaps.", + "operationId": "boltz_get__swap_boltz_api_v1_swap_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of normal swaps", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SubmarineSwap" + }, + "type": "array", + "title": "Response Boltz Get Swap Boltz Api V1 Swap Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "boltz" + ], + "summary": "create a submarine swap", + "description": "This endpoint creates a submarine swap", + "operationId": "boltz_post__swap_boltz_api_v1_swap_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubmarineSwap" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "create swap", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmarineSwap" + } + } + } + }, + "405": { + "description": "auto reverse swap is active, a swap would immediatly be swapped out again." + }, + "500": { + "description": "boltz error" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/refund": { + "post": { + "tags": [ + "boltz" + ], + "summary": "refund of a swap", + "description": "This endpoint attempts to refund a normal swaps,\n creates an onchain tx and sets swap status to refunded.", + "operationId": "boltz_swap_refund_boltz_api_v1_swap_refund_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Swap Id" + }, + "name": "swap_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "refunded swap with status set to refunded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmarineSwap" + } + } + } + }, + "400": { + "description": "when swap_id is missing" + }, + "404": { + "description": "when swap is not found" + }, + "405": { + "description": "when swap is not pending" + }, + "500": { + "description": "when something goes wrong creating the refund onchain tx" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/reverse": { + "get": { + "tags": [ + "boltz" + ], + "summary": "get a list of reverse swaps", + "description": "This endpoint gets a list of reverse swaps.", + "operationId": "boltz_get__swap_reverse_boltz_api_v1_swap_reverse_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of reverse swaps", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ReverseSubmarineSwap" + }, + "type": "array", + "title": "Response Boltz Get Swap Reverse Boltz Api V1 Swap Reverse Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "boltz" + ], + "summary": "create a reverse submarine swap", + "description": "This endpoint creates a reverse submarine swap", + "operationId": "boltz_post__swap_reverse_boltz_api_v1_swap_reverse_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReverseSubmarineSwap" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "create reverse swap", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReverseSubmarineSwap" + } + } + } + }, + "405": { + "description": "not allowed method, insufficient balance" + }, + "500": { + "description": "boltz error" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/reverse/auto": { + "get": { + "tags": [ + "boltz" + ], + "summary": "get a list of auto reverse swaps", + "description": "This endpoint gets a list of auto reverse swaps.", + "operationId": "boltz_get__swap_reverse_auto_boltz_api_v1_swap_reverse_auto_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of auto reverse swaps", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AutoReverseSubmarineSwap" + }, + "type": "array", + "title": "Response Boltz Get Swap Reverse Auto Boltz Api V1 Swap Reverse Auto Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "boltz" + ], + "summary": "create a auto reverse submarine swap", + "description": "This endpoint creates a auto reverse submarine swap", + "operationId": "boltz_post__swap_reverse_auto_boltz_api_v1_swap_reverse_auto_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAutoReverseSubmarineSwap" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "create auto reverse swap", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoReverseSubmarineSwap" + } + } + } + }, + "405": { + "description": "auto reverse swap is active, only 1 swap per wallet possible." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/reverse/auto/{swap_id}": { + "delete": { + "tags": [ + "boltz" + ], + "summary": "delete a auto reverse submarine swap", + "description": "This endpoint deletes a auto reverse submarine swap", + "operationId": "boltz_delete__swap_reverse_auto_boltz_api_v1_swap_reverse_auto__swap_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Swap Id" + }, + "name": "swap_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "delete auto reverse swap", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/status": { + "post": { + "tags": [ + "boltz" + ], + "summary": "shows the status of a swap", + "description": "This endpoint attempts to get the status of the swap.", + "operationId": "boltz_swap_status_boltz_api_v1_swap_status_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Swap Id" + }, + "name": "swap_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "status of swap json", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "404": { + "description": "when swap_id is not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltz/api/v1/swap/boltz": { + "get": { + "tags": [ + "boltz" + ], + "summary": "get a boltz configuration", + "description": "This endpoint gets configuration for boltz. (limits, fees...)", + "operationId": "boltz_get__swap_boltz_boltz_api_v1_swap_boltz_get", + "responses": { + "200": { + "description": "dict of boltz config", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Boltz Get Swap Boltz Boltz Api V1 Swap Boltz Get" + } + } + } + } + } + } + }, + "/boltz/api/v1/settings": { + "get": { + "tags": [ + "boltz" + ], + "summary": "Api Get Or Create Settings", + "operationId": "api_get_or_create_settings_boltz_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoltzSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "boltz" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_boltz_api_v1_settings_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoltzSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoltzSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "boltz" + ], + "summary": "Api Delete Settings", + "operationId": "api_delete_settings_boltz_api_v1_settings_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satsdice/": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Index", + "operationId": "index_satsdice__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satsdice/{link_id}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Display", + "operationId": "display_satsdice__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satsdice/win/{link_id}/{payment_hash}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Satsdice.Displaywin", + "operationId": "satsdice_displaywin_satsdice_win__link_id___payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satsdice/api/v1/links": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Api Links", + "operationId": "api_links_satsdice_api_v1_links_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SatsdiceLink" + }, + "type": "array", + "title": "Response Api Links Satsdice Api V1 Links Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "satsdice" + ], + "summary": "Api Create Satsdice Link", + "operationId": "api_create_satsdice_link_satsdice_api_v1_links_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSatsDiceLink" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatsdiceLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satsdice/api/v1/links/{link_id}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Api Link Retrieve", + "operationId": "api_link_retrieve_satsdice_api_v1_links__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatsdiceLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "satsdice" + ], + "summary": "Api Update Satsdice Link", + "operationId": "api_update_satsdice_link_satsdice_api_v1_links__link_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSatsDiceLink" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatsdiceLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "satsdice" + ], + "summary": "Api Link Delete", + "operationId": "api_link_delete_satsdice_api_v1_links__link_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satsdice/api/v1/withdraws/{the_hash}/{lnurl_id}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Api Withdraw Hash Retrieve", + "operationId": "api_withdraw_hash_retrieve_satsdice_api_v1_withdraws__the_hash___lnurl_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "The Hash" + }, + "name": "the_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Lnurl Id" + }, + "name": "lnurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satsdice/api/v1/lnurlp/{link_id}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Satsdice.Lnurlp Response", + "operationId": "satsdice_lnurlp_response_satsdice_api_v1_lnurlp__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Satsdice Lnurlp Response Satsdice Api V1 Lnurlp Link Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satsdice/api/v1/lnurlp/cb/{link_id}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Satsdice.Api Lnurlp Callback", + "operationId": "satsdice_api_lnurlp_callback_satsdice_api_v1_lnurlp_cb__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + } + ], + "title": "Response Satsdice Api Lnurlp Callback Satsdice Api V1 Lnurlp Cb Link Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satsdice/api/v1/lnurlw/{unique_hash}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Satsdice.Lnurlw Response", + "operationId": "satsdice_lnurlw_response_satsdice_api_v1_lnurlw__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Satsdice Lnurlw Response Satsdice Api V1 Lnurlw Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satsdice/api/v1/lnurlw/cb/{unique_hash}": { + "get": { + "tags": [ + "satsdice" + ], + "summary": "Satsdice.Api Lnurlw Callback", + "operationId": "satsdice_api_lnurlw_callback_satsdice_api_v1_lnurlw_cb__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Satsdice Api Lnurlw Callback Satsdice Api V1 Lnurlw Cb Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/offlineshop/": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Index", + "operationId": "index_offlineshop__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/offlineshop/print": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Print Qr Codes", + "operationId": "print_qr_codes_offlineshop_print_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/offlineshop/confirmation/{p}": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Offlineshop.Confirmation Code", + "operationId": "offlineshop_confirmation_code_offlineshop_confirmation__p__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "P" + }, + "name": "p", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/offlineshop/api/v1/offlineshop": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Api Shop From Wallet", + "operationId": "api_shop_from_wallet_offlineshop_api_v1_offlineshop_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/offlineshop/api/v1/offlineshop/items/{item_id}": { + "put": { + "tags": [ + "Offlineshop" + ], + "summary": "Api Add Or Update Item", + "operationId": "api_add_or_update_item_offlineshop_api_v1_offlineshop_items__item_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateItem" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Offlineshop" + ], + "summary": "Api Delete Item", + "operationId": "api_delete_item_offlineshop_api_v1_offlineshop_items__item_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/offlineshop/api/v1/offlineshop/items": { + "post": { + "tags": [ + "Offlineshop" + ], + "summary": "Api Add Or Update Item", + "operationId": "api_add_or_update_item_offlineshop_api_v1_offlineshop_items_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateItem" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/offlineshop/api/v1/offlineshop/method": { + "put": { + "tags": [ + "Offlineshop" + ], + "summary": "Api Update Offlineshop", + "operationId": "api_update_offlineshop_offlineshop_api_v1_offlineshop_method_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShop" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/offlineshop/lnurl/{item_id}": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Offlineshop.Lnurl Response", + "operationId": "offlineshop_lnurl_response_offlineshop_lnurl__item_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Offlineshop Lnurl Response Offlineshop Lnurl Item Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/offlineshop/lnurl/cb/{item_id}": { + "get": { + "tags": [ + "Offlineshop" + ], + "summary": "Offlineshop.Lnurl Callback", + "operationId": "offlineshop_lnurl_callback_offlineshop_lnurl_cb__item_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Offlineshop Lnurl Callback Offlineshop Lnurl Cb Item Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnurlp/": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Index", + "operationId": "index_lnurlp__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lnurlp/link/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Display", + "operationId": "display_lnurlp_link__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnurlp/print/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Print Qr", + "operationId": "print_qr_lnurlp_print__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnurlp/api/v1/links": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Api Links", + "operationId": "api_links_lnurlp_api_v1_links_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PayLink" + }, + "type": "array", + "title": "Response Api Links Lnurlp Api V1 Links Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "lnurlp" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_lnurlp_api_v1_links_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePayLinkData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnurlp/api/v1/links/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Api Link Retrieve", + "operationId": "api_link_retrieve_lnurlp_api_v1_links__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "lnurlp" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_lnurlp_api_v1_links__link_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePayLinkData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "lnurlp" + ], + "summary": "Api Link Delete", + "operationId": "api_link_delete_lnurlp_api_v1_links__link_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnurlp/api/v1/settings": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Api Get Or Create Settings", + "operationId": "api_get_or_create_settings_lnurlp_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlpSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "lnurlp" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_lnurlp_api_v1_settings_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlpSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlpSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "lnurlp" + ], + "summary": "Api Delete Settings", + "operationId": "api_delete_settings_lnurlp_api_v1_settings_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lnurlp/api/v1/lnurl/cb/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Lnurlp.Api Lnurl Callback", + "operationId": "lnurlp_api_lnurl_callback_lnurlp_api_v1_lnurl_cb__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Webhook Data" + }, + "name": "webhook_data", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + } + ], + "title": "Response Lnurlp Api Lnurl Callback Lnurlp Api V1 Lnurl Cb Link Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnurlp/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Lnurlp.Api Lnurl Response", + "operationId": "lnurlp_api_lnurl_response_lnurlp__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Webhook Data" + }, + "name": "webhook_data", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlPayResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnurlp/api/v1/lnurl/{link_id}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Lnurlp.Api Lnurl Response.Deprecated", + "operationId": "lnurlp_api_lnurl_response_deprecated_lnurlp_api_v1_lnurl__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Webhook Data" + }, + "name": "webhook_data", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlPayResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true + } + }, + "/lnurlp/api/v1/well-known/{username}": { + "get": { + "tags": [ + "lnurlp" + ], + "summary": "Lnaddress", + "operationId": "lnaddress_lnurlp_api_v1_well_known__username__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Username" + }, + "name": "username", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Lnaddress Lnurlp Api V1 Well Known Username Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/invoices/": { + "get": { + "tags": [ + "invoices" + ], + "summary": "Index", + "operationId": "index_invoices__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/invoices/pay/{invoice_id}": { + "get": { + "tags": [ + "invoices" + ], + "summary": "Pay", + "operationId": "pay_invoices_pay__invoice_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/invoices/api/v1/invoices": { + "get": { + "tags": [ + "invoices" + ], + "summary": "Api Invoices", + "operationId": "api_invoices_invoices_api_v1_invoices_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets" + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Invoice" + }, + "type": "array", + "title": "Response Api Invoices Invoices Api V1 Invoices Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/invoices/api/v1/invoice/{invoice_id}": { + "get": { + "tags": [ + "invoices" + ], + "summary": "Api Invoice", + "operationId": "api_invoice_invoices_api_v1_invoice__invoice_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvoiceFull" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": [ + "invoices" + ], + "summary": "Api Invoice Update", + "operationId": "api_invoice_update_invoices_api_v1_invoice__invoice_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInvoiceData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invoice" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "invoices" + ], + "summary": "Api Invoice Delete", + "operationId": "api_invoice_delete_invoices_api_v1_invoice__invoice_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/invoices/api/v1/invoice": { + "post": { + "tags": [ + "invoices" + ], + "summary": "Api Invoice Create", + "operationId": "api_invoice_create_invoices_api_v1_invoice_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInvoiceData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invoice" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/invoices/api/v1/invoice/{invoice_id}/payments": { + "post": { + "tags": [ + "invoices" + ], + "summary": "Api Invoices Create Payment", + "operationId": "api_invoices_create_payment_invoices_api_v1_invoice__invoice_id__payments_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvoiceAmountPayment" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/invoices/api/v1/invoice/{invoice_id}/payments/{payment_hash}": { + "get": { + "tags": [ + "invoices" + ], + "summary": "Api Invoices Check Payment", + "operationId": "api_invoices_check_payment_invoices_api_v1_invoice__invoice_id__payments__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice Id" + }, + "name": "invoice_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Index", + "operationId": "index_satspay__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satspay/{charge_id}": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Display Charge", + "operationId": "display_charge_satspay__charge_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satspay/css/{css_id}": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Display Css", + "operationId": "display_css_satspay_css__css_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Css Id" + }, + "name": "css_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satspay/api/v1": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Enabled", + "operationId": "api_enabled_satspay_api_v1_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Enabled Satspay Api V1 Get" + } + } + } + } + } + } + }, + "/satspay/api/v1/charge": { + "post": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Create", + "operationId": "api_charge_create_satspay_api_v1_charge_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCharge" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Charge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/api/v1/charges": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Charges Retrieve", + "operationId": "api_charges_retrieve_satspay_api_v1_charges_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Charge" + }, + "type": "array", + "title": "Response Api Charges Retrieve Satspay Api V1 Charges Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/api/v1/charge/balance/{charge_id}": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Retrieve", + "description": "This endpoint is used by the woocommerce plugin to check if the status of a charge\nis paid. you can refresh the success page of the webshop to trigger this endpoint.\nuseful if the webhook is not working or fails for some reason.\nhttps://github.com/lnbits/woocommerce-payment-gateway/blob/main/lnbits.php#L312", + "operationId": "api_charge_retrieve_satspay_api_v1_charge_balance__charge_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Charge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Check Balance", + "operationId": "api_charge_check_balance_satspay_api_v1_charge_balance__charge_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Charge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/api/v1/charge/{charge_id}": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Retrieve", + "description": "This endpoint is used by the woocommerce plugin to check if the status of a charge\nis paid. you can refresh the success page of the webshop to trigger this endpoint.\nuseful if the webhook is not working or fails for some reason.\nhttps://github.com/lnbits/woocommerce-payment-gateway/blob/main/lnbits.php#L312", + "operationId": "api_charge_retrieve_satspay_api_v1_charge__charge_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Charge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Delete", + "operationId": "api_charge_delete_satspay_api_v1_charge__charge_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/api/v1/charge/webhook/{charge_id}": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Charge Webhook", + "operationId": "api_charge_webhook_satspay_api_v1_charge_webhook__charge_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Charge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspay/api/v1/settings": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Get Or Create Settings", + "operationId": "api_get_or_create_settings_satspay_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatspaySettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "satspay" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_satspay_api_v1_settings_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatspaySettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatspaySettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "satspay" + ], + "summary": "Api Delete Settings", + "operationId": "api_delete_settings_satspay_api_v1_settings_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satspay/api/v1/themes": { + "get": { + "tags": [ + "satspay" + ], + "summary": "Api Get Themes", + "operationId": "api_get_themes_satspay_api_v1_themes_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SatsPayTheme" + }, + "type": "array", + "title": "Response Api Get Themes Satspay Api V1 Themes Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "satspay" + ], + "summary": "Api Themes Create", + "operationId": "api_themes_create_satspay_api_v1_themes_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSatsPayTheme" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatsPayTheme" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satspay/api/v1/themes/{css_id}": { + "post": { + "tags": [ + "satspay" + ], + "summary": "Api Themes Save", + "operationId": "api_themes_save_satspay_api_v1_themes__css_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Css Id" + }, + "name": "css_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSatsPayTheme" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SatsPayTheme" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satspay/api/v1/themes/{theme_id}": { + "delete": { + "tags": [ + "satspay" + ], + "summary": "Api Theme Delete", + "operationId": "api_theme_delete_satspay_api_v1_themes__theme_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Theme Id" + }, + "name": "theme_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paywall/": { + "get": { + "tags": [ + "Paywall" + ], + "summary": "Index", + "operationId": "index_paywall__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paywall/{paywall_id}": { + "get": { + "tags": [ + "Paywall" + ], + "summary": "Display", + "operationId": "display_paywall__paywall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paywall/api/v1/paywalls": { + "get": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywalls", + "operationId": "api_paywalls_paywall_api_v1_paywalls_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Paywall" + }, + "type": "array", + "title": "Response Api Paywalls Paywall Api V1 Paywalls Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Create", + "operationId": "api_paywall_create_paywall_api_v1_paywalls_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePaywall" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Paywall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/paywall/api/v1/paywalls/{paywall_id}": { + "put": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Update", + "operationId": "api_paywall_update_paywall_api_v1_paywalls__paywall_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePaywall" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Paywall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Delete", + "operationId": "api_paywall_delete_paywall_api_v1_paywalls__paywall_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "patch": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Update", + "operationId": "api_paywall_update_paywall_api_v1_paywalls__paywall_id__patch", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePaywall" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Paywall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/paywall/api/v1/paywalls/invoice/{paywall_id}": { + "get": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Create Fixed Amount Invoice", + "operationId": "api_paywall_create_fixed_amount_invoice_paywall_api_v1_paywalls_invoice__paywall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Create Invoice", + "operationId": "api_paywall_create_invoice_paywall_api_v1_paywalls_invoice__paywall_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePaywallInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paywall/api/v1/paywalls/check_invoice/{paywall_id}": { + "post": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywal Check Invoice", + "operationId": "api_paywal_check_invoice_paywall_api_v1_paywalls_check_invoice__paywall_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckPaywallInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paywall/download/{paywall_id}": { + "get": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Download File", + "operationId": "api_paywall_download_file_paywall_download__paywall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Version" + }, + "name": "version", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "head": { + "tags": [ + "Paywall" + ], + "summary": "Api Paywall Check File", + "operationId": "api_paywall_check_file_paywall_download__paywall_id__head", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Paywall Id" + }, + "name": "paywall_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Index", + "operationId": "index_withdraw__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/withdraw/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Display", + "operationId": "display_withdraw__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/print/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Print Qr", + "operationId": "print_qr_withdraw_print__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/csv/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Csv", + "operationId": "csv_withdraw_csv__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/api/v1/links": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Links", + "operationId": "api_links_withdraw_api_v1_links_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset", + "default": 0 + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit", + "default": 0 + }, + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__PaginatedWithdraws" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_withdraw_api_v1_links_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__CreateWithdrawData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/withdraw/api/v1/links/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Retrieve", + "operationId": "api_link_retrieve_withdraw_api_v1_links__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_withdraw_api_v1_links__link_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__CreateWithdrawData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Delete", + "operationId": "api_link_delete_withdraw_api_v1_links__link_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/withdraw/api/v1/links/{the_hash}/{lnurl_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Hash Retrieve", + "operationId": "api_hash_retrieve_withdraw_api_v1_links__the_hash___lnurl_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "The Hash" + }, + "name": "the_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Lnurl Id" + }, + "name": "lnurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__HashCheck" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/withdraw/api/v1/lnurl/{unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Withdraw.Api Lnurl Response", + "operationId": "withdraw_api_lnurl_response_withdraw_api_v1_lnurl__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Withdraw Api Lnurl Response Withdraw Api V1 Lnurl Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/api/v1/lnurl/cb/{unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "lnurl withdraw callback", + "description": "This endpoints allows you to put unique_hash, k1\n and a payment_request to get your payment_request paid.", + "operationId": "withdraw_api_lnurl_callback_withdraw_api_v1_lnurl_cb__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Id Unique Hash" + }, + "name": "id_unique_hash", + "in": "query" + } + ], + "responses": { + "200": { + "description": "status: OK", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Withdraw Api Lnurl Callback Withdraw Api V1 Lnurl Cb Unique Hash Get" + } + } + } + }, + "400": { + "description": "k1 is wrong or link open time or withdraw not working." + }, + "404": { + "description": "withdraw link not found." + }, + "405": { + "description": "withdraw link is spent." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/withdraw/api/v1/lnurl/{unique_hash}/{id_unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Withdraw.Api Lnurl Multi Response", + "operationId": "withdraw_api_lnurl_multi_response_withdraw_api_v1_lnurl__unique_hash___id_unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Id Unique Hash" + }, + "name": "id_unique_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Withdraw Api Lnurl Multi Response Withdraw Api V1 Lnurl Unique Hash Id Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/decoder/": { + "get": { + "tags": [ + "decoder" + ], + "summary": "Index", + "operationId": "index_decoder__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/gerty/": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Index", + "operationId": "index_gerty__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/gerty/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Display", + "operationId": "display_gerty__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gertys", + "operationId": "api_gertys_gerty_api_v1_gerty_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Gerty" + }, + "type": "array", + "title": "Response Api Gertys Gerty Api V1 Gerty Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "Gerty" + ], + "summary": "Api Link Create", + "operationId": "api_link_create_gerty_api_v1_gerty_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGerty" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Gerty" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/gerty/api/v1/gerty/{gerty_id}": { + "put": { + "tags": [ + "Gerty" + ], + "summary": "Api Link Update", + "operationId": "api_link_update_gerty_api_v1_gerty__gerty_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Gerty" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Gerty" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Delete", + "operationId": "api_gerty_delete_gerty_api_v1_gerty__gerty_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/gerty/api/v1/gerty/satoshiquote": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Satoshi", + "operationId": "api_gerty_satoshi_gerty_api_v1_gerty_satoshiquote_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/pages/{gerty_id}/{p}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Json", + "operationId": "api_gerty_json_gerty_api_v1_gerty_pages__gerty_id___p__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "P" + }, + "name": "p", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/fees-recommended/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Fees Recommended", + "operationId": "api_gerty_get_fees_recommended_gerty_api_v1_gerty_fees_recommended__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/hashrate-1w/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Hashrate 1W", + "operationId": "api_gerty_get_hashrate_1w_gerty_api_v1_gerty_hashrate_1w__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/hashrate-1m/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Hashrate 1M", + "operationId": "api_gerty_get_hashrate_1m_gerty_api_v1_gerty_hashrate_1m__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/statistics/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Statistics", + "operationId": "api_gerty_get_statistics_gerty_api_v1_gerty_statistics__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/difficulty-adjustment/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Difficulty Adjustment", + "operationId": "api_gerty_get_difficulty_adjustment_gerty_api_v1_gerty_difficulty_adjustment__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/tip-height/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Tip Height", + "operationId": "api_gerty_get_tip_height_gerty_api_v1_gerty_tip_height__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/gerty/api/v1/gerty/mempool/{gerty_id}": { + "get": { + "tags": [ + "Gerty" + ], + "summary": "Api Gerty Get Mempool", + "operationId": "api_gerty_get_mempool_gerty_api_v1_gerty_mempool__gerty_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Gerty Id" + }, + "name": "gerty_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/example/": { + "get": { + "tags": [ + "example", + "example" + ], + "summary": "Index", + "description": "Example generic endpoint", + "operationId": "index_example__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/example/api/v1/test/{example_data}": { + "get": { + "tags": [ + "example" + ], + "summary": "Api Example", + "description": "Example API endpoint", + "operationId": "api_example_example_api_v1_test__example_data__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Example Data" + }, + "name": "example_data", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Example" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/example/api/v1/vetted": { + "get": { + "tags": [ + "example" + ], + "summary": "Api Get Vetted", + "description": "Get the vetted extension readme", + "operationId": "api_get_vetted_example_api_v1_vetted_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/bitcoinswitch/": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Index", + "operationId": "index_bitcoinswitch__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/bitcoinswitch/public/{switch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Index Public", + "operationId": "index_public_bitcoinswitch_public__switch_id__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/bitcoinswitch/api/v1": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitchs Retrieve", + "operationId": "api_bitcoinswitchs_retrieve_bitcoinswitch_api_v1_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Bitcoinswitch" + }, + "type": "array", + "title": "Response Api Bitcoinswitchs Retrieve Bitcoinswitch Api V1 Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Create", + "operationId": "api_bitcoinswitch_create_bitcoinswitch_api_v1_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__CreateBitcoinswitch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/bitcoinswitch/api/v1/trigger/{switch_id}/{pin}": { + "put": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Trigger", + "operationId": "api_bitcoinswitch_trigger_bitcoinswitch_api_v1_trigger__switch_id___pin__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Switch Id" + }, + "name": "switch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Pin" + }, + "name": "pin", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/bitcoinswitch/api/v1/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Retrieve", + "operationId": "api_bitcoinswitch_retrieve_bitcoinswitch_api_v1__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Update", + "operationId": "api_bitcoinswitch_update_bitcoinswitch_api_v1__bitcoinswitch_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__CreateBitcoinswitch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Delete", + "operationId": "api_bitcoinswitch_delete_bitcoinswitch_api_v1__bitcoinswitch_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/bitcoinswitch/api/v1/public/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Get Public", + "operationId": "api_bitcoinswitch_get_public_bitcoinswitch_api_v1_public__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__BitcoinswitchPublic" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/bitcoinswitch/api/v1/lnurl/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Lnurl Params", + "operationId": "lnurl_params_bitcoinswitch_api_v1_lnurl__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pin" + }, + "name": "pin", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Lnurl Params Bitcoinswitch Api V1 Lnurl Bitcoinswitch Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/bitcoinswitch/api/v1/lnurl/cb/{switch_id}/{pin}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Bitcoinswitch.Lnurl Cb", + "operationId": "bitcoinswitch_lnurl_cb_bitcoinswitch_api_v1_lnurl_cb__switch_id___pin__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Switch Id" + }, + "name": "switch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Pin" + }, + "name": "pin", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Comment" + }, + "name": "comment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Bitcoinswitch Lnurl Cb Bitcoinswitch Api V1 Lnurl Cb Switch Id Pin Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/scrub/": { + "get": { + "tags": [ + "scrub" + ], + "summary": "Index", + "operationId": "index_scrub__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrub/api/v1/links": { + "get": { + "tags": [ + "scrub" + ], + "summary": "Api Links", + "operationId": "api_links_scrub_api_v1_links_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ScrubLink" + }, + "type": "array", + "title": "Response Api Links Scrub Api V1 Links Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "scrub" + ], + "summary": "Api Scrub Create Or Update", + "operationId": "api_scrub_create_or_update_scrub_api_v1_links_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScrubLink" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrubLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scrub/api/v1/links/{link_id}": { + "get": { + "tags": [ + "scrub" + ], + "summary": "Api Link Retrieve", + "operationId": "api_link_retrieve_scrub_api_v1_links__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrubLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "scrub" + ], + "summary": "Api Scrub Create Or Update", + "operationId": "api_scrub_create_or_update_scrub_api_v1_links__link_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScrubLink" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrubLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "scrub" + ], + "summary": "Api Link Delete", + "operationId": "api_link_delete_scrub_api_v1_links__link_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lncalendar/": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Index", + "operationId": "index_lncalendar__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lncalendar/{schedule_id}": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Display", + "operationId": "display_lncalendar__schedule_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/schedule": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Schedules", + "operationId": "api_schedules_lncalendar_api_v1_schedule_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Schedule Create", + "operationId": "api_schedule_create_lncalendar_api_v1_schedule_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSchedule" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lncalendar/api/v1/schedule/{schedule_id}": { + "put": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Schedule Update", + "operationId": "api_schedule_update_lncalendar_api_v1_schedule__schedule_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSchedule" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Schedule Delete", + "operationId": "api_schedule_delete_lncalendar_api_v1_schedule__schedule_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lncalendar/api/v1/appointment": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Get All Appointments", + "operationId": "api_get_all_appointments_lncalendar_api_v1_appointment_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Appointment Create", + "operationId": "api_appointment_create_lncalendar_api_v1_appointment_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAppointment" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/appointment/purge/{schedule_id}": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Purge Appointments", + "operationId": "api_purge_appointments_lncalendar_api_v1_appointment_purge__schedule_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/appointment/{schedule_id}/{payment_hash}": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Appointment Check Invoice", + "operationId": "api_appointment_check_invoice_lncalendar_api_v1_appointment__schedule_id___payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/appointment/{schedule_id}": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Get Appointments Schedule", + "operationId": "api_get_appointments_schedule_lncalendar_api_v1_appointment__schedule_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/unavailable": { + "post": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Unavailable Create", + "operationId": "api_unavailable_create_lncalendar_api_v1_unavailable_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUnavailableTime" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lncalendar/api/v1/unavailable/{schedule_id}": { + "get": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Unavailable Get", + "operationId": "api_unavailable_get_lncalendar_api_v1_unavailable__schedule_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lncalendar/api/v1/unavailable/{schedule_id}/{unavailable_id}": { + "delete": { + "tags": [ + "LNCalendar" + ], + "summary": "Api Unavailable Delete", + "operationId": "api_unavailable_delete_lncalendar_api_v1_unavailable__schedule_id___unavailable_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Schedule Id" + }, + "name": "schedule_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Unavailable Id" + }, + "name": "unavailable_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnticket/": { + "get": { + "tags": [ + "LNTicket" + ], + "summary": "Index", + "operationId": "index_lnticket__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lnticket/{form_id}": { + "get": { + "tags": [ + "LNTicket" + ], + "summary": "Display", + "operationId": "display_lnticket__form_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Form Id" + }, + "name": "form_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnticket/api/v1/forms": { + "get": { + "tags": [ + "LNTicket" + ], + "summary": "Api Forms Get", + "operationId": "api_forms_get_lnticket_api_v1_forms_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Form" + }, + "type": "array", + "title": "Response Api Forms Get Lnticket Api V1 Forms Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "LNTicket" + ], + "summary": "Api Form Create", + "operationId": "api_form_create_lnticket_api_v1_forms_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFormData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Form" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnticket/api/v1/forms/{form_id}": { + "put": { + "tags": [ + "LNTicket" + ], + "summary": "Api Form Update", + "operationId": "api_form_update_lnticket_api_v1_forms__form_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Form Id" + }, + "name": "form_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFormData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Form" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "LNTicket" + ], + "summary": "Api Form Delete", + "operationId": "api_form_delete_lnticket_api_v1_forms__form_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Form Id" + }, + "name": "form_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnticket/api/v1/tickets": { + "get": { + "tags": [ + "LNTicket" + ], + "summary": "Api Tickets", + "operationId": "api_tickets_lnticket_api_v1_tickets_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__lnticket__models__Ticket" + }, + "type": "array", + "title": "Response Api Tickets Lnticket Api V1 Tickets Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnticket/api/v1/tickets/{form_id}": { + "post": { + "tags": [ + "LNTicket" + ], + "summary": "Api Ticket Make Ticket", + "operationId": "api_ticket_make_ticket_lnticket_api_v1_tickets__form_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Form Id" + }, + "name": "form_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTicketData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnticket/api/v1/tickets/{payment_hash}": { + "get": { + "tags": [ + "LNTicket" + ], + "summary": "Api Ticket Send Ticket", + "operationId": "api_ticket_send_ticket_lnticket_api_v1_tickets__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnticket/api/v1/tickets/{ticket_id}": { + "delete": { + "tags": [ + "LNTicket" + ], + "summary": "Api Ticket Delete", + "operationId": "api_ticket_delete_lnticket_api_v1_tickets__ticket_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Ticket Id" + }, + "name": "ticket_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Index", + "operationId": "index_nostrmarket__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrmarket/market": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Market", + "operationId": "market_nostrmarket_market_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/nostrmarket/api/v1/merchant": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Merchant", + "operationId": "api_get_merchant_nostrmarket_api_v1_merchant_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Merchant" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Merchant", + "operationId": "api_create_merchant_nostrmarket_api_v1_merchant_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartialMerchant" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Merchant" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/merchant/{merchant_id}": { + "delete": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Delete Merchant", + "operationId": "api_delete_merchant_nostrmarket_api_v1_merchant__merchant_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Merchant Id" + }, + "name": "merchant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/merchant/{merchant_id}/nostr": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Refresh Merchant", + "operationId": "api_refresh_merchant_nostrmarket_api_v1_merchant__merchant_id__nostr_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Merchant Id" + }, + "name": "merchant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Republish Merchant", + "operationId": "api_republish_merchant_nostrmarket_api_v1_merchant__merchant_id__nostr_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Merchant Id" + }, + "name": "merchant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Delete Merchant On Nostr", + "operationId": "api_delete_merchant_on_nostr_nostrmarket_api_v1_merchant__merchant_id__nostr_delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Merchant Id" + }, + "name": "merchant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/merchant/{merchant_id}/toggle": { + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Toggle Merchant", + "operationId": "api_toggle_merchant_nostrmarket_api_v1_merchant__merchant_id__toggle_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Merchant Id" + }, + "name": "merchant_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Merchant" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/zone": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Zones", + "operationId": "api_get_zones_nostrmarket_api_v1_zone_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Zone" + }, + "type": "array", + "title": "Response Api Get Zones Nostrmarket Api V1 Zone Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Zone", + "operationId": "api_create_zone_nostrmarket_api_v1_zone_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Zone" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/zone/{zone_id}": { + "delete": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Delete Zone", + "operationId": "api_delete_zone_nostrmarket_api_v1_zone__zone_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Zone Id" + }, + "name": "zone_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "patch": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Update Zone", + "operationId": "api_update_zone_nostrmarket_api_v1_zone__zone_id__patch", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Zone Id" + }, + "name": "zone_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Zone" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Zone" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/stall": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Stalls", + "operationId": "api_get_stalls_nostrmarket_api_v1_stall_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "Pending", + "default": false + }, + "name": "pending", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Stall", + "operationId": "api_create_stall_nostrmarket_api_v1_stall_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stall" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/stall/{stall_id}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Stall", + "operationId": "api_get_stall_nostrmarket_api_v1_stall__stall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Stall Id" + }, + "name": "stall_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Update Stall", + "operationId": "api_update_stall_nostrmarket_api_v1_stall__stall_id__put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stall" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Stall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Delete Stall", + "operationId": "api_delete_stall_nostrmarket_api_v1_stall__stall_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Stall Id" + }, + "name": "stall_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/stall/product/{stall_id}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Stall Products", + "operationId": "api_get_stall_products_nostrmarket_api_v1_stall_product__stall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Stall Id" + }, + "name": "stall_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Pending", + "default": false + }, + "name": "pending", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/stall/order/{stall_id}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Stall Orders", + "operationId": "api_get_stall_orders_nostrmarket_api_v1_stall_order__stall_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Stall Id" + }, + "name": "stall_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Paid" + }, + "name": "paid", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Shipped" + }, + "name": "shipped", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pubkey" + }, + "name": "pubkey", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/product": { + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Product", + "operationId": "api_create_product_nostrmarket_api_v1_product_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Product" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Product" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/product/{product_id}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Product", + "operationId": "api_get_product_nostrmarket_api_v1_product__product_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Product" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Delete Product", + "operationId": "api_delete_product_nostrmarket_api_v1_product__product_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "patch": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Update Product", + "operationId": "api_update_product_nostrmarket_api_v1_product__product_id__patch", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Product" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Product" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/order/{order_id}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Order", + "operationId": "api_get_order_nostrmarket_api_v1_order__order_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Order Id" + }, + "name": "order_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "patch": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Update Order Status", + "operationId": "api_update_order_status_nostrmarket_api_v1_order__order_id__patch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderStatusUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Order" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/order": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Orders", + "operationId": "api_get_orders_nostrmarket_api_v1_order_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "Paid" + }, + "name": "paid", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Shipped" + }, + "name": "shipped", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pubkey" + }, + "name": "pubkey", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/order/restore/{event_id}": { + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Restore Order", + "operationId": "api_restore_order_nostrmarket_api_v1_order_restore__event_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + }, + "name": "event_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Order" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/orders/restore": { + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Restore Orders", + "operationId": "api_restore_orders_nostrmarket_api_v1_orders_restore_put", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/order/reissue": { + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Reissue Order Invoice", + "operationId": "api_reissue_order_invoice_nostrmarket_api_v1_order_reissue_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderReissue" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrmarket__models__Order" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/message/{public_key}": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Messages", + "operationId": "api_get_messages_nostrmarket_api_v1_message__public_key__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Public Key" + }, + "name": "public_key", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/DirectMessage" + }, + "type": "array", + "title": "Response Api Get Messages Nostrmarket Api V1 Message Public Key Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/message": { + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Message", + "operationId": "api_create_message_nostrmarket_api_v1_message_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartialDirectMessage" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DirectMessage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/customer": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Get Customers", + "operationId": "api_get_customers_nostrmarket_api_v1_customer_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Customer" + }, + "type": "array", + "title": "Response Api Get Customers Nostrmarket Api V1 Customer Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "nostrmarket" + ], + "summary": "Api Create Customer", + "operationId": "api_create_customer_nostrmarket_api_v1_customer_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrmarket/api/v1/currencies": { + "get": { + "tags": [ + "nostrmarket" + ], + "summary": "Api List Currencies Available", + "operationId": "api_list_currencies_available_nostrmarket_api_v1_currencies_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/nostrmarket/api/v1/restart": { + "put": { + "tags": [ + "nostrmarket" + ], + "summary": "Restart Nostr Client", + "operationId": "restart_nostr_client_nostrmarket_api_v1_restart_put", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Index", + "operationId": "index_nostrnip5__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/domain/{domain_id}": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Domain Details", + "operationId": "domain_details_nostrnip5_domain__domain_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/signup/{domain_id}": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Signup", + "operationId": "signup_nostrnip5_signup__domain_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Identifier" + }, + "name": "identifier", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Years" + }, + "name": "years", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/rotate/{domain_id}/{address_id}": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Rotate", + "operationId": "rotate_nostrnip5_rotate__domain_id___address_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Secret" + }, + "name": "secret", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/domains": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Domains", + "operationId": "api_domains_nostrnip5_api_v1_domains_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets" + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Domain" + }, + "type": "array", + "title": "Response Api Domains Nostrnip5 Api V1 Domains Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Get Domain", + "operationId": "api_get_domain_nostrnip5_api_v1_domain__domain_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Domain Delete", + "operationId": "api_domain_delete_nostrnip5_api_v1_domain__domain_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Update Domain", + "operationId": "api_update_domain_nostrnip5_api_v1_domain_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditDomainData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Create Domain", + "operationId": "api_create_domain_nostrnip5_api_v1_domain_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDomainData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/nostr.json": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Get Nostr Json", + "operationId": "api_get_nostr_json_nostrnip5_api_v1_domain__domain_id__nostr_json_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Name" + }, + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/search": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Search Identifier", + "operationId": "api_search_identifier_nostrnip5_api_v1_domain__domain_id__search_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Q" + }, + "name": "q", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Years" + }, + "name": "years", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/payments/{payment_hash}": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Check Address Payment", + "operationId": "api_check_address_payment_nostrnip5_api_v1_domain__domain_id__payments__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/addresses": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Get Addresses", + "operationId": "api_get_addresses_nostrnip5_api_v1_addresses_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets" + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__nostrnip5__models__Address" + }, + "type": "array", + "title": "Response Api Get Addresses Nostrnip5 Api V1 Addresses Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/addresses/paginated": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "get paginated list of addresses", + "operationId": "Addresses_List_nostrnip5_api_v1_addresses_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets" + }, + "name": "all_wallets", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Local Part" + }, + "name": "local_part", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Reimburse Amount" + }, + "name": "reimburse_amount", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Pubkey" + }, + "name": "pubkey", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "boolean", + "title": "Active" + }, + "name": "active", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of addresses", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/{address_id}/transfer": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "get transfer code for a particular identifier owned by the authenticated user", + "operationId": "Get_Transfer_Code_nostrnip5_api_v1_domain__domain_id__address__address_id__transfer_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "transfer code and new owner id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/lock": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "lock an identifier for transfer. The identifier can only be unlocked with the returned lock code.", + "operationId": "Lock_identifier_nostrnip5_api_v1_domain__domain_id__address_lock_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LockRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "lock code", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LockResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/unlock": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "unlock an identifier. The identifier can only be unlocked by someone who has a valid lock code.", + "operationId": "Unlock_identifier_nostrnip5_api_v1_domain__domain_id__address_unlock_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnlockRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "unlock status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/transfer": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "transfer identifier to a new owner.", + "operationId": "Transfer_identifier_nostrnip5_api_v1_domain__domain_id__address_transfer_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "transfer status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/{address_id}": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Update Address", + "operationId": "api_update_address_nostrnip5_api_v1_domain__domain_id__address__address_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAddressData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrnip5__models__Address" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Delete Address", + "operationId": "api_delete_address_nostrnip5_api_v1_domain__domain_id__address__address_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/{address_id}/activate": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Activate Address", + "operationId": "api_activate_address_nostrnip5_api_v1_domain__domain_id__address__address_id__activate_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrnip5__models__Address" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/{address_id}/reimburse": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Address Reimburse", + "operationId": "api_address_reimburse_nostrnip5_api_v1_domain__domain_id__address__address_id__reimburse_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address": { + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Request Address", + "operationId": "api_request_address_nostrnip5_api_v1_domain__domain_id__address_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAddressData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrnip5/api/v1/user/addresses": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Get User Addresses", + "operationId": "api_get_user_addresses_nostrnip5_api_v1_user_addresses_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Local Part" + }, + "name": "local_part", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Active" + }, + "name": "active", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/user/domain/{domain_id}/address/{address_id}": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Update User Address", + "operationId": "api_update_user_address_nostrnip5_api_v1_user_domain__domain_id__address__address_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAddressData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrnip5__models__Address" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Delete User Address", + "operationId": "api_delete_user_address_nostrnip5_api_v1_user_domain__domain_id__address__address_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/{domain_id}/address/{address_id}/rotate": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Rotate User Address", + "operationId": "api_rotate_user_address_nostrnip5_api_v1_domain__domain_id__address__address_id__rotate_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RotateAddressData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrnip5/api/v1/user/domain/{domain_id}/address": { + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Request User Address", + "operationId": "api_request_user_address_nostrnip5_api_v1_user_domain__domain_id__address_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAddressData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/public/domain/{domain_id}/address": { + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Request Public User Address", + "operationId": "api_request_public_user_address_nostrnip5_api_v1_public_domain__domain_id__address_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAddressData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/user/domain/{domain_id}/address/{address_id}/lnaddress": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Lnurl Create Or Update", + "operationId": "api_lnurl_create_or_update_nostrnip5_api_v1_user_domain__domain_id__address__address_id__lnaddress_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnAddressConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Lnurl Create Or Update", + "operationId": "api_lnurl_create_or_update_nostrnip5_api_v1_user_domain__domain_id__address__address_id__lnaddress_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Domain Id" + }, + "name": "domain_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address Id" + }, + "name": "address_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnAddressConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/domain/ranking/{bucket}": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Refresh Identifier Ranking", + "operationId": "api_refresh_identifier_ranking_nostrnip5_api_v1_domain_ranking__bucket__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "integer", + "title": "Bucket" + }, + "name": "bucket", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "patch": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Add Identifier Ranking", + "operationId": "api_add_identifier_ranking_nostrnip5_api_v1_domain_ranking__bucket__patch", + "parameters": [ + { + "required": true, + "schema": { + "type": "integer", + "title": "Bucket" + }, + "name": "bucket", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/ranking/search": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Domain Search Address", + "operationId": "api_domain_search_address_nostrnip5_api_v1_ranking_search_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Q" + }, + "name": "q", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentifierRanking" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/ranking": { + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Domain Update Ranking", + "operationId": "api_domain_update_ranking_nostrnip5_api_v1_ranking_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentifierRanking" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentifierRanking" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrnip5/api/v1/settings": { + "get": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Get Settings", + "operationId": "api_get_settings_nostrnip5_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nip5Settings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Settings Create Or Update", + "operationId": "api_settings_create_or_update_nostrnip5_api_v1_settings_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nip5Settings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "nostrnip5" + ], + "summary": "Api Settings Create Or Update", + "operationId": "api_settings_create_or_update_nostrnip5_api_v1_settings_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Nip5Settings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrclient/": { + "get": { + "tags": [ + "nostrclient" + ], + "summary": "Index", + "operationId": "index_nostrclient__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrclient/api/v1/relays": { + "get": { + "tags": [ + "nostrclient" + ], + "summary": "Api Get Relays", + "operationId": "api_get_relays_nostrclient_api_v1_relays_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Relay" + }, + "type": "array", + "title": "Response Api Get Relays Nostrclient Api V1 Relays Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrclient/api/v1/relay": { + "post": { + "tags": [ + "nostrclient" + ], + "summary": "Api Add Relay", + "operationId": "api_add_relay_nostrclient_api_v1_relay_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Relay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Relay" + }, + "type": "array", + "title": "Response Api Add Relay Nostrclient Api V1 Relay Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "nostrclient" + ], + "summary": "Api Delete Relay", + "operationId": "api_delete_relay_nostrclient_api_v1_relay_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Relay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrclient/api/v1/relay/test": { + "put": { + "tags": [ + "nostrclient" + ], + "summary": "Api Test Endpoint", + "operationId": "api_test_endpoint_nostrclient_api_v1_relay_test_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestMessage" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestMessageResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrclient/api/v1/config": { + "get": { + "tags": [ + "nostrclient" + ], + "summary": "Api Get Config", + "operationId": "api_get_config_nostrclient_api_v1_config_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrclient__models__Config" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "nostrclient" + ], + "summary": "Api Update Config", + "operationId": "api_update_config_nostrclient_api_v1_config_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__nostrclient__models__Config" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrrelay/": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Index", + "operationId": "index_nostrrelay__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/nostrrelay/{relay_id}": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Nostrrelay", + "operationId": "nostrrelay_nostrrelay__relay_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/nostrrelay/api/v1/relay": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Get Relays", + "operationId": "api_get_relays_nostrrelay_api_v1_relay_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NostrRelay" + }, + "type": "array", + "title": "Response Api Get Relays Nostrrelay Api V1 Relay Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Create Relay", + "operationId": "api_create_relay_nostrrelay_api_v1_relay_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrrelay/api/v1/relay/{relay_id}": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Get Relay", + "operationId": "api_get_relay_nostrrelay_api_v1_relay__relay_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Toggle Relay", + "operationId": "api_toggle_relay_nostrrelay_api_v1_relay__relay_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Delete Relay", + "operationId": "api_delete_relay_nostrrelay_api_v1_relay__relay_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "patch": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Update Relay", + "operationId": "api_update_relay_nostrrelay_api_v1_relay__relay_id__patch", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrRelay" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrrelay/api/v1/relay-info": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Get Relay Info", + "operationId": "api_get_relay_info_nostrrelay_api_v1_relay_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/nostrrelay/api/v1/account": { + "get": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Get Accounts", + "operationId": "api_get_accounts_nostrrelay_api_v1_account_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Allowed", + "default": false + }, + "name": "allowed", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Blocked", + "default": true + }, + "name": "blocked", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NostrAccount" + }, + "type": "array", + "title": "Response Api Get Accounts Nostrrelay Api V1 Account Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Create Or Update Account", + "operationId": "api_create_or_update_account_nostrrelay_api_v1_account_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrPartialAccount" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NostrAccount" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrrelay/api/v1/account/{relay_id}/{pubkey}": { + "delete": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Delete Account", + "operationId": "api_delete_account_nostrrelay_api_v1_account__relay_id___pubkey__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Relay Id" + }, + "name": "relay_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pubkey" + }, + "name": "pubkey", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/nostrrelay/api/v1/pay": { + "put": { + "tags": [ + "NostrRelay" + ], + "summary": "Api Pay To Join", + "operationId": "api_pay_to_join_nostrrelay_api_v1_pay_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BuyOrder" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/boltcards/": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Index", + "operationId": "index_boltcards__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/boltcards/{card_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Display", + "operationId": "display_boltcards__card_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/boltcards/api/v1/cards": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Cards", + "operationId": "api_cards_boltcards_api_v1_cards_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Card" + }, + "type": "array", + "title": "Response Api Cards Boltcards Api V1 Cards Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Create", + "operationId": "api_card_create_boltcards_api_v1_cards_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__CreateCardData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltcards/api/v1/cards/{card_id}": { + "put": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Update", + "operationId": "api_card_update_boltcards_api_v1_cards__card_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__CreateCardData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Delete", + "operationId": "api_card_delete_boltcards_api_v1_cards__card_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltcards/api/v1/cards/enable/{card_id}/{enable}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Enable Card", + "operationId": "enable_card_boltcards_api_v1_cards_enable__card_id___enable__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "boolean", + "title": "Enable" + }, + "name": "enable", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltcards/api/v1/hits": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Hits", + "operationId": "api_hits_boltcards_api_v1_hits_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Hit" + }, + "type": "array", + "title": "Response Api Hits Boltcards Api V1 Hits Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltcards/api/v1/refunds": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Refunds", + "operationId": "api_refunds_boltcards_api_v1_refunds_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__Refund" + }, + "type": "array", + "title": "Response Api Refunds Boltcards Api V1 Refunds Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/boltcards/api/v1/scan/{external_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Scan", + "operationId": "api_scan_boltcards_api_v1_scan__external_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "External Id" + }, + "name": "external_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "P" + }, + "name": "p", + "in": "query" + }, + { + "required": true, + "schema": { + "title": "C" + }, + "name": "c", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Api Scan Boltcards Api V1 Scan External Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/boltcards/api/v1/lnurl/cb/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurl Callback", + "operationId": "boltcards_lnurl_callback_boltcards_api_v1_lnurl_cb__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Boltcards Lnurl Callback Boltcards Api V1 Lnurl Cb Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/boltcards/api/v1/auth": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Auth", + "operationId": "api_auth_boltcards_api_v1_auth_get", + "parameters": [ + { + "required": true, + "schema": { + "title": "A" + }, + "name": "a", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "boltcards" + ], + "summary": "Api Auth Post", + "operationId": "api_auth_post_boltcards_api_v1_auth_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "A" + }, + "name": "a", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Wipe", + "default": false + }, + "name": "wipe", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__boltcards__models__UIDPost" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/boltcards/api/v1/lnurlp/cb/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurlp Callback", + "operationId": "boltcards_lnurlp_callback_boltcards_api_v1_lnurlp_cb__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Boltcards Lnurlp Callback Boltcards Api V1 Lnurlp Cb Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/boltcards/api/v1/lnurlp/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurlp Response", + "operationId": "boltcards_lnurlp_response_boltcards_api_v1_lnurlp__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Boltcards Lnurlp Response Boltcards Api V1 Lnurlp Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnpos/": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Index", + "operationId": "index_lnpos__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lnpos/{payment_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Lnpos.Displaypin", + "operationId": "lnpos_displaypin_lnpos__payment_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Id" + }, + "name": "payment_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnpos/api/v1": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Api Lnposs Get", + "operationId": "api_lnposs_get_lnpos_api_v1_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "lnpos" + ], + "summary": "Api Lnpos Create", + "operationId": "api_lnpos_create_lnpos_api_v1_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLnpos" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnpos/api/v1/{lnpos_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Api Lnpos Get", + "operationId": "api_lnpos_get_lnpos_api_v1__lnpos_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnpos Id" + }, + "name": "lnpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "lnpos" + ], + "summary": "Api Lnpos Update", + "operationId": "api_lnpos_update_lnpos_api_v1__lnpos_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnpos Id" + }, + "name": "lnpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLnpos" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "lnpos" + ], + "summary": "Api Lnpos Delete", + "operationId": "api_lnpos_delete_lnpos_api_v1__lnpos_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnpos Id" + }, + "name": "lnpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/lnpos/api/v2/lnurl/{lnpos_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Lnurl Params", + "operationId": "lnurl_params_lnpos_api_v2_lnurl__lnpos_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnpos Id" + }, + "name": "lnpos_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "P" + }, + "name": "p", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Lnurl Params Lnpos Api V2 Lnurl Lnpos Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnpos/api/v2/lnurl/cb/{payment_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Lnpos.Lnurl Callback", + "operationId": "lnpos_lnurl_callback_lnpos_api_v2_lnurl_cb__payment_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Id" + }, + "name": "payment_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Lnpos Lnurl Callback Lnpos Api V2 Lnurl Cb Payment Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lnpos/api/v1/lnurl/{lnpos_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Lnurl Params", + "operationId": "lnurl_params_lnpos_api_v1_lnurl__lnpos_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnpos Id" + }, + "name": "lnpos_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "P" + }, + "name": "p", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true + } + }, + "/lnpos/api/v1/lnurl/cb/{payment_id}": { + "get": { + "tags": [ + "lnpos" + ], + "summary": "Lnpos.Lnurl Legacy Callback", + "operationId": "lnpos_lnurl_legacy_callback_lnpos_api_v1_lnurl_cb__payment_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Id" + }, + "name": "payment_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true + } + }, + "/lndhub/": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Index", + "operationId": "lndhub_index_lndhub__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/lndhub/ext/getinfo": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Getinfo", + "operationId": "lndhub_getinfo_lndhub_ext_getinfo_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/lndhub/ext/auth": { + "post": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Auth", + "operationId": "lndhub_auth_lndhub_ext_auth_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LndhubAuthData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lndhub/ext/addinvoice": { + "post": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Addinvoice", + "operationId": "lndhub_addinvoice_lndhub_ext_addinvoice_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LndhubAddInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/payinvoice": { + "post": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Payinvoice", + "operationId": "lndhub_payinvoice_lndhub_ext_payinvoice_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LndhubCreateInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/balance": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Balance", + "operationId": "lndhub_balance_lndhub_ext_balance_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/gettxs": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Gettxs", + "operationId": "lndhub_gettxs_lndhub_ext_gettxs_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "maximum": 200, + "minimum": 1, + "title": "Limit", + "default": 20 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "title": "Offset", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/getuserinvoices": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Getuserinvoices", + "operationId": "lndhub_getuserinvoices_lndhub_ext_getuserinvoices_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "maximum": 200, + "minimum": 1, + "title": "Limit", + "default": 20 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "title": "Offset", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/getbtc": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Getbtc", + "description": "load an address for incoming onchain btc", + "operationId": "lndhub_getbtc_lndhub_ext_getbtc_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/getpending": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Getpending", + "description": "pending onchain transactions", + "operationId": "lndhub_getpending_lndhub_ext_getpending_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/lndhub/ext/decodeinvoice": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Decodeinvoice", + "operationId": "lndhub_decodeinvoice_lndhub_ext_decodeinvoice_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Invoice" + }, + "name": "invoice", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/lndhub/ext/checkrouteinvoice": { + "get": { + "tags": [ + "lndhub" + ], + "summary": "Lndhub Checkrouteinvoice", + "description": "not implemented on canonical lndhub", + "operationId": "lndhub_checkrouteinvoice_lndhub_ext_checkrouteinvoice_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/copilot/": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Index", + "operationId": "index_copilot__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/copilot/cp/": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Compose", + "operationId": "compose_copilot_cp__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/copilot/pn/": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Panel", + "operationId": "panel_copilot_pn__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/copilot/chat/{chat_id}": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Chat", + "operationId": "chat_copilot_chat__chat_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Chat Id" + }, + "name": "chat_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/copilot/api/v1/copilot": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Api Copilots Retrieve", + "operationId": "api_copilots_retrieve_copilot_api_v1_copilot_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "copilot" + ], + "summary": "Api Copilot Create", + "operationId": "api_copilot_create_copilot_api_v1_copilot_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCopilotData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Copilot" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/copilot/api/v1/copilot/{copilot_id}": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Api Copilot Retrieve", + "operationId": "api_copilot_retrieve_copilot_api_v1_copilot__copilot_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Copilot Id" + }, + "name": "copilot_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "copilot" + ], + "summary": "Api Copilot Update", + "operationId": "api_copilot_update_copilot_api_v1_copilot__copilot_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Copilot Id" + }, + "name": "copilot_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCopilotData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Copilot" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "copilot" + ], + "summary": "Api Copilot Delete", + "operationId": "api_copilot_delete_copilot_api_v1_copilot__copilot_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Copilot Id" + }, + "name": "copilot_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/copilot/api/v1/copilot/ws/{copilot_id}/{comment}/{data}": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Api Copilot Ws Relay", + "operationId": "api_copilot_ws_relay_copilot_api_v1_copilot_ws__copilot_id___comment___data__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Copilot Id" + }, + "name": "copilot_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Comment" + }, + "name": "comment", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/copilot/lnurl/{cp_id}": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Copilot.Lnurl Response", + "operationId": "copilot_lnurl_response_copilot_lnurl__cp_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Cp Id" + }, + "name": "cp_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/copilot/lnurl/cb/{cp_id}": { + "get": { + "tags": [ + "copilot" + ], + "summary": "Copilot.Lnurl Callback", + "operationId": "copilot_lnurl_callback_copilot_lnurl_cb__cp_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Cp Id" + }, + "name": "cp_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Comment" + }, + "name": "comment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/coinflip/": { + "get": { + "tags": [ + "coinflip" + ], + "summary": "Index", + "operationId": "index_coinflip__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/coinflip/coinflip/{coinflip_settings_id}/{game}": { + "get": { + "tags": [ + "coinflip" + ], + "summary": "Display Coinflip", + "operationId": "display_coinflip_coinflip_coinflip__coinflip_settings_id___game__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Coinflip Settings Id" + }, + "name": "coinflip_settings_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Game" + }, + "name": "game", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/coinflip/api/v1/coinflip/settings": { + "get": { + "tags": [ + "coinflip" + ], + "summary": "Api Get Coinflip Settings", + "operationId": "api_get_coinflip_settings_coinflip_api_v1_coinflip_settings_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "coinflip" + ], + "summary": "Api Update Coinflip Settings", + "operationId": "api_update_coinflip_settings_coinflip_api_v1_coinflip_settings_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CoinflipSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CoinflipSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "coinflip" + ], + "summary": "Api Create Coinflip Settings", + "operationId": "api_create_coinflip_settings_coinflip_api_v1_coinflip_settings_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCoinflipSettings" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CoinflipSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/coinflip/api/v1/coinflip": { + "post": { + "tags": [ + "coinflip" + ], + "summary": "Api Create Coinflip", + "operationId": "api_create_coinflip_coinflip_api_v1_coinflip_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCoinflip" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/coinflip/api/v1/coinflip/join/": { + "post": { + "tags": [ + "coinflip" + ], + "summary": "Api Join Coinflip", + "operationId": "api_join_coinflip_coinflip_api_v1_coinflip_join__post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JoinCoinflipGame" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/coinflip/api/v1/coinflip/coinflip/{coinflip_id}": { + "get": { + "tags": [ + "coinflip" + ], + "summary": "Api Get Coinflip", + "operationId": "api_get_coinflip_coinflip_api_v1_coinflip_coinflip__coinflip_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Coinflip Id" + }, + "name": "coinflip_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satspot/": { + "get": { + "tags": [ + "satspot" + ], + "summary": "Index", + "operationId": "index_satspot__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/satspot/{satspot_id}": { + "get": { + "tags": [ + "satspot" + ], + "summary": "Display Satspot", + "operationId": "display_satspot_satspot__satspot_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Satspot Id" + }, + "name": "satspot_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satspot/api/v1/satspot": { + "get": { + "tags": [ + "satspot" + ], + "summary": "Api Get Satspots", + "operationId": "api_get_satspots_satspot_api_v1_satspot_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "satspot" + ], + "summary": "Api Create Satspot", + "operationId": "api_create_satspot_satspot_api_v1_satspot_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSatspot" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspot/api/v1/satspot/join/": { + "post": { + "tags": [ + "satspot" + ], + "summary": "Api Join Satspot", + "operationId": "api_join_satspot_satspot_api_v1_satspot_join__post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JoinSatspotGame" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/satspot/api/v1/satspot/{satspot_id}": { + "delete": { + "tags": [ + "satspot" + ], + "summary": "Api Satspot Delete", + "operationId": "api_satspot_delete_satspot_api_v1_satspot__satspot_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Satspot Id" + }, + "name": "satspot_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/satspot/api/v1/satspot/satspot/{satspot_id}": { + "get": { + "tags": [ + "satspot" + ], + "summary": "Api Get Satspot", + "operationId": "api_get_satspot_satspot_api_v1_satspot_satspot__satspot_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Satspot Id" + }, + "name": "satspot_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Index", + "operationId": "index_myextension__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/myextension/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Myextension", + "operationId": "myextension_myextension__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/manifest/{myextension_id}.webmanifest": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Manifest", + "operationId": "manifest_myextension_manifest__myextension_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/api/v1/myex": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextensions", + "operationId": "api_myextensions_myextension_api_v1_myex_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/MyExtension" + }, + "type": "array", + "title": "Response Api Myextensions Myextension Api V1 Myex Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextension Create", + "operationId": "api_myextension_create_myextension_api_v1_myex_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMyExtensionData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MyExtension" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/myextension/api/v1/myex/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextension", + "operationId": "api_myextension_myextension_api_v1_myex__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MyExtension" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextension Update", + "operationId": "api_myextension_update_myextension_api_v1_myex__myextension_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMyExtensionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MyExtension" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextension Delete", + "operationId": "api_myextension_delete_myextension_api_v1_myex__myextension_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/myextension/api/v1/myex/payment": { + "post": { + "tags": [ + "MyExtension" + ], + "summary": "Api Myextension Create Invoice", + "operationId": "api_myextension_create_invoice_myextension_api_v1_myex_payment_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePayment" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Myextension Create Invoice Myextension Api V1 Myex Payment Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/api/v1/lnurl/pay/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Myextension.Api Lnurl Pay", + "operationId": "myextension_api_lnurl_pay_myextension_api_v1_lnurl_pay__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/api/v1/lnurl/paycb/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Myextension.Api Lnurl Pay Callback", + "operationId": "myextension_api_lnurl_pay_callback_myextension_api_v1_lnurl_paycb__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/api/v1/lnurl/withdraw/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Myextension.Api Lnurl Withdraw", + "operationId": "myextension_api_lnurl_withdraw_myextension_api_v1_lnurl_withdraw__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/myextension/api/v1/lnurl/withdrawcb/{myextension_id}": { + "get": { + "tags": [ + "MyExtension" + ], + "summary": "Myextension.Api Lnurl Withdraw Callback", + "operationId": "myextension_api_lnurl_withdraw_callback_myextension_api_v1_lnurl_withdrawcb__myextension_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Myextension Id" + }, + "name": "myextension_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/bleskomat/": { + "get": { + "tags": [ + "Bleskomat" + ], + "summary": "Index", + "operationId": "index_bleskomat__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/bleskomat/api/v1/bleskomats": { + "get": { + "tags": [ + "Bleskomat" + ], + "summary": "Api Bleskomats", + "operationId": "api_bleskomats_bleskomat_api_v1_bleskomats_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Bleskomat" + }, + "type": "array", + "title": "Response Api Bleskomats Bleskomat Api V1 Bleskomats Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/bleskomat/api/v1/bleskomat/{bleskomat_id}": { + "get": { + "tags": [ + "Bleskomat" + ], + "summary": "Api Bleskomat Retrieve", + "operationId": "api_bleskomat_retrieve_bleskomat_api_v1_bleskomat__bleskomat_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Bleskomat Id" + }, + "name": "bleskomat_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Bleskomat" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "Bleskomat" + ], + "summary": "Api Bleskomat Create Or Update", + "operationId": "api_bleskomat_create_or_update_bleskomat_api_v1_bleskomat__bleskomat_id__put", + "parameters": [ + { + "required": true, + "schema": { + "title": "Bleskomat Id" + }, + "name": "bleskomat_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBleskomat" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Bleskomat" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Bleskomat" + ], + "summary": "Api Bleskomat Delete", + "operationId": "api_bleskomat_delete_bleskomat_api_v1_bleskomat__bleskomat_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Bleskomat Id" + }, + "name": "bleskomat_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/bleskomat/api/v1/bleskomat": { + "post": { + "tags": [ + "Bleskomat" + ], + "summary": "Api Bleskomat Create Or Update", + "operationId": "api_bleskomat_create_or_update_bleskomat_api_v1_bleskomat_post", + "parameters": [ + { + "required": false, + "schema": { + "title": "Bleskomat Id" + }, + "name": "bleskomat_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBleskomat" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Bleskomat" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/bleskomat/u": { + "get": { + "tags": [ + "Bleskomat" + ], + "summary": "Bleskomat.Api Bleskomat Lnurl", + "operationId": "bleskomat_api_bleskomat_lnurl_bleskomat_u_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/scheduler/": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "Index", + "operationId": "index_scheduler__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scheduler/api/v1/test_log/{job_id}": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "his log saves the testlogs", + "description": "testlog", + "operationId": "testlog_scheduler_api_v1_test_log__job_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "testlog", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Testlog Scheduler Api V1 Test Log Job Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/logentry/{log_id}": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "get log entires for job from DB", + "operationId": "Log_entries_for_a_specific_job_id_from_DB_scheduler_api_v1_logentry__log_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Log Id" + }, + "name": "log_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "log entries for a job from DB", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Log Entries For A Specific Job Id From Db Scheduler Api V1 Logentry Log Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "scheduler" + ], + "summary": "Delete a Job's Log from DB", + "description": "Delete Job Log from DB", + "operationId": "Job_Log_Delete_scheduler_api_v1_logentry__log_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Log Id" + }, + "name": "log_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Job Log Delete Scheduler Api V1 Logentry Log Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/logentry": { + "post": { + "tags": [ + "scheduler" + ], + "summary": "Create a new log entry in DB", + "description": "Create a new log entry in DB", + "operationId": "Log_Entry_Create_scheduler_api_v1_logentry_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogEntry" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New Log Entry", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogEntry" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/complete_log": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "get log of all the jobs plus extra logs", + "operationId": "Complete_Log_scheduler_api_v1_complete_log_get", + "responses": { + "200": { + "description": "complete log from scheduler.log", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Complete Log Scheduler Api V1 Complete Log Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/delete_log": { + "post": { + "tags": [ + "scheduler" + ], + "summary": "clear all log messages", + "operationId": "delete_Log_scheduler_api_v1_delete_log_post", + "responses": { + "200": { + "description": "delete complete log from scheduler.log", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Log Scheduler Api V1 Delete Log Post" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/jobs": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "get list of jobs", + "description": "Retrieves all jobs, supporting flexible filtering (LHS Brackets).\n\n### Syntax\n`field[op]=value`\n\n### Operators\n- eq, ne\n- gt, lt\n- in (include)\n- ex (exclude)\n\nFilters are AND-combined", + "operationId": "Jobs_List_scheduler_api_v1_jobs_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Id" + }, + "name": "id", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Name" + }, + "name": "name", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Schedule" + }, + "name": "schedule", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Selectedverb" + }, + "name": "selectedverb", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Url" + }, + "name": "url", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Body" + }, + "name": "body", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra" + }, + "name": "extra", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of jobs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "scheduler" + ], + "summary": "Create a new job", + "description": "Create a new job", + "operationId": "Job_Create_scheduler_api_v1_jobs_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateJobData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "New Job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/jobs/{job_id}": { + "get": { + "tags": [ + "scheduler" + ], + "summary": "Get a specific jobs", + "description": "get jobs", + "operationId": "Jobs_Get_scheduler_api_v1_jobs__job_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "job if job exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "scheduler" + ], + "summary": "Update a jobs", + "description": "Update a jobs", + "operationId": "Jobs_Update_scheduler_api_v1_jobs__job_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + }, + "name": "job_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Updated jobs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/jobs/{jobs_id}": { + "delete": { + "tags": [ + "scheduler" + ], + "summary": "Delete a jobs", + "description": "Delete a jobs", + "operationId": "Jobs_Delete_scheduler_api_v1_jobs__jobs_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Jobs Id" + }, + "name": "jobs_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "404": { + "description": "Jobs does not exist." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/scheduler/api/v1/pause/{job_id}/{status}": { + "post": { + "tags": [ + "scheduler" + ], + "summary": "Start or Stop Cron jobs", + "description": "Stop or Start Cron jobs", + "operationId": "Pause_Jobs_scheduler_api_v1_pause__job_id___status__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + }, + "name": "job_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Pause jobs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "404": { + "description": "Job does not exist." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Index", + "operationId": "index_livestream__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/livestream/track/{track_id}": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Livestream.Track Redirect Download", + "operationId": "livestream_track_redirect_download_livestream_track__track_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Track Id" + }, + "name": "track_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "P" + }, + "name": "p", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/livestream/api/v1/livestream": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Api Livestream From Wallet", + "operationId": "api_livestream_from_wallet_livestream_api_v1_livestream_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LivestreamOverview" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/api/v1/livestream/track/{track_id}": { + "put": { + "tags": [ + "livestream" + ], + "summary": "Api Update Tracks", + "operationId": "api_update_tracks_livestream_api_v1_livestream_track__track_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Track Id" + }, + "name": "track_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTrack" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/api/v1/livestream/fee/{fee_pct}": { + "put": { + "tags": [ + "livestream" + ], + "summary": "Api Update Fee", + "operationId": "api_update_fee_livestream_api_v1_livestream_fee__fee_pct__put", + "parameters": [ + { + "required": true, + "schema": { + "title": "Fee Pct" + }, + "name": "fee_pct", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/api/v1/livestream/track": { + "post": { + "tags": [ + "livestream" + ], + "summary": "Api Add Tracks", + "operationId": "api_add_tracks_livestream_api_v1_livestream_track_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTrack" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/api/v1/livestream/tracks/{track_id}": { + "delete": { + "tags": [ + "livestream" + ], + "summary": "Api Delete Track", + "operationId": "api_delete_track_livestream_api_v1_livestream_tracks__track_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Track Id" + }, + "name": "track_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/livestream/lnurl/{ls_id}": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Livestream.Lnurl Livestream", + "operationId": "livestream_lnurl_livestream_livestream_lnurl__ls_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ls Id" + }, + "name": "ls_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Livestream Lnurl Livestream Livestream Lnurl Ls Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/livestream/lnurl/t/{track_id}": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Livestream.Lnurl Track", + "operationId": "livestream_lnurl_track_livestream_lnurl_t__track_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Track Id" + }, + "name": "track_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Livestream Lnurl Track Livestream Lnurl T Track Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/livestream/lnurl/cb/{track_id}": { + "get": { + "tags": [ + "livestream" + ], + "summary": "Livestream.Lnurl Callback", + "operationId": "livestream_lnurl_callback_livestream_lnurl_cb__track_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Track Id" + }, + "name": "track_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Comment" + }, + "name": "comment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Livestream Lnurl Callback Livestream Lnurl Cb Track Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Index", + "operationId": "index_tpos__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/tpos/{tpos_id}": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Tpos", + "operationId": "tpos_tpos__tpos_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Lnaddress", + "default": "" + }, + "name": "lnaddress", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/manifest/{tpos_id}.webmanifest": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Manifest", + "operationId": "manifest_tpos_manifest__tpos_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/lnurl/{lnurlcharge_id}/{amount}": { + "get": { + "tags": [ + "TPoS", + "LNURL" + ], + "summary": "Tpos.Tposlnurlcharge", + "operationId": "tpos_tposlnurlcharge_tpos_api_v1_lnurl__lnurlcharge_id___amount__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnurlcharge Id" + }, + "name": "lnurlcharge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Tpos Tposlnurlcharge Tpos Api V1 Lnurl Lnurlcharge Id Amount Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/lnurl/cb": { + "get": { + "tags": [ + "TPoS", + "LNURL" + ], + "summary": "Tpos.Tposlnurlcharge.Callback", + "operationId": "tpos_tposlnurlcharge_callback_tpos_api_v1_lnurl_cb_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Tpos Tposlnurlcharge Callback Tpos Api V1 Lnurl Cb Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/tposs": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tposs", + "operationId": "api_tposs_tpos_api_v1_tposs_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__Tpos" + }, + "type": "array", + "title": "Response Api Tposs Tpos Api V1 Tposs Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create", + "operationId": "api_tpos_create_tpos_api_v1_tposs_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__CreateTposData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/tpos/api/v1/tposs/{tpos_id}": { + "put": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Update", + "operationId": "api_tpos_update_tpos_api_v1_tposs__tpos_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__CreateTposData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Delete", + "operationId": "api_tpos_delete_tpos_api_v1_tposs__tpos_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/tpos/api/v1/tposs/{tpos_id}/invoices": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Get Latest Invoices", + "operationId": "api_tpos_get_latest_invoices_tpos_api_v1_tposs__tpos_id__invoices_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create Invoice", + "operationId": "api_tpos_create_invoice_tpos_api_v1_tposs__tpos_id__invoices_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__CreateTposInvoice" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/tposs/{tpos_id}/invoices/{payment_request}/pay": { + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Pay Invoice", + "operationId": "api_tpos_pay_invoice_tpos_api_v1_tposs__tpos_id__invoices__payment_request__pay_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Request" + }, + "name": "payment_request", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__PayLnurlWData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/tposs/{tpos_id}/invoices/{payment_hash}": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Check Invoice", + "operationId": "api_tpos_check_invoice_tpos_api_v1_tposs__tpos_id__invoices__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Extra", + "default": false + }, + "name": "extra", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/tposs/{tpos_id}/items": { + "put": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create Items", + "operationId": "api_tpos_create_items_tpos_api_v1_tposs__tpos_id__items_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__CreateUpdateItemData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__Tpos" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/tpos/api/v1/tposs/lnaddresscheck": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Check Lnaddress", + "operationId": "api_tpos_check_lnaddress_tpos_api_v1_tposs_lnaddresscheck_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnaddress" + }, + "name": "lnaddress", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/atm/{tpos_id}/create": { + "post": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Atm Pin Check", + "operationId": "api_tpos_atm_pin_check_tpos_api_v1_atm__tpos_id__create_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__LnurlCharge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/tpos/api/v1/atm/withdraw/{charge_id}/{amount}": { + "get": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Create Withdraw", + "operationId": "api_tpos_create_withdraw_tpos_api_v1_atm_withdraw__charge_id___amount__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__LnurlCharge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tpos/api/v1/atm/withdraw/{charge_id}/{amount}/pay": { + "post": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Atm Pay", + "operationId": "api_tpos_atm_pay_tpos_api_v1_atm_withdraw__charge_id___amount__pay_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__CreateWithdrawPay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/eightball/": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Index", + "operationId": "index_eightball__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/eightball/{eightball_id}": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Eightball", + "operationId": "eightball_eightball__eightball_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/eightball/manifest/{eightball_id}.webmanifest": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Manifest", + "operationId": "manifest_eightball_manifest__eightball_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/eightball/api/v1/eightb": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Api Eightballs", + "operationId": "api_eightballs_eightball_api_v1_eightb_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "EightBall" + ], + "summary": "Api Eightball Create", + "operationId": "api_eightball_create_eightball_api_v1_eightb_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEightBallData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EightBall" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/eightball/api/v1/eightb/{eightball_id}": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Api Eightball", + "operationId": "api_eightball_eightball_api_v1_eightb__eightball_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "EightBall" + ], + "summary": "Api Eightball Update", + "operationId": "api_eightball_update_eightball_api_v1_eightb__eightball_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEightBallData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "EightBall" + ], + "summary": "Api Eightball Delete", + "operationId": "api_eightball_delete_eightball_api_v1_eightb__eightball_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/eightball/api/v1/lnurl/pay/{eightball_id}": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Eightball.Api Lnurl Pay", + "operationId": "eightball_api_lnurl_pay_eightball_api_v1_lnurl_pay__eightball_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Eightball Api Lnurl Pay Eightball Api V1 Lnurl Pay Eightball Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/eightball/api/v1/lnurl/paycb/{eightball_id}": { + "get": { + "tags": [ + "EightBall" + ], + "summary": "Eightball.Api Lnurl Pay Callback", + "operationId": "eightball_api_lnurl_pay_callback_eightball_api_v1_lnurl_paycb__eightball_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Eightball Id" + }, + "name": "eightball_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Eightball Api Lnurl Pay Callback Eightball Api V1 Lnurl Paycb Eightball Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tipjar/": { + "get": { + "tags": [ + "tipjar" + ], + "summary": "Index", + "operationId": "index_tipjar__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/tipjar/{tipjar_id}": { + "get": { + "tags": [ + "tipjar" + ], + "summary": "Tip", + "description": "Return the donation form for the Tipjar corresponding to id", + "operationId": "tip_tipjar__tipjar_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tipjar Id" + }, + "name": "tipjar_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tipjar/api/v1/tipjars": { + "get": { + "tags": [ + "tipjar" + ], + "summary": "Api Get Tipjars", + "description": "Return list of all tipjars assigned to wallet with given invoice key", + "operationId": "api_get_tipjars_tipjar_api_v1_tipjars_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/TipJar" + }, + "type": "array", + "title": "Response Api Get Tipjars Tipjar Api V1 Tipjars Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "tipjar" + ], + "summary": "Api Create Tipjar", + "description": "Create a tipjar, which holds data about how/where to post tips", + "operationId": "api_create_tipjar_tipjar_api_v1_tipjars_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTipJar" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TipJar" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/tipjar/api/v1/tips": { + "get": { + "tags": [ + "tipjar" + ], + "summary": "Api Get Tips", + "description": "Return list of all tips assigned to wallet with given invoice key", + "operationId": "api_get_tips_tipjar_api_v1_tips_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Tip" + }, + "type": "array", + "title": "Response Api Get Tips Tipjar Api V1 Tips Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "tipjar" + ], + "summary": "Api Create Tip", + "description": "Public route to take data from tip form and return satspay charge", + "operationId": "api_create_tip_tipjar_api_v1_tips_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTips" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Create Tip Tipjar Api V1 Tips Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/tipjar/api/v1/tips/{tip_id}": { + "put": { + "tags": [ + "tipjar" + ], + "summary": "Api Update Tip", + "description": "Update a tip with the data given in the request", + "operationId": "api_update_tip_tipjar_api_v1_tips__tip_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tip Id" + }, + "name": "tip_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTip" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tip" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "tipjar" + ], + "summary": "Api Delete Tip", + "description": "Delete the tip with the given tip_id", + "operationId": "api_delete_tip_tipjar_api_v1_tips__tip_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tip Id" + }, + "name": "tip_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/tipjar/api/v1/tipjars/{tipjar_id}": { + "put": { + "tags": [ + "tipjar" + ], + "summary": "Api Update Tipjar", + "description": "Update a tipjar with the data given in the request", + "operationId": "api_update_tipjar_tipjar_api_v1_tipjars__tipjar_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tipjar Id" + }, + "name": "tipjar_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTipJar" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TipJar" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "tipjar" + ], + "summary": "Api Delete Tipjar", + "description": "Delete the tipjar with the given tipjar_id", + "operationId": "api_delete_tipjar_tipjar_api_v1_tipjars__tipjar_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tipjar Id" + }, + "name": "tipjar_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/auction_house/": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Index", + "operationId": "index_auction_house__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/auction_room/{auction_room_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Auction Room Details", + "operationId": "auction_room_details_auction_house_auction_room__auction_room_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/auctions/{auction_room_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Auctions List", + "operationId": "auctions_list_auction_house_auctions__auction_room_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/bids/{auction_item_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Bids List", + "operationId": "bids_list_auction_house_bids__auction_item_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/audit/auctions/{entry_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Entry Audit", + "operationId": "entry_audit_auction_house_audit_auctions__entry_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Entry Id" + }, + "name": "entry_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/auction_room": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Api Get Auction Rooms", + "operationId": "api_get_auction_rooms_auction_house_api_v1_auction_room_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AuctionRoom" + }, + "type": "array", + "title": "Response Api Get Auction Rooms Auction House Api V1 Auction Room Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "auction_house" + ], + "summary": "Api Update Auction Room", + "operationId": "api_update_auction_room_auction_house_api_v1_auction_room_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditAuctionRoomData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "auction_house" + ], + "summary": "Api Create Auction Room", + "operationId": "api_create_auction_room_auction_house_api_v1_auction_room_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAuctionRoomData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/auction_room/{auction_room_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Api Get Auction Room", + "operationId": "api_get_auction_room_auction_house_api_v1_auction_room__auction_room_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/AuctionRoom" + }, + { + "$ref": "#/components/schemas/PublicAuctionRoom" + } + ], + "title": "Response Api Get Auction Room Auction House Api V1 Auction Room Auction Room Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "auction_house" + ], + "summary": "Api Auction Room Delete", + "operationId": "api_auction_room_delete_auction_house_api_v1_auction_room__auction_room_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/items/{auction_room_id}": { + "post": { + "tags": [ + "auction_house" + ], + "summary": "Api Create Auction Item", + "operationId": "api_create_auction_item_auction_house_api_v1_items__auction_room_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAuctionItem" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAuctionItem" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/items/{auction_room_id}/paginated": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "get paginated list of auction items", + "operationId": "Auction_Items_List_auction_house_api_v1_items__auction_room_id__paginated_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Room Id" + }, + "name": "auction_room_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Include Inactive" + }, + "name": "include_inactive", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "User Is Owner" + }, + "name": "user_is_owner", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "User Is Participant" + }, + "name": "user_is_participant", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Name" + }, + "name": "name", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "number", + "title": "Ask Price" + }, + "name": "ask_price", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "number", + "title": "Current Price" + }, + "name": "current_price", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Expires At" + }, + "name": "expires_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of auction items", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/items/{auction_item_id}": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "Get the auction item with this is. If the user is the owner, return the full item, otherwise return a public item", + "operationId": "Get_Auction_Item_auction_house_api_v1_items__auction_item_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An auction item or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAuctionItem" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "auction_house" + ], + "summary": "Close the auction for this item manually. The auction must be expired or have zero bids to be able to close it.Only the owner of the item or of the auction room can close the auction.", + "operationId": "Manually_close_Auction_Item_auction_house_api_v1_items__auction_item_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Force Close", + "default": false + }, + "name": "force_close", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An auction item or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/bids/{auction_item_id}": { + "put": { + "tags": [ + "auction_house" + ], + "summary": "Api Place Bid", + "operationId": "api_place_bid_auction_house_api_v1_bids__auction_item_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BidRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BidResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/bids/{auction_item_id}/paginated": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "get paginated list of bids for an auction item", + "operationId": "Bids_List_auction_house_api_v1_bids__auction_item_id__paginated_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Only Mine", + "default": false + }, + "name": "only_mine", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Include Unpaid", + "default": false + }, + "name": "include_unpaid", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "number", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "number", + "title": "Amount Sat" + }, + "name": "amount_sat", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of bids", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/auction_house/api/v1/audit/items/{auction_item_id}/paginated": { + "get": { + "tags": [ + "auction_house" + ], + "summary": "get paginated list of audit entries for an entry", + "operationId": "Audit_Data_auction_house_api_v1_audit_items__auction_item_id__paginated_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Auction Item Id" + }, + "name": "auction_item_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Entry Id" + }, + "name": "entry_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of audit entries", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/sellcoins/": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Index", + "operationId": "index_sellcoins__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/sellcoins/{product_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Get Products Page", + "operationId": "get_products_page_sellcoins__product_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/sellcoins/order/{order_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Get Order Page", + "operationId": "get_order_page_sellcoins_order__order_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Order Id" + }, + "name": "order_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/sellcoins/manifest/{settings_id}.webmanifest": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Manifest", + "operationId": "manifest_sellcoins_manifest__settings_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/sellcoins/api/v1/settings": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Api Get Settings", + "operationId": "api_get_settings_sellcoins_api_v1_settings_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "SellCoins" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_sellcoins_api_v1_settings_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/sellcoins/api/v1/product": { + "post": { + "tags": [ + "SellCoins" + ], + "summary": "Api Create Product", + "operationId": "api_create_product_sellcoins_api_v1_product_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__sellcoins__models__Product" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__extensions__sellcoins__models__Product" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/sellcoins/api/v1/products": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Api Get Products", + "operationId": "api_get_products_sellcoins_api_v1_products_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__sellcoins__models__Product" + }, + "type": "array", + "title": "Response Api Get Products Sellcoins Api V1 Products Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/sellcoins/api/v1/product/{product_id}": { + "delete": { + "tags": [ + "SellCoins" + ], + "summary": "Api Delete Product", + "operationId": "api_delete_product_sellcoins_api_v1_product__product_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/sellcoins/api/v1/order/{product_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Api Create Order", + "operationId": "api_create_order_sellcoins_api_v1_order__product_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Product Id" + }, + "name": "product_id", + "in": "path" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrder" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/sellcoins/api/v1/orders/{settings_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Api Get Orders", + "operationId": "api_get_orders_sellcoins_api_v1_orders__settings_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__sellcoins__models__Order" + }, + "type": "array", + "title": "Response Api Get Orders Sellcoins Api V1 Orders Settings Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/sellcoins/api/v1/lnurl/{order_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Sellcoins.Api Lnurl Withdraw", + "operationId": "sellcoins_api_lnurl_withdraw_sellcoins_api_v1_lnurl__order_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Order Id" + }, + "name": "order_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/sellcoins/api/v1/lnurl/callback/{order_id}": { + "get": { + "tags": [ + "SellCoins" + ], + "summary": "Sellcoins.Api Lnurl Callback", + "operationId": "sellcoins_api_lnurl_callback_sellcoins_api_v1_lnurl_callback__order_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Order Id" + }, + "name": "order_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/scrum/": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "Index", + "operationId": "index_scrum__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/{scrum_id}": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "Scrum Public Page", + "operationId": "scrum_public_page_scrum__scrum_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/scrum/manifest/{scrum_id}.webmanifest": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "Manifest", + "operationId": "manifest_scrum_manifest__scrum_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/scrum/api/v1/scrum": { + "post": { + "tags": [ + "Scrum" + ], + "summary": "Api Create Scrum", + "operationId": "api_create_scrum_scrum_api_v1_scrum_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScrum" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scrum" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/scrum/{scrum_id}": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "Get the scrum with this id.", + "operationId": "Get_Scrum_scrum_api_v1_scrum__scrum_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An scrum or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scrum" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Scrum" + ], + "summary": "Api Update Scrum", + "operationId": "api_update_scrum_scrum_api_v1_scrum__scrum_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScrum" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scrum" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Scrum" + ], + "summary": "Delete the scrum and optionally all its associated tasks.", + "operationId": "Delete_Scrum_scrum_api_v1_scrum__scrum_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Clear Tasks", + "default": false + }, + "name": "clear_tasks", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/scrum/paginated": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "get paginated list of scrum", + "operationId": "Scrum_List_scrum_api_v1_scrum_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "name": "updated_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of scrum", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/tasks": { + "post": { + "tags": [ + "Scrum" + ], + "summary": "Create new tasks for the specified scrum.", + "operationId": "Create_Tasks_scrum_api_v1_tasks_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTasks" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The created tasks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tasks" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/tasks/{tasks_id}": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "Get the tasks with this id.", + "operationId": "Get_Tasks_scrum_api_v1_tasks__tasks_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tasks Id" + }, + "name": "tasks_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An tasks or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tasks" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Scrum" + ], + "summary": "Update the tasks with this id.", + "operationId": "Update_Tasks_scrum_api_v1_tasks__tasks_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tasks Id" + }, + "name": "tasks_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTasks" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The updated tasks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tasks" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Scrum" + ], + "summary": "Delete the tasks", + "operationId": "Delete_Tasks_scrum_api_v1_tasks__tasks_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tasks Id" + }, + "name": "tasks_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/tasks/paginated": { + "get": { + "tags": [ + "Scrum" + ], + "summary": "get paginated list of tasks", + "operationId": "Tasks_List_scrum_api_v1_tasks_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Scrum Id" + }, + "name": "scrum_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "name": "updated_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of tasks", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/scrum/api/v1/tasks/public": { + "post": { + "tags": [ + "Scrum" + ], + "summary": "Create new public tasks for the specified scrum.", + "operationId": "Create_Public_Tasks_scrum_api_v1_tasks_public_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTasks" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The created public tasks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tasks" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/scrum/api/v1/tasks/public/{tasks_id}": { + "put": { + "tags": [ + "Scrum" + ], + "summary": "Update the tasks with this id.", + "operationId": "Update_Tasks_scrum_api_v1_tasks_public__tasks_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tasks Id" + }, + "name": "tasks_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TasksPublic" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The updated tasks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tasks" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Scrum" + ], + "summary": "Delete the tasks", + "operationId": "Delete_Tasks_scrum_api_v1_tasks_public__tasks_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tasks Id" + }, + "name": "tasks_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/numbers/": { + "get": { + "tags": [ + "numbers" + ], + "summary": "Index", + "operationId": "index_numbers__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/numbers/{game_id}": { + "get": { + "tags": [ + "numbers" + ], + "summary": "Display Numbers", + "operationId": "display_numbers_numbers__game_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Game Id" + }, + "name": "game_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/numbers/api/v1": { + "get": { + "tags": [ + "numbers" + ], + "summary": "Api Get Games", + "operationId": "api_get_games_numbers_api_v1_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "numbers" + ], + "summary": "Api Create Game", + "operationId": "api_create_game_numbers_api_v1_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Game" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/numbers/api/v1/{game_id}": { + "get": { + "tags": [ + "numbers" + ], + "summary": "Api Get Public Game", + "operationId": "api_get_public_game_numbers_api_v1__game_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Game Id" + }, + "name": "game_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "numbers" + ], + "summary": "Api Delete Game", + "operationId": "api_delete_game_numbers_api_v1__game_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Game Id" + }, + "name": "game_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/numbers/api/v1/join": { + "post": { + "tags": [ + "numbers" + ], + "summary": "Api Create Player", + "operationId": "api_create_player_numbers_api_v1_join_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Player" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/numbers/api/v1/players/{game_id}": { + "get": { + "tags": [ + "numbers" + ], + "summary": "Api Get Players", + "operationId": "api_get_players_numbers_api_v1_players__game_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Game Id" + }, + "name": "game_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/dashboard/": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Index", + "operationId": "index_dashboard__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/{owner_data_id}": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Owner Data Public Page", + "operationId": "owner_data_public_page_dashboard__owner_data_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/dashboard/manifest/{owner_data_id}.webmanifest": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Manifest", + "operationId": "manifest_dashboard_manifest__owner_data_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/dashboard/api/v1/owner_data": { + "post": { + "tags": [ + "Dashboard" + ], + "summary": "Api Create Owner Data", + "operationId": "api_create_owner_data_dashboard_api_v1_owner_data_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOwnerData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OwnerData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/api/v1/owner_data/{owner_data_id}": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Get the owner_data with this id.", + "operationId": "Get_OwnerData_dashboard_api_v1_owner_data__owner_data_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An owner_data or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OwnerData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Dashboard" + ], + "summary": "Api Update Owner Data", + "operationId": "api_update_owner_data_dashboard_api_v1_owner_data__owner_data_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOwnerData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OwnerData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Dashboard" + ], + "summary": "Delete the owner_data and optionally all its associated client_data.", + "operationId": "Delete_Owner_Data_dashboard_api_v1_owner_data__owner_data_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Clear Client Data", + "default": false + }, + "name": "clear_client_data", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/api/v1/owner_data/paginated": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "get paginated list of owner_data", + "operationId": "Owner_Data_List_dashboard_api_v1_owner_data_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "name": "updated_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of owner_data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/api/v1/client_data": { + "put": { + "tags": [ + "Dashboard" + ], + "summary": "Update the client_data with this id.", + "operationId": "Update_Client_Data_dashboard_api_v1_client_data_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "The updated client data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Dashboard" + ], + "summary": "Create new client data for the specified owner data.", + "operationId": "Create_Client_Data_dashboard_api_v1_client_data_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateClientData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "The created client data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/api/v1/client_data/paginated": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "get paginated list of client_data", + "operationId": "Client_Data_List_dashboard_api_v1_client_data_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Owner Data Id" + }, + "name": "owner_data_id", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "name": "updated_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of client_data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/dashboard/api/v1/client_data/{client_data_id}": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Get the client data with this id.", + "operationId": "Get_Client_Data_dashboard_api_v1_client_data__client_data_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Client Data Id" + }, + "name": "client_data_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An client data or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientData" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Dashboard" + ], + "summary": "Delete the client_data", + "operationId": "Delete_Client_Data_dashboard_api_v1_client_data__client_data_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Client Data Id" + }, + "name": "client_data_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/chaospad/": { + "get": { + "tags": [ + "ChaosPad" + ], + "summary": "Index", + "operationId": "index_chaospad__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/chaospad/{pads_id}": { + "get": { + "tags": [ + "ChaosPad" + ], + "summary": "Pads Public Page", + "operationId": "pads_public_page_chaospad__pads_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/chaospad/api/v1/pads": { + "post": { + "tags": [ + "ChaosPad" + ], + "summary": "Api Create Pads", + "operationId": "api_create_pads_chaospad_api_v1_pads_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePads" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pads" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/chaospad/api/v1/pads/{pads_id}": { + "get": { + "tags": [ + "ChaosPad" + ], + "summary": "Get the pads with this id.", + "operationId": "Get_Pads_chaospad_api_v1_pads__pads_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "An pads or 404 if not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pads" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "ChaosPad" + ], + "summary": "Api Update Pads", + "operationId": "api_update_pads_chaospad_api_v1_pads__pads_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePads" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pads" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "ChaosPad" + ], + "summary": "Delete the pads and optionally all its associated client_data.", + "operationId": "Delete_Pads_chaospad_api_v1_pads__pads_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Clear Client Data", + "default": false + }, + "name": "clear_client_data", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "The status of the deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/chaospad/api/v1/pads/paginated": { + "get": { + "tags": [ + "ChaosPad" + ], + "summary": "get paginated list of pads", + "operationId": "Pads_List_chaospad_api_v1_pads_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "name": "created_at", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "name": "updated_at", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of pads", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/chaospad/api/v1/snapshot/{pads_id}": { + "get": { + "tags": [ + "ChaosPad" + ], + "summary": "Api Get Snapshot", + "operationId": "api_get_snapshot_chaospad_api_v1_snapshot__pads_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "ChaosPad" + ], + "summary": "Api Post Snapshot", + "operationId": "api_post_snapshot_chaospad_api_v1_snapshot__pads_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Pads Id" + }, + "name": "pads_id", + "in": "path" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotWriteResult" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Index", + "operationId": "index_fossa__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/fossa/atm": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Atmpage", + "operationId": "atmpage_fossa_atm_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lightning" + }, + "name": "lightning", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/print/{payment_id}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Print Receipt", + "operationId": "print_receipt_fossa_print__payment_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Payment Id" + }, + "name": "payment_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/api/v1/fossa": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Api Fossas Retrieve", + "operationId": "api_fossas_retrieve_fossa_api_v1_fossa_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Fossa" + }, + "type": "array", + "title": "Response Api Fossas Retrieve Fossa Api V1 Fossa Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "fossa" + ], + "summary": "Api Fossa Create", + "operationId": "api_fossa_create_fossa_api_v1_fossa_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFossa" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fossa" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/fossa/api/v1/fossa/{fossa_id}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Api Fossa Retrieve", + "operationId": "api_fossa_retrieve_fossa_api_v1_fossa__fossa_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Fossa Id" + }, + "name": "fossa_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fossa" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "fossa" + ], + "summary": "Api Fossa Update", + "operationId": "api_fossa_update_fossa_api_v1_fossa__fossa_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Fossa Id" + }, + "name": "fossa_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFossa" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Fossa" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "fossa" + ], + "summary": "Api Fossa Delete", + "operationId": "api_fossa_delete_fossa_api_v1_fossa__fossa_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Fossa Id" + }, + "name": "fossa_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/fossa/api/v1/lnurl/{fossa_id}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Fossa.Lnurl Params", + "operationId": "fossa_lnurl_params_fossa_api_v1_lnurl__fossa_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Fossa Id" + }, + "name": "fossa_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "P" + }, + "name": "p", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Fossa Lnurl Params Fossa Api V1 Lnurl Fossa Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/api/v1/lnurl/cb/{payment_id}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Fossa.Lnurl Callback", + "operationId": "fossa_lnurl_callback_fossa_api_v1_lnurl_cb__payment_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Id" + }, + "name": "payment_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Fossa Lnurl Callback Fossa Api V1 Lnurl Cb Payment Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/api/v1/atm": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Api Atm Payments Retrieve", + "operationId": "api_atm_payments_retrieve_fossa_api_v1_atm_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/FossaPayment" + }, + "type": "array", + "title": "Response Api Atm Payments Retrieve Fossa Api V1 Atm Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/fossa/api/v1/atm/{atm_id}": { + "delete": { + "tags": [ + "fossa" + ], + "summary": "Api Atm Payment Delete", + "operationId": "api_atm_payment_delete_fossa_api_v1_atm__atm_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Atm Id" + }, + "name": "atm_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/fossa/api/v1/ln/{lnurl}/{withdraw_request}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Get Fossa Payment Lightning", + "description": "Handle Lightning payments for atms via invoice, lnaddress, lnurlp (withdraw_request)", + "operationId": "get_fossa_payment_lightning_fossa_api_v1_ln__lnurl___withdraw_request__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnurl" + }, + "name": "lnurl", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Withdraw Request" + }, + "name": "withdraw_request", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/fossa/api/v1/boltz/{lnurl}/{onchain_liquid}/{address}": { + "get": { + "tags": [ + "fossa" + ], + "summary": "Get Fossa Payment Boltz", + "description": "Handle Boltz payments for atms.", + "operationId": "get_fossa_payment_boltz_fossa_api_v1_boltz__lnurl___onchain_liquid___address__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnurl" + }, + "name": "lnurl", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Onchain Liquid" + }, + "name": "onchain_liquid", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Address" + }, + "name": "address", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Index", + "operationId": "index_paidreviews__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paidreviews/{settings_id}/{tag}": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Myextension", + "operationId": "myextension_paidreviews__settings_id___tag__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/manifest/{settings_id}/{tag}.webmanifest": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Manifest", + "operationId": "manifest_paidreviews_manifest__settings_id___tag__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/api/v1/settings": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Settings", + "operationId": "api_settings_paidreviews_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PRSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Create Settings", + "operationId": "api_create_settings_paidreviews_api_v1_settings_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePrSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PRSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paidreviews/api/v1/settings/{settings_id}": { + "put": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_paidreviews_api_v1_settings__settings_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePrSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PRSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paidreviews/api/v1/{settings_id}/tags": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Get Tags", + "operationId": "api_get_tags_paidreviews_api_v1__settings_id__tags_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/RatingStats" + }, + "type": "array", + "title": "Response Api Get Tags Paidreviews Api V1 Settings Id Tags Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/api/v1/{settings_id}/tags/sync": { + "post": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Sync Tags From Manifest", + "operationId": "api_sync_tags_from_manifest_paidreviews_api_v1__settings_id__tags_sync_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Sync Tags From Manifest Paidreviews Api V1 Settings Id Tags Sync Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/paidreviews/api/v1/{settings_id}/reviews/{tag}": { + "get": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Reviews By Tag", + "operationId": "api_reviews_by_tag_paidreviews_api_v1__settings_id__reviews__tag__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReviewstPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/api/v1/{settings_id}/reviews": { + "post": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Make Review", + "operationId": "api_make_review_paidreviews_api_v1__settings_id__reviews_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostReview" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Make Review Paidreviews Api V1 Settings Id Reviews Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/paidreviews/api/v1/{settings_id}/reviews/{review_id}": { + "delete": { + "tags": [ + "PaidReviews" + ], + "summary": "Api Delete Review", + "operationId": "api_delete_review_paidreviews_api_v1__settings_id__reviews__review_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Settings Id" + }, + "name": "settings_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Review Id" + }, + "name": "review_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth": { + "get": { + "tags": [ + "Auth" + ], + "summary": "Get Auth User", + "description": "Get the authenticated user", + "operationId": "get_auth_user_api_v1_auth_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Auth" + ], + "summary": "Login", + "description": "Login via the username and password", + "operationId": "login_api_v1_auth_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginUsernamePassword" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/nostr": { + "post": { + "tags": [ + "Auth" + ], + "summary": "Nostr Login", + "description": "Login via Nostr", + "operationId": "nostr_login_api_v1_auth_nostr_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/api/v1/auth/usr": { + "post": { + "tags": [ + "Auth" + ], + "summary": "Login Usr", + "description": "Login via the User ID", + "operationId": "login_usr_api_v1_auth_usr_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginUsr" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/acl": { + "get": { + "tags": [ + "Auth" + ], + "summary": "Api Get User Acls", + "operationId": "api_get_user_acls_api_v1_auth_acl_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAcls" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Auth" + ], + "summary": "Api Update User Acl", + "operationId": "api_update_user_acl_api_v1_auth_acl_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccessControlList" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAcls" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Auth" + ], + "summary": "Api Delete User Acl", + "operationId": "api_delete_user_acl_api_v1_auth_acl_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAccessControlList" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "patch": { + "tags": [ + "Auth" + ], + "summary": "Api Update User Acl", + "operationId": "api_update_user_acl_api_v1_auth_acl_patch", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccessControlList" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAcls" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth/acl/token": { + "post": { + "tags": [ + "Auth" + ], + "summary": "Api Create User Api Token", + "operationId": "api_create_user_api_token_api_v1_auth_acl_token_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Auth" + ], + "summary": "Api Delete User Api Token", + "operationId": "api_delete_user_api_token_api_v1_auth_acl_token_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTokenRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth/{provider}": { + "get": { + "tags": [ + "Auth" + ], + "summary": "Login With Sso Provider", + "description": "SSO Provider", + "operationId": "login_with_sso_provider_api_v1_auth__provider__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/{provider}/token": { + "get": { + "tags": [ + "Auth" + ], + "summary": "Handle Oauth Token", + "description": "Handle OAuth callback", + "operationId": "handle_oauth_token_api_v1_auth__provider__token_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/logout": { + "post": { + "tags": [ + "Auth" + ], + "summary": "Logout", + "operationId": "logout_api_v1_auth_logout_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/api/v1/auth/register": { + "post": { + "tags": [ + "Auth" + ], + "summary": "Register", + "operationId": "register_api_v1_auth_register_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterUser" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/pubkey": { + "put": { + "tags": [ + "Auth" + ], + "summary": "Update Pubkey", + "operationId": "update_pubkey_api_v1_auth_pubkey_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserPubkey" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth/password": { + "put": { + "tags": [ + "Auth" + ], + "summary": "Update Password", + "operationId": "update_password_api_v1_auth_password_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserPassword" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth/reset": { + "put": { + "tags": [ + "Auth" + ], + "summary": "Reset Password", + "operationId": "reset_password_api_v1_auth_reset_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetUserPassword" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/auth/update": { + "put": { + "tags": [ + "Auth" + ], + "summary": "Update", + "operationId": "update_api_v1_auth_update_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUser" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/auth/first_install": { + "put": { + "tags": [ + "Auth" + ], + "summary": "First Install", + "operationId": "first_install_api_v1_auth_first_install_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSuperuserPassword" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin/api/v1/audit": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Audit", + "description": "show the current balance of the node and the LNbits database", + "operationId": "Audit_admin_api_v1_audit_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/monitor": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Monitor", + "description": "show the current listeners and other monitoring data", + "operationId": "Monitor_admin_api_v1_monitor_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/testemail": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Testemail", + "description": "send a test email to the admin", + "operationId": "TestEmail_admin_api_v1_testemail_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/settings": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Api Get Settings", + "operationId": "api_get_settings_admin_api_v1_settings_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminSettings" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Admin UI" + ], + "summary": "Api Update Settings", + "operationId": "api_update_settings_admin_api_v1_settings_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Admin UI" + ], + "summary": "Api Delete Settings", + "operationId": "api_delete_settings_admin_api_v1_settings_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "patch": { + "tags": [ + "Admin UI" + ], + "summary": "Api Update Settings Partial", + "operationId": "api_update_settings_partial_admin_api_v1_settings_patch", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Data" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/settings/default": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Api Reset Settings", + "operationId": "api_reset_settings_admin_api_v1_settings_default_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Field Name" + }, + "name": "field_name", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/restart": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Api Restart Server", + "operationId": "api_restart_server_admin_api_v1_restart_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Api Restart Server Admin Api V1 Restart Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/admin/api/v1/backup": { + "get": { + "tags": [ + "Admin UI" + ], + "summary": "Api Download Backup", + "operationId": "api_download_backup_admin_api_v1_backup_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/ok": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Ok", + "description": "Check if node api can be enabled", + "operationId": "api_get_ok_node_api_v1_ok_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/info": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Info", + "operationId": "api_get_info_node_api_v1_info_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeInfoResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/channels": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Channels", + "operationId": "api_get_channels_node_api_v1_channels_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NodeChannel" + }, + "type": "array", + "title": "Response Api Get Channels Node Api V1 Channels Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Node Managment" + ], + "summary": "Api Create Channel", + "operationId": "api_create_channel_node_api_v1_channels_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_api_create_channel_node_api_v1_channels_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelPoint" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Node Managment" + ], + "summary": "Api Delete Channel", + "operationId": "api_delete_channel_node_api_v1_channels_delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Short Id" + }, + "name": "short_id", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Funding Txid" + }, + "name": "funding_txid", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Output Index" + }, + "name": "output_index", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Force", + "default": false + }, + "name": "force", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NodeChannel" + }, + "type": "array", + "title": "Response Api Delete Channel Node Api V1 Channels Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/channels/{channel_id}": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Channel", + "operationId": "api_get_channel_node_api_v1_channels__channel_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Channel Id" + }, + "name": "channel_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeChannel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Node Managment" + ], + "summary": "Api Set Channel Fees", + "operationId": "api_set_channel_fees_node_api_v1_channels__channel_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Channel Id" + }, + "name": "channel_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_api_set_channel_fees_node_api_v1_channels__channel_id__put" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/payments": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Payments", + "operationId": "api_get_payments_node_api_v1_payments_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/invoices": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Invoices", + "operationId": "api_get_invoices_node_api_v1_invoices_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/peers": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Peers", + "operationId": "api_get_peers_node_api_v1_peers_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/NodePeerInfo" + }, + "type": "array", + "title": "Response Api Get Peers Node Api V1 Peers Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Node Managment" + ], + "summary": "Api Connect Peer", + "operationId": "api_connect_peer_node_api_v1_peers_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_api_connect_peer_node_api_v1_peers_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/rank": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get 1Ml Stats", + "description": "Retrieve node ranks from https://1ml.com", + "operationId": "api_get_1ml_stats_node_api_v1_rank_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeRank" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Get User Extensions", + "operationId": "api_get_user_extensions_api_v1_extension_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Extension" + }, + "type": "array", + "title": "Response Api Get User Extensions Api V1 Extension Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Install Extension", + "operationId": "api_install_extension_api_v1_extension_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExtension" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/details": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Extension Details", + "operationId": "api_extension_details_api_v1_extension__ext_id__details_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Details Link" + }, + "name": "details_link", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/extension/{ext_id}/sell": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Update Pay To Enable", + "operationId": "api_update_pay_to_enable_api_v1_extension__ext_id__sell_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayToEnableInfo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/enable": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Enable Extension", + "operationId": "api_enable_extension_api_v1_extension__ext_id__enable_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/disable": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Disable Extension", + "operationId": "api_disable_extension_api_v1_extension__ext_id__disable_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/activate": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Activate Extension", + "operationId": "api_activate_extension_api_v1_extension__ext_id__activate_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/deactivate": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Deactivate Extension", + "operationId": "api_deactivate_extension_api_v1_extension__ext_id__deactivate_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}": { + "delete": { + "tags": [ + "Extension Managment" + ], + "summary": "Api Uninstall Extension", + "operationId": "api_uninstall_extension_api_v1_extension__ext_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/releases": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Extension Releases", + "operationId": "get_extension_releases_api_v1_extension__ext_id__releases_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtensionRelease" + }, + "type": "array", + "title": "Response Get Extension Releases Api V1 Extension Ext Id Releases Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/invoice/install": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Pay To Install Invoice", + "operationId": "get_pay_to_install_invoice_api_v1_extension__ext_id__invoice_install_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExtension" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleasePaymentInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/invoice/enable": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Pay To Enable Invoice", + "operationId": "get_pay_to_enable_invoice_api_v1_extension__ext_id__invoice_enable_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PayToEnableInfo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/release/{org}/{repo}/{tag_name}": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Extension Release", + "operationId": "get_extension_release_api_v1_extension_release__org___repo___tag_name__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Org" + }, + "name": "org", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Repo" + }, + "name": "repo", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tag Name" + }, + "name": "tag_name", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/{ext_id}/db": { + "delete": { + "tags": [ + "Extension Managment" + ], + "summary": "Delete Extension Db", + "operationId": "delete_extension_db_api_v1_extension__ext_id__db_delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/all": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Extensions", + "operationId": "extensions_api_v1_extension_all_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/reviews/tags": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Extension Reviews Tags", + "operationId": "get_extension_reviews_tags_api_v1_extension_reviews_tags_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtensionReviewsStatus" + }, + "type": "array", + "title": "Response Get Extension Reviews Tags Api V1 Extension Reviews Tags Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/reviews/{ext_id}": { + "get": { + "tags": [ + "Extension Managment" + ], + "summary": "Get Extension Reviews", + "operationId": "get_extension_reviews_api_v1_extension_reviews__ext_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Ext Id" + }, + "name": "ext_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/reviews": { + "put": { + "tags": [ + "Extension Managment" + ], + "summary": "Create Extension Review", + "operationId": "create_extension_review_api_v1_extension_reviews_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExtensionReview" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionReviewPaymentRequest" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/builder/zip": { + "post": { + "tags": [ + "Extension Managment" + ], + "summary": "Build and download extension zip.", + "description": "This endpoint generates a zip file for the extension based on the provided data.", + "operationId": "api_build_extension_api_v1_extension_builder_zip_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/builder/deploy": { + "post": { + "tags": [ + "Extension Managment" + ], + "summary": "Build extension based on provided config.", + "description": "This endpoint generates a zip file for the extension based on the provided data.\n If `deploy` is set to true, the extension will be installed and activated.", + "operationId": "api_deploy_extension_api_v1_extension_builder_deploy_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/builder/preview": { + "post": { + "tags": [ + "Extension Managment" + ], + "summary": "Build and preview the extension ui.", + "operationId": "api_preview_extension_api_v1_extension_builder_preview_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtensionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/extension/builder": { + "delete": { + "tags": [ + "Extension Managment" + ], + "summary": "Clean extension builder data.", + "description": "This endpoint cleans the extension builder data.", + "operationId": "api_delete_extension_builder_data_api_v1_extension_builder_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/api/v1/peers/{peer_id}": { + "delete": { + "tags": [ + "Node Managment" + ], + "summary": "Api Disconnect Peer", + "operationId": "api_disconnect_peer_node_api_v1_peers__peer_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + }, + "name": "peer_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/node/public/api/v1/info": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get Public Info", + "operationId": "api_get_public_info_node_public_api_v1_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicNodeInfo" + } + } + } + } + } + } + }, + "/node/public/api/v1/rank": { + "get": { + "tags": [ + "Node Managment" + ], + "summary": "Api Get 1Ml Stats", + "description": "Retrieve node ranks from https://1ml.com", + "operationId": "api_get_1ml_stats_node_public_api_v1_rank_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeRank" + } + } + } + } + } + } + }, + "/api/v1/payments": { + "get": { + "tags": [ + "Payments" + ], + "summary": "get list of payments", + "operationId": "Payment_List_api_v1_payments_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of payments", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Payment" + }, + "type": "array", + "title": "Response Payment List Api V1 Payments Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "Payments" + ], + "summary": "Create or pay an invoice", + "description": "This endpoint can be used both to generate and pay a BOLT11 invoice.\n To generate a new invoice for receiving funds into the authorized account,\n specify at least the first four fields in the POST body: `out: false`,\n `amount`, `unit`, and `memo`. To pay an arbitrary invoice from the funds\n already in the authorized account, specify `out: true` and use the `bolt11`\n field to supply the BOLT11 invoice to be paid.", + "operationId": "api_payments_create_api_v1_payments_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInvoice" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment" + } + } + } + }, + "400": { + "description": "Invalid BOLT11 string or missing fields." + }, + "401": { + "description": "Invoice (or Admin) key required." + }, + "520": { + "description": "Payment or Invoice error." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/history": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Payments History", + "operationId": "Get_payments_history_api_v1_payments_history_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "hour", + "day", + "month" + ], + "title": "Group", + "default": "day" + }, + "name": "group", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentHistoryPoint" + }, + "type": "array", + "title": "Response Get Payments History Api V1 Payments History Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/stats/count": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Payments History For All Users", + "operationId": "Get_payments_history_for_all_users_api_v1_payments_stats_count_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "status", + "tag", + "extension", + "wallet_id" + ], + "title": "Count By", + "default": "tag" + }, + "name": "count_by", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentCountStat" + }, + "type": "array", + "title": "Response Get Payments History For All Users Api V1 Payments Stats Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/payments/stats/wallets": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Payments History For All Users", + "operationId": "Get_payments_history_for_all_users_api_v1_payments_stats_wallets_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentWalletStats" + }, + "type": "array", + "title": "Response Get Payments History For All Users Api V1 Payments Stats Wallets Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/payments/stats/daily": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Get Payments History Per Day", + "operationId": "Get_payments_history_per_day_api_v1_payments_stats_daily_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PaymentDailyStats" + }, + "type": "array", + "title": "Response Get Payments History Per Day Api V1 Payments Stats Daily Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/payments/paginated": { + "get": { + "tags": [ + "Payments" + ], + "summary": "get paginated list of payments", + "operationId": "Payment_List_api_v1_payments_paginated_get", + "parameters": [ + { + "description": "Force check and update of pending payments.", + "required": false, + "schema": { + "type": "boolean", + "title": "Recheck Pending", + "description": "Force check and update of pending payments.", + "default": false + }, + "name": "recheck_pending", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of payments", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/all/paginated": { + "get": { + "tags": [ + "Payments" + ], + "summary": "get paginated list of payments", + "operationId": "Payment_List_api_v1_payments_all_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Status" + }, + "name": "status", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Tag" + }, + "name": "tag", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Checking Id" + }, + "name": "checking_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "integer", + "title": "Fee" + }, + "name": "fee", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Memo" + }, + "name": "memo", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "name": "time", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Preimage" + }, + "name": "preimage", + "in": "query" + }, + { + "description": "Supports Filtering", + "required": false, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Labels" + }, + "name": "labels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of payments", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/payments/{payment_hash}/labels": { + "put": { + "tags": [ + "Payments" + ], + "summary": "Api Update Payment Labels", + "operationId": "api_update_payment_labels_api_v1_payments__payment_hash__labels_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePaymentLabels" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/fee-reserve": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Api Payments Fee Reserve", + "operationId": "api_payments_fee_reserve_api_v1_payments_fee_reserve_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Invoice", + "default": "invoice" + }, + "name": "invoice", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/payments/{payment_hash}": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Api Payment", + "operationId": "api_payment_api_v1_payments__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "X-Api-Key" + }, + "name": "x-api-key", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/payments/decode": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Api Payments Decode", + "operationId": "api_payments_decode_api_v1_payments_decode_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecodePayment" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/payments/settle": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Api Payments Settle", + "operationId": "api_payments_settle_api_v1_payments_settle_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettleInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "title": "type" + }, + "type": "array", + "maxItems": 6, + "minItems": 6, + "title": "Response Api Payments Settle Api V1 Payments Settle Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/cancel": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Api Payments Cancel", + "operationId": "api_payments_cancel_api_v1_payments_cancel_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelInvoice" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "title": "type" + }, + "type": "array", + "maxItems": 6, + "minItems": 6, + "title": "Response Api Payments Cancel Api V1 Payments Cancel Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/{payment_request}/pay-with-nfc": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Api Payment Pay With Nfc", + "operationId": "api_payment_pay_with_nfc_api_v1_payments__payment_request__pay_with_nfc_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Request" + }, + "name": "payment_request", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLnurlWithdraw" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/wallet": { + "get": { + "tags": [ + "Wallet" + ], + "summary": "Api Wallet", + "operationId": "api_wallet_api_v1_wallet_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "Wallet" + ], + "summary": "Api Create Wallet", + "operationId": "api_create_wallet_api_v1_wallet_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__core__models__wallets__CreateWallet" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Wallet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "patch": { + "tags": [ + "Wallet" + ], + "summary": "Api Update Wallet", + "operationId": "api_update_wallet_api_v1_wallet_patch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_api_update_wallet_api_v1_wallet_patch" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Wallet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/paginated": { + "get": { + "tags": [ + "Wallet" + ], + "summary": "get paginated list of user wallets", + "operationId": "Wallet_List_api_v1_wallet_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Id" + }, + "name": "id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Name" + }, + "name": "name", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Currency" + }, + "name": "currency", + "in": "query" + } + ], + "responses": { + "200": { + "description": "list of user wallets", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/wallet/share/invite": { + "put": { + "tags": [ + "Wallet" + ], + "summary": "Api Invite Wallet Share", + "operationId": "api_invite_wallet_share_api_v1_wallet_share_invite_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletSharePermission" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletSharePermission" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/share/invite/{share_request_id}": { + "delete": { + "tags": [ + "Wallet" + ], + "summary": "Api Reject Wallet Invitation", + "operationId": "api_reject_wallet_invitation_api_v1_wallet_share_invite__share_request_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Share Request Id" + }, + "name": "share_request_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/wallet/share": { + "put": { + "tags": [ + "Wallet" + ], + "summary": "Api Accept Wallet Share Request", + "operationId": "api_accept_wallet_share_request_api_v1_wallet_share_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletSharePermission" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletSharePermission" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/share/{share_request_id}": { + "delete": { + "tags": [ + "Wallet" + ], + "summary": "Api Delete Wallet Share Permissions", + "operationId": "api_delete_wallet_share_permissions_api_v1_wallet_share__share_request_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Share Request Id" + }, + "name": "share_request_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/{new_name}": { + "put": { + "tags": [ + "Wallet" + ], + "summary": "Api Update Wallet Name", + "operationId": "api_update_wallet_name_api_v1_wallet__new_name__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "New Name" + }, + "name": "new_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/reset/{wallet_id}": { + "put": { + "tags": [ + "Wallet" + ], + "summary": "Api Reset Wallet Keys", + "operationId": "api_reset_wallet_keys_api_v1_wallet_reset__wallet_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Wallet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/wallet/stored_paylinks/{wallet_id}": { + "put": { + "tags": [ + "Wallet" + ], + "summary": "Api Put Stored Paylinks", + "operationId": "api_put_stored_paylinks_api_v1_wallet_stored_paylinks__wallet_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StoredPayLinks" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/StoredPayLink" + }, + "type": "array", + "title": "Response Api Put Stored Paylinks Api V1 Wallet Stored Paylinks Wallet Id Put" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/wallet/{wallet_id}": { + "delete": { + "tags": [ + "Wallet" + ], + "summary": "Api Delete Wallet", + "operationId": "api_delete_wallet_api_v1_wallet__wallet_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/health": { + "get": { + "tags": [ + "Core" + ], + "summary": "Health", + "operationId": "health_api_v1_health_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Health Api V1 Health Get" + } + } + } + } + } + } + }, + "/api/v1/status": { + "get": { + "tags": [ + "Core" + ], + "summary": "Health Check", + "operationId": "health_check_api_v1_status_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Health Check Api V1 Status Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/wallets": { + "get": { + "tags": [ + "Core" + ], + "summary": "Wallets", + "description": "Get basic info for all of user's wallets.", + "operationId": "Wallets_api_v1_wallets_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Wallet" + }, + "type": "array", + "title": "Response Wallets Api V1 Wallets Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/account": { + "post": { + "tags": [ + "Core" + ], + "summary": "Api Create Account", + "operationId": "api_create_account_api_v1_account_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lnbits__core__models__wallets__CreateWallet" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Wallet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/rate/history": { + "get": { + "tags": [ + "Core" + ], + "summary": "Api Exchange Rate History", + "operationId": "api_exchange_rate_history_api_v1_rate_history_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "object" + }, + "type": "array", + "title": "Response Api Exchange Rate History Api V1 Rate History Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/rate/{currency}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Api Check Fiat Rate", + "operationId": "api_check_fiat_rate_api_v1_rate__currency__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Currency" + }, + "name": "currency", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "number" + }, + "type": "object", + "title": "Response Api Check Fiat Rate Api V1 Rate Currency Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/currencies": { + "get": { + "tags": [ + "Core" + ], + "summary": "Api List Currencies Available", + "operationId": "api_list_currencies_available_api_v1_currencies_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Api List Currencies Available Api V1 Currencies Get" + } + } + } + } + } + } + }, + "/api/v1/conversion": { + "post": { + "tags": [ + "Core" + ], + "summary": "Api Fiat As Sats", + "operationId": "api_fiat_as_sats_api_v1_conversion_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/qrcode/{data}": { + "get": { + "tags": [ + "Core" + ], + "summary": "Img", + "operationId": "img_api_v1_qrcode__data__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/qrcode": { + "get": { + "tags": [ + "Core" + ], + "summary": "Img", + "operationId": "img_api_v1_qrcode_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/ws/{item_id}": { + "post": { + "tags": [ + "Websocket" + ], + "summary": "Websocket Update Post", + "operationId": "websocket_update_post_api_v1_ws__item_id__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/ws/{item_id}/{data}": { + "get": { + "tags": [ + "Websocket" + ], + "summary": "Websocket Update Get", + "operationId": "websocket_update_get_api_v1_ws__item_id___data__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Item Id" + }, + "name": "item_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Data" + }, + "name": "data", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/callback/{provider_name}": { + "post": { + "tags": [ + "callback" + ], + "summary": "Api Generic Webhook Handler", + "operationId": "api_generic_webhook_handler_api_v1_callback__provider_name__post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider Name" + }, + "name": "provider_name", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/tinyurl": { + "post": { + "tags": [ + "Tinyurl" + ], + "summary": "Tinyurl", + "description": "creates a tinyurl", + "operationId": "Tinyurl_api_v1_tinyurl_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Url" + }, + "name": "url", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Endless", + "default": false + }, + "name": "endless", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/tinyurl/{tinyurl_id}": { + "get": { + "tags": [ + "Tinyurl" + ], + "summary": "Tinyurl", + "description": "get a tinyurl by id", + "operationId": "Tinyurl_api_v1_tinyurl__tinyurl_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tinyurl Id" + }, + "name": "tinyurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "Tinyurl" + ], + "summary": "Tinyurl", + "description": "delete a tinyurl by id", + "operationId": "Tinyurl_api_v1_tinyurl__tinyurl_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tinyurl Id" + }, + "name": "tinyurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/t/{tinyurl_id}": { + "get": { + "tags": [ + "Tinyurl" + ], + "summary": "Tinyurl", + "description": "redirects a tinyurl by id", + "operationId": "Tinyurl_t__tinyurl_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tinyurl Id" + }, + "name": "tinyurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/webpush": { + "post": { + "tags": [ + "Webpush" + ], + "summary": "Api Create Webpush Subscription", + "operationId": "api_create_webpush_subscription_api_v1_webpush_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWebPushSubscription" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebPushSubscription" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Webpush" + ], + "summary": "Api Delete Webpush Subscription", + "operationId": "api_delete_webpush_subscription_api_v1_webpush_delete", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get paginated list of accounts", + "operationId": "Get_accounts_users_api_v1_user_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Id" + }, + "name": "id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Username" + }, + "name": "username", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Email" + }, + "name": "email", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Pubkey" + }, + "name": "pubkey", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "External Id" + }, + "name": "external_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Wallet Id" + }, + "name": "wallet_id", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Users" + ], + "summary": "Create User", + "operationId": "Create_user_users_api_v1_user_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUser" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUser" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get user by Id", + "operationId": "Get_user_users_api_v1_user__user_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Users" + ], + "summary": "Update User", + "operationId": "Update_user_users_api_v1_user__user_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUser" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUser" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Users" + ], + "summary": "Delete User By Id", + "operationId": "Delete_user_by_Id_users_api_v1_user__user_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/reset_password": { + "put": { + "tags": [ + "Users" + ], + "summary": "Reset User Password", + "operationId": "Reset_user_password_users_api_v1_user__user_id__reset_password_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Reset User Password Users Api V1 User User Id Reset Password Put" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/admin": { + "get": { + "tags": [ + "Users" + ], + "summary": "Give Or Revoke Admin Permsisions To A User", + "operationId": "Give_or_revoke_admin_permsisions_to_a_user_users_api_v1_user__user_id__admin_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/wallet": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get Wallets For User", + "operationId": "Get_wallets_for_user_users_api_v1_user__user_id__wallet_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Wallet" + }, + "type": "array", + "title": "Response Get Wallets For User Users Api V1 User User Id Wallet Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "Users" + ], + "summary": "Create A New Wallet For User", + "operationId": "Create_a_new_wallet_for_user_users_api_v1_user__user_id__wallet_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Body_Create_a_new_wallet_for_user_users_api_v1_user__user_id__wallet_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/wallet/{wallet}/undelete": { + "put": { + "tags": [ + "Users" + ], + "summary": "Reactivate Deleted Wallet", + "operationId": "Reactivate_deleted_wallet_users_api_v1_user__user_id__wallet__wallet__undelete_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet" + }, + "name": "wallet", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/wallets": { + "delete": { + "tags": [ + "Users" + ], + "summary": "Soft delete (only sets a flag) all user wallets.", + "operationId": "Delete_all_wallets_for_user_users_api_v1_user__user_id__wallets_delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/user/{user_id}/wallet/{wallet}": { + "delete": { + "tags": [ + "Users" + ], + "summary": "First time it is called it does a soft delete (only sets a flag).The second time it is called will delete the entry from the DB", + "operationId": "Delete_wallet_by_id_users_api_v1_user__user_id__wallet__wallet__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Wallet" + }, + "name": "wallet", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/users/api/v1/balance": { + "put": { + "tags": [ + "Users" + ], + "summary": "Update balance for a particular wallet.", + "operationId": "UpdateBalance_users_api_v1_balance_put", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateBalance" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/audit/api/v1": { + "get": { + "tags": [ + "Audit" + ], + "summary": "Get paginated list audit entries", + "operationId": "Get_audit_entries_audit_api_v1_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Ip Address" + }, + "name": "ip_address", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Path" + }, + "name": "path", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Request Method" + }, + "name": "request_method", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Response Code" + }, + "name": "response_code", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Component" + }, + "name": "component", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/audit/api/v1/stats": { + "get": { + "tags": [ + "Audit" + ], + "summary": "Get paginated list audit entries", + "operationId": "Get_audit_entries_audit_api_v1_stats_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Ip Address" + }, + "name": "ip_address", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "User Id" + }, + "name": "user_id", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Path" + }, + "name": "path", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Request Method" + }, + "name": "request_method", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Response Code" + }, + "name": "response_code", + "in": "query" + }, + { + "description": "Supports Filtering. Supports Search", + "required": false, + "schema": { + "type": "string", + "title": "Component" + }, + "name": "component", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditStats" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/assets/paginated": { + "get": { + "tags": [ + "Assets" + ], + "summary": "Get paginated list user assets", + "operationId": "Get_user_assets_api_v1_assets_paginated_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit" + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset" + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Sortby" + }, + "name": "sortby", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + }, + "name": "direction", + "in": "query" + }, + { + "description": "Text based search", + "required": false, + "schema": { + "type": "string", + "title": "Search", + "description": "Text based search" + }, + "name": "search", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/assets/{asset_id}": { + "get": { + "tags": [ + "Assets" + ], + "summary": "Get user asset by ID", + "operationId": "Get_user_asset_api_v1_assets__asset_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Asset Id" + }, + "name": "asset_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "Assets" + ], + "summary": "Update user asset by ID", + "operationId": "Update_user_asset_api_v1_assets__asset_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Asset Id" + }, + "name": "asset_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "Assets" + ], + "summary": "Delete user asset by ID", + "operationId": "Delete_user_asset_api_v1_assets__asset_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Asset Id" + }, + "name": "asset_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/assets/{asset_id}/binary": { + "get": { + "tags": [ + "Assets" + ], + "summary": "Get user asset binary data by ID", + "operationId": "Get_user_asset_binary_api_v1_assets__asset_id__binary_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Asset Id" + }, + "name": "asset_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/assets/{asset_id}/thumbnail": { + "get": { + "tags": [ + "Assets" + ], + "summary": "Get user asset thumbnail data by ID", + "operationId": "Get_user_asset_thumbnail_api_v1_assets__asset_id__thumbnail_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Asset Id" + }, + "name": "asset_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/assets": { + "post": { + "tags": [ + "Assets" + ], + "summary": "Upload user assets", + "operationId": "Upload_api_v1_assets_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "Public Asset", + "default": false + }, + "name": "public_asset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_Upload_api_v1_assets_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/fiat/check/{provider}": { + "put": { + "tags": [ + "Fiat API" + ], + "summary": "Api Test Fiat Provider", + "operationId": "api_test_fiat_provider_api_v1_fiat_check__provider__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/fiat/{provider}/subscription": { + "post": { + "tags": [ + "Fiat API" + ], + "summary": "Create Subscription", + "operationId": "create_subscription_api_v1_fiat__provider__subscription_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFiatSubscription" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FiatSubscriptionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/fiat/{provider}/subscription/{subscription_id}": { + "delete": { + "tags": [ + "Fiat API" + ], + "summary": "Cancel Subscription", + "operationId": "cancel_subscription_api_v1_fiat__provider__subscription__subscription_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Subscription Id" + }, + "name": "subscription_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FiatSubscriptionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/fiat/{provider}/connection_token": { + "post": { + "tags": [ + "Fiat API" + ], + "summary": "Connection Token", + "operationId": "connection_token_api_v1_fiat__provider__connection_token_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Provider" + }, + "name": "provider", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/api/v1/lnurlscan/{code}": { + "get": { + "tags": [ + "LNURL" + ], + "summary": "Api Lnurlscan", + "operationId": "api_lnurlscan_api_v1_lnurlscan__code__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Code" + }, + "name": "code", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlAuthResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Api Lnurlscan Api V1 Lnurlscan Code Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/lnurlscan": { + "post": { + "tags": [ + "LNURL" + ], + "summary": "Api Lnurlscan Post", + "operationId": "api_lnurlscan_post_api_v1_lnurlscan_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlScan" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlAuthResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Api Lnurlscan Post Api V1 Lnurlscan Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/lnurlauth": { + "post": { + "tags": [ + "LNURL" + ], + "summary": "Api Perform Lnurlauth", + "operationId": "api_perform_lnurlauth_api_v1_lnurlauth_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlAuthResponse" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LnurlResponseModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v1/payments/lnurl": { + "post": { + "tags": [ + "LNURL" + ], + "summary": "Api Payments Pay Lnurl", + "description": "Pay an LNURL payment request.\nEither provice `res` (LnurlPayResponse) or `lnurl` (str) in the `data` object.", + "operationId": "api_payments_pay_lnurl_api_v1_payments_lnurl_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLnurlPayment" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Index", + "operationId": "index_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/{tpos_id}": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Tpos", + "operationId": "tpos_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos__tpos_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Lnaddress", + "default": "" + }, + "name": "lnaddress", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/manifest/{tpos_id}.webmanifest": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Manifest", + "operationId": "manifest_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_manifest__tpos_id__webmanifest_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/lnurl/{lnurlcharge_id}/{amount}": { + "get": { + "tags": [ + "TPoS", + "LNURL" + ], + "summary": "Tpos.Tposlnurlcharge", + "operationId": "tpos_tposlnurlcharge_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_lnurl__lnurlcharge_id___amount__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnurlcharge Id" + }, + "name": "lnurlcharge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Tpos Tposlnurlcharge Upgrades 0Df6F904931Ba0Fb9531E7Cf2Dca354C9A1D97Bf62E0A9000A0E0Ffe87E3Fadf Tpos Api V1 Lnurl Lnurlcharge Id Amount Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/lnurl/cb": { + "get": { + "tags": [ + "TPoS", + "LNURL" + ], + "summary": "Tpos.Tposlnurlcharge.Callback", + "operationId": "tpos_tposlnurlcharge_callback_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_lnurl_cb_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Tpos Tposlnurlcharge Callback Upgrades 0Df6F904931Ba0Fb9531E7Cf2Dca354C9A1D97Bf62E0A9000A0E0Ffe87E3Fadf Tpos Api V1 Lnurl Cb Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tposs", + "operationId": "api_tposs_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__Tpos" + }, + "type": "array", + "title": "Response Api Tposs Upgrades 0Df6F904931Ba0Fb9531E7Cf2Dca354C9A1D97Bf62E0A9000A0E0Ffe87E3Fadf Tpos Api V1 Tposs Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create", + "operationId": "api_tpos_create_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateTposData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/inventory/status": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Inventory Status", + "operationId": "api_inventory_status_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_inventory_status_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Response Api Inventory Status Upgrades 0Df6F904931Ba0Fb9531E7Cf2Dca354C9A1D97Bf62E0A9000A0E0Ffe87E3Fadf Tpos Api V1 Inventory Status Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}": { + "put": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Update", + "operationId": "api_tpos_update_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateTposData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Delete", + "operationId": "api_tpos_delete_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}/invoices": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Get Latest Invoices", + "operationId": "api_tpos_get_latest_invoices_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__invoices_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create Invoice", + "operationId": "api_tpos_create_invoice_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__invoices_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateTposInvoice" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}/invoices/{payment_request}/pay": { + "post": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Pay Invoice", + "operationId": "api_tpos_pay_invoice_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__invoices__payment_request__pay_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Request" + }, + "name": "payment_request", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__PayLnurlWData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}/invoices/{payment_hash}": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Check Invoice", + "operationId": "api_tpos_check_invoice_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__invoices__payment_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Payment Hash" + }, + "name": "payment_hash", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Extra", + "default": false + }, + "name": "extra", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}/items": { + "put": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Create Items", + "operationId": "api_tpos_create_items_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__items_put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateUpdateItemData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__Tpos" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/lnaddresscheck": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Check Lnaddress", + "operationId": "api_tpos_check_lnaddress_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs_lnaddresscheck_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Lnaddress" + }, + "name": "lnaddress", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/tposs/{tpos_id}/inventory-items": { + "get": { + "tags": [ + "TPoS" + ], + "summary": "Api Tpos Inventory Items", + "operationId": "api_tpos_inventory_items_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_tposs__tpos_id__inventory_items_get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/atm/{tpos_id}/create": { + "post": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Atm Pin Check", + "operationId": "api_tpos_atm_pin_check_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_atm__tpos_id__create_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Tpos Id" + }, + "name": "tpos_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__LnurlCharge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/atm/withdraw/{charge_id}/{amount}": { + "get": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Create Withdraw", + "operationId": "api_tpos_create_withdraw_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_atm_withdraw__charge_id___amount__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__LnurlCharge" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf/tpos/api/v1/atm/withdraw/{charge_id}/{amount}/pay": { + "post": { + "tags": [ + "TPoS", + "TPoS ATM" + ], + "summary": "Api Tpos Atm Pay", + "operationId": "api_tpos_atm_pay_upgrades_0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf_tpos_api_v1_atm_withdraw__charge_id___amount__pay_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Charge Id" + }, + "name": "charge_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateWithdrawPay" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Index", + "operationId": "index_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/{card_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Display", + "operationId": "display_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards__card_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/cards": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Cards", + "operationId": "api_cards_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_cards_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Card" + }, + "type": "array", + "title": "Response Api Cards Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Cards Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Create", + "operationId": "api_card_create_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_cards_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__CreateCardData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/cards/{card_id}": { + "put": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Update", + "operationId": "api_card_update_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_cards__card_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__CreateCardData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "boltcards" + ], + "summary": "Api Card Delete", + "operationId": "api_card_delete_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_cards__card_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/cards/enable/{card_id}/{enable}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Enable Card", + "operationId": "enable_card_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_cards_enable__card_id___enable__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Card Id" + }, + "name": "card_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "boolean", + "title": "Enable" + }, + "name": "enable", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Card" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/hits": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Hits", + "operationId": "api_hits_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_hits_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Hit" + }, + "type": "array", + "title": "Response Api Hits Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Hits Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/refunds": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Refunds", + "operationId": "api_refunds_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_refunds_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Refund" + }, + "type": "array", + "title": "Response Api Refunds Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Refunds Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/scan/{external_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Scan", + "operationId": "api_scan_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_scan__external_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "External Id" + }, + "name": "external_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "P" + }, + "name": "p", + "in": "query" + }, + { + "required": true, + "schema": { + "title": "C" + }, + "name": "c", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Api Scan Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Scan External Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/lnurl/cb/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurl Callback", + "operationId": "boltcards_lnurl_callback_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_lnurl_cb__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Boltcards Lnurl Callback Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Lnurl Cb Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/auth": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Api Auth", + "operationId": "api_auth_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_auth_get", + "parameters": [ + { + "required": true, + "schema": { + "title": "A" + }, + "name": "a", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "boltcards" + ], + "summary": "Api Auth Post", + "operationId": "api_auth_post_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_auth_post", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "A" + }, + "name": "a", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Wipe", + "default": false + }, + "name": "wipe", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__UIDPost" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/lnurlp/cb/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurlp Callback", + "operationId": "boltcards_lnurlp_callback_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_lnurlp_cb__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Amount" + }, + "name": "amount", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Boltcards Lnurlp Callback Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Lnurlp Cb Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9/boltcards/api/v1/lnurlp/{hit_id}": { + "get": { + "tags": [ + "boltcards" + ], + "summary": "Boltcards.Lnurlp Response", + "operationId": "boltcards_lnurlp_response_upgrades_438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9_boltcards_api_v1_lnurlp__hit_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Hit Id" + }, + "name": "hit_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Boltcards Lnurlp Response Upgrades 438C588C4Df57Ee50B58793A923C332A41Bf7A7Ae88Ef179588F16F02Abee7F9 Boltcards Api V1 Lnurlp Hit Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Index", + "operationId": "index_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Display", + "operationId": "display_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/print/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Print Qr", + "operationId": "print_qr_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_print__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/csv/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Csv", + "operationId": "csv_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_csv__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/links": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Links", + "operationId": "api_links_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "boolean", + "title": "All Wallets", + "default": false + }, + "name": "all_wallets", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Offset", + "default": 0 + }, + "name": "offset", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Limit", + "default": 0 + }, + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__PaginatedWithdraws" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "query" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__CreateWithdrawData" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/links/{link_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Retrieve", + "operationId": "api_link_retrieve_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links__link_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "put": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Create Or Update", + "operationId": "api_link_create_or_update_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links__link_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__CreateWithdrawData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__WithdrawLink" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "delete": { + "tags": [ + "withdraw" + ], + "summary": "Api Link Delete", + "operationId": "api_link_delete_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links__link_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Link Id" + }, + "name": "link_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SimpleStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/links/{the_hash}/{lnurl_id}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Api Hash Retrieve", + "operationId": "api_hash_retrieve_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_links__the_hash___lnurl_id__get", + "parameters": [ + { + "required": true, + "schema": { + "title": "The Hash" + }, + "name": "the_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Lnurl Id" + }, + "name": "lnurl_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__HashCheck" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/lnurl/{unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Withdraw.Api Lnurl Response", + "operationId": "withdraw_api_lnurl_response_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_lnurl__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Withdraw Api Lnurl Response Upgrades 4E66Ed94Bc9Be8C0E0Fe4F3B6019Fdb7688Bab70Ab18162Cb564Cf9F5397606C Withdraw Api V1 Lnurl Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/lnurl/cb/{unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "lnurl withdraw callback", + "description": "This endpoints allows you to put unique_hash, k1\n and a payment_request to get your payment_request paid.", + "operationId": "withdraw_api_lnurl_callback_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_lnurl_cb__unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "K1" + }, + "name": "k1", + "in": "query" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pr" + }, + "name": "pr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Id Unique Hash" + }, + "name": "id_unique_hash", + "in": "query" + } + ], + "responses": { + "200": { + "description": "status: OK", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlErrorResponse" + }, + { + "$ref": "#/components/schemas/LnurlSuccessResponse" + } + ], + "title": "Response Withdraw Api Lnurl Callback Upgrades 4E66Ed94Bc9Be8C0E0Fe4F3B6019Fdb7688Bab70Ab18162Cb564Cf9F5397606C Withdraw Api V1 Lnurl Cb Unique Hash Get" + } + } + } + }, + "400": { + "description": "k1 is wrong or link open time or withdraw not working." + }, + "404": { + "description": "withdraw link not found." + }, + "405": { + "description": "withdraw link is spent." + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c/withdraw/api/v1/lnurl/{unique_hash}/{id_unique_hash}": { + "get": { + "tags": [ + "withdraw" + ], + "summary": "Withdraw.Api Lnurl Multi Response", + "operationId": "withdraw_api_lnurl_multi_response_upgrades_4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c_withdraw_api_v1_lnurl__unique_hash___id_unique_hash__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Unique Hash" + }, + "name": "unique_hash", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Id Unique Hash" + }, + "name": "id_unique_hash", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Withdraw Api Lnurl Multi Response Upgrades 4E66Ed94Bc9Be8C0E0Fe4F3B6019Fdb7688Bab70Ab18162Cb564Cf9F5397606C Withdraw Api V1 Lnurl Unique Hash Id Unique Hash Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Index", + "operationId": "index_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch__get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/public/{switch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Index Public", + "operationId": "index_public_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_public__switch_id__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + } + } + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitchs Retrieve", + "operationId": "api_bitcoinswitchs_retrieve_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_get", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Bitcoinswitch" + }, + "type": "array", + "title": "Response Api Bitcoinswitchs Retrieve Upgrades 8715F08De1B61F677158Deff429532Ef8285D5E0C22Ffecb2Ef39853869Fdc16 Bitcoinswitch Api V1 Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "post": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Create", + "operationId": "api_bitcoinswitch_create_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_post", + "parameters": [ + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__CreateBitcoinswitch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1/trigger/{switch_id}/{pin}": { + "put": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Trigger", + "operationId": "api_bitcoinswitch_trigger_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_trigger__switch_id___pin__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Switch Id" + }, + "name": "switch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Pin" + }, + "name": "pin", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Retrieve", + "operationId": "api_bitcoinswitch_retrieve_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "put": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Update", + "operationId": "api_bitcoinswitch_update_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1__bitcoinswitch_id__put", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__CreateBitcoinswitch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Bitcoinswitch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + }, + "delete": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Delete", + "operationId": "api_bitcoinswitch_delete_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1__bitcoinswitch_id__delete", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "string", + "format": "uuid4", + "title": "Usr" + }, + "name": "usr", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Cookie Access Token" + }, + "name": "cookie_access_token", + "in": "cookie" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + }, + { + "HTTPBearer": [] + } + ] + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1/public/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Api Bitcoinswitch Get Public", + "operationId": "api_bitcoinswitch_get_public_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_public__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__BitcoinswitchPublic" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1/lnurl/{bitcoinswitch_id}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Lnurl Params", + "operationId": "lnurl_params_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_lnurl__bitcoinswitch_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Bitcoinswitch Id" + }, + "name": "bitcoinswitch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "string", + "title": "Pin" + }, + "name": "pin", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Lnurl Params Upgrades 8715F08De1B61F677158Deff429532Ef8285D5E0C22Ffecb2Ef39853869Fdc16 Bitcoinswitch Api V1 Lnurl Bitcoinswitch Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/upgrades/8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16/bitcoinswitch/api/v1/lnurl/cb/{switch_id}/{pin}": { + "get": { + "tags": [ + "bitcoinswitch" + ], + "summary": "Bitcoinswitch.Lnurl Cb", + "operationId": "bitcoinswitch_lnurl_cb_upgrades_8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16_bitcoinswitch_api_v1_lnurl_cb__switch_id___pin__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Switch Id" + }, + "name": "switch_id", + "in": "path" + }, + { + "required": true, + "schema": { + "type": "integer", + "title": "Pin" + }, + "name": "pin", + "in": "path" + }, + { + "required": false, + "schema": { + "type": "integer", + "title": "Amount" + }, + "name": "amount", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "string", + "title": "Comment" + }, + "name": "comment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/LnurlPayActionResponse" + }, + { + "$ref": "#/components/schemas/LnurlErrorResponse" + } + ], + "title": "Response Bitcoinswitch Lnurl Cb Upgrades 8715F08De1B61F677158Deff429532Ef8285D5E0C22Ffecb2Ef39853869Fdc16 Bitcoinswitch Api V1 Lnurl Cb Switch Id Pin Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AccessControlList": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "endpoints": { + "items": { + "$ref": "#/components/schemas/EndpointAccess" + }, + "type": "array", + "title": "Endpoints", + "default": [] + }, + "token_id_list": { + "items": { + "$ref": "#/components/schemas/SimpleItem" + }, + "type": "array", + "title": "Token Id List", + "default": [] + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "AccessControlList" + }, + "ActionFields": { + "properties": { + "generate_action": { + "type": "boolean", + "title": "Generate Action", + "default": false + }, + "generate_payment_logic": { + "type": "boolean", + "title": "Generate Payment Logic", + "default": false + }, + "wallet_id": { + "type": "string", + "title": "Wallet Id" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "amount": { + "type": "string", + "title": "Amount" + }, + "amount_source": { + "type": "string", + "enum": [ + "owner_data", + "client_data" + ], + "title": "Amount Source" + }, + "paid_flag": { + "type": "string", + "title": "Paid Flag" + } + }, + "type": "object", + "title": "ActionFields" + }, + "AddressExtra": { + "properties": { + "currency": { + "type": "string", + "title": "Currency" + }, + "price": { + "type": "number", + "title": "Price" + }, + "price_in_sats": { + "type": "number", + "title": "Price In Sats" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "reimburse_payment_hash": { + "type": "string", + "title": "Reimburse Payment Hash" + }, + "promo_code": { + "type": "string", + "title": "Promo Code" + }, + "transfer_code": { + "type": "string", + "title": "Transfer Code" + }, + "referer": { + "type": "string", + "title": "Referer" + }, + "activated_by_owner": { + "type": "boolean", + "title": "Activated By Owner", + "default": false + }, + "years": { + "type": "integer", + "title": "Years", + "default": 1 + }, + "max_years": { + "type": "integer", + "title": "Max Years", + "default": 1 + }, + "relays": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Relays", + "default": [] + }, + "ln_address": { + "allOf": [ + { + "$ref": "#/components/schemas/LnAddressConfig" + } + ], + "title": "Ln Address", + "default": { + "wallet": "", + "min": 1, + "max": 10000000, + "pay_link_id": "" + } + } + }, + "type": "object", + "title": "AddressExtra" + }, + "AddressStatus": { + "properties": { + "identifier": { + "type": "string", + "title": "Identifier" + }, + "free_identifier_number": { + "type": "string", + "title": "Free Identifier Number" + }, + "available": { + "type": "boolean", + "title": "Available", + "default": false + }, + "price": { + "type": "number", + "title": "Price" + }, + "price_in_sats": { + "type": "number", + "title": "Price In Sats" + }, + "price_reason": { + "type": "string", + "title": "Price Reason" + }, + "currency": { + "type": "string", + "title": "Currency" + } + }, + "type": "object", + "required": [ + "identifier" + ], + "title": "AddressStatus" + }, + "AdminSettings": { + "properties": { + "keycloak_discovery_url": { + "type": "string", + "title": "Keycloak Discovery Url", + "default": "" + }, + "keycloak_client_id": { + "type": "string", + "title": "Keycloak Client Id", + "default": "" + }, + "keycloak_client_secret": { + "type": "string", + "title": "Keycloak Client Secret", + "default": "" + }, + "keycloak_client_custom_org": { + "type": "string", + "title": "Keycloak Client Custom Org" + }, + "keycloak_client_custom_icon": { + "type": "string", + "title": "Keycloak Client Custom Icon" + }, + "github_client_id": { + "type": "string", + "title": "Github Client Id", + "default": "" + }, + "github_client_secret": { + "type": "string", + "title": "Github Client Secret", + "default": "" + }, + "google_client_id": { + "type": "string", + "title": "Google Client Id", + "default": "" + }, + "google_client_secret": { + "type": "string", + "title": "Google Client Secret", + "default": "" + }, + "nostr_absolute_request_urls": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Nostr Absolute Request Urls", + "default": [ + "http://127.0.0.1:5000", + "http://localhost:5000" + ] + }, + "auth_token_expire_minutes": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Auth Token Expire Minutes", + "default": 525600 + }, + "auth_all_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Auth All Methods", + "default": [ + "user-id-only", + "username-password", + "nostr-auth-nip98", + "google-auth", + "github-auth", + "keycloak-auth" + ] + }, + "auth_allowed_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Auth Allowed Methods", + "default": [ + "user-id-only", + "username-password" + ] + }, + "auth_credetials_update_threshold": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Auth Credetials Update Threshold", + "default": 120 + }, + "auth_authentication_cache_minutes": { + "type": "integer", + "minimum": 0, + "title": "Auth Authentication Cache Minutes", + "default": 10 + }, + "lnbits_audit_enabled": { + "type": "boolean", + "title": "Lnbits Audit Enabled", + "default": true + }, + "lnbits_audit_retention_days": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Audit Retention Days", + "default": 7 + }, + "lnbits_audit_log_ip_address": { + "type": "boolean", + "title": "Lnbits Audit Log Ip Address", + "default": false + }, + "lnbits_audit_log_path_params": { + "type": "boolean", + "title": "Lnbits Audit Log Path Params", + "default": true + }, + "lnbits_audit_log_query_params": { + "type": "boolean", + "title": "Lnbits Audit Log Query Params", + "default": true + }, + "lnbits_audit_log_request_body": { + "type": "boolean", + "title": "Lnbits Audit Log Request Body", + "default": false + }, + "lnbits_audit_include_paths": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Include Paths", + "default": [ + ".*api/v1/.*" + ] + }, + "lnbits_audit_exclude_paths": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Exclude Paths", + "default": [ + "/static" + ] + }, + "lnbits_audit_http_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Http Methods", + "default": [ + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "lnbits_audit_http_response_codes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Http Response Codes", + "default": [ + "4.*", + "5.*" + ] + }, + "lnbits_node_ui": { + "type": "boolean", + "title": "Lnbits Node Ui", + "default": false + }, + "lnbits_public_node_ui": { + "type": "boolean", + "title": "Lnbits Public Node Ui", + "default": false + }, + "lnbits_node_ui_transactions": { + "type": "boolean", + "title": "Lnbits Node Ui Transactions", + "default": false + }, + "lnbits_webpush_pubkey": { + "type": "string", + "title": "Lnbits Webpush Pubkey" + }, + "lnbits_webpush_privkey": { + "type": "string", + "title": "Lnbits Webpush Privkey" + }, + "lightning_invoice_expiry": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lightning Invoice Expiry", + "default": 3600 + }, + "paypal_enabled": { + "type": "boolean", + "title": "Paypal Enabled", + "default": false + }, + "paypal_api_endpoint": { + "type": "string", + "title": "Paypal Api Endpoint", + "default": "https://api-m.paypal.com" + }, + "paypal_client_id": { + "type": "string", + "title": "Paypal Client Id" + }, + "paypal_client_secret": { + "type": "string", + "title": "Paypal Client Secret" + }, + "paypal_payment_success_url": { + "type": "string", + "title": "Paypal Payment Success Url", + "default": "https://lnbits.com" + }, + "paypal_payment_webhook_url": { + "type": "string", + "title": "Paypal Payment Webhook Url", + "default": "https://your-lnbits-domain-here.com/api/v1/callback/paypal" + }, + "paypal_webhook_id": { + "type": "string", + "title": "Paypal Webhook Id" + }, + "paypal_limits": { + "$ref": "#/components/schemas/FiatProviderLimits" + }, + "stripe_enabled": { + "type": "boolean", + "title": "Stripe Enabled", + "default": false + }, + "stripe_api_endpoint": { + "type": "string", + "title": "Stripe Api Endpoint", + "default": "https://api.stripe.com" + }, + "stripe_api_secret_key": { + "type": "string", + "title": "Stripe Api Secret Key" + }, + "stripe_payment_success_url": { + "type": "string", + "title": "Stripe Payment Success Url", + "default": "https://lnbits.com" + }, + "stripe_payment_webhook_url": { + "type": "string", + "title": "Stripe Payment Webhook Url", + "default": "https://your-lnbits-domain-here.com/api/v1/callback/stripe" + }, + "stripe_webhook_signing_secret": { + "type": "string", + "title": "Stripe Webhook Signing Secret" + }, + "stripe_limits": { + "$ref": "#/components/schemas/FiatProviderLimits" + }, + "breez_liquid_api_key": { + "type": "string", + "title": "Breez Liquid Api Key" + }, + "breez_liquid_seed": { + "type": "string", + "title": "Breez Liquid Seed" + }, + "breez_liquid_fee_offset_sat": { + "type": "integer", + "title": "Breez Liquid Fee Offset Sat", + "default": 50 + }, + "strike_api_endpoint": { + "type": "string", + "title": "Strike Api Endpoint", + "default": "https://api.strike.me/v1", + "env": "STRIKE_API_ENDPOINT" + }, + "strike_api_key": { + "type": "string", + "title": "Strike Api Key", + "env": "STRIKE_API_KEY" + }, + "breez_api_key": { + "type": "string", + "title": "Breez Api Key" + }, + "breez_greenlight_seed": { + "type": "string", + "title": "Breez Greenlight Seed" + }, + "breez_greenlight_invite_code": { + "type": "string", + "title": "Breez Greenlight Invite Code" + }, + "breez_greenlight_device_key": { + "type": "string", + "title": "Breez Greenlight Device Key" + }, + "breez_greenlight_device_cert": { + "type": "string", + "title": "Breez Greenlight Device Cert" + }, + "breez_use_trampoline": { + "type": "boolean", + "title": "Breez Use Trampoline", + "default": true + }, + "nwc_pairing_url": { + "type": "string", + "title": "Nwc Pairing Url" + }, + "lntips_api_endpoint": { + "type": "string", + "title": "Lntips Api Endpoint" + }, + "lntips_api_key": { + "type": "string", + "title": "Lntips Api Key" + }, + "lntips_admin_key": { + "type": "string", + "title": "Lntips Admin Key" + }, + "lntips_invoice_key": { + "type": "string", + "title": "Lntips Invoice Key" + }, + "spark_url": { + "type": "string", + "title": "Spark Url" + }, + "spark_token": { + "type": "string", + "title": "Spark Token" + }, + "opennode_api_endpoint": { + "type": "string", + "title": "Opennode Api Endpoint" + }, + "opennode_key": { + "type": "string", + "title": "Opennode Key" + }, + "opennode_admin_key": { + "type": "string", + "title": "Opennode Admin Key" + }, + "opennode_invoice_key": { + "type": "string", + "title": "Opennode Invoice Key" + }, + "phoenixd_api_endpoint": { + "type": "string", + "title": "Phoenixd Api Endpoint", + "default": "http://localhost:9740/" + }, + "phoenixd_api_password": { + "type": "string", + "title": "Phoenixd Api Password" + }, + "zbd_api_endpoint": { + "type": "string", + "title": "Zbd Api Endpoint", + "default": "https://api.zebedee.io/v0/" + }, + "zbd_api_key": { + "type": "string", + "title": "Zbd Api Key" + }, + "boltz_client_endpoint": { + "type": "string", + "title": "Boltz Client Endpoint", + "default": "127.0.0.1:9002" + }, + "boltz_client_macaroon": { + "type": "string", + "title": "Boltz Client Macaroon" + }, + "boltz_client_password": { + "type": "string", + "title": "Boltz Client Password", + "default": "" + }, + "boltz_client_cert": { + "type": "string", + "title": "Boltz Client Cert" + }, + "boltz_mnemonic": { + "type": "string", + "title": "Boltz Mnemonic" + }, + "alby_api_endpoint": { + "type": "string", + "title": "Alby Api Endpoint", + "default": "https://api.getalby.com/" + }, + "alby_access_token": { + "type": "string", + "title": "Alby Access Token" + }, + "blink_api_endpoint": { + "type": "string", + "title": "Blink Api Endpoint", + "default": "https://api.blink.sv/graphql" + }, + "blink_ws_endpoint": { + "type": "string", + "title": "Blink Ws Endpoint", + "default": "wss://ws.blink.sv/graphql" + }, + "blink_token": { + "type": "string", + "title": "Blink Token" + }, + "lnpay_api_endpoint": { + "type": "string", + "title": "Lnpay Api Endpoint" + }, + "lnpay_api_key": { + "type": "string", + "title": "Lnpay Api Key" + }, + "lnpay_wallet_key": { + "type": "string", + "title": "Lnpay Wallet Key" + }, + "lnpay_admin_key": { + "type": "string", + "title": "Lnpay Admin Key" + }, + "lnd_grpc_endpoint": { + "type": "string", + "title": "Lnd Grpc Endpoint" + }, + "lnd_grpc_cert": { + "type": "string", + "title": "Lnd Grpc Cert" + }, + "lnd_grpc_port": { + "type": "integer", + "title": "Lnd Grpc Port" + }, + "lnd_grpc_admin_macaroon": { + "type": "string", + "title": "Lnd Grpc Admin Macaroon" + }, + "lnd_grpc_invoice_macaroon": { + "type": "string", + "title": "Lnd Grpc Invoice Macaroon" + }, + "lnd_grpc_macaroon": { + "type": "string", + "title": "Lnd Grpc Macaroon" + }, + "lnd_grpc_macaroon_encrypted": { + "type": "string", + "title": "Lnd Grpc Macaroon Encrypted" + }, + "lnd_rest_endpoint": { + "type": "string", + "title": "Lnd Rest Endpoint" + }, + "lnd_rest_cert": { + "type": "string", + "title": "Lnd Rest Cert" + }, + "lnd_rest_macaroon": { + "type": "string", + "title": "Lnd Rest Macaroon" + }, + "lnd_rest_macaroon_encrypted": { + "type": "string", + "title": "Lnd Rest Macaroon Encrypted" + }, + "lnd_rest_route_hints": { + "type": "boolean", + "title": "Lnd Rest Route Hints", + "default": true + }, + "lnd_rest_allow_self_payment": { + "type": "boolean", + "title": "Lnd Rest Allow Self Payment", + "default": false + }, + "lnd_cert": { + "type": "string", + "title": "Lnd Cert" + }, + "lnd_admin_macaroon": { + "type": "string", + "title": "Lnd Admin Macaroon" + }, + "lnd_invoice_macaroon": { + "type": "string", + "title": "Lnd Invoice Macaroon" + }, + "lnd_rest_admin_macaroon": { + "type": "string", + "title": "Lnd Rest Admin Macaroon" + }, + "lnd_rest_invoice_macaroon": { + "type": "string", + "title": "Lnd Rest Invoice Macaroon" + }, + "eclair_url": { + "type": "string", + "title": "Eclair Url" + }, + "eclair_pass": { + "type": "string", + "title": "Eclair Pass" + }, + "corelightning_rest_url": { + "type": "string", + "title": "Corelightning Rest Url" + }, + "corelightning_rest_macaroon": { + "type": "string", + "title": "Corelightning Rest Macaroon" + }, + "corelightning_rest_cert": { + "type": "string", + "title": "Corelightning Rest Cert" + }, + "corelightning_rpc": { + "type": "string", + "title": "Corelightning Rpc" + }, + "corelightning_pay_command": { + "type": "string", + "title": "Corelightning Pay Command", + "default": "pay" + }, + "clightning_rpc": { + "type": "string", + "title": "Clightning Rpc" + }, + "clnrest_url": { + "type": "string", + "title": "Clnrest Url" + }, + "clnrest_ca": { + "type": "string", + "title": "Clnrest Ca" + }, + "clnrest_cert": { + "type": "string", + "title": "Clnrest Cert" + }, + "clnrest_readonly_rune": { + "type": "string", + "title": "Clnrest Readonly Rune" + }, + "clnrest_invoice_rune": { + "type": "string", + "title": "Clnrest Invoice Rune" + }, + "clnrest_pay_rune": { + "type": "string", + "title": "Clnrest Pay Rune" + }, + "clnrest_renepay_rune": { + "type": "string", + "title": "Clnrest Renepay Rune" + }, + "clnrest_last_pay_index": { + "type": "string", + "title": "Clnrest Last Pay Index" + }, + "clnrest_nodeid": { + "type": "string", + "title": "Clnrest Nodeid" + }, + "cliche_endpoint": { + "type": "string", + "title": "Cliche Endpoint" + }, + "lnbits_endpoint": { + "type": "string", + "title": "Lnbits Endpoint", + "default": "https://demo.lnbits.com" + }, + "lnbits_key": { + "type": "string", + "title": "Lnbits Key" + }, + "lnbits_admin_key": { + "type": "string", + "title": "Lnbits Admin Key" + }, + "lnbits_invoice_key": { + "type": "string", + "title": "Lnbits Invoice Key" + }, + "fake_wallet_secret": { + "type": "string", + "title": "Fake Wallet Secret", + "default": "ToTheMoon1" + }, + "lnbits_denomination": { + "type": "string", + "title": "Lnbits Denomination", + "default": "sats" + }, + "lnbits_backend_wallet_class": { + "type": "string", + "title": "Lnbits Backend Wallet Class", + "default": "VoidWallet" + }, + "lnbits_funding_source_pay_invoice_wait_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Funding Source Pay Invoice Wait Seconds", + "default": 5 + }, + "funding_source_max_retries": { + "type": "integer", + "minimum": 0, + "title": "Funding Source Max Retries", + "default": 4 + }, + "lnbits_nostr_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Nostr Notifications Enabled", + "default": false + }, + "lnbits_nostr_notifications_private_key": { + "type": "string", + "title": "Lnbits Nostr Notifications Private Key", + "default": "" + }, + "lnbits_nostr_notifications_identifiers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Nostr Notifications Identifiers", + "default": [] + }, + "lnbits_telegram_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Telegram Notifications Enabled", + "default": false + }, + "lnbits_telegram_notifications_access_token": { + "type": "string", + "title": "Lnbits Telegram Notifications Access Token", + "default": "" + }, + "lnbits_telegram_notifications_chat_id": { + "type": "string", + "title": "Lnbits Telegram Notifications Chat Id", + "default": "" + }, + "lnbits_email_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Email Notifications Enabled", + "default": false + }, + "lnbits_email_notifications_email": { + "type": "string", + "title": "Lnbits Email Notifications Email", + "default": "" + }, + "lnbits_email_notifications_username": { + "type": "string", + "title": "Lnbits Email Notifications Username", + "default": "" + }, + "lnbits_email_notifications_password": { + "type": "string", + "title": "Lnbits Email Notifications Password", + "default": "" + }, + "lnbits_email_notifications_server": { + "type": "string", + "title": "Lnbits Email Notifications Server", + "default": "smtp.protonmail.ch" + }, + "lnbits_email_notifications_port": { + "type": "integer", + "title": "Lnbits Email Notifications Port", + "default": 587 + }, + "lnbits_email_notifications_to_emails": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Email Notifications To Emails", + "default": [] + }, + "lnbits_notification_settings_update": { + "type": "boolean", + "title": "Lnbits Notification Settings Update", + "default": true + }, + "lnbits_notification_credit_debit": { + "type": "boolean", + "title": "Lnbits Notification Credit Debit", + "default": true + }, + "notification_balance_delta_threshold_sats": { + "type": "integer", + "minimum": 0, + "title": "Notification Balance Delta Threshold Sats", + "default": 1 + }, + "lnbits_notification_server_start_stop": { + "type": "boolean", + "title": "Lnbits Notification Server Start Stop", + "default": true + }, + "lnbits_notification_watchdog": { + "type": "boolean", + "title": "Lnbits Notification Watchdog", + "default": false + }, + "lnbits_notification_server_status_hours": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Notification Server Status Hours", + "default": 24 + }, + "lnbits_notification_incoming_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Notification Incoming Payment Amount Sats", + "default": 1000000 + }, + "lnbits_notification_outgoing_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Notification Outgoing Payment Amount Sats", + "default": 1000000 + }, + "lnbits_rate_limit_no": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Rate Limit No", + "default": 200 + }, + "lnbits_rate_limit_unit": { + "type": "string", + "title": "Lnbits Rate Limit Unit", + "default": "minute" + }, + "lnbits_allowed_ips": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Ips", + "default": [] + }, + "lnbits_blocked_ips": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Blocked Ips", + "default": [] + }, + "lnbits_callback_url_rules": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Callback Url Rules", + "default": [ + "https?://([a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})(:\\d+)?" + ] + }, + "lnbits_wallet_limit_max_balance": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Max Balance", + "default": 0 + }, + "lnbits_wallet_limit_daily_max_withdraw": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Daily Max Withdraw", + "default": 0 + }, + "lnbits_wallet_limit_secs_between_trans": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Secs Between Trans", + "default": 0 + }, + "lnbits_only_allow_incoming_payments": { + "type": "boolean", + "title": "Lnbits Only Allow Incoming Payments", + "default": false + }, + "lnbits_watchdog_switch_to_voidwallet": { + "type": "boolean", + "title": "Lnbits Watchdog Switch To Voidwallet", + "default": false + }, + "lnbits_watchdog_interval_minutes": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Watchdog Interval Minutes", + "default": 60 + }, + "lnbits_watchdog_delta": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Watchdog Delta", + "default": 1000000 + }, + "lnbits_max_outgoing_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Outgoing Payment Amount Sats", + "default": 10000000 + }, + "lnbits_max_incoming_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Incoming Payment Amount Sats", + "default": 10000000 + }, + "lnbits_exchange_rate_cache_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange Rate Cache Seconds", + "default": 30 + }, + "lnbits_exchange_history_size": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange History Size", + "default": 60 + }, + "lnbits_exchange_history_refresh_interval_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange History Refresh Interval Seconds", + "default": 300 + }, + "lnbits_exchange_rate_providers": { + "items": { + "$ref": "#/components/schemas/ExchangeRateProvider" + }, + "type": "array", + "title": "Lnbits Exchange Rate Providers", + "default": [ + { + "name": "Binance", + "api_url": "https://api.binance.com/api/v3/ticker/price?symbol=BTC{TO}", + "path": "$.price", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [ + "USD:USDT" + ] + }, + { + "name": "Blockchain", + "api_url": "https://blockchain.info/frombtc?currency={TO}&value=100000000", + "path": "", + "exclude_to": [], + "ticker_conversion": [] + }, + { + "name": "Exir", + "api_url": "https://api.exir.io/v1/ticker?symbol=btc-{to}", + "path": "$.last", + "exclude_to": [ + "czk", + "eur" + ], + "ticker_conversion": [ + "USD:USDT" + ] + }, + { + "name": "Bitfinex", + "api_url": "https://api.bitfinex.com/v1/pubticker/btc{to}", + "path": "$.last_price", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "Bitstamp", + "api_url": "https://www.bitstamp.net/api/v2/ticker/btc{to}/", + "path": "$.last", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "Coinbase", + "api_url": "https://api.coinbase.com/v2/exchange-rates?currency=BTC", + "path": "$.data.rates.{TO}", + "exclude_to": [], + "ticker_conversion": [] + }, + { + "name": "Kraken", + "api_url": "https://api.kraken.com/0/public/Ticker?pair=XBT{TO}", + "path": "$.result.XXBTZ{TO}.c[0]", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "yadio", + "api_url": "https://api.yadio.io/exrates/BTC", + "path": "$.BTC.{TO}", + "exclude_to": [], + "ticker_conversion": [] + } + ] + }, + "lnbits_reserve_fee_min": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Reserve Fee Min", + "default": 2000 + }, + "lnbits_reserve_fee_percent": { + "type": "number", + "minimum": 0, + "title": "Lnbits Reserve Fee Percent", + "default": 1 + }, + "lnbits_service_fee": { + "type": "number", + "minimum": 0, + "title": "Lnbits Service Fee", + "default": 0 + }, + "lnbits_service_fee_ignore_internal": { + "type": "boolean", + "title": "Lnbits Service Fee Ignore Internal", + "default": true + }, + "lnbits_service_fee_max": { + "type": "integer", + "title": "Lnbits Service Fee Max", + "default": 0 + }, + "lnbits_service_fee_wallet": { + "type": "string", + "title": "Lnbits Service Fee Wallet" + }, + "lnbits_max_asset_size_mb": { + "type": "number", + "minimum": 0, + "title": "Lnbits Max Asset Size Mb", + "default": 2.5 + }, + "lnbits_assets_allowed_mime_types": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Assets Allowed Mime Types", + "default": [ + "image/png", + "image/jpeg", + "image/jpg", + "image/heic", + "image/heif", + "image/heics", + "png", + "jpeg", + "jpg", + "heic", + "heif", + "heics" + ] + }, + "lnbits_asset_thumbnail_width": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Asset Thumbnail Width", + "default": 128 + }, + "lnbits_asset_thumbnail_height": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Asset Thumbnail Height", + "default": 128 + }, + "lnbits_asset_thumbnail_format": { + "type": "string", + "title": "Lnbits Asset Thumbnail Format", + "default": "png" + }, + "lnbits_max_assets_per_user": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Assets Per User", + "default": 1 + }, + "lnbits_assets_no_limit_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Assets No Limit Users", + "default": [] + }, + "lnbits_baseurl": { + "type": "string", + "title": "Lnbits Baseurl", + "default": "http://127.0.0.1:5000/" + }, + "lnbits_hide_api": { + "type": "boolean", + "title": "Lnbits Hide Api", + "default": false + }, + "lnbits_site_title": { + "type": "string", + "title": "Lnbits Site Title", + "default": "LNbits" + }, + "lnbits_site_tagline": { + "type": "string", + "title": "Lnbits Site Tagline", + "default": "free and open-source lightning wallet" + }, + "lnbits_site_description": { + "type": "string", + "title": "Lnbits Site Description", + "default": "The world's most powerful suite of bitcoin tools." + }, + "lnbits_show_home_page_elements": { + "type": "boolean", + "title": "Lnbits Show Home Page Elements", + "default": true + }, + "lnbits_default_wallet_name": { + "type": "string", + "title": "Lnbits Default Wallet Name", + "default": "LNbits wallet" + }, + "lnbits_custom_badge": { + "type": "string", + "title": "Lnbits Custom Badge" + }, + "lnbits_custom_badge_color": { + "type": "string", + "title": "Lnbits Custom Badge Color", + "default": "warning" + }, + "lnbits_theme_options": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Theme Options", + "default": [ + "classic", + "freedom", + "mint", + "salvador", + "monochrome", + "autumn", + "cyber", + "flamingo", + "bitcoin" + ] + }, + "lnbits_custom_logo": { + "type": "string", + "title": "Lnbits Custom Logo" + }, + "lnbits_custom_image": { + "type": "string", + "title": "Lnbits Custom Image", + "default": "/static/images/logos/lnbits.svg" + }, + "lnbits_ad_space_title": { + "type": "string", + "title": "Lnbits Ad Space Title", + "default": "Supported by" + }, + "lnbits_ad_space": { + "type": "string", + "title": "Lnbits Ad Space", + "default": "https://shop.lnbits.com/;/static/images/bitcoin-shop-banner.png;/static/images/bitcoin-shop-banner.png,https://affil.trezor.io/aff_c?offer_id=169&aff_id=33845;/static/images/bitcoin-hardware-wallet.png;/static/images/bitcoin-hardware-wallet.png,https://firefish.io/?ref=lnbits;/static/images/firefish.png;/static/images/firefish.png,https://opensats.org/;/static/images/open-sats.png;/static/images/open-sats.png" + }, + "lnbits_ad_space_enabled": { + "type": "boolean", + "title": "Lnbits Ad Space Enabled", + "default": false + }, + "lnbits_allowed_currencies": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Currencies", + "default": [] + }, + "lnbits_default_accounting_currency": { + "type": "string", + "title": "Lnbits Default Accounting Currency" + }, + "lnbits_qr_logo": { + "type": "string", + "title": "Lnbits Qr Logo", + "default": "/static/images/favicon_qr_logo.png" + }, + "lnbits_apple_touch_icon": { + "type": "string", + "title": "Lnbits Apple Touch Icon" + }, + "lnbits_default_reaction": { + "type": "string", + "title": "Lnbits Default Reaction", + "default": "confettiBothSides" + }, + "lnbits_default_theme": { + "type": "string", + "title": "Lnbits Default Theme", + "default": "salvador" + }, + "lnbits_default_border": { + "type": "string", + "title": "Lnbits Default Border", + "default": "hard-border" + }, + "lnbits_default_gradient": { + "type": "boolean", + "title": "Lnbits Default Gradient", + "default": true + }, + "lnbits_default_bgimage": { + "type": "string", + "title": "Lnbits Default Bgimage" + }, + "lnbits_admin_extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Admin Extensions", + "default": [] + }, + "lnbits_user_default_extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits User Default Extensions", + "default": [] + }, + "lnbits_extensions_deactivate_all": { + "type": "boolean", + "title": "Lnbits Extensions Deactivate All", + "default": false + }, + "lnbits_extensions_builder_activate_non_admins": { + "type": "boolean", + "title": "Lnbits Extensions Builder Activate Non Admins", + "default": false + }, + "lnbits_extensions_reviews_url": { + "type": "string", + "title": "Lnbits Extensions Reviews Url", + "description": "\n URL for the paid reviews.\n Regular users can view this URL (not secret).\n ", + "default": "https://demo.lnbits.com/paidreviews/api/v1/AdFzLjzuKFLsdk4Bcnff6r" + }, + "lnbits_extensions_manifests": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Extensions Manifests", + "default": [ + "https://raw.githubusercontent.com/lnbits/lnbits-extensions/main/extensions.json" + ] + }, + "lnbits_extensions_builder_manifest_url": { + "type": "string", + "title": "Lnbits Extensions Builder Manifest Url", + "default": "https://raw.githubusercontent.com/lnbits/extension_builder_stub/refs/heads/main/manifest.json" + }, + "lnbits_admin_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Admin Users", + "default": [] + }, + "lnbits_allowed_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Users", + "default": [] + }, + "lnbits_allow_new_accounts": { + "type": "boolean", + "title": "Lnbits Allow New Accounts", + "default": true + }, + "is_super_user": { + "type": "boolean", + "title": "Is Super User" + }, + "lnbits_allowed_funding_sources": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Funding Sources" + } + }, + "type": "object", + "required": [ + "is_super_user" + ], + "title": "AdminSettings" + }, + "AesAction": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlPaySuccessActionTag" + } + ], + "default": "aes" + }, + "description": { + "type": "string", + "maxLength": 144, + "title": "Description" + }, + "ciphertext": { + "type": "string", + "maxLength": 4096, + "minLength": 24, + "title": "Ciphertext" + }, + "iv": { + "type": "string", + "maxLength": 24, + "minLength": 24, + "title": "Iv" + } + }, + "type": "object", + "required": [ + "description", + "ciphertext", + "iv" + ], + "title": "AesAction" + }, + "ApiTokenRequest": { + "properties": { + "acl_id": { + "type": "string", + "title": "Acl Id" + }, + "token_name": { + "type": "string", + "title": "Token Name" + }, + "password": { + "type": "string", + "title": "Password" + }, + "expiration_time_minutes": { + "type": "integer", + "title": "Expiration Time Minutes" + } + }, + "type": "object", + "required": [ + "acl_id", + "token_name", + "password", + "expiration_time_minutes" + ], + "title": "ApiTokenRequest" + }, + "ApiTokenResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "api_token": { + "type": "string", + "title": "Api Token" + } + }, + "type": "object", + "required": [ + "id", + "api_token" + ], + "title": "ApiTokenResponse" + }, + "AssetInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "mime_type": { + "type": "string", + "title": "Mime Type" + }, + "name": { + "type": "string", + "title": "Name" + }, + "is_public": { + "type": "boolean", + "title": "Is Public", + "default": false + }, + "size_bytes": { + "type": "integer", + "title": "Size Bytes" + }, + "thumbnail_base64": { + "type": "string", + "title": "Thumbnail Base64" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "mime_type", + "name", + "size_bytes" + ], + "title": "AssetInfo" + }, + "AssetUpdate": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "is_public": { + "type": "boolean", + "title": "Is Public" + } + }, + "type": "object", + "title": "AssetUpdate" + }, + "AuctionDuration": { + "properties": { + "days": { + "type": "integer", + "title": "Days", + "default": 7 + }, + "hours": { + "type": "integer", + "title": "Hours", + "default": 0 + }, + "minutes": { + "type": "integer", + "title": "Minutes", + "default": 0 + } + }, + "type": "object", + "title": "AuctionDuration" + }, + "AuctionRoom": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "type": { + "type": "string", + "title": "Type", + "default": "auction" + }, + "duration_seconds": { + "type": "integer", + "title": "Duration Seconds", + "default": 0, + "no_database": true + }, + "min_bid_up_percentage": { + "type": "number", + "title": "Min Bid Up Percentage", + "default": 5 + }, + "room_percentage": { + "type": "number", + "title": "Room Percentage", + "default": 10 + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "fee_wallet_id": { + "type": "string", + "title": "Fee Wallet Id" + }, + "is_open_room": { + "type": "boolean", + "title": "Is Open Room", + "default": false + }, + "extra": { + "$ref": "#/components/schemas/AuctionRoomConfig" + } + }, + "type": "object", + "required": [ + "id", + "name", + "description", + "currency", + "user_id", + "fee_wallet_id", + "extra" + ], + "title": "AuctionRoom" + }, + "AuctionRoomConfig": { + "properties": { + "duration": { + "allOf": [ + { + "$ref": "#/components/schemas/AuctionDuration" + } + ], + "title": "Duration", + "default": { + "days": 7, + "hours": 0, + "minutes": 0 + } + }, + "lock_webhook": { + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + } + ], + "title": "Lock Webhook", + "default": { + "method": "GET", + "url": "", + "headers": "", + "data": "" + } + }, + "unlock_webhook": { + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + } + ], + "title": "Unlock Webhook", + "default": { + "method": "GET", + "url": "", + "headers": "", + "data": "" + } + }, + "transfer_webhook": { + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + } + ], + "title": "Transfer Webhook", + "default": { + "method": "GET", + "url": "", + "headers": "", + "data": "" + } + } + }, + "type": "object", + "title": "AuctionRoomConfig" + }, + "AuditCountStat": { + "properties": { + "field": { + "type": "string", + "title": "Field", + "default": "" + }, + "total": { + "type": "number", + "title": "Total", + "default": 0 + } + }, + "type": "object", + "title": "AuditCountStat" + }, + "AuditStats": { + "properties": { + "request_method": { + "items": { + "$ref": "#/components/schemas/AuditCountStat" + }, + "type": "array", + "title": "Request Method", + "default": [] + }, + "response_code": { + "items": { + "$ref": "#/components/schemas/AuditCountStat" + }, + "type": "array", + "title": "Response Code", + "default": [] + }, + "component": { + "items": { + "$ref": "#/components/schemas/AuditCountStat" + }, + "type": "array", + "title": "Component", + "default": [] + }, + "long_duration": { + "items": { + "$ref": "#/components/schemas/AuditCountStat" + }, + "type": "array", + "title": "Long Duration", + "default": [] + } + }, + "type": "object", + "title": "AuditStats" + }, + "AutoReverseSubmarineSwap": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "feerate_limit": { + "type": "integer", + "title": "Feerate Limit" + }, + "balance": { + "type": "integer", + "title": "Balance" + }, + "onchain_address": { + "type": "string", + "title": "Onchain Address" + }, + "instant_settlement": { + "type": "boolean", + "title": "Instant Settlement" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "count": { + "type": "integer", + "title": "Count" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "asset", + "amount", + "balance", + "onchain_address", + "instant_settlement", + "count" + ], + "title": "AutoReverseSubmarineSwap" + }, + "BidRequest": { + "properties": { + "memo": { + "type": "string", + "title": "Memo" + }, + "ln_address": { + "type": "string", + "title": "Ln Address" + }, + "amount": { + "type": "number", + "title": "Amount" + } + }, + "type": "object", + "required": [ + "memo", + "amount" + ], + "title": "BidRequest" + }, + "BidResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "payment_request": { + "type": "string", + "title": "Payment Request" + } + }, + "type": "object", + "required": [ + "id", + "payment_hash", + "payment_request" + ], + "title": "BidResponse" + }, + "Bleskomat": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "api_key_id": { + "type": "string", + "title": "Api Key Id" + }, + "api_key_secret": { + "type": "string", + "title": "Api Key Secret" + }, + "api_key_encoding": { + "type": "string", + "title": "Api Key Encoding" + }, + "name": { + "type": "string", + "title": "Name" + }, + "fiat_currency": { + "type": "string", + "title": "Fiat Currency" + }, + "exchange_rate_provider": { + "type": "string", + "title": "Exchange Rate Provider" + }, + "fee": { + "type": "string", + "title": "Fee" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "api_key_id", + "api_key_secret", + "api_key_encoding", + "name", + "fiat_currency", + "exchange_rate_provider", + "fee" + ], + "title": "Bleskomat" + }, + "Body_Create_a_new_wallet_for_user_users_api_v1_user__user_id__wallet_post": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + } + }, + "type": "object", + "title": "Body_Create_a_new_wallet_for_user_users_api_v1_user__user_id__wallet_post" + }, + "Body_Upload_api_v1_assets_post": { + "properties": { + "file": { + "type": "string", + "format": "binary", + "title": "File" + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_Upload_api_v1_assets_post" + }, + "Body_api_connect_peer_node_api_v1_peers_post": { + "properties": { + "uri": { + "type": "string", + "title": "Uri" + } + }, + "type": "object", + "required": [ + "uri" + ], + "title": "Body_api_connect_peer_node_api_v1_peers_post" + }, + "Body_api_create_channel_node_api_v1_channels_post": { + "properties": { + "peer_id": { + "type": "string", + "title": "Peer Id" + }, + "funding_amount": { + "type": "integer", + "title": "Funding Amount" + }, + "push_amount": { + "type": "integer", + "title": "Push Amount" + }, + "fee_rate": { + "type": "integer", + "title": "Fee Rate" + } + }, + "type": "object", + "required": [ + "peer_id", + "funding_amount" + ], + "title": "Body_api_create_channel_node_api_v1_channels_post" + }, + "Body_api_set_channel_fees_node_api_v1_channels__channel_id__put": { + "properties": { + "fee_ppm": { + "type": "integer", + "title": "Fee Ppm" + }, + "fee_base_msat": { + "type": "integer", + "title": "Fee Base Msat" + } + }, + "type": "object", + "title": "Body_api_set_channel_fees_node_api_v1_channels__channel_id__put" + }, + "Body_api_update_wallet_api_v1_wallet_patch": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "icon": { + "type": "string", + "title": "Icon" + }, + "color": { + "type": "string", + "title": "Color" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "pinned": { + "type": "boolean", + "title": "Pinned" + } + }, + "type": "object", + "title": "Body_api_update_wallet_api_v1_wallet_patch" + }, + "BoltzSettings": { + "properties": { + "boltz_network": { + "type": "string", + "title": "Boltz Network", + "default": "main" + }, + "boltz_network_liquid": { + "type": "string", + "title": "Boltz Network Liquid", + "default": "liquidv1" + }, + "boltz_url": { + "type": "string", + "title": "Boltz Url", + "default": "https://boltz.exchange/api" + } + }, + "type": "object", + "title": "BoltzSettings" + }, + "BuyOrder": { + "properties": { + "action": { + "type": "string", + "title": "Action" + }, + "relay_id": { + "type": "string", + "title": "Relay Id" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "units_to_buy": { + "type": "integer", + "title": "Units To Buy", + "default": 0 + } + }, + "type": "object", + "required": [ + "action", + "relay_id", + "pubkey" + ], + "title": "BuyOrder" + }, + "CancelInvoice": { + "properties": { + "payment_hash": { + "type": "string", + "maxLength": 64, + "minLength": 64, + "title": "Payment Hash", + "description": "The payment hash of the invoice to cancel." + } + }, + "type": "object", + "required": [ + "payment_hash" + ], + "title": "CancelInvoice" + }, + "ChannelBalance": { + "properties": { + "local_msat": { + "type": "integer", + "title": "Local Msat" + }, + "remote_msat": { + "type": "integer", + "title": "Remote Msat" + }, + "total_msat": { + "type": "integer", + "title": "Total Msat" + } + }, + "type": "object", + "required": [ + "local_msat", + "remote_msat", + "total_msat" + ], + "title": "ChannelBalance" + }, + "ChannelPoint": { + "properties": { + "funding_txid": { + "type": "string", + "title": "Funding Txid" + }, + "output_index": { + "type": "integer", + "title": "Output Index" + } + }, + "type": "object", + "required": [ + "funding_txid", + "output_index" + ], + "title": "ChannelPoint" + }, + "ChannelState": { + "enum": [ + "active", + "pending", + "closed", + "inactive" + ], + "title": "ChannelState", + "description": "An enumeration." + }, + "ChannelStats": { + "properties": { + "counts": { + "additionalProperties": { + "type": "integer" + }, + "type": "object", + "title": "Counts" + }, + "avg_size": { + "type": "integer", + "title": "Avg Size" + }, + "biggest_size": { + "type": "integer", + "title": "Biggest Size" + }, + "smallest_size": { + "type": "integer", + "title": "Smallest Size" + }, + "total_capacity": { + "type": "integer", + "title": "Total Capacity" + } + }, + "type": "object", + "required": [ + "counts", + "avg_size", + "total_capacity" + ], + "title": "ChannelStats" + }, + "Charge": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user": { + "type": "string", + "title": "User" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "time": { + "type": "integer", + "title": "Time" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "balance": { + "type": "integer", + "title": "Balance", + "default": 0 + }, + "pending": { + "type": "integer", + "title": "Pending", + "default": 0 + }, + "zeroconf": { + "type": "boolean", + "title": "Zeroconf", + "default": false + }, + "fasttrack": { + "type": "boolean", + "title": "Fasttrack", + "default": false + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "completelinktext": { + "type": "string", + "title": "Completelinktext", + "default": "Back to Merchant" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "onchainwallet": { + "type": "string", + "title": "Onchainwallet" + }, + "onchainaddress": { + "type": "string", + "title": "Onchainaddress" + }, + "lnbitswallet": { + "type": "string", + "title": "Lnbitswallet" + }, + "payment_request": { + "type": "string", + "title": "Payment Request" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "completelink": { + "type": "string", + "title": "Completelink" + }, + "custom_css": { + "type": "string", + "title": "Custom Css" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "currency_amount": { + "type": "number", + "title": "Currency Amount" + }, + "extra": { + "type": "string", + "title": "Extra" + } + }, + "type": "object", + "required": [ + "id", + "user", + "amount", + "time", + "timestamp" + ], + "title": "Charge" + }, + "CheckPaywallInvoice": { + "properties": { + "payment_hash": { + "type": "string", + "title": "Payment Hash" + } + }, + "type": "object", + "required": [ + "payment_hash" + ], + "title": "CheckPaywallInvoice" + }, + "ClientData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "owner_data_id": { + "type": "string", + "title": "Owner Data Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "link": { + "type": "string", + "title": "Link" + }, + "icon": { + "type": "string", + "title": "Icon" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "owner_data_id", + "name", + "link", + "icon" + ], + "title": "ClientData" + }, + "ClientDataFields": { + "properties": { + "public_inputs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Public Inputs", + "default": [] + } + }, + "type": "object", + "title": "ClientDataFields" + }, + "CoinflipSettings": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet_id": { + "type": "string", + "title": "Wallet Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "max_players": { + "type": "integer", + "title": "Max Players" + }, + "max_bet": { + "type": "integer", + "title": "Max Bet" + }, + "enabled": { + "type": "boolean", + "title": "Enabled" + }, + "haircut": { + "type": "number", + "title": "Haircut" + } + }, + "type": "object", + "required": [ + "id", + "wallet_id", + "user_id", + "max_players", + "max_bet", + "enabled", + "haircut" + ], + "title": "CoinflipSettings" + }, + "ConversionData": { + "properties": { + "from_": { + "type": "string", + "title": "From ", + "default": "sat" + }, + "amount": { + "type": "number", + "title": "Amount" + }, + "to": { + "type": "string", + "title": "To", + "default": "usd" + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "ConversionData" + }, + "Copilot": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user": { + "type": "string", + "title": "User" + }, + "title": { + "type": "string", + "title": "Title" + }, + "lnurl_toggle": { + "type": "integer", + "title": "Lnurl Toggle" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "animation1": { + "type": "string", + "title": "Animation1" + }, + "animation2": { + "type": "string", + "title": "Animation2" + }, + "animation3": { + "type": "string", + "title": "Animation3" + }, + "animation1threshold": { + "type": "integer", + "title": "Animation1Threshold" + }, + "animation2threshold": { + "type": "integer", + "title": "Animation2Threshold" + }, + "animation3threshold": { + "type": "integer", + "title": "Animation3Threshold" + }, + "animation1webhook": { + "type": "string", + "title": "Animation1Webhook" + }, + "animation2webhook": { + "type": "string", + "title": "Animation2Webhook" + }, + "animation3webhook": { + "type": "string", + "title": "Animation3Webhook" + }, + "lnurl_title": { + "type": "string", + "title": "Lnurl Title" + }, + "show_message": { + "type": "integer", + "title": "Show Message" + }, + "show_ack": { + "type": "integer", + "title": "Show Ack" + }, + "show_price": { + "type": "string", + "title": "Show Price" + }, + "amount_made": { + "type": "integer", + "title": "Amount Made" + }, + "timestamp": { + "type": "integer", + "title": "Timestamp" + }, + "fullscreen_cam": { + "type": "integer", + "title": "Fullscreen Cam" + }, + "iframe_url": { + "type": "string", + "title": "Iframe Url" + } + }, + "type": "object", + "required": [ + "id", + "title", + "lnurl_toggle", + "animation1threshold", + "animation2threshold", + "animation3threshold", + "show_message", + "show_ack", + "amount_made", + "timestamp", + "fullscreen_cam" + ], + "title": "Copilot" + }, + "CreateAddressData": { + "properties": { + "domain_id": { + "type": "string", + "title": "Domain Id" + }, + "local_part": { + "type": "string", + "title": "Local Part" + }, + "pubkey": { + "type": "string", + "title": "Pubkey", + "default": "" + }, + "years": { + "type": "integer", + "title": "Years", + "default": 1 + }, + "relays": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Relays" + }, + "promo_code": { + "type": "string", + "title": "Promo Code" + }, + "referer": { + "type": "string", + "title": "Referer" + }, + "create_invoice": { + "type": "boolean", + "title": "Create Invoice", + "default": false + } + }, + "type": "object", + "required": [ + "domain_id", + "local_part" + ], + "title": "CreateAddressData" + }, + "CreateAppointment": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "info": { + "type": "string", + "title": "Info" + }, + "start_time": { + "type": "string", + "title": "Start Time" + }, + "end_time": { + "type": "string", + "title": "End Time" + }, + "schedule": { + "type": "string", + "title": "Schedule" + } + }, + "type": "object", + "required": [ + "name", + "start_time", + "end_time", + "schedule" + ], + "title": "CreateAppointment" + }, + "CreateAuctionItem": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "ln_address": { + "type": "string", + "title": "Ln Address" + }, + "ask_price": { + "type": "number", + "title": "Ask Price", + "default": 0 + }, + "transfer_code": { + "type": "string", + "title": "Transfer Code" + } + }, + "type": "object", + "required": [ + "name", + "transfer_code" + ], + "title": "CreateAuctionItem" + }, + "CreateAuctionRoomData": { + "properties": { + "fee_wallet_id": { + "type": "string", + "title": "Fee Wallet Id" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type", + "default": "auction" + }, + "room_percentage": { + "type": "number", + "title": "Room Percentage", + "default": 10 + }, + "min_bid_up_percentage": { + "type": "number", + "title": "Min Bid Up Percentage", + "default": 5 + }, + "is_open_room": { + "type": "boolean", + "title": "Is Open Room", + "default": false + } + }, + "type": "object", + "required": [ + "currency", + "name", + "description" + ], + "title": "CreateAuctionRoomData" + }, + "CreateAutoReverseSubmarineSwap": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset", + "default": "BTC/BTC" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "balance": { + "type": "integer", + "title": "Balance", + "default": 0 + }, + "instant_settlement": { + "type": "boolean", + "title": "Instant Settlement" + }, + "onchain_address": { + "type": "string", + "title": "Onchain Address" + }, + "feerate_limit": { + "type": "integer", + "title": "Feerate Limit" + } + }, + "type": "object", + "required": [ + "wallet", + "amount", + "instant_settlement", + "onchain_address" + ], + "title": "CreateAutoReverseSubmarineSwap" + }, + "CreateBleskomat": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "fiat_currency": { + "type": "string", + "title": "Fiat Currency" + }, + "exchange_rate_provider": { + "type": "string", + "title": "Exchange Rate Provider" + }, + "fee": { + "type": "string", + "title": "Fee" + } + }, + "type": "object", + "required": [ + "name", + "fiat_currency", + "exchange_rate_provider", + "fee" + ], + "title": "CreateBleskomat" + }, + "CreateCharge": { + "properties": { + "onchainwallet": { + "type": "string", + "title": "Onchainwallet" + }, + "lnbitswallet": { + "type": "string", + "title": "Lnbitswallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "completelink": { + "type": "string", + "title": "Completelink" + }, + "completelinktext": { + "type": "string", + "title": "Completelinktext", + "default": "Back to Merchant" + }, + "time": { + "type": "integer", + "minimum": 1, + "title": "Time" + }, + "amount": { + "type": "integer", + "minimum": 1, + "title": "Amount" + }, + "zeroconf": { + "type": "boolean", + "title": "Zeroconf", + "default": false + }, + "fasttrack": { + "type": "boolean", + "title": "Fasttrack", + "default": false + }, + "custom_css": { + "type": "string", + "title": "Custom Css" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "currency_amount": { + "type": "number", + "title": "Currency Amount" + }, + "extra": { + "type": "string", + "title": "Extra" + } + }, + "type": "object", + "required": [ + "description", + "time" + ], + "title": "CreateCharge" + }, + "CreateClientData": { + "properties": { + "owner_data_id": { + "type": "string", + "title": "Owner Data Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "link": { + "type": "string", + "title": "Link" + }, + "icon": { + "type": "string", + "title": "Icon" + } + }, + "type": "object", + "required": [ + "owner_data_id", + "name", + "link", + "icon" + ], + "title": "CreateClientData" + }, + "CreateCoinflip": { + "properties": { + "settings_id": { + "type": "string", + "title": "Settings Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "number_of_players": { + "type": "integer", + "title": "Number Of Players", + "default": 0 + }, + "buy_in": { + "type": "integer", + "title": "Buy In", + "default": 0 + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateCoinflip" + }, + "CreateCoinflipSettings": { + "properties": { + "max_players": { + "type": "integer", + "title": "Max Players", + "default": 5 + }, + "max_bet": { + "type": "integer", + "title": "Max Bet", + "default": 100 + }, + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "haircut": { + "type": "number", + "title": "Haircut", + "default": 0 + } + }, + "type": "object", + "title": "CreateCoinflipSettings" + }, + "CreateCopilotData": { + "properties": { + "user": { + "type": "string", + "title": "User" + }, + "title": { + "type": "string", + "title": "Title" + }, + "lnurl_toggle": { + "type": "integer", + "title": "Lnurl Toggle", + "default": 0 + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "animation1": { + "type": "string", + "title": "Animation1" + }, + "animation2": { + "type": "string", + "title": "Animation2" + }, + "animation3": { + "type": "string", + "title": "Animation3" + }, + "animation1threshold": { + "type": "integer", + "title": "Animation1Threshold", + "default": 0 + }, + "animation2threshold": { + "type": "integer", + "title": "Animation2Threshold", + "default": 0 + }, + "animation3threshold": { + "type": "integer", + "title": "Animation3Threshold", + "default": 0 + }, + "animation1webhook": { + "type": "string", + "title": "Animation1Webhook" + }, + "animation2webhook": { + "type": "string", + "title": "Animation2Webhook" + }, + "animation3webhook": { + "type": "string", + "title": "Animation3Webhook" + }, + "lnurl_title": { + "type": "string", + "title": "Lnurl Title" + }, + "show_message": { + "type": "integer", + "title": "Show Message", + "default": 0 + }, + "show_ack": { + "type": "integer", + "title": "Show Ack", + "default": 0 + }, + "show_price": { + "type": "string", + "title": "Show Price" + }, + "amount_made": { + "type": "integer", + "title": "Amount Made", + "default": 0 + }, + "timestamp": { + "type": "integer", + "title": "Timestamp", + "default": 0 + }, + "fullscreen_cam": { + "type": "integer", + "title": "Fullscreen Cam", + "default": 0 + }, + "iframe_url": { + "type": "string", + "title": "Iframe Url" + } + }, + "type": "object", + "title": "CreateCopilotData" + }, + "CreateDomainData": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "cost_extra": { + "$ref": "#/components/schemas/DomainCostConfig" + } + }, + "type": "object", + "required": [ + "wallet", + "currency", + "cost", + "domain" + ], + "title": "CreateDomainData" + }, + "CreateEightBallData": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "wordlist": { + "type": "string", + "title": "Wordlist" + }, + "lnurlpayamount": { + "type": "integer", + "title": "Lnurlpayamount" + }, + "wallet": { + "type": "string", + "title": "Wallet" + } + }, + "type": "object", + "required": [ + "name", + "wordlist", + "lnurlpayamount" + ], + "title": "CreateEightBallData" + }, + "CreateEvent": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "info": { + "type": "string", + "title": "Info" + }, + "closing_date": { + "type": "string", + "title": "Closing Date" + }, + "event_start_date": { + "type": "string", + "title": "Event Start Date" + }, + "event_end_date": { + "type": "string", + "title": "Event End Date" + }, + "currency": { + "type": "string", + "title": "Currency", + "default": "sat" + }, + "amount_tickets": { + "type": "integer", + "minimum": 0, + "title": "Amount Tickets" + }, + "price_per_ticket": { + "type": "number", + "minimum": 0, + "title": "Price Per Ticket" + }, + "banner": { + "type": "string", + "title": "Banner" + } + }, + "type": "object", + "required": [ + "wallet", + "name", + "info", + "closing_date", + "event_start_date", + "event_end_date", + "amount_tickets", + "price_per_ticket" + ], + "title": "CreateEvent" + }, + "CreateExtension": { + "properties": { + "ext_id": { + "type": "string", + "title": "Ext Id" + }, + "archive": { + "type": "string", + "title": "Archive" + }, + "source_repo": { + "type": "string", + "title": "Source Repo" + }, + "version": { + "type": "string", + "title": "Version" + }, + "cost_sats": { + "type": "integer", + "title": "Cost Sats", + "default": 0 + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + } + }, + "type": "object", + "required": [ + "ext_id", + "archive", + "source_repo", + "version" + ], + "title": "CreateExtension" + }, + "CreateExtensionReview": { + "properties": { + "tag": { + "type": "string", + "title": "Tag" + }, + "name": { + "type": "string", + "title": "Name" + }, + "rating": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "title": "Rating" + }, + "comment": { + "type": "string", + "title": "Comment" + } + }, + "type": "object", + "required": [ + "tag", + "rating" + ], + "title": "CreateExtensionReview" + }, + "CreateFiatSubscription": { + "properties": { + "subscription_id": { + "type": "string", + "title": "Subscription Id" + }, + "quantity": { + "type": "integer", + "title": "Quantity" + }, + "payment_options": { + "$ref": "#/components/schemas/FiatSubscriptionPaymentOptions" + } + }, + "type": "object", + "required": [ + "subscription_id", + "quantity", + "payment_options" + ], + "title": "CreateFiatSubscription" + }, + "CreateFormData": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "description": { + "type": "string", + "minLength": 0, + "title": "Description" + }, + "amount": { + "type": "integer", + "minimum": 0, + "title": "Amount" + }, + "flatrate": { + "type": "integer", + "title": "Flatrate" + } + }, + "type": "object", + "required": [ + "wallet", + "name", + "description", + "amount", + "flatrate" + ], + "title": "CreateFormData" + }, + "CreateFossa": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "profit": { + "type": "number", + "title": "Profit" + }, + "boltz": { + "type": "boolean", + "title": "Boltz", + "default": false + } + }, + "type": "object", + "required": [ + "title", + "wallet", + "currency", + "profit" + ], + "title": "CreateFossa" + }, + "CreateGerty": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "title": "Type" + }, + "refresh_time": { + "type": "integer", + "title": "Refresh Time" + }, + "utc_offset": { + "type": "integer", + "title": "Utc Offset" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "lnbits_wallets": { + "type": "string", + "title": "Lnbits Wallets" + }, + "mempool_endpoint": { + "type": "string", + "title": "Mempool Endpoint" + }, + "exchange": { + "type": "string", + "title": "Exchange" + }, + "display_preferences": { + "type": "string", + "title": "Display Preferences" + }, + "urls": { + "type": "string", + "title": "Urls" + } + }, + "type": "object", + "required": [ + "name", + "type" + ], + "title": "CreateGerty" + }, + "CreateInvoice": { + "properties": { + "unit": { + "type": "string", + "title": "Unit", + "default": "sat" + }, + "internal": { + "type": "boolean", + "title": "Internal", + "default": false + }, + "out": { + "type": "boolean", + "title": "Out", + "default": true + }, + "amount": { + "type": "number", + "minimum": 0, + "title": "Amount" + }, + "memo": { + "type": "string", + "maxLength": 640, + "title": "Memo" + }, + "description_hash": { + "type": "string", + "title": "Description Hash" + }, + "unhashed_description": { + "type": "string", + "title": "Unhashed Description" + }, + "payment_hash": { + "type": "string", + "maxLength": 64, + "minLength": 64, + "title": "Payment Hash", + "description": "The payment hash of the hold invoice." + }, + "expiry": { + "type": "integer", + "title": "Expiry" + }, + "extra": { + "type": "object", + "title": "Extra" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "bolt11": { + "type": "string", + "title": "Bolt11" + }, + "lnurl_withdraw": { + "$ref": "#/components/schemas/LnurlWithdrawResponse" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Labels", + "default": [] + } + }, + "type": "object", + "title": "CreateInvoice" + }, + "CreateInvoiceData": { + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatusEnum" + } + ], + "default": "draft" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "company_name": { + "type": "string", + "title": "Company Name" + }, + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "phone": { + "type": "string", + "title": "Phone" + }, + "address": { + "type": "string", + "title": "Address" + }, + "items": { + "items": { + "$ref": "#/components/schemas/InvoiceItemData" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "currency", + "items" + ], + "title": "CreateInvoiceData" + }, + "CreateItem": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "price": { + "type": "number", + "title": "Price" + }, + "unit": { + "type": "string", + "title": "Unit" + }, + "image": { + "type": "string", + "title": "Image" + } + }, + "type": "object", + "required": [ + "name", + "description", + "price", + "unit" + ], + "title": "CreateItem" + }, + "CreateJobData": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the Job" + }, + "status": { + "type": "boolean", + "title": "Status", + "default": false + }, + "selectedverb": { + "type": "string", + "title": "Selectedverb" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/HeaderItems" + }, + "type": "array", + "title": "Headers" + }, + "body": { + "type": "string", + "title": "Body" + }, + "schedule": { + "type": "string", + "title": "Schedule" + }, + "extra": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra" + } + }, + "type": "object", + "title": "CreateJobData" + }, + "CreateJukeLinkData": { + "properties": { + "user": { + "type": "string", + "title": "User" + }, + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "sp_user": { + "type": "string", + "title": "Sp User" + }, + "sp_secret": { + "type": "string", + "title": "Sp Secret" + }, + "sp_access_token": { + "type": "string", + "title": "Sp Access Token" + }, + "sp_refresh_token": { + "type": "string", + "title": "Sp Refresh Token" + }, + "sp_device": { + "type": "string", + "title": "Sp Device" + }, + "sp_playlists": { + "type": "string", + "title": "Sp Playlists" + }, + "price": { + "type": "integer", + "title": "Price" + } + }, + "type": "object", + "title": "CreateJukeLinkData" + }, + "CreateLnpos": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency", + "default": "sat" + }, + "profit": { + "type": "number", + "title": "Profit" + } + }, + "type": "object", + "required": [ + "title", + "wallet" + ], + "title": "CreateLnpos" + }, + "CreateLnurlPayment": { + "properties": { + "res": { + "$ref": "#/components/schemas/LnurlPayResponse" + }, + "lnurl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "title": "Lnurl" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "comment": { + "type": "string", + "title": "Comment" + }, + "unit": { + "type": "string", + "title": "Unit" + }, + "internal_memo": { + "type": "string", + "title": "Internal Memo" + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "CreateLnurlPayment" + }, + "CreateLnurlWithdraw": { + "properties": { + "lnurl_w": { + "type": "string", + "title": "Lnurl W" + } + }, + "type": "object", + "required": [ + "lnurl_w" + ], + "title": "CreateLnurlWithdraw" + }, + "CreateMyExtensionData": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "default": "" + }, + "name": { + "type": "string", + "title": "Name" + }, + "lnurlpayamount": { + "type": "integer", + "title": "Lnurlpayamount" + }, + "lnurlwithdrawamount": { + "type": "integer", + "title": "Lnurlwithdrawamount" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "total": { + "type": "integer", + "title": "Total", + "default": 0 + } + }, + "type": "object", + "required": [ + "name", + "lnurlpayamount", + "lnurlwithdrawamount", + "wallet" + ], + "title": "CreateMyExtensionData" + }, + "CreateOrder": { + "properties": { + "payment_request": { + "type": "string", + "title": "Payment Request" + }, + "order_id": { + "type": "string", + "title": "Order Id" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + } + }, + "type": "object", + "required": [ + "payment_request", + "order_id", + "payment_hash" + ], + "title": "CreateOrder" + }, + "CreateOwnerData": { + "properties": { + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateOwnerData" + }, + "CreatePads": { + "properties": { + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreatePads" + }, + "CreatePayLinkData": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "min": { + "type": "number", + "minimum": 0.01, + "title": "Min", + "default": 1 + }, + "max": { + "type": "number", + "minimum": 0.01, + "title": "Max", + "default": 1 + }, + "comment_chars": { + "type": "integer", + "maximum": 799, + "minimum": 0, + "title": "Comment Chars", + "default": 0 + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "success_text": { + "type": "string", + "title": "Success Text" + }, + "success_url": { + "type": "string", + "title": "Success Url" + }, + "fiat_base_multiplier": { + "type": "integer", + "minimum": 1, + "title": "Fiat Base Multiplier", + "default": 100 + }, + "username": { + "type": "string", + "title": "Username" + }, + "zaps": { + "type": "boolean", + "title": "Zaps", + "default": false + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + } + }, + "type": "object", + "required": [ + "description" + ], + "title": "CreatePayLinkData" + }, + "CreatePayment": { + "properties": { + "myextension_id": { + "type": "string", + "title": "Myextension Id" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "memo": { + "type": "string", + "title": "Memo" + } + }, + "type": "object", + "required": [ + "myextension_id", + "amount", + "memo" + ], + "title": "CreatePayment" + }, + "CreatePaywall": { + "properties": { + "url": { + "type": "string", + "title": "Url" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "description": { + "type": "string", + "title": "Description" + }, + "amount": { + "type": "number", + "minimum": 0, + "title": "Amount" + }, + "currency": { + "type": "string", + "title": "Currency", + "default": "sat" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "remembers": { + "type": "boolean", + "title": "Remembers" + }, + "extras": { + "$ref": "#/components/schemas/PaywallExtra" + } + }, + "type": "object", + "required": [ + "url", + "memo", + "amount", + "remembers" + ], + "title": "CreatePaywall" + }, + "CreatePaywallInvoice": { + "properties": { + "amount": { + "type": "number", + "minimum": 0, + "title": "Amount" + }, + "pay_in_fiat": { + "type": "boolean", + "title": "Pay In Fiat", + "default": false + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "CreatePaywallInvoice" + }, + "CreatePrSettings": { + "properties": { + "cost": { + "type": "integer", + "minimum": 0, + "title": "Cost", + "default": 0 + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "comment_word_limit": { + "type": "integer", + "minimum": 0, + "title": "Comment Word Limit", + "default": 0 + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags" + } + }, + "type": "object", + "title": "CreatePrSettings" + }, + "CreatePsbt": { + "properties": { + "masterpubs": { + "items": { + "$ref": "#/components/schemas/MasterPublicKey" + }, + "type": "array", + "title": "Masterpubs" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/TransactionInput" + }, + "type": "array", + "title": "Inputs" + }, + "outputs": { + "items": { + "$ref": "#/components/schemas/TransactionOutput" + }, + "type": "array", + "title": "Outputs" + }, + "fee_rate": { + "type": "integer", + "title": "Fee Rate" + }, + "tx_size": { + "type": "integer", + "title": "Tx Size" + } + }, + "type": "object", + "required": [ + "masterpubs", + "inputs", + "outputs", + "fee_rate", + "tx_size" + ], + "title": "CreatePsbt" + }, + "CreateReverseSubmarineSwap": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset", + "default": "BTC/BTC" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "direction": { + "type": "string", + "title": "Direction", + "default": "send" + }, + "instant_settlement": { + "type": "boolean", + "title": "Instant Settlement" + }, + "onchain_address": { + "type": "string", + "title": "Onchain Address" + }, + "feerate": { + "type": "boolean", + "title": "Feerate" + }, + "feerate_value": { + "type": "integer", + "title": "Feerate Value" + } + }, + "type": "object", + "required": [ + "wallet", + "amount", + "instant_settlement", + "onchain_address" + ], + "title": "CreateReverseSubmarineSwap" + }, + "CreateSatsDiceLink": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "title": { + "type": "string", + "title": "Title" + }, + "base_url": { + "type": "string", + "title": "Base Url" + }, + "min_bet": { + "type": "integer", + "title": "Min Bet" + }, + "max_bet": { + "type": "integer", + "title": "Max Bet" + }, + "multiplier": { + "type": "number", + "title": "Multiplier", + "default": 0 + }, + "chance": { + "type": "number", + "title": "Chance", + "default": 0 + }, + "haircut": { + "type": "number", + "title": "Haircut", + "default": 0 + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + } + }, + "type": "object", + "title": "CreateSatsDiceLink" + }, + "CreateSatsPayTheme": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "custom_css": { + "type": "string", + "title": "Custom Css" + } + }, + "type": "object", + "required": [ + "title", + "custom_css" + ], + "title": "CreateSatsPayTheme" + }, + "CreateSatspot": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "haircut": { + "type": "integer", + "title": "Haircut", + "default": 0 + }, + "closing_date": { + "type": "string", + "format": "date-time", + "title": "Closing Date", + "default": "2026-01-13T11:50:09.340719+00:00" + }, + "buy_in": { + "type": "integer", + "title": "Buy In", + "default": 0 + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateSatspot" + }, + "CreateSchedule": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "start_day": { + "type": "integer", + "maximum": 6, + "minimum": 0, + "title": "Start Day" + }, + "end_day": { + "type": "integer", + "maximum": 6, + "minimum": 0, + "title": "End Day" + }, + "start_time": { + "type": "string", + "title": "Start Time" + }, + "end_time": { + "type": "string", + "title": "End Time" + }, + "amount": { + "type": "integer", + "minimum": 1, + "title": "Amount" + } + }, + "type": "object", + "required": [ + "wallet", + "name", + "start_day", + "end_day", + "start_time", + "end_time", + "amount" + ], + "title": "CreateSchedule" + }, + "CreateScrubLink": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "description": { + "type": "string", + "title": "Description" + }, + "payoraddress": { + "type": "string", + "title": "Payoraddress" + } + }, + "type": "object", + "required": [ + "wallet", + "description", + "payoraddress" + ], + "title": "CreateScrubLink" + }, + "CreateScrum": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "public_assigning": { + "type": "boolean", + "title": "Public Assigning" + }, + "public_tasks": { + "type": "boolean", + "title": "Public Tasks", + "default": false + }, + "public_delete_tasks": { + "type": "boolean", + "title": "Public Delete Tasks", + "default": false + }, + "wallet": { + "type": "string", + "title": "Wallet" + } + }, + "type": "object", + "required": [ + "name", + "description", + "public_assigning", + "wallet" + ], + "title": "CreateScrum" + }, + "CreateShop": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "method": { + "type": "string", + "title": "Method", + "default": "wordlist" + }, + "wordlist": { + "type": "string", + "title": "Wordlist" + } + }, + "type": "object", + "required": [ + "wallet" + ], + "title": "CreateShop" + }, + "CreateSubmarineSwap": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset", + "default": "BTC/BTC" + }, + "refund_address": { + "type": "string", + "title": "Refund Address" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "direction": { + "type": "string", + "title": "Direction", + "default": "receive" + }, + "feerate": { + "type": "boolean", + "title": "Feerate" + }, + "feerate_value": { + "type": "integer", + "title": "Feerate Value" + } + }, + "type": "object", + "required": [ + "wallet", + "refund_address", + "amount" + ], + "title": "CreateSubmarineSwap" + }, + "CreateTasks": { + "properties": { + "task": { + "type": "string", + "title": "Task" + }, + "scrum_id": { + "type": "string", + "title": "Scrum Id" + }, + "assignee": { + "type": "string", + "title": "Assignee" + }, + "stage": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskStage" + } + ], + "default": "todo" + }, + "reward": { + "type": "integer", + "title": "Reward" + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "complete": { + "type": "boolean", + "title": "Complete" + }, + "notes": { + "type": "string", + "title": "Notes" + } + }, + "type": "object", + "required": [ + "task", + "scrum_id" + ], + "title": "CreateTasks" + }, + "CreateTicket": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "email": { + "type": "string", + "format": "email", + "title": "Email" + } + }, + "type": "object", + "required": [ + "name", + "email" + ], + "title": "CreateTicket" + }, + "CreateTicketData": { + "properties": { + "form": { + "type": "string", + "title": "Form" + }, + "name": { + "type": "string", + "title": "Name" + }, + "email": { + "type": "string", + "title": "Email", + "default": "" + }, + "ltext": { + "type": "string", + "title": "Ltext" + }, + "sats": { + "type": "integer", + "minimum": 0, + "title": "Sats" + } + }, + "type": "object", + "required": [ + "form", + "name", + "ltext", + "sats" + ], + "title": "CreateTicketData" + }, + "CreateTip": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "sats": { + "type": "integer", + "title": "Sats" + }, + "tipjar": { + "type": "string", + "title": "Tipjar" + }, + "name": { + "type": "string", + "title": "Name", + "default": "Anonymous" + }, + "message": { + "type": "string", + "title": "Message", + "default": "" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "sats", + "tipjar" + ], + "title": "CreateTip" + }, + "CreateTipJar": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "webhook": { + "type": "string", + "title": "Webhook", + "default": "" + }, + "onchain": { + "type": "string", + "title": "Onchain", + "default": "" + }, + "onchain_limit": { + "type": "integer", + "title": "Onchain Limit", + "default": 0 + } + }, + "type": "object", + "required": [ + "name", + "wallet" + ], + "title": "CreateTipJar" + }, + "CreateTips": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "sats": { + "type": "string", + "title": "Sats" + }, + "tipjar": { + "type": "string", + "title": "Tipjar" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "name", + "sats", + "tipjar", + "message" + ], + "title": "CreateTips" + }, + "CreateTrack": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "download_url": { + "type": "string", + "title": "Download Url" + }, + "price_msat": { + "type": "integer", + "minimum": 0, + "title": "Price Msat" + }, + "producer_id": { + "type": "string", + "title": "Producer Id" + }, + "producer_name": { + "type": "string", + "title": "Producer Name" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CreateTrack" + }, + "CreateUnavailableTime": { + "properties": { + "start_time": { + "type": "string", + "title": "Start Time" + }, + "end_time": { + "type": "string", + "title": "End Time" + }, + "schedule": { + "type": "string", + "title": "Schedule" + } + }, + "type": "object", + "required": [ + "start_time", + "schedule" + ], + "title": "CreateUnavailableTime" + }, + "CreateUser": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "email": { + "type": "string", + "title": "Email" + }, + "username": { + "type": "string", + "maxLength": 20, + "minLength": 2, + "title": "Username" + }, + "password": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password" + }, + "password_repeat": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password Repeat" + }, + "pubkey": { + "type": "string", + "maxLength": 64, + "title": "Pubkey" + }, + "external_id": { + "type": "string", + "maxLength": 256, + "title": "External Id" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Extensions" + }, + "extra": { + "$ref": "#/components/schemas/UserExtra" + } + }, + "type": "object", + "title": "CreateUser" + }, + "CreateWebPushSubscription": { + "properties": { + "subscription": { + "type": "string", + "title": "Subscription" + } + }, + "type": "object", + "required": [ + "subscription" + ], + "title": "CreateWebPushSubscription" + }, + "CustomCost": { + "properties": { + "bracket": { + "type": "integer", + "title": "Bracket" + }, + "amount": { + "type": "number", + "title": "Amount" + } + }, + "type": "object", + "required": [ + "bracket", + "amount" + ], + "title": "CustomCost" + }, + "Customer": { + "properties": { + "merchant_id": { + "type": "string", + "title": "Merchant Id" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + }, + "profile": { + "$ref": "#/components/schemas/CustomerProfile" + }, + "unread_messages": { + "type": "integer", + "title": "Unread Messages", + "default": 0 + } + }, + "type": "object", + "required": [ + "merchant_id", + "public_key" + ], + "title": "Customer" + }, + "CustomerProfile": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "about": { + "type": "string", + "title": "About" + } + }, + "type": "object", + "title": "CustomerProfile" + }, + "DataField": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "title": "Type" + }, + "label": { + "type": "string", + "title": "Label" + }, + "hint": { + "type": "string", + "title": "Hint" + }, + "optional": { + "type": "boolean", + "title": "Optional", + "default": false + }, + "editable": { + "type": "boolean", + "title": "Editable", + "default": false + }, + "searchable": { + "type": "boolean", + "title": "Searchable", + "default": false + }, + "sortable": { + "type": "boolean", + "title": "Sortable", + "default": false + }, + "fields": { + "items": { + "$ref": "#/components/schemas/DataField" + }, + "type": "array", + "title": "Fields", + "default": [] + } + }, + "type": "object", + "required": [ + "name", + "type" + ], + "title": "DataField" + }, + "DataFields": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "editable": { + "type": "boolean", + "title": "Editable", + "default": true + }, + "fields": { + "items": { + "$ref": "#/components/schemas/DataField" + }, + "type": "array", + "title": "Fields", + "default": [] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "DataFields" + }, + "DecodePayment": { + "properties": { + "data": { + "type": "string", + "title": "Data" + }, + "filter_fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Filter Fields", + "default": [] + } + }, + "type": "object", + "required": [ + "data" + ], + "title": "DecodePayment" + }, + "DeleteAccessControlList": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "password": { + "type": "string", + "title": "Password" + } + }, + "type": "object", + "required": [ + "id", + "password" + ], + "title": "DeleteAccessControlList" + }, + "DeleteTokenRequest": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "acl_id": { + "type": "string", + "title": "Acl Id" + }, + "password": { + "type": "string", + "title": "Password" + } + }, + "type": "object", + "required": [ + "id", + "acl_id", + "password" + ], + "title": "DeleteTokenRequest" + }, + "DirectMessage": { + "properties": { + "event_id": { + "type": "string", + "title": "Event Id" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + }, + "message": { + "type": "string", + "title": "Message" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "type": { + "type": "integer", + "title": "Type", + "default": -1 + }, + "incoming": { + "type": "boolean", + "title": "Incoming", + "default": false + }, + "time": { + "type": "integer", + "title": "Time" + }, + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "message", + "public_key", + "id" + ], + "title": "DirectMessage" + }, + "Domain": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "cost_extra": { + "$ref": "#/components/schemas/DomainCostConfig" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "currency", + "cost", + "domain", + "wallet", + "cost_extra", + "time" + ], + "title": "Domain" + }, + "DomainCostConfig": { + "properties": { + "max_years": { + "type": "integer", + "title": "Max Years", + "default": 1 + }, + "transfer_secret": { + "type": "string", + "title": "Transfer Secret" + }, + "char_count_cost": { + "items": { + "$ref": "#/components/schemas/CustomCost" + }, + "type": "array", + "title": "Char Count Cost", + "default": [] + }, + "rank_cost": { + "items": { + "$ref": "#/components/schemas/CustomCost" + }, + "type": "array", + "title": "Rank Cost", + "default": [] + }, + "promotions": { + "items": { + "$ref": "#/components/schemas/Promotion" + }, + "type": "array", + "title": "Promotions", + "default": [] + } + }, + "type": "object", + "title": "DomainCostConfig" + }, + "EditAuctionRoomData": { + "properties": { + "fee_wallet_id": { + "type": "string", + "title": "Fee Wallet Id" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "type": { + "type": "string", + "title": "Type", + "default": "auction" + }, + "room_percentage": { + "type": "number", + "title": "Room Percentage", + "default": 10 + }, + "min_bid_up_percentage": { + "type": "number", + "title": "Min Bid Up Percentage", + "default": 5 + }, + "is_open_room": { + "type": "boolean", + "title": "Is Open Room", + "default": false + }, + "id": { + "type": "string", + "title": "Id" + }, + "extra": { + "$ref": "#/components/schemas/AuctionRoomConfig" + } + }, + "type": "object", + "required": [ + "currency", + "name", + "description", + "id", + "extra" + ], + "title": "EditAuctionRoomData" + }, + "EditDomainData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "cost_extra": { + "$ref": "#/components/schemas/DomainCostConfig" + } + }, + "type": "object", + "required": [ + "id", + "currency", + "cost" + ], + "title": "EditDomainData" + }, + "EightBall": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "wordlist": { + "type": "string", + "title": "Wordlist" + }, + "lnurlpayamount": { + "type": "integer", + "title": "Lnurlpayamount" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "name", + "wordlist", + "lnurlpayamount" + ], + "title": "EightBall" + }, + "EndpointAccess": { + "properties": { + "path": { + "type": "string", + "title": "Path" + }, + "name": { + "type": "string", + "title": "Name" + }, + "read": { + "type": "boolean", + "title": "Read", + "default": false + }, + "write": { + "type": "boolean", + "title": "Write", + "default": false + } + }, + "type": "object", + "required": [ + "path", + "name" + ], + "title": "EndpointAccess" + }, + "Example": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + } + }, + "type": "object", + "required": [ + "id", + "wallet" + ], + "title": "Example" + }, + "ExchangeRateProvider": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "api_url": { + "type": "string", + "title": "Api Url" + }, + "path": { + "type": "string", + "title": "Path" + }, + "exclude_to": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Exclude To", + "default": [] + }, + "ticker_conversion": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Ticker Conversion", + "default": [] + } + }, + "type": "object", + "required": [ + "name", + "api_url", + "path" + ], + "title": "ExchangeRateProvider" + }, + "Extension": { + "properties": { + "code": { + "type": "string", + "title": "Code" + }, + "is_valid": { + "type": "boolean", + "title": "Is Valid" + }, + "name": { + "type": "string", + "title": "Name" + }, + "short_description": { + "type": "string", + "title": "Short Description" + }, + "tile": { + "type": "string", + "title": "Tile" + }, + "upgrade_hash": { + "type": "string", + "title": "Upgrade Hash", + "default": "" + } + }, + "type": "object", + "required": [ + "code", + "is_valid" + ], + "title": "Extension" + }, + "ExtensionData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "stub_version": { + "type": "string", + "title": "Stub Version" + }, + "short_description": { + "type": "string", + "title": "Short Description" + }, + "description": { + "type": "string", + "title": "Description" + }, + "owner_data": { + "$ref": "#/components/schemas/DataFields" + }, + "client_data": { + "$ref": "#/components/schemas/DataFields" + }, + "settings_data": { + "$ref": "#/components/schemas/SettingsFields" + }, + "public_page": { + "$ref": "#/components/schemas/PublicPageFields" + }, + "preview_action": { + "allOf": [ + { + "$ref": "#/components/schemas/PreviewAction" + } + ], + "title": "Preview Action", + "default": { + "is_preview_mode": false, + "is_settings_preview": false, + "is_owner_data_preview": false, + "is_client_data_preview": false, + "is_public_page_preview": false + } + } + }, + "type": "object", + "required": [ + "id", + "name", + "owner_data", + "client_data", + "settings_data", + "public_page" + ], + "title": "ExtensionData" + }, + "ExtensionRelease": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "version": { + "type": "string", + "title": "Version" + }, + "archive": { + "type": "string", + "title": "Archive" + }, + "source_repo": { + "type": "string", + "title": "Source Repo" + }, + "is_github_release": { + "type": "boolean", + "title": "Is Github Release", + "default": false + }, + "hash": { + "type": "string", + "title": "Hash" + }, + "min_lnbits_version": { + "type": "string", + "title": "Min Lnbits Version" + }, + "max_lnbits_version": { + "type": "string", + "title": "Max Lnbits Version" + }, + "is_version_compatible": { + "type": "boolean", + "title": "Is Version Compatible", + "default": true + }, + "html_url": { + "type": "string", + "title": "Html Url" + }, + "description": { + "type": "string", + "title": "Description" + }, + "warning": { + "type": "string", + "title": "Warning" + }, + "repo": { + "type": "string", + "title": "Repo" + }, + "icon": { + "type": "string", + "title": "Icon" + }, + "details_link": { + "type": "string", + "title": "Details Link" + }, + "paid_features": { + "type": "string", + "title": "Paid Features" + }, + "pay_link": { + "type": "string", + "title": "Pay Link" + }, + "cost_sats": { + "type": "integer", + "title": "Cost Sats" + }, + "paid_sats": { + "type": "integer", + "title": "Paid Sats", + "default": 0 + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + } + }, + "type": "object", + "required": [ + "name", + "version", + "archive", + "source_repo" + ], + "title": "ExtensionRelease" + }, + "ExtensionReviewPaymentRequest": { + "properties": { + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "payment_request": { + "type": "string", + "title": "Payment Request" + } + }, + "type": "object", + "required": [ + "payment_hash", + "payment_request" + ], + "title": "ExtensionReviewPaymentRequest" + }, + "ExtensionReviewsStatus": { + "properties": { + "tag": { + "type": "string", + "title": "Tag" + }, + "avg_rating": { + "type": "number", + "title": "Avg Rating" + }, + "review_count": { + "type": "integer", + "title": "Review Count" + } + }, + "type": "object", + "required": [ + "tag", + "avg_rating", + "review_count" + ], + "title": "ExtensionReviewsStatus" + }, + "ExtractPsbt": { + "properties": { + "inputs": { + "items": { + "$ref": "#/components/schemas/SerializedTransaction" + }, + "type": "array", + "title": "Inputs" + }, + "psbt_base64": { + "type": "string", + "title": "Psbt Base64", + "default": "" + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + } + }, + "type": "object", + "required": [ + "inputs" + ], + "title": "ExtractPsbt" + }, + "ExtractTx": { + "properties": { + "tx_hex": { + "type": "string", + "title": "Tx Hex", + "default": "" + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + } + }, + "type": "object", + "title": "ExtractTx" + }, + "FiatProviderLimits": { + "properties": { + "allowed_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Allowed Users", + "default": [] + }, + "service_max_fee_sats": { + "type": "integer", + "title": "Service Max Fee Sats", + "default": 0 + }, + "service_fee_percent": { + "type": "number", + "title": "Service Fee Percent", + "default": 0 + }, + "service_fee_wallet_id": { + "type": "string", + "title": "Service Fee Wallet Id" + }, + "service_min_amount_sats": { + "type": "integer", + "title": "Service Min Amount Sats", + "default": 0 + }, + "service_max_amount_sats": { + "type": "integer", + "title": "Service Max Amount Sats", + "default": 0 + }, + "service_faucet_wallet_id": { + "type": "string", + "title": "Service Faucet Wallet Id", + "default": "" + } + }, + "type": "object", + "title": "FiatProviderLimits" + }, + "FiatSubscriptionPaymentOptions": { + "properties": { + "memo": { + "type": "string", + "title": "Memo", + "description": "Payments created by the recurring subscription will have this memo." + }, + "wallet_id": { + "type": "string", + "title": "Wallet Id", + "description": "Payments created by the recurring subscription will be made to this wallet." + }, + "subscription_request_id": { + "type": "string", + "title": "Subscription Request Id", + "description": "Unique ID that can be used to identify the subscription request.If not provided, one will be generated." + }, + "tag": { + "type": "string", + "title": "Tag", + "description": "Payments created by the recurring subscription will have this tag. Admin only." + }, + "extra": { + "type": "object", + "title": "Extra", + "description": "Payments created by the recurring subscription will merge this extra data to the payment extra. Admin only." + }, + "success_url": { + "type": "string", + "title": "Success Url", + "description": "The URL to redirect the user to after the subscription is successfully created.", + "default": "https://my.lnbits.com" + } + }, + "type": "object", + "title": "FiatSubscriptionPaymentOptions" + }, + "FiatSubscriptionResponse": { + "properties": { + "ok": { + "type": "boolean", + "title": "Ok", + "default": true + }, + "subscription_request_id": { + "type": "string", + "title": "Subscription Request Id" + }, + "checkout_session_url": { + "type": "string", + "title": "Checkout Session Url" + }, + "error_message": { + "type": "string", + "title": "Error Message" + } + }, + "type": "object", + "title": "FiatSubscriptionResponse" + }, + "Form": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "description": { + "type": "string", + "title": "Description" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "flatrate": { + "type": "integer", + "title": "Flatrate" + }, + "amountmade": { + "type": "integer", + "title": "Amountmade" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "name", + "description", + "amount", + "flatrate", + "amountmade", + "time" + ], + "title": "Form" + }, + "Fossa": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "key": { + "type": "string", + "title": "Key" + }, + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "profit": { + "type": "number", + "title": "Profit" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "boltz": { + "type": "boolean", + "title": "Boltz" + } + }, + "type": "object", + "required": [ + "id", + "key", + "title", + "wallet", + "profit", + "currency", + "boltz" + ], + "title": "Fossa" + }, + "FossaPayment": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "fossa_id": { + "type": "string", + "title": "Fossa Id" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "payload": { + "type": "string", + "title": "Payload" + }, + "pin": { + "type": "integer", + "title": "Pin" + }, + "sats": { + "type": "integer", + "title": "Sats" + }, + "amount": { + "type": "number", + "title": "Amount" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + } + }, + "type": "object", + "required": [ + "id", + "fossa_id", + "payload", + "pin", + "sats", + "amount" + ], + "title": "FossaPayment" + }, + "Game": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "closing_date": { + "type": "string", + "format": "date-time", + "title": "Closing Date" + }, + "buy_in_max": { + "type": "integer", + "title": "Buy In Max", + "default": 0 + }, + "haircut": { + "type": "integer", + "title": "Haircut", + "default": 0 + }, + "odds": { + "type": "integer", + "title": "Odds", + "default": 0 + }, + "completed": { + "type": "boolean", + "title": "Completed", + "default": false + }, + "block_hash": { + "type": "string", + "title": "Block Hash", + "default": "" + }, + "mempool": { + "type": "string", + "title": "Mempool", + "default": "https://mempool.space" + }, + "block_number": { + "type": "integer", + "title": "Block Number", + "default": 0 + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "closing_date" + ], + "title": "Game" + }, + "Gerty": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "title": "Type" + }, + "utc_offset": { + "type": "integer", + "title": "Utc Offset" + }, + "display_preferences": { + "type": "string", + "title": "Display Preferences" + }, + "refresh_time": { + "type": "integer", + "title": "Refresh Time" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "lnbits_wallets": { + "type": "string", + "title": "Lnbits Wallets" + }, + "mempool_endpoint": { + "type": "string", + "title": "Mempool Endpoint" + }, + "exchange": { + "type": "string", + "title": "Exchange" + }, + "urls": { + "type": "string", + "title": "Urls" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time", + "default": "2026-01-12T11:50:08.667877+00:00" + } + }, + "type": "object", + "required": [ + "id", + "name", + "type", + "utc_offset", + "display_preferences" + ], + "title": "Gerty" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HeaderItems": { + "properties": { + "key": { + "type": "string", + "title": "Key" + }, + "value": { + "type": "string", + "title": "Value" + } + }, + "type": "object", + "required": [ + "key", + "value" + ], + "title": "HeaderItems" + }, + "IdentifierRanking": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "rank": { + "type": "integer", + "title": "Rank" + } + }, + "type": "object", + "required": [ + "name", + "rank" + ], + "title": "IdentifierRanking" + }, + "InventorySale": { + "properties": { + "inventory_id": { + "type": "string", + "title": "Inventory Id" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags" + }, + "items": { + "items": { + "$ref": "#/components/schemas/InventorySaleItem" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "inventory_id" + ], + "title": "InventorySale" + }, + "InventorySaleItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "quantity": { + "type": "integer", + "minimum": 1, + "title": "Quantity", + "default": 1 + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "InventorySaleItem" + }, + "Invoice": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatusEnum" + } + ], + "default": "draft" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "company_name": { + "type": "string", + "title": "Company Name" + }, + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "phone": { + "type": "string", + "title": "Phone" + }, + "address": { + "type": "string", + "title": "Address" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time", + "default": "2026-01-12T11:50:08.209251+00:00" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "currency" + ], + "title": "Invoice" + }, + "InvoiceAmountPayment": { + "properties": { + "famount": { + "type": "integer", + "minimum": 1, + "title": "Famount", + "description": "Amount to pay in fiat currency." + } + }, + "type": "object", + "required": [ + "famount" + ], + "title": "InvoiceAmountPayment" + }, + "InvoiceFull": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatusEnum" + } + ], + "default": "draft" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "company_name": { + "type": "string", + "title": "Company Name" + }, + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "phone": { + "type": "string", + "title": "Phone" + }, + "address": { + "type": "string", + "title": "Address" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time", + "default": "2026-01-12T11:50:08.209251+00:00" + }, + "items": { + "items": { + "$ref": "#/components/schemas/InvoiceItem" + }, + "type": "array", + "title": "Items", + "default": [] + }, + "payments": { + "type": "integer", + "title": "Payments", + "default": 0 + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "currency" + ], + "title": "InvoiceFull" + }, + "InvoiceItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "invoice_id": { + "type": "string", + "title": "Invoice Id" + }, + "description": { + "type": "string", + "title": "Description" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "quantity": { + "type": "integer", + "title": "Quantity" + } + }, + "type": "object", + "required": [ + "id", + "invoice_id", + "description", + "amount", + "quantity" + ], + "title": "InvoiceItem" + }, + "InvoiceItemData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "description": { + "type": "string", + "title": "Description" + }, + "amount": { + "type": "number", + "minimum": 0.01, + "title": "Amount" + }, + "quantity": { + "type": "integer", + "minimum": 1, + "title": "Quantity" + } + }, + "type": "object", + "required": [ + "description", + "amount", + "quantity" + ], + "title": "InvoiceItemData" + }, + "InvoiceResponse": { + "properties": { + "ok": { + "type": "boolean", + "title": "Ok" + }, + "checking_id": { + "type": "string", + "title": "Checking Id" + }, + "payment_request": { + "type": "string", + "title": "Payment Request" + }, + "error_message": { + "type": "string", + "title": "Error Message" + }, + "preimage": { + "type": "string", + "title": "Preimage" + }, + "fee_msat": { + "type": "integer", + "title": "Fee Msat" + } + }, + "type": "object", + "required": [ + "ok", + "checking_id", + "payment_request", + "error_message", + "preimage", + "fee_msat" + ], + "title": "InvoiceResponse" + }, + "InvoiceStatusEnum": { + "type": "string", + "enum": [ + "draft", + "open", + "paid", + "canceled" + ], + "title": "InvoiceStatusEnum", + "description": "An enumeration." + }, + "Job": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "admin": { + "type": "string", + "title": "Admin" + }, + "status": { + "type": "boolean", + "title": "Status" + }, + "schedule": { + "type": "string", + "title": "Schedule" + }, + "selectedverb": { + "type": "string", + "title": "Selectedverb" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/HeaderItems" + }, + "type": "array", + "title": "Headers" + }, + "body": { + "type": "string", + "title": "Body" + }, + "extra": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra" + } + }, + "type": "object", + "required": [ + "id", + "name", + "admin", + "status", + "schedule" + ], + "title": "Job" + }, + "JoinCoinflipGame": { + "properties": { + "game_id": { + "type": "string", + "title": "Game Id" + }, + "settings_id": { + "type": "string", + "title": "Settings Id" + }, + "ln_address": { + "type": "string", + "title": "Ln Address" + } + }, + "type": "object", + "title": "JoinCoinflipGame" + }, + "JoinSatspotGame": { + "properties": { + "satspot_id": { + "type": "string", + "title": "Satspot Id" + }, + "ln_address": { + "type": "string", + "title": "Ln Address" + } + }, + "type": "object", + "title": "JoinSatspotGame" + }, + "Jukebox": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user": { + "type": "string", + "title": "User" + }, + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "inkey": { + "type": "string", + "title": "Inkey" + }, + "sp_user": { + "type": "string", + "title": "Sp User" + }, + "sp_secret": { + "type": "string", + "title": "Sp Secret" + }, + "sp_access_token": { + "type": "string", + "title": "Sp Access Token" + }, + "sp_refresh_token": { + "type": "string", + "title": "Sp Refresh Token" + }, + "sp_device": { + "type": "string", + "title": "Sp Device" + }, + "sp_playlists": { + "type": "string", + "title": "Sp Playlists" + }, + "price": { + "type": "integer", + "title": "Price" + }, + "profit": { + "type": "integer", + "title": "Profit" + } + }, + "type": "object", + "required": [ + "id", + "user", + "title", + "wallet", + "sp_user", + "sp_secret", + "price", + "profit" + ], + "title": "Jukebox" + }, + "Livestream": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "fee_pct": { + "type": "integer", + "title": "Fee Pct", + "default": 10 + }, + "current_track": { + "type": "string", + "title": "Current Track" + } + }, + "type": "object", + "required": [ + "id", + "wallet" + ], + "title": "Livestream" + }, + "LivestreamOverview": { + "properties": { + "livestream": { + "$ref": "#/components/schemas/Livestream" + }, + "tracks": { + "items": { + "$ref": "#/components/schemas/Track" + }, + "type": "array", + "title": "Tracks" + }, + "producers": { + "items": { + "$ref": "#/components/schemas/Producer" + }, + "type": "array", + "title": "Producers" + } + }, + "type": "object", + "required": [ + "livestream", + "tracks", + "producers" + ], + "title": "LivestreamOverview" + }, + "LnAddressConfig": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "min": { + "type": "integer", + "title": "Min", + "default": 1 + }, + "max": { + "type": "integer", + "title": "Max", + "default": 10000000 + }, + "pay_link_id": { + "type": "string", + "title": "Pay Link Id", + "default": "" + } + }, + "type": "object", + "required": [ + "wallet" + ], + "title": "LnAddressConfig" + }, + "LndhubAddInvoice": { + "properties": { + "amt": { + "type": "integer", + "title": "Amt" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "preimage": { + "type": "string", + "title": "Preimage" + } + }, + "type": "object", + "required": [ + "amt", + "memo" + ], + "title": "LndhubAddInvoice" + }, + "LndhubAuthData": { + "properties": { + "login": { + "type": "string", + "title": "Login" + }, + "password": { + "type": "string", + "title": "Password" + }, + "refresh_token": { + "type": "string", + "title": "Refresh Token" + } + }, + "type": "object", + "title": "LndhubAuthData" + }, + "LndhubCreateInvoice": { + "properties": { + "invoice": { + "type": "string", + "title": "Invoice" + } + }, + "type": "object", + "required": [ + "invoice" + ], + "title": "LndhubCreateInvoice" + }, + "LnurlAuthResponse": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlResponseTag" + } + ], + "default": "login" + }, + "callback": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Callback" + }, + "k1": { + "type": "string", + "title": "K1" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "callback", + "k1" + ], + "title": "LnurlAuthResponse" + }, + "LnurlErrorResponse": { + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlStatus" + } + ], + "default": "ERROR" + }, + "reason": { + "type": "string", + "title": "Reason" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "reason" + ], + "title": "LnurlErrorResponse" + }, + "LnurlPayActionResponse": { + "properties": { + "pr": { + "type": "string", + "title": "Pr" + }, + "successAction": { + "anyOf": [ + { + "$ref": "#/components/schemas/AesAction" + }, + { + "$ref": "#/components/schemas/MessageAction" + }, + { + "$ref": "#/components/schemas/UrlAction" + } + ], + "title": "Successaction" + }, + "routes": { + "items": { + "items": { + "$ref": "#/components/schemas/LnurlPayRouteHop" + }, + "type": "array" + }, + "type": "array", + "title": "Routes", + "default": [] + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "description": "LUD-11: Disposable and storeable payRequests." + }, + "verify": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Verify", + "description": "LUD-21: verify base spec." + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pr" + ], + "title": "LnurlPayActionResponse" + }, + "LnurlPayResponse": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlResponseTag" + } + ], + "default": "payRequest" + }, + "callback": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Callback" + }, + "minSendable": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Minsendable" + }, + "maxSendable": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Maxsendable" + }, + "metadata": { + "type": "string", + "title": "Metadata" + }, + "payerData": { + "$ref": "#/components/schemas/LnurlPayResponsePayerData" + }, + "commentAllowed": { + "type": "integer", + "title": "Commentallowed" + }, + "allowsNostr": { + "type": "boolean", + "title": "Allowsnostr" + }, + "nostrPubkey": { + "type": "string", + "title": "Nostrpubkey" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "callback", + "minSendable", + "maxSendable", + "metadata" + ], + "title": "LnurlPayResponse" + }, + "LnurlPayResponsePayerData": { + "properties": { + "name": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOption" + }, + "pubkey": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOption" + }, + "identifier": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOption" + }, + "email": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOption" + }, + "auth": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOptionAuth" + }, + "extras": { + "items": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataExtra" + }, + "type": "array", + "title": "Extras" + } + }, + "type": "object", + "title": "LnurlPayResponsePayerData" + }, + "LnurlPayResponsePayerDataExtra": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "field": { + "$ref": "#/components/schemas/LnurlPayResponsePayerDataOption" + } + }, + "type": "object", + "required": [ + "name", + "field" + ], + "title": "LnurlPayResponsePayerDataExtra" + }, + "LnurlPayResponsePayerDataOption": { + "properties": { + "mandatory": { + "type": "boolean", + "title": "Mandatory" + } + }, + "type": "object", + "required": [ + "mandatory" + ], + "title": "LnurlPayResponsePayerDataOption" + }, + "LnurlPayResponsePayerDataOptionAuth": { + "properties": { + "mandatory": { + "type": "boolean", + "title": "Mandatory" + }, + "k1": { + "type": "string", + "title": "K1" + } + }, + "type": "object", + "required": [ + "mandatory", + "k1" + ], + "title": "LnurlPayResponsePayerDataOptionAuth" + }, + "LnurlPayRouteHop": { + "properties": { + "nodeId": { + "type": "string", + "title": "Nodeid" + }, + "channelUpdate": { + "type": "string", + "title": "Channelupdate" + } + }, + "type": "object", + "required": [ + "nodeId", + "channelUpdate" + ], + "title": "LnurlPayRouteHop" + }, + "LnurlPaySuccessActionTag": { + "enum": [ + "aes", + "message", + "url" + ], + "title": "LnurlPaySuccessActionTag", + "description": "Enum for success action tags" + }, + "LnurlResponseModel": { + "properties": { + + }, + "additionalProperties": false, + "type": "object", + "title": "LnurlResponseModel" + }, + "LnurlResponseTag": { + "enum": [ + "login", + "channelRequest", + "hostedChannelRequest", + "payRequest", + "withdrawRequest" + ], + "title": "LnurlResponseTag", + "description": "Enum for response tags" + }, + "LnurlScan": { + "properties": { + "lnurl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "title": "Lnurl" + } + }, + "type": "object", + "required": [ + "lnurl" + ], + "title": "LnurlScan" + }, + "LnurlStatus": { + "enum": [ + "OK", + "ERROR" + ], + "title": "LnurlStatus", + "description": "Enum for status" + }, + "LnurlSuccessResponse": { + "properties": { + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlStatus" + } + ], + "default": "OK" + } + }, + "additionalProperties": false, + "type": "object", + "title": "LnurlSuccessResponse" + }, + "LnurlWithdrawResponse": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlResponseTag" + } + ], + "default": "withdrawRequest" + }, + "callback": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Callback" + }, + "k1": { + "type": "string", + "title": "K1" + }, + "minWithdrawable": { + "type": "integer", + "minimum": 0, + "title": "Minwithdrawable" + }, + "maxWithdrawable": { + "type": "integer", + "minimum": 0, + "title": "Maxwithdrawable" + }, + "defaultDescription": { + "type": "string", + "title": "Defaultdescription", + "default": "" + }, + "balanceCheck": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Balancecheck" + }, + "currentBalance": { + "type": "integer", + "title": "Currentbalance" + }, + "payLink": { + "type": "string", + "title": "Paylink" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "callback", + "k1", + "minWithdrawable", + "maxWithdrawable" + ], + "title": "LnurlWithdrawResponse" + }, + "LnurlpSettings": { + "properties": { + "nostr_private_key": { + "type": "string", + "title": "Nostr Private Key" + } + }, + "type": "object", + "required": [ + "nostr_private_key" + ], + "title": "LnurlpSettings" + }, + "LockRequest": { + "properties": { + "transfer_code": { + "type": "string", + "title": "Transfer Code" + } + }, + "type": "object", + "required": [ + "transfer_code" + ], + "title": "LockRequest" + }, + "LockResponse": { + "properties": { + "lock_code": { + "type": "string", + "title": "Lock Code" + } + }, + "type": "object", + "required": [ + "lock_code" + ], + "title": "LockResponse", + "description": "Code used to transfer an address." + }, + "LogEntry": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "job_id": { + "type": "string", + "title": "Job Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "response": { + "type": "string", + "title": "Response" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp", + "default": "2026-01-12T11:50:09.469421+00:00" + } + }, + "type": "object", + "required": [ + "id", + "job_id" + ], + "title": "LogEntry" + }, + "LoginUsernamePassword": { + "properties": { + "username": { + "type": "string", + "title": "Username" + }, + "password": { + "type": "string", + "title": "Password" + } + }, + "type": "object", + "required": [ + "username", + "password" + ], + "title": "LoginUsernamePassword" + }, + "LoginUsr": { + "properties": { + "usr": { + "type": "string", + "title": "Usr" + } + }, + "type": "object", + "required": [ + "usr" + ], + "title": "LoginUsr" + }, + "MasterPublicKey": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "fingerprint": { + "type": "string", + "title": "Fingerprint" + } + }, + "type": "object", + "required": [ + "id", + "public_key", + "fingerprint" + ], + "title": "MasterPublicKey" + }, + "Merchant": { + "properties": { + "private_key": { + "type": "string", + "title": "Private Key" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/MerchantConfig" + } + ], + "title": "Config", + "default": { + "sync_from_nostr": false, + "active": false, + "restore_in_progress": false + } + }, + "id": { + "type": "string", + "title": "Id" + }, + "time": { + "type": "integer", + "title": "Time", + "default": 0 + } + }, + "type": "object", + "required": [ + "private_key", + "public_key", + "id" + ], + "title": "Merchant" + }, + "MerchantConfig": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "about": { + "type": "string", + "title": "About" + }, + "picture": { + "type": "string", + "title": "Picture" + }, + "event_id": { + "type": "string", + "title": "Event Id" + }, + "sync_from_nostr": { + "type": "boolean", + "title": "Sync From Nostr", + "default": false + }, + "active": { + "type": "boolean", + "title": "Active", + "default": false + }, + "restore_in_progress": { + "type": "boolean", + "title": "Restore In Progress", + "default": false + } + }, + "type": "object", + "title": "MerchantConfig" + }, + "MessageAction": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlPaySuccessActionTag" + } + ], + "default": "message" + }, + "message": { + "type": "string", + "maxLength": 144, + "title": "Message" + } + }, + "type": "object", + "required": [ + "message" + ], + "title": "MessageAction" + }, + "MyExtension": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "lnurlpayamount": { + "type": "integer", + "title": "Lnurlpayamount" + }, + "lnurlwithdrawamount": { + "type": "integer", + "title": "Lnurlwithdrawamount" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "lnurlpay": { + "type": "string", + "title": "Lnurlpay", + "default": "" + }, + "lnurlwithdraw": { + "type": "string", + "title": "Lnurlwithdraw", + "default": "" + } + }, + "type": "object", + "required": [ + "id", + "name", + "lnurlpayamount", + "lnurlwithdrawamount", + "wallet", + "total" + ], + "title": "MyExtension" + }, + "Nip5Settings": { + "properties": { + "cloudflare_access_token": { + "type": "string", + "title": "Cloudflare Access Token" + }, + "lnaddress_api_admin_key": { + "type": "string", + "title": "Lnaddress Api Admin Key", + "default": "" + }, + "lnaddress_api_endpoint": { + "type": "string", + "title": "Lnaddress Api Endpoint", + "default": "https://nostr.com" + } + }, + "type": "object", + "title": "Nip5Settings" + }, + "NodeChannel": { + "properties": { + "peer_id": { + "type": "string", + "title": "Peer Id" + }, + "balance": { + "$ref": "#/components/schemas/ChannelBalance" + }, + "state": { + "$ref": "#/components/schemas/ChannelState" + }, + "id": { + "type": "string", + "title": "Id" + }, + "short_id": { + "type": "string", + "title": "Short Id" + }, + "point": { + "$ref": "#/components/schemas/ChannelPoint" + }, + "name": { + "type": "string", + "title": "Name" + }, + "color": { + "type": "string", + "title": "Color" + }, + "fee_ppm": { + "type": "integer", + "title": "Fee Ppm" + }, + "fee_base_msat": { + "type": "integer", + "title": "Fee Base Msat" + } + }, + "type": "object", + "required": [ + "peer_id", + "balance", + "state" + ], + "title": "NodeChannel" + }, + "NodeFees": { + "properties": { + "total_msat": { + "type": "integer", + "title": "Total Msat" + }, + "daily_msat": { + "type": "integer", + "title": "Daily Msat" + }, + "weekly_msat": { + "type": "integer", + "title": "Weekly Msat" + }, + "monthly_msat": { + "type": "integer", + "title": "Monthly Msat" + } + }, + "type": "object", + "required": [ + "total_msat" + ], + "title": "NodeFees" + }, + "NodeInfoResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "backend_name": { + "type": "string", + "title": "Backend Name" + }, + "alias": { + "type": "string", + "title": "Alias" + }, + "color": { + "type": "string", + "title": "Color" + }, + "num_peers": { + "type": "integer", + "title": "Num Peers" + }, + "blockheight": { + "type": "integer", + "title": "Blockheight" + }, + "channel_stats": { + "$ref": "#/components/schemas/ChannelStats" + }, + "addresses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Addresses" + }, + "onchain_balance_sat": { + "type": "integer", + "title": "Onchain Balance Sat" + }, + "onchain_confirmed_sat": { + "type": "integer", + "title": "Onchain Confirmed Sat" + }, + "fees": { + "$ref": "#/components/schemas/NodeFees" + }, + "balance_msat": { + "type": "integer", + "title": "Balance Msat" + } + }, + "type": "object", + "required": [ + "id", + "backend_name", + "alias", + "color", + "num_peers", + "blockheight", + "channel_stats", + "addresses", + "onchain_balance_sat", + "onchain_confirmed_sat", + "fees", + "balance_msat" + ], + "title": "NodeInfoResponse" + }, + "NodePeerInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "alias": { + "type": "string", + "title": "Alias" + }, + "color": { + "type": "string", + "title": "Color" + }, + "last_timestamp": { + "type": "integer", + "title": "Last Timestamp" + }, + "addresses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Addresses" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "NodePeerInfo" + }, + "NodeRank": { + "properties": { + "capacity": { + "type": "integer", + "title": "Capacity" + }, + "channelcount": { + "type": "integer", + "title": "Channelcount" + }, + "age": { + "type": "integer", + "title": "Age" + }, + "growth": { + "type": "integer", + "title": "Growth" + }, + "availability": { + "type": "integer", + "title": "Availability" + } + }, + "type": "object", + "title": "NodeRank" + }, + "NostrAccount": { + "properties": { + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "relay_id": { + "type": "string", + "title": "Relay Id" + }, + "sats": { + "type": "integer", + "title": "Sats", + "default": 0 + }, + "storage": { + "type": "integer", + "title": "Storage", + "default": 0 + }, + "paid_to_join": { + "type": "boolean", + "title": "Paid To Join", + "default": false + }, + "allowed": { + "type": "boolean", + "title": "Allowed", + "default": false + }, + "blocked": { + "type": "boolean", + "title": "Blocked", + "default": false + } + }, + "type": "object", + "required": [ + "pubkey", + "relay_id" + ], + "title": "NostrAccount" + }, + "NostrPartialAccount": { + "properties": { + "relay_id": { + "type": "string", + "title": "Relay Id" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "allowed": { + "type": "boolean", + "title": "Allowed" + }, + "blocked": { + "type": "boolean", + "title": "Blocked" + } + }, + "type": "object", + "required": [ + "relay_id", + "pubkey" + ], + "title": "NostrPartialAccount" + }, + "NostrRelay": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "contact": { + "type": "string", + "title": "Contact" + }, + "active": { + "type": "boolean", + "title": "Active", + "default": false + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/RelaySpec" + } + ], + "title": "Meta", + "default": { + "require_auth_events": false, + "skiped_auth_events": [], + "forced_auth_events": [], + "require_auth_filter": false, + "wallet": "", + "is_paid_relay": false, + "cost_to_join": 0, + "storage_cost_value": 0, + "storage_cost_unit": "MB", + "free_storage_value": 1, + "free_storage_unit": "MB", + "full_storage_action": "prune", + "max_events_per_hour": 0, + "created_at_days_past": 0, + "created_at_hours_past": 0, + "created_at_minutes_past": 0, + "created_at_seconds_past": 0, + "created_at_days_future": 0, + "created_at_hours_future": 0, + "created_at_minutes_future": 0, + "created_at_seconds_future": 0, + "max_client_filters": 0, + "limit_per_filter": 1000, + "domain": "" + } + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "NostrRelay" + }, + "OrderContact": { + "properties": { + "nostr": { + "type": "string", + "title": "Nostr" + }, + "phone": { + "type": "string", + "title": "Phone" + }, + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "title": "OrderContact" + }, + "OrderExtra": { + "properties": { + "products": { + "items": { + "$ref": "#/components/schemas/ProductOverview" + }, + "type": "array", + "title": "Products" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "btc_price": { + "type": "string", + "title": "Btc Price" + }, + "shipping_cost": { + "type": "number", + "title": "Shipping Cost", + "default": 0 + }, + "shipping_cost_sat": { + "type": "number", + "title": "Shipping Cost Sat", + "default": 0 + }, + "fail_message": { + "type": "string", + "title": "Fail Message" + } + }, + "type": "object", + "required": [ + "products", + "currency", + "btc_price" + ], + "title": "OrderExtra" + }, + "OrderItem": { + "properties": { + "product_id": { + "type": "string", + "title": "Product Id" + }, + "quantity": { + "type": "integer", + "title": "Quantity" + } + }, + "type": "object", + "required": [ + "product_id", + "quantity" + ], + "title": "OrderItem" + }, + "OrderReissue": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "shipping_id": { + "type": "string", + "title": "Shipping Id" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "OrderReissue" + }, + "OrderStatusUpdate": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "message": { + "type": "string", + "title": "Message" + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "shipped": { + "type": "boolean", + "title": "Shipped" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "OrderStatusUpdate" + }, + "OwnerData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "user_id", + "name" + ], + "title": "OwnerData" + }, + "OwnerDataFields": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "title": "OwnerDataFields" + }, + "PRSettings": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "cost": { + "type": "integer", + "title": "Cost" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "comment_word_limit": { + "type": "integer", + "title": "Comment Word Limit", + "default": 0 + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Tags" + } + }, + "type": "object", + "required": [ + "wallet", + "cost" + ], + "title": "PRSettings" + }, + "Pads": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "user_id", + "name" + ], + "title": "Pads" + }, + "Page": { + "properties": { + "data": { + "items": { + + }, + "type": "array", + "title": "Data" + }, + "total": { + "type": "integer", + "title": "Total" + } + }, + "type": "object", + "required": [ + "data", + "total" + ], + "title": "Page" + }, + "PartialDirectMessage": { + "properties": { + "event_id": { + "type": "string", + "title": "Event Id" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + }, + "message": { + "type": "string", + "title": "Message" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "type": { + "type": "integer", + "title": "Type", + "default": -1 + }, + "incoming": { + "type": "boolean", + "title": "Incoming", + "default": false + }, + "time": { + "type": "integer", + "title": "Time" + } + }, + "type": "object", + "required": [ + "message", + "public_key" + ], + "title": "PartialDirectMessage" + }, + "PartialMerchant": { + "properties": { + "private_key": { + "type": "string", + "title": "Private Key" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/MerchantConfig" + } + ], + "title": "Config", + "default": { + "sync_from_nostr": false, + "active": false, + "restore_in_progress": false + } + } + }, + "type": "object", + "required": [ + "private_key", + "public_key" + ], + "title": "PartialMerchant" + }, + "PayLink": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "description": { + "type": "string", + "title": "Description" + }, + "min": { + "type": "number", + "title": "Min" + }, + "max": { + "type": "number", + "title": "Max" + }, + "served_meta": { + "type": "integer", + "title": "Served Meta" + }, + "served_pr": { + "type": "integer", + "title": "Served Pr" + }, + "comment_chars": { + "type": "integer", + "title": "Comment Chars" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "lnurl": { + "type": "string", + "title": "Lnurl", + "description": "Deprecated: Instead of using this bech32 encoded string, dynamically generate your own static link (lud17/bech32) on the client side. Example: lnurlp://${window.location.hostname}/lnurlp/${paylink_id}", + "deprecated": true, + "no_database": true + }, + "username": { + "type": "string", + "title": "Username" + }, + "zaps": { + "type": "boolean", + "title": "Zaps" + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "success_text": { + "type": "string", + "title": "Success Text" + }, + "success_url": { + "type": "string", + "title": "Success Url" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "fiat_base_multiplier": { + "type": "integer", + "title": "Fiat Base Multiplier" + }, + "disposable": { + "type": "boolean", + "title": "Disposable" + }, + "domain": { + "type": "string", + "title": "Domain" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "description", + "min", + "max", + "served_meta", + "served_pr", + "comment_chars", + "disposable" + ], + "title": "PayLink" + }, + "PayToEnableInfo": { + "properties": { + "amount": { + "type": "integer", + "title": "Amount", + "default": 0 + }, + "required": { + "type": "boolean", + "title": "Required", + "default": false + }, + "wallet": { + "type": "string", + "title": "Wallet" + } + }, + "type": "object", + "title": "PayToEnableInfo" + }, + "Payment": { + "properties": { + "checking_id": { + "type": "string", + "title": "Checking Id" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "wallet_id": { + "type": "string", + "title": "Wallet Id" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "fee": { + "type": "integer", + "title": "Fee" + }, + "bolt11": { + "type": "string", + "title": "Bolt11" + }, + "payment_request": { + "type": "string", + "title": "Payment Request", + "no_database": true + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "status": { + "type": "string", + "title": "Status", + "default": "pending" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "expiry": { + "type": "string", + "format": "date-time", + "title": "Expiry" + }, + "webhook": { + "type": "string", + "title": "Webhook" + }, + "webhook_status": { + "type": "string", + "title": "Webhook Status" + }, + "preimage": { + "type": "string", + "title": "Preimage" + }, + "tag": { + "type": "string", + "title": "Tag" + }, + "extension": { + "type": "string", + "title": "Extension" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Labels", + "default": [] + }, + "extra": { + "type": "object", + "title": "Extra", + "default": { + + } + } + }, + "type": "object", + "required": [ + "checking_id", + "payment_hash", + "wallet_id", + "amount", + "fee", + "bolt11" + ], + "title": "Payment" + }, + "PaymentCountStat": { + "properties": { + "field": { + "type": "string", + "title": "Field", + "default": "" + }, + "total": { + "type": "number", + "title": "Total", + "default": 0 + } + }, + "type": "object", + "title": "PaymentCountStat" + }, + "PaymentDailyStats": { + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "Date" + }, + "balance": { + "type": "number", + "title": "Balance", + "default": 0 + }, + "balance_in": { + "type": "number", + "title": "Balance In", + "default": 0 + }, + "balance_out": { + "type": "number", + "title": "Balance Out", + "default": 0 + }, + "payments_count": { + "type": "integer", + "title": "Payments Count", + "default": 0 + }, + "count_in": { + "type": "integer", + "title": "Count In", + "default": 0 + }, + "count_out": { + "type": "integer", + "title": "Count Out", + "default": 0 + }, + "fee": { + "type": "number", + "title": "Fee", + "default": 0 + } + }, + "type": "object", + "required": [ + "date" + ], + "title": "PaymentDailyStats" + }, + "PaymentHistoryPoint": { + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "Date" + }, + "income": { + "type": "integer", + "title": "Income" + }, + "spending": { + "type": "integer", + "title": "Spending" + }, + "balance": { + "type": "integer", + "title": "Balance" + } + }, + "type": "object", + "required": [ + "date", + "income", + "spending", + "balance" + ], + "title": "PaymentHistoryPoint" + }, + "PaymentWalletStats": { + "properties": { + "wallet_id": { + "type": "string", + "title": "Wallet Id", + "default": "" + }, + "wallet_name": { + "type": "string", + "title": "Wallet Name", + "default": "" + }, + "user_id": { + "type": "string", + "title": "User Id", + "default": "" + }, + "payments_count": { + "type": "integer", + "title": "Payments Count" + }, + "balance": { + "type": "number", + "title": "Balance", + "default": 0 + } + }, + "type": "object", + "required": [ + "payments_count" + ], + "title": "PaymentWalletStats" + }, + "Paywall": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "url": { + "type": "string", + "title": "Url" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "description": { + "type": "string", + "title": "Description" + }, + "amount": { + "type": "number", + "title": "Amount" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "remembers": { + "type": "boolean", + "title": "Remembers" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time", + "default": "2026-01-12T11:50:08.321752+00:00" + }, + "extras": { + "allOf": [ + { + "$ref": "#/components/schemas/PaywallExtra" + } + ], + "title": "Extras", + "default": { + "type": "url" + } + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "url", + "memo", + "amount", + "currency", + "remembers" + ], + "title": "Paywall" + }, + "PaywallExtra": { + "properties": { + "type": { + "type": "string", + "title": "Type", + "default": "url" + }, + "file_config": { + "$ref": "#/components/schemas/PaywallFileConfig" + } + }, + "type": "object", + "title": "PaywallExtra" + }, + "PaywallFileConfig": { + "properties": { + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers" + } + }, + "type": "object", + "required": [ + "url", + "headers" + ], + "title": "PaywallFileConfig" + }, + "Player": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "game_id": { + "type": "string", + "title": "Game Id" + }, + "block_number": { + "type": "integer", + "title": "Block Number", + "default": 0 + }, + "buy_in": { + "type": "integer", + "title": "Buy In", + "default": 0 + }, + "ln_address": { + "type": "string", + "title": "Ln Address" + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "owed": { + "type": "integer", + "title": "Owed", + "default": 0 + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "game_id", + "ln_address" + ], + "title": "Player" + }, + "PostReview": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "tag": { + "type": "string", + "title": "Tag" + }, + "rating": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "title": "Rating" + }, + "comment": { + "type": "string", + "title": "Comment" + } + }, + "type": "object", + "required": [ + "rating" + ], + "title": "PostReview" + }, + "PreviewAction": { + "properties": { + "is_preview_mode": { + "type": "boolean", + "title": "Is Preview Mode", + "default": false + }, + "is_settings_preview": { + "type": "boolean", + "title": "Is Settings Preview", + "default": false + }, + "is_owner_data_preview": { + "type": "boolean", + "title": "Is Owner Data Preview", + "default": false + }, + "is_client_data_preview": { + "type": "boolean", + "title": "Is Client Data Preview", + "default": false + }, + "is_public_page_preview": { + "type": "boolean", + "title": "Is Public Page Preview", + "default": false + } + }, + "type": "object", + "title": "PreviewAction" + }, + "Producer": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "livestream": { + "type": "string", + "title": "Livestream" + }, + "user": { + "type": "string", + "title": "User" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "livestream", + "user", + "wallet", + "name" + ], + "title": "Producer" + }, + "ProductConfig": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "use_autoreply": { + "type": "boolean", + "title": "Use Autoreply", + "default": false + }, + "autoreply_message": { + "type": "string", + "title": "Autoreply Message" + }, + "shipping": { + "items": { + "$ref": "#/components/schemas/ProductShippingCost" + }, + "type": "array", + "title": "Shipping", + "default": [] + } + }, + "type": "object", + "title": "ProductConfig" + }, + "ProductOverview": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "price": { + "type": "number", + "title": "Price" + }, + "product_shipping_cost": { + "type": "number", + "title": "Product Shipping Cost" + } + }, + "type": "object", + "required": [ + "id", + "name", + "price" + ], + "title": "ProductOverview" + }, + "ProductShippingCost": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "cost": { + "type": "integer", + "title": "Cost" + } + }, + "type": "object", + "required": [ + "id", + "cost" + ], + "title": "ProductShippingCost" + }, + "PromoCodeStatus": { + "properties": { + "buyer_discount": { + "type": "number", + "title": "Buyer Discount" + }, + "allow_referer": { + "type": "boolean", + "title": "Allow Referer", + "default": false + }, + "referer": { + "type": "string", + "title": "Referer" + } + }, + "type": "object", + "title": "PromoCodeStatus" + }, + "Promotion": { + "properties": { + "code": { + "type": "string", + "title": "Code", + "default": "" + }, + "buyer_discount_percent": { + "type": "number", + "title": "Buyer Discount Percent" + }, + "referer_bonus_percent": { + "type": "number", + "title": "Referer Bonus Percent" + }, + "selected_referer": { + "type": "string", + "title": "Selected Referer" + } + }, + "type": "object", + "required": [ + "buyer_discount_percent", + "referer_bonus_percent" + ], + "title": "Promotion" + }, + "PublicAuctionItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "auction_room_id": { + "type": "string", + "title": "Auction Room Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "active": { + "type": "boolean", + "title": "Active", + "default": true + }, + "description": { + "type": "string", + "title": "Description" + }, + "ask_price": { + "type": "number", + "title": "Ask Price", + "default": 0 + }, + "current_price": { + "type": "number", + "title": "Current Price", + "default": 0 + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expires At" + }, + "current_price_sat": { + "type": "number", + "title": "Current Price Sat", + "default": 0, + "no_database": true + }, + "bid_count": { + "type": "integer", + "title": "Bid Count", + "default": 0, + "no_database": true + }, + "currency": { + "type": "string", + "title": "Currency", + "default": "sat", + "no_database": true + }, + "next_min_bid": { + "type": "number", + "title": "Next Min Bid", + "default": 0, + "no_database": true + }, + "time_left_seconds": { + "type": "integer", + "title": "Time Left Seconds", + "default": 0, + "no_database": true + }, + "user_is_owner": { + "type": "boolean", + "title": "User Is Owner", + "default": false, + "no_database": true + }, + "user_is_participant": { + "type": "boolean", + "title": "User Is Participant", + "default": false, + "no_database": true + }, + "user_is_top_bidder": { + "type": "boolean", + "title": "User Is Top Bidder", + "default": false, + "no_database": true + } + }, + "type": "object", + "required": [ + "id", + "auction_room_id", + "name", + "expires_at" + ], + "title": "PublicAuctionItem" + }, + "PublicAuctionRoom": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "type": { + "type": "string", + "title": "Type", + "default": "auction" + }, + "duration_seconds": { + "type": "integer", + "title": "Duration Seconds", + "default": 0, + "no_database": true + }, + "min_bid_up_percentage": { + "type": "number", + "title": "Min Bid Up Percentage", + "default": 5 + }, + "room_percentage": { + "type": "number", + "title": "Room Percentage", + "default": 10 + } + }, + "type": "object", + "required": [ + "id", + "name", + "description", + "currency" + ], + "title": "PublicAuctionRoom" + }, + "PublicNodeInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "backend_name": { + "type": "string", + "title": "Backend Name" + }, + "alias": { + "type": "string", + "title": "Alias" + }, + "color": { + "type": "string", + "title": "Color" + }, + "num_peers": { + "type": "integer", + "title": "Num Peers" + }, + "blockheight": { + "type": "integer", + "title": "Blockheight" + }, + "channel_stats": { + "$ref": "#/components/schemas/ChannelStats" + }, + "addresses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Addresses" + } + }, + "type": "object", + "required": [ + "id", + "backend_name", + "alias", + "color", + "num_peers", + "blockheight", + "channel_stats", + "addresses" + ], + "title": "PublicNodeInfo" + }, + "PublicPageFields": { + "properties": { + "has_public_page": { + "type": "boolean", + "title": "Has Public Page", + "default": false + }, + "owner_data_fields": { + "$ref": "#/components/schemas/OwnerDataFields" + }, + "client_data_fields": { + "$ref": "#/components/schemas/ClientDataFields" + }, + "action_fields": { + "$ref": "#/components/schemas/ActionFields" + } + }, + "type": "object", + "required": [ + "owner_data_fields", + "client_data_fields", + "action_fields" + ], + "title": "PublicPageFields" + }, + "RatingStats": { + "properties": { + "tag": { + "type": "string", + "title": "Tag" + }, + "review_count": { + "type": "integer", + "minimum": 0, + "title": "Review Count", + "default": 0 + }, + "avg_rating": { + "type": "integer", + "title": "Avg Rating" + } + }, + "type": "object", + "required": [ + "avg_rating" + ], + "title": "RatingStats" + }, + "RegisterUser": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "username": { + "type": "string", + "maxLength": 20, + "minLength": 2, + "title": "Username" + }, + "password": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password" + }, + "password_repeat": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password Repeat" + } + }, + "type": "object", + "required": [ + "username", + "password", + "password_repeat" + ], + "title": "RegisterUser" + }, + "Relay": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "url": { + "type": "string", + "title": "Url" + }, + "active": { + "type": "boolean", + "title": "Active" + }, + "connected": { + "type": "boolean", + "title": "Connected", + "no_database": true + }, + "connected_string": { + "type": "string", + "title": "Connected String", + "no_database": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/RelayStatus" + } + ], + "title": "Status", + "no_database": true + }, + "ping": { + "type": "integer", + "title": "Ping", + "no_database": true + } + }, + "type": "object", + "title": "Relay" + }, + "RelaySpec": { + "properties": { + "requireAuthEvents": { + "type": "boolean", + "title": "Requireauthevents", + "default": false + }, + "skipedAuthEvents": { + "items": { + + }, + "type": "array", + "title": "Skipedauthevents", + "default": [] + }, + "forcedAuthEvents": { + "items": { + + }, + "type": "array", + "title": "Forcedauthevents", + "default": [] + }, + "requireAuthFilter": { + "type": "boolean", + "title": "Requireauthfilter", + "default": false + }, + "wallet": { + "type": "string", + "title": "Wallet", + "default": "" + }, + "isPaidRelay": { + "type": "boolean", + "title": "Ispaidrelay", + "default": false + }, + "costToJoin": { + "type": "integer", + "title": "Costtojoin", + "default": 0 + }, + "storageCostValue": { + "type": "integer", + "title": "Storagecostvalue", + "default": 0 + }, + "storageCostUnit": { + "type": "string", + "title": "Storagecostunit", + "default": "MB" + }, + "freeStorageValue": { + "type": "integer", + "title": "Freestoragevalue", + "default": 1 + }, + "freeStorageUnit": { + "type": "string", + "title": "Freestorageunit", + "default": "MB" + }, + "fullStorageAction": { + "type": "string", + "title": "Fullstorageaction", + "default": "prune" + }, + "maxEventsPerHour": { + "type": "integer", + "title": "Maxeventsperhour", + "default": 0 + }, + "createdAtDaysPast": { + "type": "integer", + "title": "Createdatdayspast", + "default": 0 + }, + "createdAtHoursPast": { + "type": "integer", + "title": "Createdathourspast", + "default": 0 + }, + "createdAtMinutesPast": { + "type": "integer", + "title": "Createdatminutespast", + "default": 0 + }, + "createdAtSecondsPast": { + "type": "integer", + "title": "Createdatsecondspast", + "default": 0 + }, + "createdAtDaysFuture": { + "type": "integer", + "title": "Createdatdaysfuture", + "default": 0 + }, + "createdAtHoursFuture": { + "type": "integer", + "title": "Createdathoursfuture", + "default": 0 + }, + "createdAtMinutesFuture": { + "type": "integer", + "title": "Createdatminutesfuture", + "default": 0 + }, + "createdAtSecondsFuture": { + "type": "integer", + "title": "Createdatsecondsfuture", + "default": 0 + }, + "maxClientFilters": { + "type": "integer", + "title": "Maxclientfilters", + "default": 0 + }, + "limitPerFilter": { + "type": "integer", + "title": "Limitperfilter", + "default": 1000 + }, + "domain": { + "type": "string", + "title": "Domain", + "default": "" + } + }, + "type": "object", + "title": "RelaySpec" + }, + "RelayStatus": { + "properties": { + "num_sent_events": { + "type": "integer", + "title": "Num Sent Events", + "default": 0 + }, + "num_received_events": { + "type": "integer", + "title": "Num Received Events", + "default": 0 + }, + "error_counter": { + "type": "integer", + "title": "Error Counter", + "default": 0 + }, + "error_list": { + "items": { + + }, + "type": "array", + "title": "Error List", + "default": [] + }, + "notice_list": { + "items": { + + }, + "type": "array", + "title": "Notice List", + "default": [] + } + }, + "type": "object", + "title": "RelayStatus" + }, + "ReleasePaymentInfo": { + "properties": { + "amount": { + "type": "integer", + "title": "Amount" + }, + "pay_link": { + "type": "string", + "title": "Pay Link" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "payment_request": { + "type": "string", + "title": "Payment Request" + } + }, + "type": "object", + "title": "ReleasePaymentInfo" + }, + "ResetUserPassword": { + "properties": { + "reset_key": { + "type": "string", + "title": "Reset Key" + }, + "password": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password" + }, + "password_repeat": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password Repeat" + } + }, + "type": "object", + "required": [ + "reset_key", + "password", + "password_repeat" + ], + "title": "ResetUserPassword" + }, + "ReverseSubmarineSwap": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "direction": { + "type": "string", + "title": "Direction" + }, + "feerate": { + "type": "boolean", + "title": "Feerate" + }, + "feerate_value": { + "type": "integer", + "title": "Feerate Value" + }, + "onchain_address": { + "type": "string", + "title": "Onchain Address" + }, + "instant_settlement": { + "type": "boolean", + "title": "Instant Settlement" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "status": { + "type": "string", + "title": "Status" + }, + "boltz_id": { + "type": "string", + "title": "Boltz Id" + }, + "preimage": { + "type": "string", + "title": "Preimage" + }, + "claim_privkey": { + "type": "string", + "title": "Claim Privkey" + }, + "lockup_address": { + "type": "string", + "title": "Lockup Address" + }, + "invoice": { + "type": "string", + "title": "Invoice" + }, + "onchain_amount": { + "type": "integer", + "title": "Onchain Amount" + }, + "timeout_block_height": { + "type": "integer", + "title": "Timeout Block Height" + }, + "redeem_script": { + "type": "string", + "title": "Redeem Script" + }, + "blinding_key": { + "type": "string", + "title": "Blinding Key" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "asset", + "amount", + "direction", + "feerate", + "onchain_address", + "instant_settlement", + "status", + "boltz_id", + "preimage", + "claim_privkey", + "lockup_address", + "invoice", + "onchain_amount", + "timeout_block_height", + "redeem_script" + ], + "title": "ReverseSubmarineSwap" + }, + "ReviewstPage": { + "properties": { + "data": { + "items": { + + }, + "type": "array", + "title": "Data" + }, + "total": { + "type": "integer", + "title": "Total" + }, + "avg_rating": { + "type": "number", + "title": "Avg Rating", + "default": 0 + } + }, + "type": "object", + "required": [ + "data", + "total" + ], + "title": "ReviewstPage" + }, + "RotateAddressData": { + "properties": { + "secret": { + "type": "string", + "title": "Secret" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + } + }, + "type": "object", + "required": [ + "secret", + "pubkey" + ], + "title": "RotateAddressData" + }, + "SatsPayTheme": { + "properties": { + "css_id": { + "type": "string", + "title": "Css Id" + }, + "title": { + "type": "string", + "title": "Title" + }, + "custom_css": { + "type": "string", + "title": "Custom Css" + }, + "user": { + "type": "string", + "title": "User" + } + }, + "type": "object", + "required": [ + "css_id", + "title", + "custom_css", + "user" + ], + "title": "SatsPayTheme" + }, + "SatsdiceLink": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "title": { + "type": "string", + "title": "Title" + }, + "min_bet": { + "type": "integer", + "title": "Min Bet" + }, + "max_bet": { + "type": "integer", + "title": "Max Bet" + }, + "multiplier": { + "type": "number", + "title": "Multiplier" + }, + "haircut": { + "type": "number", + "title": "Haircut" + }, + "chance": { + "type": "number", + "title": "Chance" + }, + "base_url": { + "type": "string", + "title": "Base Url" + }, + "amount": { + "type": "integer", + "title": "Amount", + "default": 0 + }, + "served_meta": { + "type": "integer", + "title": "Served Meta", + "default": 0 + }, + "served_pr": { + "type": "integer", + "title": "Served Pr", + "default": 0 + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + }, + "open_time": { + "type": "integer", + "title": "Open Time", + "default": 1768218608 + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "title", + "min_bet", + "max_bet", + "multiplier", + "haircut", + "chance", + "base_url" + ], + "title": "SatsdiceLink" + }, + "SatspaySettings": { + "properties": { + "webhook_method": { + "type": "string", + "title": "Webhook Method", + "default": "GET" + }, + "mempool_url": { + "type": "string", + "title": "Mempool Url", + "default": "https://mempool.space" + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + } + }, + "type": "object", + "title": "SatspaySettings" + }, + "ScrubLink": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "description": { + "type": "string", + "title": "Description" + }, + "payoraddress": { + "type": "string", + "title": "Payoraddress" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "description", + "payoraddress" + ], + "title": "ScrubLink" + }, + "Scrum": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "type": "string", + "title": "Description" + }, + "public_assigning": { + "type": "boolean", + "title": "Public Assigning" + }, + "public_tasks": { + "type": "boolean", + "title": "Public Tasks", + "default": false + }, + "public_delete_tasks": { + "type": "boolean", + "title": "Public Delete Tasks", + "default": false + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "user_id", + "name", + "description", + "public_assigning", + "wallet" + ], + "title": "Scrum" + }, + "SerializedTransaction": { + "properties": { + "tx_hex": { + "type": "string", + "title": "Tx Hex" + } + }, + "type": "object", + "required": [ + "tx_hex" + ], + "title": "SerializedTransaction" + }, + "Settings": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "default": "" + }, + "denomination": { + "type": "string", + "title": "Denomination", + "default": "" + }, + "send_wallet_id": { + "type": "string", + "title": "Send Wallet Id", + "default": "" + }, + "receive_wallet_id": { + "type": "string", + "title": "Receive Wallet Id", + "default": "" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "header_image": { + "type": "string", + "title": "Header Image", + "default": "" + }, + "haircut": { + "type": "integer", + "title": "Haircut", + "default": "" + }, + "auto_convert": { + "type": "boolean", + "title": "Auto Convert" + }, + "email": { + "type": "boolean", + "title": "Email" + }, + "nostr": { + "type": "boolean", + "title": "Nostr" + }, + "launch_page": { + "type": "boolean", + "title": "Launch Page" + }, + "live_mode": { + "type": "boolean", + "title": "Live Mode" + }, + "message": { + "type": "string", + "title": "Message", + "default": "" + } + }, + "type": "object", + "title": "Settings" + }, + "SettingsFields": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "editable": { + "type": "boolean", + "title": "Editable", + "default": true + }, + "fields": { + "items": { + "$ref": "#/components/schemas/DataField" + }, + "type": "array", + "title": "Fields", + "default": [] + }, + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": false + }, + "type": { + "type": "string", + "title": "Type", + "default": "user" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "SettingsFields" + }, + "SettleInvoice": { + "properties": { + "preimage": { + "type": "string", + "maxLength": 64, + "minLength": 64, + "title": "Preimage", + "description": "The preimage of the payment hash to settle the invoice." + } + }, + "type": "object", + "required": [ + "preimage" + ], + "title": "SettleInvoice" + }, + "SignedTransaction": { + "properties": { + "tx_hex": { + "type": "string", + "title": "Tx Hex" + }, + "tx_json": { + "type": "string", + "title": "Tx Json" + } + }, + "type": "object", + "title": "SignedTransaction" + }, + "SimpleItem": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + } + }, + "type": "object", + "required": [ + "id", + "name" + ], + "title": "SimpleItem" + }, + "SimpleStatus": { + "properties": { + "success": { + "type": "boolean", + "title": "Success" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "success", + "message" + ], + "title": "SimpleStatus" + }, + "SnapshotResponse": { + "properties": { + "exists": { + "type": "boolean", + "title": "Exists" + }, + "update_blob": { + "type": "string", + "title": "Update Blob" + } + }, + "type": "object", + "required": [ + "exists" + ], + "title": "SnapshotResponse" + }, + "SnapshotWriteResult": { + "properties": { + "ok": { + "type": "boolean", + "title": "Ok", + "default": true + }, + "final": { + "type": "boolean", + "title": "Final", + "default": false + }, + "rate_limited": { + "type": "boolean", + "title": "Rate Limited", + "default": false + } + }, + "type": "object", + "title": "SnapshotWriteResult" + }, + "Stall": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency", + "default": "sat" + }, + "shipping_zones": { + "items": { + "$ref": "#/components/schemas/Zone" + }, + "type": "array", + "title": "Shipping Zones", + "default": [] + }, + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/StallConfig" + } + ], + "title": "Config", + "default": { + + } + }, + "pending": { + "type": "boolean", + "title": "Pending", + "default": false + }, + "event_id": { + "type": "string", + "title": "Event Id" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + } + }, + "type": "object", + "required": [ + "wallet", + "name" + ], + "title": "Stall" + }, + "StallConfig": { + "properties": { + "image_url": { + "type": "string", + "title": "Image Url" + }, + "description": { + "type": "string", + "title": "Description" + } + }, + "type": "object", + "title": "StallConfig" + }, + "StoredPayLink": { + "properties": { + "lnurl": { + "type": "string", + "title": "Lnurl" + }, + "label": { + "type": "string", + "title": "Label" + }, + "last_used": { + "type": "integer", + "title": "Last Used" + } + }, + "type": "object", + "required": [ + "lnurl", + "label" + ], + "title": "StoredPayLink" + }, + "StoredPayLinks": { + "properties": { + "links": { + "items": { + "$ref": "#/components/schemas/StoredPayLink" + }, + "type": "array", + "title": "Links", + "default": [] + } + }, + "type": "object", + "title": "StoredPayLinks" + }, + "SubmarineSwap": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "asset": { + "type": "string", + "title": "Asset" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "direction": { + "type": "string", + "title": "Direction" + }, + "feerate": { + "type": "boolean", + "title": "Feerate" + }, + "feerate_value": { + "type": "integer", + "title": "Feerate Value" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "status": { + "type": "string", + "title": "Status" + }, + "refund_privkey": { + "type": "string", + "title": "Refund Privkey" + }, + "refund_address": { + "type": "string", + "title": "Refund Address" + }, + "boltz_id": { + "type": "string", + "title": "Boltz Id" + }, + "expected_amount": { + "type": "integer", + "title": "Expected Amount" + }, + "timeout_block_height": { + "type": "integer", + "title": "Timeout Block Height" + }, + "address": { + "type": "string", + "title": "Address" + }, + "bip21": { + "type": "string", + "title": "Bip21" + }, + "redeem_script": { + "type": "string", + "title": "Redeem Script" + }, + "blinding_key": { + "type": "string", + "title": "Blinding Key" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "asset", + "amount", + "direction", + "feerate", + "payment_hash", + "status", + "refund_privkey", + "refund_address", + "boltz_id", + "expected_amount", + "timeout_block_height", + "address", + "bip21", + "redeem_script" + ], + "title": "SubmarineSwap" + }, + "Target": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "source": { + "type": "string", + "title": "Source" + }, + "percent": { + "type": "number", + "title": "Percent" + }, + "alias": { + "type": "string", + "title": "Alias" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "source", + "percent" + ], + "title": "Target" + }, + "TargetPut": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "alias": { + "type": "string", + "title": "Alias", + "default": "" + }, + "percent": { + "type": "number", + "maximum": 100, + "minimum": 0, + "title": "Percent" + } + }, + "type": "object", + "required": [ + "wallet", + "percent" + ], + "title": "TargetPut" + }, + "TargetPutList": { + "properties": { + "targets": { + "items": { + "$ref": "#/components/schemas/TargetPut" + }, + "type": "array", + "title": "Targets" + } + }, + "type": "object", + "required": [ + "targets" + ], + "title": "TargetPutList" + }, + "TaskStage": { + "type": "string", + "enum": [ + "todo", + "doing", + "done" + ], + "title": "TaskStage", + "description": "An enumeration." + }, + "Tasks": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "task": { + "type": "string", + "title": "Task" + }, + "scrum_id": { + "type": "string", + "title": "Scrum Id" + }, + "assignee": { + "type": "string", + "title": "Assignee" + }, + "stage": { + "$ref": "#/components/schemas/TaskStage" + }, + "reward": { + "type": "integer", + "title": "Reward" + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "complete": { + "type": "boolean", + "title": "Complete", + "default": false + }, + "notes": { + "type": "string", + "title": "Notes" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "task", + "scrum_id", + "stage" + ], + "title": "Tasks" + }, + "TasksPublic": { + "properties": { + "assignee": { + "type": "string", + "title": "Assignee" + }, + "stage": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskStage" + } + ], + "default": "todo" + }, + "notes": { + "type": "string", + "title": "Notes" + } + }, + "type": "object", + "title": "TasksPublic" + }, + "TestMessage": { + "properties": { + "sender_private_key": { + "type": "string", + "title": "Sender Private Key" + }, + "reciever_public_key": { + "type": "string", + "title": "Reciever Public Key" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "reciever_public_key", + "message" + ], + "title": "TestMessage" + }, + "TestMessageResponse": { + "properties": { + "private_key": { + "type": "string", + "title": "Private Key" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "event_json": { + "type": "string", + "title": "Event Json" + } + }, + "type": "object", + "required": [ + "private_key", + "public_key", + "event_json" + ], + "title": "TestMessageResponse" + }, + "Tip": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "message": { + "type": "string", + "title": "Message" + }, + "sats": { + "type": "integer", + "title": "Sats" + }, + "tipjar": { + "type": "string", + "title": "Tipjar" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "name", + "message", + "sats", + "tipjar" + ], + "title": "Tip", + "description": "A Tip represents a single donation" + }, + "TipJar": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "webhook": { + "type": "string", + "title": "Webhook", + "default": "" + }, + "onchain": { + "type": "string", + "title": "Onchain", + "default": "" + }, + "onchain_limit": { + "type": "integer", + "title": "Onchain Limit", + "default": 0 + }, + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "name", + "wallet", + "id" + ], + "title": "TipJar", + "description": "A TipJar represents a user's tip jar" + }, + "Track": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "livestream": { + "type": "string", + "title": "Livestream" + }, + "producer": { + "type": "string", + "title": "Producer" + }, + "name": { + "type": "string", + "title": "Name" + }, + "download_url": { + "type": "string", + "title": "Download Url" + }, + "price_msat": { + "type": "integer", + "title": "Price Msat", + "default": 0 + } + }, + "type": "object", + "required": [ + "id", + "livestream", + "producer", + "name" + ], + "title": "Track" + }, + "TransactionInput": { + "properties": { + "tx_id": { + "type": "string", + "title": "Tx Id" + }, + "vout": { + "type": "integer", + "title": "Vout" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "address": { + "type": "string", + "title": "Address" + }, + "branch_index": { + "type": "integer", + "title": "Branch Index" + }, + "address_index": { + "type": "integer", + "title": "Address Index" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "tx_hex": { + "type": "string", + "title": "Tx Hex" + } + }, + "type": "object", + "required": [ + "tx_id", + "vout", + "amount", + "address", + "branch_index", + "address_index", + "wallet", + "tx_hex" + ], + "title": "TransactionInput" + }, + "TransactionOutput": { + "properties": { + "amount": { + "type": "integer", + "title": "Amount" + }, + "address": { + "type": "string", + "title": "Address" + }, + "branch_index": { + "type": "integer", + "title": "Branch Index" + }, + "address_index": { + "type": "integer", + "title": "Address Index" + }, + "wallet": { + "type": "string", + "title": "Wallet" + } + }, + "type": "object", + "required": [ + "amount", + "address" + ], + "title": "TransactionOutput" + }, + "TransferRequest": { + "properties": { + "lock_code": { + "type": "string", + "title": "Lock Code" + }, + "new_owner_id": { + "type": "string", + "title": "New Owner Id" + } + }, + "type": "object", + "required": [ + "lock_code", + "new_owner_id" + ], + "title": "TransferRequest" + }, + "TransferResponse": { + "properties": { + "transfer_code": { + "type": "string", + "title": "Transfer Code" + } + }, + "type": "object", + "required": [ + "transfer_code" + ], + "title": "TransferResponse" + }, + "UnlockRequest": { + "properties": { + "lock_code": { + "type": "string", + "title": "Lock Code" + } + }, + "type": "object", + "required": [ + "lock_code" + ], + "title": "UnlockRequest" + }, + "UpdateAccessControlList": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "endpoints": { + "items": { + "$ref": "#/components/schemas/EndpointAccess" + }, + "type": "array", + "title": "Endpoints", + "default": [] + }, + "token_id_list": { + "items": { + "$ref": "#/components/schemas/SimpleItem" + }, + "type": "array", + "title": "Token Id List", + "default": [] + }, + "password": { + "type": "string", + "title": "Password" + } + }, + "type": "object", + "required": [ + "id", + "name", + "password" + ], + "title": "UpdateAccessControlList" + }, + "UpdateAddressData": { + "properties": { + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "relays": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Relays" + } + }, + "type": "object", + "title": "UpdateAddressData" + }, + "UpdateBalance": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "amount": { + "type": "integer", + "title": "Amount" + } + }, + "type": "object", + "required": [ + "id", + "amount" + ], + "title": "UpdateBalance" + }, + "UpdateInvoiceData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatusEnum" + } + ], + "default": "draft" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "company_name": { + "type": "string", + "title": "Company Name" + }, + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "phone": { + "type": "string", + "title": "Phone" + }, + "address": { + "type": "string", + "title": "Address" + }, + "items": { + "items": { + "$ref": "#/components/schemas/InvoiceItemData" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "currency", + "items" + ], + "title": "UpdateInvoiceData" + }, + "UpdateJobData": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the Job" + }, + "status": { + "type": "boolean", + "title": "Status" + }, + "selectedverb": { + "type": "string", + "title": "Selectedverb" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "items": { + "$ref": "#/components/schemas/HeaderItems" + }, + "type": "array", + "title": "Headers" + }, + "body": { + "type": "string", + "title": "Body" + }, + "schedule": { + "type": "string", + "title": "Schedule", + "description": "Schedule to run" + }, + "extra": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Extra", + "description": "Partial update for extra field" + } + }, + "type": "object", + "required": [ + "id", + "status" + ], + "title": "UpdateJobData" + }, + "UpdatePaymentLabels": { + "properties": { + "labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Labels", + "default": [] + } + }, + "type": "object", + "title": "UpdatePaymentLabels" + }, + "UpdateSettings": { + "properties": { + "keycloak_discovery_url": { + "type": "string", + "title": "Keycloak Discovery Url", + "default": "" + }, + "keycloak_client_id": { + "type": "string", + "title": "Keycloak Client Id", + "default": "" + }, + "keycloak_client_secret": { + "type": "string", + "title": "Keycloak Client Secret", + "default": "" + }, + "keycloak_client_custom_org": { + "type": "string", + "title": "Keycloak Client Custom Org" + }, + "keycloak_client_custom_icon": { + "type": "string", + "title": "Keycloak Client Custom Icon" + }, + "github_client_id": { + "type": "string", + "title": "Github Client Id", + "default": "" + }, + "github_client_secret": { + "type": "string", + "title": "Github Client Secret", + "default": "" + }, + "google_client_id": { + "type": "string", + "title": "Google Client Id", + "default": "" + }, + "google_client_secret": { + "type": "string", + "title": "Google Client Secret", + "default": "" + }, + "nostr_absolute_request_urls": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Nostr Absolute Request Urls", + "default": [ + "http://127.0.0.1:5000", + "http://localhost:5000" + ] + }, + "auth_token_expire_minutes": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Auth Token Expire Minutes", + "default": 525600 + }, + "auth_all_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Auth All Methods", + "default": [ + "user-id-only", + "username-password", + "nostr-auth-nip98", + "google-auth", + "github-auth", + "keycloak-auth" + ] + }, + "auth_allowed_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Auth Allowed Methods", + "default": [ + "user-id-only", + "username-password" + ] + }, + "auth_credetials_update_threshold": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Auth Credetials Update Threshold", + "default": 120 + }, + "auth_authentication_cache_minutes": { + "type": "integer", + "minimum": 0, + "title": "Auth Authentication Cache Minutes", + "default": 10 + }, + "lnbits_audit_enabled": { + "type": "boolean", + "title": "Lnbits Audit Enabled", + "default": true + }, + "lnbits_audit_retention_days": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Audit Retention Days", + "default": 7 + }, + "lnbits_audit_log_ip_address": { + "type": "boolean", + "title": "Lnbits Audit Log Ip Address", + "default": false + }, + "lnbits_audit_log_path_params": { + "type": "boolean", + "title": "Lnbits Audit Log Path Params", + "default": true + }, + "lnbits_audit_log_query_params": { + "type": "boolean", + "title": "Lnbits Audit Log Query Params", + "default": true + }, + "lnbits_audit_log_request_body": { + "type": "boolean", + "title": "Lnbits Audit Log Request Body", + "default": false + }, + "lnbits_audit_include_paths": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Include Paths", + "default": [ + ".*api/v1/.*" + ] + }, + "lnbits_audit_exclude_paths": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Exclude Paths", + "default": [ + "/static" + ] + }, + "lnbits_audit_http_methods": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Http Methods", + "default": [ + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "lnbits_audit_http_response_codes": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Audit Http Response Codes", + "default": [ + "4.*", + "5.*" + ] + }, + "lnbits_node_ui": { + "type": "boolean", + "title": "Lnbits Node Ui", + "default": false + }, + "lnbits_public_node_ui": { + "type": "boolean", + "title": "Lnbits Public Node Ui", + "default": false + }, + "lnbits_node_ui_transactions": { + "type": "boolean", + "title": "Lnbits Node Ui Transactions", + "default": false + }, + "lnbits_webpush_pubkey": { + "type": "string", + "title": "Lnbits Webpush Pubkey" + }, + "lnbits_webpush_privkey": { + "type": "string", + "title": "Lnbits Webpush Privkey" + }, + "lightning_invoice_expiry": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lightning Invoice Expiry", + "default": 3600 + }, + "paypal_enabled": { + "type": "boolean", + "title": "Paypal Enabled", + "default": false + }, + "paypal_api_endpoint": { + "type": "string", + "title": "Paypal Api Endpoint", + "default": "https://api-m.paypal.com" + }, + "paypal_client_id": { + "type": "string", + "title": "Paypal Client Id" + }, + "paypal_client_secret": { + "type": "string", + "title": "Paypal Client Secret" + }, + "paypal_payment_success_url": { + "type": "string", + "title": "Paypal Payment Success Url", + "default": "https://lnbits.com" + }, + "paypal_payment_webhook_url": { + "type": "string", + "title": "Paypal Payment Webhook Url", + "default": "https://your-lnbits-domain-here.com/api/v1/callback/paypal" + }, + "paypal_webhook_id": { + "type": "string", + "title": "Paypal Webhook Id" + }, + "paypal_limits": { + "$ref": "#/components/schemas/FiatProviderLimits" + }, + "stripe_enabled": { + "type": "boolean", + "title": "Stripe Enabled", + "default": false + }, + "stripe_api_endpoint": { + "type": "string", + "title": "Stripe Api Endpoint", + "default": "https://api.stripe.com" + }, + "stripe_api_secret_key": { + "type": "string", + "title": "Stripe Api Secret Key" + }, + "stripe_payment_success_url": { + "type": "string", + "title": "Stripe Payment Success Url", + "default": "https://lnbits.com" + }, + "stripe_payment_webhook_url": { + "type": "string", + "title": "Stripe Payment Webhook Url", + "default": "https://your-lnbits-domain-here.com/api/v1/callback/stripe" + }, + "stripe_webhook_signing_secret": { + "type": "string", + "title": "Stripe Webhook Signing Secret" + }, + "stripe_limits": { + "$ref": "#/components/schemas/FiatProviderLimits" + }, + "breez_liquid_api_key": { + "type": "string", + "title": "Breez Liquid Api Key" + }, + "breez_liquid_seed": { + "type": "string", + "title": "Breez Liquid Seed" + }, + "breez_liquid_fee_offset_sat": { + "type": "integer", + "title": "Breez Liquid Fee Offset Sat", + "default": 50 + }, + "strike_api_endpoint": { + "type": "string", + "title": "Strike Api Endpoint", + "default": "https://api.strike.me/v1", + "env": "STRIKE_API_ENDPOINT" + }, + "strike_api_key": { + "type": "string", + "title": "Strike Api Key", + "env": "STRIKE_API_KEY" + }, + "breez_api_key": { + "type": "string", + "title": "Breez Api Key" + }, + "breez_greenlight_seed": { + "type": "string", + "title": "Breez Greenlight Seed" + }, + "breez_greenlight_invite_code": { + "type": "string", + "title": "Breez Greenlight Invite Code" + }, + "breez_greenlight_device_key": { + "type": "string", + "title": "Breez Greenlight Device Key" + }, + "breez_greenlight_device_cert": { + "type": "string", + "title": "Breez Greenlight Device Cert" + }, + "breez_use_trampoline": { + "type": "boolean", + "title": "Breez Use Trampoline", + "default": true + }, + "nwc_pairing_url": { + "type": "string", + "title": "Nwc Pairing Url" + }, + "lntips_api_endpoint": { + "type": "string", + "title": "Lntips Api Endpoint" + }, + "lntips_api_key": { + "type": "string", + "title": "Lntips Api Key" + }, + "lntips_admin_key": { + "type": "string", + "title": "Lntips Admin Key" + }, + "lntips_invoice_key": { + "type": "string", + "title": "Lntips Invoice Key" + }, + "spark_url": { + "type": "string", + "title": "Spark Url" + }, + "spark_token": { + "type": "string", + "title": "Spark Token" + }, + "opennode_api_endpoint": { + "type": "string", + "title": "Opennode Api Endpoint" + }, + "opennode_key": { + "type": "string", + "title": "Opennode Key" + }, + "opennode_admin_key": { + "type": "string", + "title": "Opennode Admin Key" + }, + "opennode_invoice_key": { + "type": "string", + "title": "Opennode Invoice Key" + }, + "phoenixd_api_endpoint": { + "type": "string", + "title": "Phoenixd Api Endpoint", + "default": "http://localhost:9740/" + }, + "phoenixd_api_password": { + "type": "string", + "title": "Phoenixd Api Password" + }, + "zbd_api_endpoint": { + "type": "string", + "title": "Zbd Api Endpoint", + "default": "https://api.zebedee.io/v0/" + }, + "zbd_api_key": { + "type": "string", + "title": "Zbd Api Key" + }, + "boltz_client_endpoint": { + "type": "string", + "title": "Boltz Client Endpoint", + "default": "127.0.0.1:9002" + }, + "boltz_client_macaroon": { + "type": "string", + "title": "Boltz Client Macaroon" + }, + "boltz_client_password": { + "type": "string", + "title": "Boltz Client Password", + "default": "" + }, + "boltz_client_cert": { + "type": "string", + "title": "Boltz Client Cert" + }, + "boltz_mnemonic": { + "type": "string", + "title": "Boltz Mnemonic" + }, + "alby_api_endpoint": { + "type": "string", + "title": "Alby Api Endpoint", + "default": "https://api.getalby.com/" + }, + "alby_access_token": { + "type": "string", + "title": "Alby Access Token" + }, + "blink_api_endpoint": { + "type": "string", + "title": "Blink Api Endpoint", + "default": "https://api.blink.sv/graphql" + }, + "blink_ws_endpoint": { + "type": "string", + "title": "Blink Ws Endpoint", + "default": "wss://ws.blink.sv/graphql" + }, + "blink_token": { + "type": "string", + "title": "Blink Token" + }, + "lnpay_api_endpoint": { + "type": "string", + "title": "Lnpay Api Endpoint" + }, + "lnpay_api_key": { + "type": "string", + "title": "Lnpay Api Key" + }, + "lnpay_wallet_key": { + "type": "string", + "title": "Lnpay Wallet Key" + }, + "lnpay_admin_key": { + "type": "string", + "title": "Lnpay Admin Key" + }, + "lnd_grpc_endpoint": { + "type": "string", + "title": "Lnd Grpc Endpoint" + }, + "lnd_grpc_cert": { + "type": "string", + "title": "Lnd Grpc Cert" + }, + "lnd_grpc_port": { + "type": "integer", + "title": "Lnd Grpc Port" + }, + "lnd_grpc_admin_macaroon": { + "type": "string", + "title": "Lnd Grpc Admin Macaroon" + }, + "lnd_grpc_invoice_macaroon": { + "type": "string", + "title": "Lnd Grpc Invoice Macaroon" + }, + "lnd_grpc_macaroon": { + "type": "string", + "title": "Lnd Grpc Macaroon" + }, + "lnd_grpc_macaroon_encrypted": { + "type": "string", + "title": "Lnd Grpc Macaroon Encrypted" + }, + "lnd_rest_endpoint": { + "type": "string", + "title": "Lnd Rest Endpoint" + }, + "lnd_rest_cert": { + "type": "string", + "title": "Lnd Rest Cert" + }, + "lnd_rest_macaroon": { + "type": "string", + "title": "Lnd Rest Macaroon" + }, + "lnd_rest_macaroon_encrypted": { + "type": "string", + "title": "Lnd Rest Macaroon Encrypted" + }, + "lnd_rest_route_hints": { + "type": "boolean", + "title": "Lnd Rest Route Hints", + "default": true + }, + "lnd_rest_allow_self_payment": { + "type": "boolean", + "title": "Lnd Rest Allow Self Payment", + "default": false + }, + "lnd_cert": { + "type": "string", + "title": "Lnd Cert" + }, + "lnd_admin_macaroon": { + "type": "string", + "title": "Lnd Admin Macaroon" + }, + "lnd_invoice_macaroon": { + "type": "string", + "title": "Lnd Invoice Macaroon" + }, + "lnd_rest_admin_macaroon": { + "type": "string", + "title": "Lnd Rest Admin Macaroon" + }, + "lnd_rest_invoice_macaroon": { + "type": "string", + "title": "Lnd Rest Invoice Macaroon" + }, + "eclair_url": { + "type": "string", + "title": "Eclair Url" + }, + "eclair_pass": { + "type": "string", + "title": "Eclair Pass" + }, + "corelightning_rest_url": { + "type": "string", + "title": "Corelightning Rest Url" + }, + "corelightning_rest_macaroon": { + "type": "string", + "title": "Corelightning Rest Macaroon" + }, + "corelightning_rest_cert": { + "type": "string", + "title": "Corelightning Rest Cert" + }, + "corelightning_rpc": { + "type": "string", + "title": "Corelightning Rpc" + }, + "corelightning_pay_command": { + "type": "string", + "title": "Corelightning Pay Command", + "default": "pay" + }, + "clightning_rpc": { + "type": "string", + "title": "Clightning Rpc" + }, + "clnrest_url": { + "type": "string", + "title": "Clnrest Url" + }, + "clnrest_ca": { + "type": "string", + "title": "Clnrest Ca" + }, + "clnrest_cert": { + "type": "string", + "title": "Clnrest Cert" + }, + "clnrest_readonly_rune": { + "type": "string", + "title": "Clnrest Readonly Rune" + }, + "clnrest_invoice_rune": { + "type": "string", + "title": "Clnrest Invoice Rune" + }, + "clnrest_pay_rune": { + "type": "string", + "title": "Clnrest Pay Rune" + }, + "clnrest_renepay_rune": { + "type": "string", + "title": "Clnrest Renepay Rune" + }, + "clnrest_last_pay_index": { + "type": "string", + "title": "Clnrest Last Pay Index" + }, + "clnrest_nodeid": { + "type": "string", + "title": "Clnrest Nodeid" + }, + "cliche_endpoint": { + "type": "string", + "title": "Cliche Endpoint" + }, + "lnbits_endpoint": { + "type": "string", + "title": "Lnbits Endpoint", + "default": "https://demo.lnbits.com" + }, + "lnbits_key": { + "type": "string", + "title": "Lnbits Key" + }, + "lnbits_admin_key": { + "type": "string", + "title": "Lnbits Admin Key" + }, + "lnbits_invoice_key": { + "type": "string", + "title": "Lnbits Invoice Key" + }, + "fake_wallet_secret": { + "type": "string", + "title": "Fake Wallet Secret", + "default": "ToTheMoon1" + }, + "lnbits_denomination": { + "type": "string", + "title": "Lnbits Denomination", + "default": "sats" + }, + "lnbits_backend_wallet_class": { + "type": "string", + "title": "Lnbits Backend Wallet Class", + "default": "VoidWallet" + }, + "lnbits_funding_source_pay_invoice_wait_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Funding Source Pay Invoice Wait Seconds", + "default": 5 + }, + "funding_source_max_retries": { + "type": "integer", + "minimum": 0, + "title": "Funding Source Max Retries", + "default": 4 + }, + "lnbits_nostr_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Nostr Notifications Enabled", + "default": false + }, + "lnbits_nostr_notifications_private_key": { + "type": "string", + "title": "Lnbits Nostr Notifications Private Key", + "default": "" + }, + "lnbits_nostr_notifications_identifiers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Nostr Notifications Identifiers", + "default": [] + }, + "lnbits_telegram_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Telegram Notifications Enabled", + "default": false + }, + "lnbits_telegram_notifications_access_token": { + "type": "string", + "title": "Lnbits Telegram Notifications Access Token", + "default": "" + }, + "lnbits_telegram_notifications_chat_id": { + "type": "string", + "title": "Lnbits Telegram Notifications Chat Id", + "default": "" + }, + "lnbits_email_notifications_enabled": { + "type": "boolean", + "title": "Lnbits Email Notifications Enabled", + "default": false + }, + "lnbits_email_notifications_email": { + "type": "string", + "title": "Lnbits Email Notifications Email", + "default": "" + }, + "lnbits_email_notifications_username": { + "type": "string", + "title": "Lnbits Email Notifications Username", + "default": "" + }, + "lnbits_email_notifications_password": { + "type": "string", + "title": "Lnbits Email Notifications Password", + "default": "" + }, + "lnbits_email_notifications_server": { + "type": "string", + "title": "Lnbits Email Notifications Server", + "default": "smtp.protonmail.ch" + }, + "lnbits_email_notifications_port": { + "type": "integer", + "title": "Lnbits Email Notifications Port", + "default": 587 + }, + "lnbits_email_notifications_to_emails": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Email Notifications To Emails", + "default": [] + }, + "lnbits_notification_settings_update": { + "type": "boolean", + "title": "Lnbits Notification Settings Update", + "default": true + }, + "lnbits_notification_credit_debit": { + "type": "boolean", + "title": "Lnbits Notification Credit Debit", + "default": true + }, + "notification_balance_delta_threshold_sats": { + "type": "integer", + "minimum": 0, + "title": "Notification Balance Delta Threshold Sats", + "default": 1 + }, + "lnbits_notification_server_start_stop": { + "type": "boolean", + "title": "Lnbits Notification Server Start Stop", + "default": true + }, + "lnbits_notification_watchdog": { + "type": "boolean", + "title": "Lnbits Notification Watchdog", + "default": false + }, + "lnbits_notification_server_status_hours": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Notification Server Status Hours", + "default": 24 + }, + "lnbits_notification_incoming_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Notification Incoming Payment Amount Sats", + "default": 1000000 + }, + "lnbits_notification_outgoing_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Notification Outgoing Payment Amount Sats", + "default": 1000000 + }, + "lnbits_rate_limit_no": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Rate Limit No", + "default": 200 + }, + "lnbits_rate_limit_unit": { + "type": "string", + "title": "Lnbits Rate Limit Unit", + "default": "minute" + }, + "lnbits_allowed_ips": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Ips", + "default": [] + }, + "lnbits_blocked_ips": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Blocked Ips", + "default": [] + }, + "lnbits_callback_url_rules": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Callback Url Rules", + "default": [ + "https?://([a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})(:\\d+)?" + ] + }, + "lnbits_wallet_limit_max_balance": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Max Balance", + "default": 0 + }, + "lnbits_wallet_limit_daily_max_withdraw": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Daily Max Withdraw", + "default": 0 + }, + "lnbits_wallet_limit_secs_between_trans": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Wallet Limit Secs Between Trans", + "default": 0 + }, + "lnbits_only_allow_incoming_payments": { + "type": "boolean", + "title": "Lnbits Only Allow Incoming Payments", + "default": false + }, + "lnbits_watchdog_switch_to_voidwallet": { + "type": "boolean", + "title": "Lnbits Watchdog Switch To Voidwallet", + "default": false + }, + "lnbits_watchdog_interval_minutes": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Watchdog Interval Minutes", + "default": 60 + }, + "lnbits_watchdog_delta": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "Lnbits Watchdog Delta", + "default": 1000000 + }, + "lnbits_max_outgoing_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Outgoing Payment Amount Sats", + "default": 10000000 + }, + "lnbits_max_incoming_payment_amount_sats": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Incoming Payment Amount Sats", + "default": 10000000 + }, + "lnbits_exchange_rate_cache_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange Rate Cache Seconds", + "default": 30 + }, + "lnbits_exchange_history_size": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange History Size", + "default": 60 + }, + "lnbits_exchange_history_refresh_interval_seconds": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Exchange History Refresh Interval Seconds", + "default": 300 + }, + "lnbits_exchange_rate_providers": { + "items": { + "$ref": "#/components/schemas/ExchangeRateProvider" + }, + "type": "array", + "title": "Lnbits Exchange Rate Providers", + "default": [ + { + "name": "Binance", + "api_url": "https://api.binance.com/api/v3/ticker/price?symbol=BTC{TO}", + "path": "$.price", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [ + "USD:USDT" + ] + }, + { + "name": "Blockchain", + "api_url": "https://blockchain.info/frombtc?currency={TO}&value=100000000", + "path": "", + "exclude_to": [], + "ticker_conversion": [] + }, + { + "name": "Exir", + "api_url": "https://api.exir.io/v1/ticker?symbol=btc-{to}", + "path": "$.last", + "exclude_to": [ + "czk", + "eur" + ], + "ticker_conversion": [ + "USD:USDT" + ] + }, + { + "name": "Bitfinex", + "api_url": "https://api.bitfinex.com/v1/pubticker/btc{to}", + "path": "$.last_price", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "Bitstamp", + "api_url": "https://www.bitstamp.net/api/v2/ticker/btc{to}/", + "path": "$.last", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "Coinbase", + "api_url": "https://api.coinbase.com/v2/exchange-rates?currency=BTC", + "path": "$.data.rates.{TO}", + "exclude_to": [], + "ticker_conversion": [] + }, + { + "name": "Kraken", + "api_url": "https://api.kraken.com/0/public/Ticker?pair=XBT{TO}", + "path": "$.result.XXBTZ{TO}.c[0]", + "exclude_to": [ + "czk" + ], + "ticker_conversion": [] + }, + { + "name": "yadio", + "api_url": "https://api.yadio.io/exrates/BTC", + "path": "$.BTC.{TO}", + "exclude_to": [], + "ticker_conversion": [] + } + ] + }, + "lnbits_reserve_fee_min": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Reserve Fee Min", + "default": 2000 + }, + "lnbits_reserve_fee_percent": { + "type": "number", + "minimum": 0, + "title": "Lnbits Reserve Fee Percent", + "default": 1 + }, + "lnbits_service_fee": { + "type": "number", + "minimum": 0, + "title": "Lnbits Service Fee", + "default": 0 + }, + "lnbits_service_fee_ignore_internal": { + "type": "boolean", + "title": "Lnbits Service Fee Ignore Internal", + "default": true + }, + "lnbits_service_fee_max": { + "type": "integer", + "title": "Lnbits Service Fee Max", + "default": 0 + }, + "lnbits_service_fee_wallet": { + "type": "string", + "title": "Lnbits Service Fee Wallet" + }, + "lnbits_max_asset_size_mb": { + "type": "number", + "minimum": 0, + "title": "Lnbits Max Asset Size Mb", + "default": 2.5 + }, + "lnbits_assets_allowed_mime_types": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Assets Allowed Mime Types", + "default": [ + "image/png", + "image/jpeg", + "image/jpg", + "image/heic", + "image/heif", + "image/heics", + "png", + "jpeg", + "jpg", + "heic", + "heif", + "heics" + ] + }, + "lnbits_asset_thumbnail_width": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Asset Thumbnail Width", + "default": 128 + }, + "lnbits_asset_thumbnail_height": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Asset Thumbnail Height", + "default": 128 + }, + "lnbits_asset_thumbnail_format": { + "type": "string", + "title": "Lnbits Asset Thumbnail Format", + "default": "png" + }, + "lnbits_max_assets_per_user": { + "type": "integer", + "minimum": 0, + "title": "Lnbits Max Assets Per User", + "default": 1 + }, + "lnbits_assets_no_limit_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Assets No Limit Users", + "default": [] + }, + "lnbits_baseurl": { + "type": "string", + "title": "Lnbits Baseurl", + "default": "http://127.0.0.1:5000/" + }, + "lnbits_hide_api": { + "type": "boolean", + "title": "Lnbits Hide Api", + "default": false + }, + "lnbits_site_title": { + "type": "string", + "title": "Lnbits Site Title", + "default": "LNbits" + }, + "lnbits_site_tagline": { + "type": "string", + "title": "Lnbits Site Tagline", + "default": "free and open-source lightning wallet" + }, + "lnbits_site_description": { + "type": "string", + "title": "Lnbits Site Description", + "default": "The world's most powerful suite of bitcoin tools." + }, + "lnbits_show_home_page_elements": { + "type": "boolean", + "title": "Lnbits Show Home Page Elements", + "default": true + }, + "lnbits_default_wallet_name": { + "type": "string", + "title": "Lnbits Default Wallet Name", + "default": "LNbits wallet" + }, + "lnbits_custom_badge": { + "type": "string", + "title": "Lnbits Custom Badge" + }, + "lnbits_custom_badge_color": { + "type": "string", + "title": "Lnbits Custom Badge Color", + "default": "warning" + }, + "lnbits_theme_options": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Theme Options", + "default": [ + "classic", + "freedom", + "mint", + "salvador", + "monochrome", + "autumn", + "cyber", + "flamingo", + "bitcoin" + ] + }, + "lnbits_custom_logo": { + "type": "string", + "title": "Lnbits Custom Logo" + }, + "lnbits_custom_image": { + "type": "string", + "title": "Lnbits Custom Image", + "default": "/static/images/logos/lnbits.svg" + }, + "lnbits_ad_space_title": { + "type": "string", + "title": "Lnbits Ad Space Title", + "default": "Supported by" + }, + "lnbits_ad_space": { + "type": "string", + "title": "Lnbits Ad Space", + "default": "https://shop.lnbits.com/;/static/images/bitcoin-shop-banner.png;/static/images/bitcoin-shop-banner.png,https://affil.trezor.io/aff_c?offer_id=169&aff_id=33845;/static/images/bitcoin-hardware-wallet.png;/static/images/bitcoin-hardware-wallet.png,https://firefish.io/?ref=lnbits;/static/images/firefish.png;/static/images/firefish.png,https://opensats.org/;/static/images/open-sats.png;/static/images/open-sats.png" + }, + "lnbits_ad_space_enabled": { + "type": "boolean", + "title": "Lnbits Ad Space Enabled", + "default": false + }, + "lnbits_allowed_currencies": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Currencies", + "default": [] + }, + "lnbits_default_accounting_currency": { + "type": "string", + "title": "Lnbits Default Accounting Currency" + }, + "lnbits_qr_logo": { + "type": "string", + "title": "Lnbits Qr Logo", + "default": "/static/images/favicon_qr_logo.png" + }, + "lnbits_apple_touch_icon": { + "type": "string", + "title": "Lnbits Apple Touch Icon" + }, + "lnbits_default_reaction": { + "type": "string", + "title": "Lnbits Default Reaction", + "default": "confettiBothSides" + }, + "lnbits_default_theme": { + "type": "string", + "title": "Lnbits Default Theme", + "default": "salvador" + }, + "lnbits_default_border": { + "type": "string", + "title": "Lnbits Default Border", + "default": "hard-border" + }, + "lnbits_default_gradient": { + "type": "boolean", + "title": "Lnbits Default Gradient", + "default": true + }, + "lnbits_default_bgimage": { + "type": "string", + "title": "Lnbits Default Bgimage" + }, + "lnbits_admin_extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Admin Extensions", + "default": [] + }, + "lnbits_user_default_extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits User Default Extensions", + "default": [] + }, + "lnbits_extensions_deactivate_all": { + "type": "boolean", + "title": "Lnbits Extensions Deactivate All", + "default": false + }, + "lnbits_extensions_builder_activate_non_admins": { + "type": "boolean", + "title": "Lnbits Extensions Builder Activate Non Admins", + "default": false + }, + "lnbits_extensions_reviews_url": { + "type": "string", + "title": "Lnbits Extensions Reviews Url", + "description": "\n URL for the paid reviews.\n Regular users can view this URL (not secret).\n ", + "default": "https://demo.lnbits.com/paidreviews/api/v1/AdFzLjzuKFLsdk4Bcnff6r" + }, + "lnbits_extensions_manifests": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Extensions Manifests", + "default": [ + "https://raw.githubusercontent.com/lnbits/lnbits-extensions/main/extensions.json" + ] + }, + "lnbits_extensions_builder_manifest_url": { + "type": "string", + "title": "Lnbits Extensions Builder Manifest Url", + "default": "https://raw.githubusercontent.com/lnbits/extension_builder_stub/refs/heads/main/manifest.json" + }, + "lnbits_admin_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Admin Users", + "default": [] + }, + "lnbits_allowed_users": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lnbits Allowed Users", + "default": [] + }, + "lnbits_allow_new_accounts": { + "type": "boolean", + "title": "Lnbits Allow New Accounts", + "default": true + } + }, + "additionalProperties": false, + "type": "object", + "title": "UpdateSettings" + }, + "UpdateSuperuserPassword": { + "properties": { + "username": { + "type": "string", + "maxLength": 20, + "minLength": 2, + "title": "Username" + }, + "password": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password" + }, + "password_repeat": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password Repeat" + } + }, + "type": "object", + "required": [ + "username", + "password", + "password_repeat" + ], + "title": "UpdateSuperuserPassword" + }, + "UpdateUser": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "username": { + "type": "string", + "maxLength": 20, + "minLength": 2, + "title": "Username" + }, + "extra": { + "$ref": "#/components/schemas/UserExtra" + } + }, + "type": "object", + "required": [ + "user_id", + "username" + ], + "title": "UpdateUser" + }, + "UpdateUserPassword": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "password_old": { + "type": "string", + "title": "Password Old" + }, + "password": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password" + }, + "password_repeat": { + "type": "string", + "maxLength": 50, + "minLength": 8, + "title": "Password Repeat" + }, + "username": { + "type": "string", + "maxLength": 20, + "minLength": 2, + "title": "Username" + } + }, + "type": "object", + "required": [ + "user_id", + "password", + "password_repeat", + "username" + ], + "title": "UpdateUserPassword" + }, + "UpdateUserPubkey": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "pubkey": { + "type": "string", + "maxLength": 64, + "title": "Pubkey" + } + }, + "type": "object", + "required": [ + "user_id", + "pubkey" + ], + "title": "UpdateUserPubkey" + }, + "UrlAction": { + "properties": { + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/LnurlPaySuccessActionTag" + } + ], + "default": "url" + }, + "url": { + "type": "string", + "maxLength": 2047, + "minLength": 1, + "format": "uri", + "title": "Url" + }, + "description": { + "type": "string", + "maxLength": 144, + "title": "Description" + } + }, + "type": "object", + "required": [ + "url", + "description" + ], + "title": "UrlAction" + }, + "User": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "email": { + "type": "string", + "title": "Email" + }, + "username": { + "type": "string", + "title": "Username" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "external_id": { + "type": "string", + "title": "External Id" + }, + "extensions": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Extensions", + "default": [] + }, + "wallets": { + "items": { + "$ref": "#/components/schemas/Wallet" + }, + "type": "array", + "title": "Wallets", + "default": [] + }, + "admin": { + "type": "boolean", + "title": "Admin", + "default": false + }, + "super_user": { + "type": "boolean", + "title": "Super User", + "default": false + }, + "fiat_providers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fiat Providers", + "default": [] + }, + "has_password": { + "type": "boolean", + "title": "Has Password", + "default": false + }, + "extra": { + "allOf": [ + { + "$ref": "#/components/schemas/UserExtra" + } + ], + "title": "Extra", + "default": { + "email_verified": false, + "provider": "lnbits", + "visible_wallet_count": 10, + "notifications": { + "excluded_wallets": [], + "outgoing_payments_sats": 0, + "incoming_payments_sats": 0 + }, + "wallet_invite_requests": [], + "labels": [] + } + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "updated_at" + ], + "title": "User" + }, + "UserAcls": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "access_control_list": { + "items": { + "$ref": "#/components/schemas/AccessControlList" + }, + "type": "array", + "title": "Access Control List", + "default": [] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id" + ], + "title": "UserAcls" + }, + "UserExtra": { + "properties": { + "email_verified": { + "type": "boolean", + "title": "Email Verified", + "default": false + }, + "first_name": { + "type": "string", + "title": "First Name" + }, + "last_name": { + "type": "string", + "title": "Last Name" + }, + "display_name": { + "type": "string", + "title": "Display Name" + }, + "picture": { + "type": "string", + "title": "Picture" + }, + "provider": { + "type": "string", + "title": "Provider", + "default": "lnbits" + }, + "visible_wallet_count": { + "type": "integer", + "title": "Visible Wallet Count", + "default": 10 + }, + "notifications": { + "allOf": [ + { + "$ref": "#/components/schemas/UserNotifications" + } + ], + "title": "Notifications", + "default": { + "excluded_wallets": [], + "outgoing_payments_sats": 0, + "incoming_payments_sats": 0 + } + }, + "wallet_invite_requests": { + "items": { + "$ref": "#/components/schemas/WalletInviteRequest" + }, + "type": "array", + "title": "Wallet Invite Requests", + "default": [] + }, + "labels": { + "items": { + "$ref": "#/components/schemas/UserLabel" + }, + "type": "array", + "title": "Labels", + "default": [] + } + }, + "type": "object", + "title": "UserExtra" + }, + "UserLabel": { + "properties": { + "name": { + "type": "string", + "pattern": "([A-Za-z0-9 ._-]{1,100}$)", + "title": "Name" + }, + "description": { + "type": "string", + "maxLength": 250, + "title": "Description" + }, + "color": { + "type": "string", + "pattern": "^#[0-9A-Fa-f]{6}$", + "title": "Color" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "UserLabel" + }, + "UserNotifications": { + "properties": { + "nostr_identifier": { + "type": "string", + "title": "Nostr Identifier" + }, + "telegram_chat_id": { + "type": "string", + "title": "Telegram Chat Id" + }, + "email_address": { + "type": "string", + "title": "Email Address" + }, + "excluded_wallets": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Excluded Wallets", + "default": [] + }, + "outgoing_payments_sats": { + "type": "integer", + "title": "Outgoing Payments Sats", + "default": 0 + }, + "incoming_payments_sats": { + "type": "integer", + "title": "Incoming Payments Sats", + "default": 0 + } + }, + "type": "object", + "title": "UserNotifications" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "Wallet": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user": { + "type": "string", + "title": "User" + }, + "wallet_type": { + "type": "string", + "title": "Wallet Type", + "default": "lightning" + }, + "adminkey": { + "type": "string", + "title": "Adminkey" + }, + "inkey": { + "type": "string", + "title": "Inkey" + }, + "name": { + "type": "string", + "title": "Name" + }, + "shared_wallet_id": { + "type": "string", + "title": "Shared Wallet Id" + }, + "deleted": { + "type": "boolean", + "title": "Deleted", + "default": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "balance_msat": { + "type": "integer", + "title": "Balance Msat", + "default": 0, + "no_database": true + }, + "extra": { + "allOf": [ + { + "$ref": "#/components/schemas/WalletExtra" + } + ], + "title": "Extra", + "default": { + "icon": "flash_on", + "color": "primary", + "pinned": false, + "shared_with": [] + } + }, + "stored_paylinks": { + "allOf": [ + { + "$ref": "#/components/schemas/StoredPayLinks" + } + ], + "title": "Stored Paylinks", + "default": { + "links": [] + } + }, + "share_permissions": { + "items": { + "$ref": "#/components/schemas/WalletPermission" + }, + "type": "array", + "default": [], + "no_database": true + } + }, + "type": "object", + "required": [ + "id", + "user", + "adminkey", + "inkey", + "name" + ], + "title": "Wallet" + }, + "WalletAccount": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "user": { + "type": "string", + "title": "User" + }, + "masterpub": { + "type": "string", + "title": "Masterpub" + }, + "fingerprint": { + "type": "string", + "title": "Fingerprint" + }, + "title": { + "type": "string", + "title": "Title" + }, + "address_no": { + "type": "integer", + "title": "Address No" + }, + "balance": { + "type": "integer", + "title": "Balance" + }, + "type": { + "type": "string", + "title": "Type", + "default": "" + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + }, + "meta": { + "type": "string", + "title": "Meta", + "default": "{}" + } + }, + "type": "object", + "required": [ + "id", + "user", + "masterpub", + "fingerprint", + "title", + "address_no", + "balance" + ], + "title": "WalletAccount" + }, + "WalletExtra": { + "properties": { + "icon": { + "type": "string", + "title": "Icon", + "default": "flash_on" + }, + "color": { + "type": "string", + "title": "Color", + "default": "primary" + }, + "pinned": { + "type": "boolean", + "title": "Pinned", + "default": false + }, + "shared_with": { + "items": { + "$ref": "#/components/schemas/WalletSharePermission" + }, + "type": "array", + "title": "Shared With", + "default": [] + } + }, + "type": "object", + "title": "WalletExtra" + }, + "WalletInviteRequest": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "from_user_name": { + "type": "string", + "title": "From User Name" + }, + "to_wallet_id": { + "type": "string", + "title": "To Wallet Id" + }, + "to_wallet_name": { + "type": "string", + "title": "To Wallet Name" + } + }, + "type": "object", + "required": [ + "request_id", + "to_wallet_id", + "to_wallet_name" + ], + "title": "WalletInviteRequest" + }, + "WalletPermission": { + "enum": [ + "view-payments", + "receive-payments", + "send-payments" + ], + "title": "WalletPermission", + "description": "An enumeration." + }, + "WalletSharePermission": { + "properties": { + "request_id": { + "type": "string", + "title": "Request Id" + }, + "username": { + "type": "string", + "title": "Username" + }, + "shared_with_wallet_id": { + "type": "string", + "title": "Shared With Wallet Id" + }, + "permissions": { + "items": { + "$ref": "#/components/schemas/WalletPermission" + }, + "type": "array", + "default": [] + }, + "status": { + "$ref": "#/components/schemas/WalletShareStatus" + }, + "comment": { + "type": "string", + "title": "Comment" + } + }, + "type": "object", + "required": [ + "username", + "status" + ], + "title": "WalletSharePermission" + }, + "WalletShareStatus": { + "enum": [ + "invite_sent", + "approved" + ], + "title": "WalletShareStatus", + "description": "An enumeration." + }, + "WalletType": { + "enum": [ + "lightning", + "lightning-shared" + ], + "title": "WalletType", + "description": "An enumeration." + }, + "WebPushSubscription": { + "properties": { + "endpoint": { + "type": "string", + "title": "Endpoint" + }, + "user": { + "type": "string", + "title": "User" + }, + "data": { + "type": "string", + "title": "Data" + }, + "host": { + "type": "string", + "title": "Host" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + } + }, + "type": "object", + "required": [ + "endpoint", + "user", + "data", + "host", + "timestamp" + ], + "title": "WebPushSubscription" + }, + "Webhook": { + "properties": { + "method": { + "type": "string", + "title": "Method", + "default": "GET" + }, + "url": { + "type": "string", + "title": "Url", + "default": "" + }, + "headers": { + "type": "string", + "title": "Headers", + "default": "" + }, + "data": { + "type": "string", + "title": "Data", + "default": "" + } + }, + "type": "object", + "title": "Webhook" + }, + "Zone": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "cost": { + "type": "number", + "title": "Cost" + }, + "countries": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Countries", + "default": [] + } + }, + "type": "object", + "required": [ + "currency", + "cost" + ], + "title": "Zone" + }, + "bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Bitcoinswitch": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Switch" + }, + "type": "array", + "title": "Switches" + }, + "password": { + "type": "string", + "title": "Password" + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "key": { + "type": "string", + "title": "Key", + "default": "" + } + }, + "type": "object", + "required": [ + "id", + "title", + "wallet", + "currency", + "switches" + ], + "title": "Bitcoinswitch" + }, + "bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__BitcoinswitchPublic": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Switch" + }, + "type": "array", + "title": "Switches" + } + }, + "type": "object", + "required": [ + "title", + "switches" + ], + "title": "BitcoinswitchPublic" + }, + "bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__CreateBitcoinswitch": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Switch" + }, + "type": "array", + "title": "Switches" + }, + "password": { + "type": "string", + "title": "Password" + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + } + }, + "type": "object", + "required": [ + "title", + "wallet", + "currency", + "switches" + ], + "title": "CreateBitcoinswitch" + }, + "bitcoinswitch-8715f08de1b61f677158deff429532ef8285d5e0c22ffecb2ef39853869fdc16__models__Switch": { + "properties": { + "amount": { + "type": "number", + "title": "Amount", + "default": 0 + }, + "duration": { + "type": "integer", + "title": "Duration", + "default": 0 + }, + "pin": { + "type": "integer", + "title": "Pin", + "default": 0 + }, + "comment": { + "type": "boolean", + "title": "Comment", + "default": false + }, + "variable": { + "type": "boolean", + "title": "Variable", + "default": false + }, + "label": { + "type": "string", + "title": "Label" + } + }, + "type": "object", + "title": "Switch" + }, + "boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Card": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "card_name": { + "type": "string", + "title": "Card Name" + }, + "uid": { + "type": "string", + "title": "Uid" + }, + "external_id": { + "type": "string", + "title": "External Id" + }, + "counter": { + "type": "integer", + "title": "Counter" + }, + "tx_limit": { + "type": "integer", + "title": "Tx Limit" + }, + "daily_limit": { + "type": "integer", + "title": "Daily Limit" + }, + "enable": { + "type": "boolean", + "title": "Enable" + }, + "k0": { + "type": "string", + "title": "K0" + }, + "k1": { + "type": "string", + "title": "K1" + }, + "k2": { + "type": "string", + "title": "K2" + }, + "prev_k0": { + "type": "string", + "title": "Prev K0" + }, + "prev_k1": { + "type": "string", + "title": "Prev K1" + }, + "prev_k2": { + "type": "string", + "title": "Prev K2" + }, + "otp": { + "type": "string", + "title": "Otp" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "card_name", + "uid", + "external_id", + "counter", + "tx_limit", + "daily_limit", + "enable", + "k0", + "k1", + "k2", + "prev_k0", + "prev_k1", + "prev_k2", + "otp", + "time" + ], + "title": "Card" + }, + "boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__CreateCardData": { + "properties": { + "card_name": { + "type": "string", + "title": "Card Name" + }, + "uid": { + "type": "string", + "title": "Uid" + }, + "counter": { + "type": "integer", + "title": "Counter", + "default": 0 + }, + "tx_limit": { + "type": "integer", + "title": "Tx Limit", + "default": 0 + }, + "daily_limit": { + "type": "integer", + "title": "Daily Limit", + "default": 0 + }, + "enable": { + "type": "boolean", + "title": "Enable", + "default": true + }, + "k0": { + "type": "string", + "title": "K0", + "default": "00000000000000000000000000000000" + }, + "k1": { + "type": "string", + "title": "K1", + "default": "00000000000000000000000000000000" + }, + "k2": { + "type": "string", + "title": "K2", + "default": "00000000000000000000000000000000" + }, + "prev_k0": { + "type": "string", + "title": "Prev K0", + "default": "00000000000000000000000000000000" + }, + "prev_k1": { + "type": "string", + "title": "Prev K1", + "default": "00000000000000000000000000000000" + }, + "prev_k2": { + "type": "string", + "title": "Prev K2", + "default": "00000000000000000000000000000000" + } + }, + "type": "object", + "required": [ + "card_name", + "uid" + ], + "title": "CreateCardData" + }, + "boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Hit": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "card_id": { + "type": "string", + "title": "Card Id" + }, + "ip": { + "type": "string", + "title": "Ip" + }, + "spent": { + "type": "boolean", + "title": "Spent" + }, + "useragent": { + "type": "string", + "title": "Useragent" + }, + "old_ctr": { + "type": "integer", + "title": "Old Ctr" + }, + "new_ctr": { + "type": "integer", + "title": "New Ctr" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "card_id", + "ip", + "spent", + "useragent", + "old_ctr", + "new_ctr", + "amount", + "time" + ], + "title": "Hit" + }, + "boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__Refund": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "hit_id": { + "type": "string", + "title": "Hit Id" + }, + "refund_amount": { + "type": "integer", + "title": "Refund Amount" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "hit_id", + "refund_amount", + "time" + ], + "title": "Refund" + }, + "boltcards-438c588c4df57ee50b58793a923c332a41bf7a7ae88ef179588f16f02abee7f9__models__UIDPost": { + "properties": { + "UID": { + "type": "string", + "title": "Uid", + "description": "The UID of the card." + }, + "LNURLW": { + "type": "string", + "title": "Lnurlw", + "description": "The LNURLW of the card." + } + }, + "type": "object", + "title": "UIDPost" + }, + "lnbits__core__models__wallets__CreateWallet": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "wallet_type": { + "allOf": [ + { + "$ref": "#/components/schemas/WalletType" + } + ], + "default": "lightning" + }, + "shared_wallet_id": { + "type": "string", + "title": "Shared Wallet Id" + } + }, + "type": "object", + "title": "CreateWallet" + }, + "lnbits__extensions__bitcoinswitch__models__Bitcoinswitch": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Switch" + }, + "type": "array", + "title": "Switches" + }, + "password": { + "type": "string", + "title": "Password" + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "key": { + "type": "string", + "title": "Key", + "default": "" + } + }, + "type": "object", + "required": [ + "id", + "title", + "wallet", + "currency", + "switches" + ], + "title": "Bitcoinswitch" + }, + "lnbits__extensions__bitcoinswitch__models__BitcoinswitchPublic": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Switch" + }, + "type": "array", + "title": "Switches" + } + }, + "type": "object", + "required": [ + "title", + "switches" + ], + "title": "BitcoinswitchPublic" + }, + "lnbits__extensions__bitcoinswitch__models__CreateBitcoinswitch": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "switches": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__bitcoinswitch__models__Switch" + }, + "type": "array", + "title": "Switches" + }, + "password": { + "type": "string", + "title": "Password" + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "disposable": { + "type": "boolean", + "title": "Disposable", + "default": true + } + }, + "type": "object", + "required": [ + "title", + "wallet", + "currency", + "switches" + ], + "title": "CreateBitcoinswitch" + }, + "lnbits__extensions__bitcoinswitch__models__Switch": { + "properties": { + "amount": { + "type": "number", + "title": "Amount", + "default": 0 + }, + "duration": { + "type": "integer", + "title": "Duration", + "default": 0 + }, + "pin": { + "type": "integer", + "title": "Pin", + "default": 0 + }, + "comment": { + "type": "boolean", + "title": "Comment", + "default": false + }, + "variable": { + "type": "boolean", + "title": "Variable", + "default": false + }, + "label": { + "type": "string", + "title": "Label" + } + }, + "type": "object", + "title": "Switch" + }, + "lnbits__extensions__boltcards__models__Card": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "card_name": { + "type": "string", + "title": "Card Name" + }, + "uid": { + "type": "string", + "title": "Uid" + }, + "external_id": { + "type": "string", + "title": "External Id" + }, + "counter": { + "type": "integer", + "title": "Counter" + }, + "tx_limit": { + "type": "integer", + "title": "Tx Limit" + }, + "daily_limit": { + "type": "integer", + "title": "Daily Limit" + }, + "enable": { + "type": "boolean", + "title": "Enable" + }, + "k0": { + "type": "string", + "title": "K0" + }, + "k1": { + "type": "string", + "title": "K1" + }, + "k2": { + "type": "string", + "title": "K2" + }, + "prev_k0": { + "type": "string", + "title": "Prev K0" + }, + "prev_k1": { + "type": "string", + "title": "Prev K1" + }, + "prev_k2": { + "type": "string", + "title": "Prev K2" + }, + "otp": { + "type": "string", + "title": "Otp" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "card_name", + "uid", + "external_id", + "counter", + "tx_limit", + "daily_limit", + "enable", + "k0", + "k1", + "k2", + "prev_k0", + "prev_k1", + "prev_k2", + "otp", + "time" + ], + "title": "Card" + }, + "lnbits__extensions__boltcards__models__CreateCardData": { + "properties": { + "card_name": { + "type": "string", + "title": "Card Name" + }, + "uid": { + "type": "string", + "title": "Uid" + }, + "counter": { + "type": "integer", + "title": "Counter", + "default": 0 + }, + "tx_limit": { + "type": "integer", + "title": "Tx Limit", + "default": 0 + }, + "daily_limit": { + "type": "integer", + "title": "Daily Limit", + "default": 0 + }, + "enable": { + "type": "boolean", + "title": "Enable", + "default": true + }, + "k0": { + "type": "string", + "title": "K0", + "default": "00000000000000000000000000000000" + }, + "k1": { + "type": "string", + "title": "K1", + "default": "00000000000000000000000000000000" + }, + "k2": { + "type": "string", + "title": "K2", + "default": "00000000000000000000000000000000" + }, + "prev_k0": { + "type": "string", + "title": "Prev K0", + "default": "00000000000000000000000000000000" + }, + "prev_k1": { + "type": "string", + "title": "Prev K1", + "default": "00000000000000000000000000000000" + }, + "prev_k2": { + "type": "string", + "title": "Prev K2", + "default": "00000000000000000000000000000000" + } + }, + "type": "object", + "required": [ + "card_name", + "uid" + ], + "title": "CreateCardData" + }, + "lnbits__extensions__boltcards__models__Hit": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "card_id": { + "type": "string", + "title": "Card Id" + }, + "ip": { + "type": "string", + "title": "Ip" + }, + "spent": { + "type": "boolean", + "title": "Spent" + }, + "useragent": { + "type": "string", + "title": "Useragent" + }, + "old_ctr": { + "type": "integer", + "title": "Old Ctr" + }, + "new_ctr": { + "type": "integer", + "title": "New Ctr" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "card_id", + "ip", + "spent", + "useragent", + "old_ctr", + "new_ctr", + "amount", + "time" + ], + "title": "Hit" + }, + "lnbits__extensions__boltcards__models__Refund": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "hit_id": { + "type": "string", + "title": "Hit Id" + }, + "refund_amount": { + "type": "integer", + "title": "Refund Amount" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "hit_id", + "refund_amount", + "time" + ], + "title": "Refund" + }, + "lnbits__extensions__boltcards__models__UIDPost": { + "properties": { + "UID": { + "type": "string", + "title": "Uid", + "description": "The UID of the card." + }, + "LNURLW": { + "type": "string", + "title": "Lnurlw", + "description": "The LNURLW of the card." + } + }, + "type": "object", + "required": [ + "UID", + "LNURLW" + ], + "title": "UIDPost" + }, + "lnbits__extensions__events__models__Ticket": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "event": { + "type": "string", + "title": "Event" + }, + "name": { + "type": "string", + "title": "Name" + }, + "email": { + "type": "string", + "title": "Email" + }, + "registered": { + "type": "boolean", + "title": "Registered" + }, + "paid": { + "type": "boolean", + "title": "Paid" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "reg_timestamp": { + "type": "string", + "format": "date-time", + "title": "Reg Timestamp" + } + }, + "type": "object", + "required": [ + "id", + "wallet", + "event", + "name", + "email", + "registered", + "paid", + "time", + "reg_timestamp" + ], + "title": "Ticket" + }, + "lnbits__extensions__lnticket__models__Ticket": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "form": { + "type": "string", + "title": "Form" + }, + "email": { + "type": "string", + "title": "Email" + }, + "ltext": { + "type": "string", + "title": "Ltext" + }, + "name": { + "type": "string", + "title": "Name" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "sats": { + "type": "integer", + "title": "Sats" + }, + "paid": { + "type": "boolean", + "title": "Paid" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + } + }, + "type": "object", + "required": [ + "id", + "form", + "email", + "ltext", + "name", + "wallet", + "sats", + "paid", + "time" + ], + "title": "Ticket" + }, + "lnbits__extensions__nostrclient__models__Config": { + "properties": { + "private_ws": { + "type": "boolean", + "title": "Private Ws", + "default": true + }, + "public_ws": { + "type": "boolean", + "title": "Public Ws", + "default": false + } + }, + "type": "object", + "title": "Config" + }, + "lnbits__extensions__nostrmarket__models__Order": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "event_id": { + "type": "string", + "title": "Event Id" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + }, + "public_key": { + "type": "string", + "title": "Public Key" + }, + "merchant_public_key": { + "type": "string", + "title": "Merchant Public Key" + }, + "shipping_id": { + "type": "string", + "title": "Shipping Id" + }, + "items": { + "items": { + "$ref": "#/components/schemas/OrderItem" + }, + "type": "array", + "title": "Items" + }, + "contact": { + "$ref": "#/components/schemas/OrderContact" + }, + "address": { + "type": "string", + "title": "Address" + }, + "stall_id": { + "type": "string", + "title": "Stall Id" + }, + "invoice_id": { + "type": "string", + "title": "Invoice Id" + }, + "total": { + "type": "number", + "title": "Total" + }, + "paid": { + "type": "boolean", + "title": "Paid", + "default": false + }, + "shipped": { + "type": "boolean", + "title": "Shipped", + "default": false + }, + "time": { + "type": "integer", + "title": "Time" + }, + "extra": { + "$ref": "#/components/schemas/OrderExtra" + } + }, + "type": "object", + "required": [ + "id", + "public_key", + "merchant_public_key", + "shipping_id", + "items", + "stall_id", + "invoice_id", + "total", + "extra" + ], + "title": "Order" + }, + "lnbits__extensions__nostrmarket__models__Product": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "stall_id": { + "type": "string", + "title": "Stall Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "categories": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Categories", + "default": [] + }, + "images": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Images", + "default": [] + }, + "price": { + "type": "number", + "title": "Price" + }, + "quantity": { + "type": "integer", + "title": "Quantity" + }, + "active": { + "type": "boolean", + "title": "Active", + "default": true + }, + "pending": { + "type": "boolean", + "title": "Pending", + "default": false + }, + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/ProductConfig" + } + ], + "title": "Config", + "default": { + "use_autoreply": false, + "shipping": [] + } + }, + "event_id": { + "type": "string", + "title": "Event Id" + }, + "event_created_at": { + "type": "integer", + "title": "Event Created At" + } + }, + "type": "object", + "required": [ + "stall_id", + "name", + "price", + "quantity" + ], + "title": "Product" + }, + "lnbits__extensions__nostrnip5__models__Address": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "owner_id": { + "type": "string", + "title": "Owner Id" + }, + "domain_id": { + "type": "string", + "title": "Domain Id" + }, + "local_part": { + "type": "string", + "title": "Local Part" + }, + "active": { + "type": "boolean", + "title": "Active" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "Time" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expires At" + }, + "pubkey": { + "type": "string", + "title": "Pubkey" + }, + "is_free": { + "type": "boolean", + "title": "Is Free", + "default": false + }, + "is_locked": { + "type": "boolean", + "title": "Is Locked", + "default": false + }, + "reimburse_amount": { + "type": "integer", + "title": "Reimburse Amount", + "default": 0 + }, + "promo_code_status": { + "allOf": [ + { + "$ref": "#/components/schemas/PromoCodeStatus" + } + ], + "title": "Promo Code Status", + "default": { + "allow_referer": false + }, + "no_database": true + }, + "extra": { + "allOf": [ + { + "$ref": "#/components/schemas/AddressExtra" + } + ], + "title": "Extra", + "default": { + "activated_by_owner": false, + "years": 1, + "max_years": 1, + "relays": [], + "ln_address": { + "wallet": "", + "min": 1, + "max": 10000000, + "pay_link_id": "" + } + } + } + }, + "type": "object", + "required": [ + "id", + "domain_id", + "local_part", + "active", + "time", + "expires_at" + ], + "title": "Address" + }, + "lnbits__extensions__sellcoins__models__Order": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "default": "" + }, + "product_id": { + "type": "string", + "title": "Product Id", + "default": "" + }, + "settings_id": { + "type": "string", + "title": "Settings Id", + "default": "" + }, + "email_to": { + "type": "string", + "title": "Email To", + "default": "" + }, + "nostr_key": { + "type": "string", + "title": "Nostr Key", + "default": "" + }, + "status": { + "type": "string", + "title": "Status", + "default": "" + }, + "payment_request": { + "type": "string", + "title": "Payment Request", + "default": "" + }, + "payment_hash": { + "type": "string", + "title": "Payment Hash", + "default": "" + }, + "sats_amount": { + "type": "integer", + "title": "Sats Amount", + "default": 0 + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At", + "default": "2026-01-12T11:50:09.981878+00:00" + } + }, + "type": "object", + "title": "Order" + }, + "lnbits__extensions__sellcoins__models__Product": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "default": "" + }, + "settings_id": { + "type": "string", + "title": "Settings Id", + "default": "" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + }, + "amount": { + "type": "integer", + "title": "Amount" + }, + "price": { + "type": "integer", + "title": "Price" + } + }, + "type": "object", + "title": "Product" + }, + "lnbits__extensions__tpos__models__CreateTposData": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "tax_inclusive": { + "type": "boolean", + "title": "Tax Inclusive", + "default": true + }, + "tax_default": { + "type": "number", + "title": "Tax Default", + "default": 0 + }, + "tip_options": { + "type": "string", + "title": "Tip Options", + "default": "[]" + }, + "tip_wallet": { + "type": "string", + "title": "Tip Wallet", + "default": "" + }, + "withdraw_time": { + "type": "integer", + "title": "Withdraw Time", + "default": 0 + }, + "withdraw_between": { + "type": "integer", + "minimum": 1, + "title": "Withdraw Between", + "default": 10 + }, + "withdraw_limit": { + "type": "integer", + "minimum": 1, + "title": "Withdraw Limit" + }, + "withdraw_time_option": { + "type": "string", + "title": "Withdraw Time Option" + }, + "withdraw_premium": { + "type": "number", + "title": "Withdraw Premium" + }, + "lnaddress": { + "type": "boolean", + "title": "Lnaddress", + "default": false + }, + "lnaddress_cut": { + "type": "integer", + "title": "Lnaddress Cut", + "default": 0 + }, + "enable_receipt_print": { + "type": "boolean", + "title": "Enable Receipt Print", + "default": false + }, + "business_name": { + "type": "string", + "title": "Business Name" + }, + "business_address": { + "type": "string", + "title": "Business Address" + }, + "business_vat_id": { + "type": "string", + "title": "Business Vat Id" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "stripe_card_payments": { + "type": "boolean", + "title": "Stripe Card Payments", + "default": false + } + }, + "type": "object", + "title": "CreateTposData" + }, + "lnbits__extensions__tpos__models__CreateTposInvoice": { + "properties": { + "amount": { + "type": "integer", + "minimum": 1, + "title": "Amount" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "exchange_rate": { + "type": "number", + "minimum": 0, + "title": "Exchange Rate" + }, + "details": { + "type": "object", + "title": "Details" + }, + "tip_amount": { + "type": "integer", + "minimum": 1, + "title": "Tip Amount" + }, + "user_lnaddress": { + "type": "string", + "title": "User Lnaddress" + }, + "internal_memo": { + "type": "string", + "maxLength": 512, + "title": "Internal Memo" + }, + "pay_in_fiat": { + "type": "boolean", + "title": "Pay In Fiat", + "default": false + }, + "fiat_method": { + "type": "string", + "title": "Fiat Method" + }, + "amount_fiat": { + "type": "number", + "minimum": 0, + "title": "Amount Fiat" + }, + "tip_amount_fiat": { + "type": "number", + "minimum": 0, + "title": "Tip Amount Fiat" + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "CreateTposInvoice" + }, + "lnbits__extensions__tpos__models__CreateUpdateItemData": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__tpos__models__Item" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "CreateUpdateItemData" + }, + "lnbits__extensions__tpos__models__CreateWithdrawPay": { + "properties": { + "pay_link": { + "type": "string", + "title": "Pay Link" + } + }, + "type": "object", + "required": [ + "pay_link" + ], + "title": "CreateWithdrawPay" + }, + "lnbits__extensions__tpos__models__Item": { + "properties": { + "image": { + "type": "string", + "title": "Image" + }, + "price": { + "type": "number", + "title": "Price" + }, + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "tax": { + "type": "number", + "minimum": 0, + "title": "Tax", + "default": 0 + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "categories": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Categories", + "default": [] + } + }, + "type": "object", + "required": [ + "price", + "title" + ], + "title": "Item" + }, + "lnbits__extensions__tpos__models__LnurlCharge": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "tpos_id": { + "type": "string", + "title": "Tpos Id" + }, + "amount": { + "type": "integer", + "title": "Amount", + "default": 0 + }, + "claimed": { + "type": "boolean", + "title": "Claimed", + "default": false + } + }, + "type": "object", + "required": [ + "id", + "tpos_id" + ], + "title": "LnurlCharge" + }, + "lnbits__extensions__tpos__models__PayLnurlWData": { + "properties": { + "lnurl": { + "type": "string", + "title": "Lnurl" + } + }, + "type": "object", + "required": [ + "lnurl" + ], + "title": "PayLnurlWData" + }, + "lnbits__extensions__tpos__models__Tpos": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "tax_inclusive": { + "type": "boolean", + "title": "Tax Inclusive" + }, + "tax_default": { + "type": "number", + "title": "Tax Default" + }, + "withdraw_time": { + "type": "integer", + "title": "Withdraw Time" + }, + "withdraw_between": { + "type": "integer", + "title": "Withdraw Between" + }, + "withdraw_limit": { + "type": "integer", + "title": "Withdraw Limit" + }, + "withdraw_time_option": { + "type": "string", + "title": "Withdraw Time Option" + }, + "withdraw_premium": { + "type": "number", + "title": "Withdraw Premium" + }, + "withdrawn_amount": { + "type": "integer", + "title": "Withdrawn Amount", + "default": 0 + }, + "lnaddress": { + "type": "boolean", + "title": "Lnaddress" + }, + "lnaddress_cut": { + "type": "integer", + "title": "Lnaddress Cut", + "default": 0 + }, + "items": { + "type": "string", + "title": "Items" + }, + "tip_options": { + "type": "string", + "title": "Tip Options" + }, + "enable_receipt_print": { + "type": "boolean", + "title": "Enable Receipt Print" + }, + "business_name": { + "type": "string", + "title": "Business Name" + }, + "business_address": { + "type": "string", + "title": "Business Address" + }, + "business_vat_id": { + "type": "string", + "title": "Business Vat Id" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "stripe_card_payments": { + "type": "boolean", + "title": "Stripe Card Payments", + "default": false + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "tip_wallet": { + "type": "string", + "title": "Tip Wallet" + } + }, + "type": "object", + "required": [ + "id", + "name", + "currency", + "tax_inclusive", + "withdraw_time", + "withdraw_between", + "enable_receipt_print", + "wallet" + ], + "title": "Tpos" + }, + "lnbits__extensions__watchonly__models__Address": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "address": { + "type": "string", + "title": "Address" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "amount": { + "type": "integer", + "title": "Amount", + "default": 0 + }, + "branch_index": { + "type": "integer", + "title": "Branch Index", + "default": 0 + }, + "address_index": { + "type": "integer", + "title": "Address Index" + }, + "note": { + "type": "string", + "title": "Note" + }, + "has_activity": { + "type": "boolean", + "title": "Has Activity", + "default": false + } + }, + "type": "object", + "required": [ + "id", + "address", + "wallet", + "address_index" + ], + "title": "Address" + }, + "lnbits__extensions__watchonly__models__Config": { + "properties": { + "mempool_endpoint": { + "type": "string", + "title": "Mempool Endpoint", + "default": "https://mempool.space" + }, + "receive_gap_limit": { + "type": "integer", + "title": "Receive Gap Limit", + "default": 20 + }, + "change_gap_limit": { + "type": "integer", + "title": "Change Gap Limit", + "default": 5 + }, + "sats_denominated": { + "type": "boolean", + "title": "Sats Denominated", + "default": true + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + } + }, + "type": "object", + "title": "Config" + }, + "lnbits__extensions__watchonly__models__CreateWallet": { + "properties": { + "masterpub": { + "type": "string", + "title": "Masterpub", + "default": "" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "network": { + "type": "string", + "title": "Network", + "default": "Mainnet" + }, + "meta": { + "type": "string", + "title": "Meta", + "default": "{}" + } + }, + "type": "object", + "title": "CreateWallet" + }, + "lnbits__extensions__withdraw__models__CreateWithdrawData": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "min_withdrawable": { + "type": "integer", + "minimum": 1, + "title": "Min Withdrawable" + }, + "max_withdrawable": { + "type": "integer", + "minimum": 1, + "title": "Max Withdrawable" + }, + "uses": { + "type": "integer", + "minimum": 1, + "title": "Uses" + }, + "wait_time": { + "type": "integer", + "minimum": 1, + "title": "Wait Time" + }, + "is_unique": { + "type": "boolean", + "title": "Is Unique" + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "custom_url": { + "type": "string", + "title": "Custom Url" + } + }, + "type": "object", + "required": [ + "title", + "min_withdrawable", + "max_withdrawable", + "uses", + "wait_time", + "is_unique" + ], + "title": "CreateWithdrawData" + }, + "lnbits__extensions__withdraw__models__HashCheck": { + "properties": { + "hash": { + "type": "boolean", + "title": "Hash" + }, + "lnurl": { + "type": "boolean", + "title": "Lnurl" + } + }, + "type": "object", + "required": [ + "hash", + "lnurl" + ], + "title": "HashCheck" + }, + "lnbits__extensions__withdraw__models__PaginatedWithdraws": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/lnbits__extensions__withdraw__models__WithdrawLink" + }, + "type": "array", + "title": "Data" + }, + "total": { + "type": "integer", + "title": "Total" + } + }, + "type": "object", + "required": [ + "data", + "total" + ], + "title": "PaginatedWithdraws" + }, + "lnbits__extensions__withdraw__models__WithdrawLink": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "title": { + "type": "string", + "title": "Title" + }, + "min_withdrawable": { + "type": "integer", + "title": "Min Withdrawable", + "default": 0 + }, + "max_withdrawable": { + "type": "integer", + "title": "Max Withdrawable", + "default": 0 + }, + "uses": { + "type": "integer", + "title": "Uses", + "default": 0 + }, + "wait_time": { + "type": "integer", + "title": "Wait Time", + "default": 0 + }, + "is_unique": { + "type": "boolean", + "title": "Is Unique", + "default": false + }, + "unique_hash": { + "type": "string", + "title": "Unique Hash", + "default": 0 + }, + "k1": { + "type": "string", + "title": "K1" + }, + "open_time": { + "type": "integer", + "title": "Open Time", + "default": 0 + }, + "used": { + "type": "integer", + "title": "Used", + "default": 0 + }, + "usescsv": { + "type": "string", + "title": "Usescsv" + }, + "number": { + "type": "integer", + "title": "Number", + "default": 0, + "no_database": true + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "custom_url": { + "type": "string", + "title": "Custom Url" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "lnurl": { + "type": "string", + "title": "Lnurl", + "description": "Deprecated: Instead of using this bech32 encoded string, dynamically generate your own static link (lud17/bech32) on the client side. Example: lnurlw://${window.location.hostname}/lnurlw/${id}", + "deprecated": true, + "no_database": true + } + }, + "type": "object", + "required": [ + "id", + "created_at" + ], + "title": "WithdrawLink" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateTposData": { + "properties": { + "wallet": { + "type": "string", + "title": "Wallet" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "use_inventory": { + "type": "boolean", + "title": "Use Inventory", + "default": false + }, + "inventory_id": { + "type": "string", + "title": "Inventory Id" + }, + "inventory_tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Inventory Tags" + }, + "inventory_omit_tags": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Inventory Omit Tags" + }, + "tax_inclusive": { + "type": "boolean", + "title": "Tax Inclusive", + "default": true + }, + "tax_default": { + "type": "number", + "title": "Tax Default", + "default": 0 + }, + "tip_options": { + "type": "string", + "title": "Tip Options", + "default": "[]" + }, + "tip_wallet": { + "type": "string", + "title": "Tip Wallet", + "default": "" + }, + "withdraw_time": { + "type": "integer", + "title": "Withdraw Time", + "default": 0 + }, + "withdraw_between": { + "type": "integer", + "minimum": 1, + "title": "Withdraw Between", + "default": 10 + }, + "withdraw_limit": { + "type": "integer", + "minimum": 1, + "title": "Withdraw Limit" + }, + "withdraw_time_option": { + "type": "string", + "title": "Withdraw Time Option" + }, + "withdraw_premium": { + "type": "number", + "title": "Withdraw Premium" + }, + "lnaddress": { + "type": "boolean", + "title": "Lnaddress", + "default": false + }, + "lnaddress_cut": { + "type": "integer", + "title": "Lnaddress Cut", + "default": 0 + }, + "enable_receipt_print": { + "type": "boolean", + "title": "Enable Receipt Print", + "default": false + }, + "business_name": { + "type": "string", + "title": "Business Name" + }, + "business_address": { + "type": "string", + "title": "Business Address" + }, + "business_vat_id": { + "type": "string", + "title": "Business Vat Id" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "stripe_card_payments": { + "type": "boolean", + "title": "Stripe Card Payments", + "default": false + }, + "stripe_reader_id": { + "type": "string", + "title": "Stripe Reader Id" + } + }, + "type": "object", + "title": "CreateTposData" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateTposInvoice": { + "properties": { + "amount": { + "type": "integer", + "minimum": 1, + "title": "Amount" + }, + "memo": { + "type": "string", + "title": "Memo" + }, + "exchange_rate": { + "type": "number", + "minimum": 0, + "title": "Exchange Rate" + }, + "details": { + "type": "object", + "title": "Details" + }, + "inventory": { + "$ref": "#/components/schemas/InventorySale" + }, + "tip_amount": { + "type": "integer", + "minimum": 1, + "title": "Tip Amount" + }, + "user_lnaddress": { + "type": "string", + "title": "User Lnaddress" + }, + "internal_memo": { + "type": "string", + "maxLength": 512, + "title": "Internal Memo" + }, + "pay_in_fiat": { + "type": "boolean", + "title": "Pay In Fiat", + "default": false + }, + "fiat_method": { + "type": "string", + "title": "Fiat Method" + }, + "amount_fiat": { + "type": "number", + "minimum": 0, + "title": "Amount Fiat" + }, + "tip_amount_fiat": { + "type": "number", + "minimum": 0, + "title": "Tip Amount Fiat" + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "CreateTposInvoice" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateUpdateItemData": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__Item" + }, + "type": "array", + "title": "Items" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "CreateUpdateItemData" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__CreateWithdrawPay": { + "properties": { + "pay_link": { + "type": "string", + "title": "Pay Link" + } + }, + "type": "object", + "required": [ + "pay_link" + ], + "title": "CreateWithdrawPay" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__Item": { + "properties": { + "image": { + "type": "string", + "title": "Image" + }, + "price": { + "type": "number", + "title": "Price" + }, + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "tax": { + "type": "number", + "minimum": 0, + "title": "Tax", + "default": 0 + }, + "disabled": { + "type": "boolean", + "title": "Disabled", + "default": false + }, + "categories": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Categories", + "default": [] + } + }, + "type": "object", + "required": [ + "price", + "title" + ], + "title": "Item" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__LnurlCharge": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "tpos_id": { + "type": "string", + "title": "Tpos Id" + }, + "amount": { + "type": "integer", + "title": "Amount", + "default": 0 + }, + "claimed": { + "type": "boolean", + "title": "Claimed", + "default": false + } + }, + "type": "object", + "required": [ + "id", + "tpos_id" + ], + "title": "LnurlCharge" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__PayLnurlWData": { + "properties": { + "lnurl": { + "type": "string", + "title": "Lnurl" + } + }, + "type": "object", + "required": [ + "lnurl" + ], + "title": "PayLnurlWData" + }, + "tpos-0df6f904931ba0fb9531e7cf2dca354c9a1d97bf62e0a9000a0e0ffe87e3fadf__models__Tpos": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "currency": { + "type": "string", + "title": "Currency" + }, + "tax_inclusive": { + "type": "boolean", + "title": "Tax Inclusive" + }, + "tax_default": { + "type": "number", + "title": "Tax Default" + }, + "withdraw_time": { + "type": "integer", + "title": "Withdraw Time" + }, + "withdraw_between": { + "type": "integer", + "title": "Withdraw Between" + }, + "withdraw_limit": { + "type": "integer", + "title": "Withdraw Limit" + }, + "withdraw_time_option": { + "type": "string", + "title": "Withdraw Time Option" + }, + "withdraw_premium": { + "type": "number", + "title": "Withdraw Premium" + }, + "withdrawn_amount": { + "type": "integer", + "title": "Withdrawn Amount", + "default": 0 + }, + "lnaddress": { + "type": "boolean", + "title": "Lnaddress" + }, + "lnaddress_cut": { + "type": "integer", + "title": "Lnaddress Cut", + "default": 0 + }, + "items": { + "type": "string", + "title": "Items" + }, + "use_inventory": { + "type": "boolean", + "title": "Use Inventory", + "default": false + }, + "inventory_id": { + "type": "string", + "title": "Inventory Id" + }, + "inventory_tags": { + "type": "string", + "title": "Inventory Tags" + }, + "inventory_omit_tags": { + "type": "string", + "title": "Inventory Omit Tags" + }, + "tip_options": { + "type": "string", + "title": "Tip Options" + }, + "enable_receipt_print": { + "type": "boolean", + "title": "Enable Receipt Print" + }, + "business_name": { + "type": "string", + "title": "Business Name" + }, + "business_address": { + "type": "string", + "title": "Business Address" + }, + "business_vat_id": { + "type": "string", + "title": "Business Vat Id" + }, + "fiat_provider": { + "type": "string", + "title": "Fiat Provider" + }, + "stripe_card_payments": { + "type": "boolean", + "title": "Stripe Card Payments", + "default": false + }, + "stripe_reader_id": { + "type": "string", + "title": "Stripe Reader Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "tip_wallet": { + "type": "string", + "title": "Tip Wallet" + } + }, + "type": "object", + "required": [ + "id", + "name", + "currency", + "tax_inclusive", + "withdraw_time", + "withdraw_between", + "enable_receipt_print", + "wallet" + ], + "title": "Tpos" + }, + "withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__CreateWithdrawData": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "min_withdrawable": { + "type": "integer", + "minimum": 1, + "title": "Min Withdrawable" + }, + "max_withdrawable": { + "type": "integer", + "minimum": 1, + "title": "Max Withdrawable" + }, + "uses": { + "type": "integer", + "minimum": 1, + "title": "Uses" + }, + "wait_time": { + "type": "integer", + "minimum": 1, + "title": "Wait Time" + }, + "is_unique": { + "type": "boolean", + "title": "Is Unique" + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "custom_url": { + "type": "string", + "title": "Custom Url" + } + }, + "type": "object", + "required": [ + "title", + "min_withdrawable", + "max_withdrawable", + "uses", + "wait_time", + "is_unique" + ], + "title": "CreateWithdrawData" + }, + "withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__HashCheck": { + "properties": { + "hash": { + "type": "boolean", + "title": "Hash" + }, + "lnurl": { + "type": "boolean", + "title": "Lnurl" + } + }, + "type": "object", + "required": [ + "hash", + "lnurl" + ], + "title": "HashCheck" + }, + "withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__PaginatedWithdraws": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__WithdrawLink" + }, + "type": "array", + "title": "Data" + }, + "total": { + "type": "integer", + "title": "Total" + } + }, + "type": "object", + "required": [ + "data", + "total" + ], + "title": "PaginatedWithdraws" + }, + "withdraw-4e66ed94bc9be8c0e0fe4f3b6019fdb7688bab70ab18162cb564cf9f5397606c__models__WithdrawLink": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "wallet": { + "type": "string", + "title": "Wallet" + }, + "title": { + "type": "string", + "title": "Title" + }, + "min_withdrawable": { + "type": "integer", + "title": "Min Withdrawable", + "default": 0 + }, + "max_withdrawable": { + "type": "integer", + "title": "Max Withdrawable", + "default": 0 + }, + "uses": { + "type": "integer", + "title": "Uses", + "default": 0 + }, + "wait_time": { + "type": "integer", + "title": "Wait Time", + "default": 0 + }, + "is_unique": { + "type": "boolean", + "title": "Is Unique", + "default": false + }, + "unique_hash": { + "type": "string", + "title": "Unique Hash", + "default": 0 + }, + "k1": { + "type": "string", + "title": "K1" + }, + "open_time": { + "type": "integer", + "title": "Open Time", + "default": 0 + }, + "used": { + "type": "integer", + "title": "Used", + "default": 0 + }, + "usescsv": { + "type": "string", + "title": "Usescsv" + }, + "number": { + "type": "integer", + "title": "Number", + "default": 0, + "no_database": true + }, + "webhook_url": { + "type": "string", + "title": "Webhook Url" + }, + "webhook_headers": { + "type": "string", + "title": "Webhook Headers" + }, + "webhook_body": { + "type": "string", + "title": "Webhook Body" + }, + "custom_url": { + "type": "string", + "title": "Custom Url" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "lnurl": { + "type": "string", + "title": "Lnurl", + "description": "Deprecated: Instead of using this bech32 encoded string, dynamically generate your own static link (lud17/bech32) on the client side. Example: lnurlw://${window.location.hostname}/lnurlw/${id}", + "deprecated": true, + "no_database": true + }, + "lnurl_url": { + "type": "string", + "title": "Lnurl Url", + "description": "The raw LNURL callback URL (use for QR code generation)", + "no_database": true + } + }, + "type": "object", + "required": [ + "id", + "created_at" + ], + "title": "WithdrawLink" + } + }, + "securitySchemes": { + "OAuth2PasswordBearer": { + "type": "oauth2", + "description": "OAuth2 access token for authentication with username and password.", + "flows": { + "password": { + "scopes": { + + }, + "tokenUrl": "api/v1/auth" + } + } + }, + "HTTPBearer": { + "type": "http", + "description": "Bearer Token for custom ACL based access control", + "scheme": "bearer" + }, + "APIKeyHeader": { + "type": "apiKey", + "description": "Admin or Invoice key for wallet API's", + "in": "header", + "name": "X-API-KEY" + }, + "APIKeyQuery": { + "type": "apiKey", + "description": "Admin or Invoice key for wallet API's", + "in": "query", + "name": "api-key" + } + } + } +} \ No newline at end of file diff --git a/about/overview.md b/about/overview.md new file mode 100644 index 0000000..53aaeb4 --- /dev/null +++ b/about/overview.md @@ -0,0 +1,264 @@ +# Spanglish Website – Overview + +## 1. Purpose + +The Spanglish website is the official digital platform for organizing, promoting, and managing Spanglish language exchange events in Asunción, Paraguay. + +Its primary purpose is to: + +* Promote monthly language exchange events +* Convert visitors into attendees +* Centralize event operations +* Reduce manual work for organizers +* Build and retain a long-term community +* Support future expansion + +The website is designed to be the main reference point for all Spanglish activities. + +--- + +## 2. Product Vision + +Spanglish aims to be the leading language exchange community in Paraguay and later in other cities. + +The website should: + +* Feel welcoming and modern +* Be easy to use for first-time visitors +* Be powerful for internal management +* Scale with community growth + +Long-term, the system should support multiple cities, memberships, and learning resources without major redesign. + +--- + +## 3. Target Users + +### 3.1 Public Users (Participants) + +* Spanish speakers learning English +* English speakers learning Spanish +* Students and professionals +* Expats and travelers +* Newcomers discovering Spanglish +* Returning community members + +### 3.2 Internal Users (Staff) + +* Admin (Owner) +* Organizers +* Check-in staff +* Marketing staff +* Support staff + +--- + +## 4. Core Goals + +The website is built around the following core goals: + +1. Increase event attendance +2. Improve operational efficiency +3. Reduce manual coordination +4. Improve communication +5. Build community loyalty +6. Enable data-driven decisions + +All features must directly or indirectly support these goals. + +--- + +## 5. System Scope + +The system consists of two main components: + +1. Public Website +2. Admin Dashboard + +Both components are connected through a shared backend and database. + +### 5.1 Public Website + +The public website is responsible for: + +* Presenting Spanglish +* Displaying events +* Handling bookings +* Promoting community channels +* Collecting contact information + +### 5.2 Admin Dashboard + +The admin dashboard is responsible for: + +* Managing events +* Managing attendees +* Managing payments +* Sending communications +* Managing media +* Monitoring performance + +--- + +## 6. Core Principles + +All development and design decisions must follow these principles: + +### 6.1 Simplicity + +* Avoid unnecessary complexity +* Prioritize ease of use +* Minimize user friction + +### 6.2 Reliability + +* Stable operation +* Clear error handling +* Data integrity + +### 6.3 Performance + +* Fast loading pages +* Responsive UI +* Optimized assets + +### 6.4 Maintainability + +* Clean code structure +* Clear documentation +* Modular design + +### 6.5 Scalability + +* Support growing user base +* Support additional locations +* Support new business models + +--- + +## 7. Brand and Experience + +### 7.1 Brand Personality + +Spanglish is: + +* Friendly +* International +* Social +* Organized +* Trustworthy +* Community-driven + +The website should reflect these values in design and tone. + +### 7.2 User Experience Goals + +Visitors should feel: + +* Welcome +* Comfortable +* Confident +* Motivated to join + +Admins should feel: + +* In control +* Efficient +* Informed +* Supported + +--- + +## 8. Community Strategy + +The website supports community building by: + +* Promoting WhatsApp and social groups +* Collecting email addresses +* Tracking attendance history +* Supporting loyalty programs +* Enabling direct communication + +The platform is designed to strengthen long-term relationships, not only facilitate one-time events. + +--- + +## 9. Business Model + +The primary revenue source is event ticket sales. + +Secondary and future revenue sources may include: + +* Membership subscriptions +* Partner sponsorships +* Premium events +* Workshops +* Digital learning materials + +The system must be flexible enough to support these models. + +--- + +## 10. Data Strategy + +The system collects and manages: + +* User profiles +* Event data +* Ticket records +* Payment records +* Communication logs +* Media assets + +All data must be handled securely and responsibly. + +--- + +## 11. Growth Vision + +Future expansion includes: + +* Multiple cities +* Multi-language support +* Mobile app +* Learning platform +* Certification system +* Nostr and Lightning integration + +The initial architecture must allow these extensions without major rewrites. + +--- + +## 12. Success Metrics + +The project will be evaluated using: + +* Event attendance growth +* Conversion rate +* Repeat participation rate +* Revenue per event +* Community size +* Operational efficiency + +These metrics guide future improvements. + +--- + +## 13. Constraints + +The system must: + +* Run on existing VPS infrastructure +* Be maintainable by a small team +* Minimize operational overhead +* Avoid unnecessary dependencies + +--- + +## 14. Summary + +The Spanglish website is a professional event management and community platform designed to support sustainable growth. + +It combines a simple, welcoming public interface with a powerful internal management system. + +All development must prioritize usability, reliability, and long-term scalability. diff --git a/about/payment_options.md b/about/payment_options.md new file mode 100644 index 0000000..846aea4 --- /dev/null +++ b/about/payment_options.md @@ -0,0 +1,366 @@ +# Spanglish Website – Payment Options Management + +## 1. Purpose + +This document defines how payment methods are configured, displayed, and managed in the Spanglish platform. + +It introduces a centralized Payment Options system that can be configured globally and overridden per event. + +The goal is to provide flexibility, transparency, and administrative control over all payment flows. + +--- + +## 2. Core Principles + +* Payment options are centrally managed in the admin panel +* Each event can override default payment settings +* Most non-instant payments require manual admin approval +* Only approved payments trigger confirmation emails +* Users must clearly understand how to pay +* The system must support future payment methods + +--- + +## 3. Payment Options Admin Tab + +### 3.1 Location + +The admin dashboard must include a dedicated tab: + +/Admin → Payment Options + +This section controls global payment settings. + +--- + +### 3.2 Global Payment Configuration + +Admins can configure default payment options used for all events unless overridden. + +Global settings include: + +* TPago default link +* Bank transfer details +* Bitcoin/Lightning configuration (LNbits) +* Cash policy +* Enabled / disabled status per method + +--- + +### 3.3 Event-Level Overrides + +Each event includes a "Payment Settings" section. + +Admins may override: + +* TPago link +* Bank account details +* Enabled payment methods +* Custom instructions + +If no override is set, global defaults apply. + +--- + +## 4. Supported Payment Methods + +--- + +## 4.1 Paraguayan Bank Transfer + +### Description + +Allows users to pay via local bank transfer. + +Payment details are displayed to the user. + +### Displayed Information + +* Bank name +* Account holder +* Account number +* Alias +* Phone number +* Additional notes (optional) + +### User Flow + +1. User selects "Bank Transfer" +2. Bank details are displayed +3. User makes the transfer externally +4. User clicks "I Have Paid" +5. Booking status becomes "Pending Approval" +6. Admin verifies payment +7. Admin marks payment as Paid +8. Confirmation email is sent + +### System Behavior + +* No automatic confirmation +* No booking confirmation until approved +* Payment proof upload (optional future feature) + +Status Flow: +Pending → Paid → Confirmed + +--- + +## 4.2 International Cards (TPago Link) + +### Description + +International card payments are handled via a TPago payment link. + +Example: +[https://www.tpago.com.py/links?alias=PXEOI9](https://www.tpago.com.py/links?alias=PXEOI9)... + +### Displayed Information + +* Payment provider name +* External payment link +* Instructions + +### User Flow + +1. User selects "International Card" +2. TPago link opens in new tab +3. User completes payment +4. User returns to booking page +5. User clicks "I Have Paid" +6. Booking status becomes "Pending Approval" +7. Admin verifies payment +8. Admin marks payment as Paid +9. Confirmation email is sent + +### System Behavior + +* Payment verification is manual +* No automatic webhook integration +* External link must be configurable + +Status Flow: +Pending → Paid → Confirmed + +--- + +## 4.3 Bitcoin / Lightning (LNbits) + +### Description + +Lightning payments are handled via LNbits integration. + +This method supports instant confirmation. + +### User Flow + +1. User selects "Bitcoin / Lightning" +2. Invoice is generated +3. QR code is displayed +4. User pays +5. Payment is detected automatically +6. Ticket is confirmed +7. Confirmation email is sent + +### System Behavior + +* Fully automated +* Webhook-based confirmation +* No admin intervention required + +Status Flow: +Paid → Confirmed + +--- + +## 4.4 Cash at the Door + +### Description + +Users pay in cash when arriving at the event. + +### User Flow + +1. User selects "Cash at the Door" +2. Booking is created +3. Status is set to Pending +4. User attends event +5. Staff receives payment +6. Admin marks as Paid +7. Confirmation is sent + +### System Behavior + +* No automatic confirmation +* Manual approval required +* Visible in admin dashboard + +Status Flow: +Pending → Paid → Confirmed + +--- + +## 5. Booking Page Presentation + +Payment methods are displayed as selectable cards. + +Each card includes: + +* Icon +* Title +* Short description +* Processing speed (Instant / Manual) + +Example: + +[ Bank Transfer ] (Manual) +[ International Card ] (Manual) +[ Bitcoin / Lightning ] (Instant) +[ Cash at Door ] (Manual) + +Selected card expands with instructions. + +--- + +## 6. "I Have Paid" Confirmation Button + +For manual payment methods, the booking page must display: + +Button: "I Have Paid" + +### Behavior + +* Marks booking as "Pending Approval" +* Stores timestamp +* Notifies admin +* Disables duplicate clicks + +No confirmation email is sent at this stage. + +--- + +## 7. Admin Payment Verification Panel + +### 7.1 Payment Review Queue + +Admins have access to: + +/Admin → Payments → Pending Approval + +This list shows: + +* User name +* Event +* Payment method +* Amount +* Date +* Reference (if provided) + +--- + +### 7.2 Approval Actions + +For each pending payment: + +* Approve (mark as Paid) +* Reject (mark as Failed) +* Add internal note + +Approval triggers: + +* Ticket confirmation +* Confirmation email +* Audit log entry + +--- + +## 8. Payment Status Model + +All bookings follow this status lifecycle: + +Created → Pending → Paid → Confirmed +↓ +Failed / Cancelled + +Only "Confirmed" bookings are considered valid attendees. + +--- + +## 9. Data Storage + +Each payment record stores: + +* Payment ID +* Booking ID +* Method +* Amount +* Currency +* Reference +* Status +* Admin approver +* Approval timestamp +* Notes + +--- + +## 10. Extensibility for Future Methods + +The payment system must be modular. + +New payment methods can be added by defining: + +* Name +* Type (Instant / Manual) +* Configuration schema +* UI template +* Validation rules + +Examples: + +* PayPal +* PIX +* Cashu +* Local wallets +* QR bank payments + +No core refactor should be required. + +--- + +## 11. Security Requirements + +* Secure storage of payment data +* Access control on payment approval +* Audit logging +* Protection against duplicate approvals +* No storage of sensitive card data + +--- + +## 12. Reporting + +The admin dashboard must provide: + +* Revenue per payment method +* Pending approvals +* Failed payments +* Approval turnaround time + +--- + +## 13. User Experience Rules + +* Instructions must be clear +* Links must open correctly +* Manual steps must be visible +* No misleading "confirmed" messages +* Payment state always visible + +--- + +## 14. Summary + +This payment options system centralizes configuration and control while supporting both instant and manual payment methods. + +It enables local Paraguayan payments, international cards, Bitcoin Lightning, and cash handling within one unified workflow. + +All implementations must follow this specification to ensure reliability and scalability. diff --git a/about/ruc_format.md b/about/ruc_format.md new file mode 100644 index 0000000..2828d51 --- /dev/null +++ b/about/ruc_format.md @@ -0,0 +1,203 @@ +RUC Form Integration +1. Overview + +This document defines the implementation of a RUC (Registro Único del Contribuyente) input form for the application. + +The goal is to: + +Collect valid Paraguayan RUC numbers + +Reduce user input errors + +Improve user experience + +Ensure basic legal and invoicing compliance + +The RUC field will be used for: + +Invoicing + +Payments + +Registrations + +Business verification + +Tax-related records + +2. RUC Format Specification + +A valid RUC has the following structure: + +6 to 8 digits + "-" + 1 check digit + + +Examples: + +4521876-5 +80012345-6 +12345678-9 + + +Rules: + +Only numbers and one hyphen + +The hyphen is always before the last digit + +No spaces or letters allowed + +Maximum length: 10 characters (including "-") + +3. User Interface Requirements +3.1 Input Field + +The RUC input field must: + +Accept only numeric input + +Auto-insert the hyphen + +Show placeholder example + +Display validation errors + +Example UI: + +[ RUC: 12345678-9 ] + + +Attributes: + +Required field (when invoicing enabled) + +Mobile-friendly + +Copy-paste safe + +Accessible (label + aria support) + +3.2 Placeholder Text + +Default placeholder: + +12345678-9 + + +Optional localized versions: + +Spanish: + +Ej: 12345678-9 + + +English: + +Example: 12345678-9 + +4. Client-Side Validation +4.1 Format Validation + +The frontend must verify: + +Pattern: /^[0-9]{6,8}-[0-9]{1}$/ + +Exactly one hyphen + +Correct digit count + +Invalid examples: + +1234-5 +123456789 +ABC123-4 + +4.2 Check Digit Validation + +The verification digit must be validated using modulo 11. + +Purpose: + +Detect mistyped RUC numbers + +Prevent fake entries + +Improve data quality + +Validation occurs: + +On input blur + +On form submit + +Before backend submission + +4.3 Auto-Formatting + +The system must: + +Remove non-numeric characters + +Automatically insert "-" + +Limit input to 9 digits + +Behavior: + +User types: + +45218765 + + +System shows: + +4521876-5 + + +This improves usability and reduces errors. + +5. Error Handling +5.1 Error Messages + +When validation fails, show: + +Format error: + +Formato inválido. Ej: 12345678-9 + + +Check digit error: + +RUC inválido. Verifique el número. + + +Empty field: + +Este campo es obligatorio. + + +Messages should be: + +Clear + +Short + +Non-technical + +Localized + +5.2 Visual Feedback + +Invalid input must: + +Highlight input in red + +Show error text below field + +Disable submit if blocking + +Valid input must: + +Show neutral or success state + +Remove error messages \ No newline at end of file diff --git a/about/user_dashboard.md b/about/user_dashboard.md new file mode 100644 index 0000000..c23f07b --- /dev/null +++ b/about/user_dashboard.md @@ -0,0 +1,430 @@ +# Spanglish Website – User Accounts & Dashboard Specification + +## 1. Purpose + +This document defines the complete user account system, authentication methods, identity management, and user dashboard features for the Spanglish platform. + +It ensures that all bookings are linked to user accounts while keeping the booking process frictionless. + +The system supports both casual users and long-term community members. + +--- + +## 2. Core Principles + +* Every booking is linked to a user account +* Account creation must not block booking +* Authentication must be flexible +* Email is the primary identifier +* Users own their data and history +* Financial transparency is mandatory +* Administrative users can manage and resolve conflicts + +--- + +## 3. User Account Model + +### 3.1 Progressive Accounts + +Spanglish uses a progressive account system. + +Users are created automatically during booking using their email address. + +These accounts are initially marked as unclaimed and can be activated later. + +This allows first-time users to book without registration. + +--- + +### 3.2 User States + +Each user account has one of the following states: + +* Unclaimed: Created during booking, no login configured +* Claimed: User has activated login +* Suspended: Disabled by admin + +--- + +### 3.3 User Identity Fields + +Each user record contains: + +* id (UUID) +* name +* email (unique) +* phone +* password_hash (nullable) +* google_id (nullable) +* is_claimed (boolean) +* ruc_number (nullable) +* created_at +* updated_at + +Email is the primary identity key. + +--- + +## 4. Authentication Methods + +### 4.1 Password Authentication + +Users may optionally set a password. + +Passwords are never required for booking. + +Requirements: + +* Minimum 10 characters +* Argon2 hashing +* Reset via email + +--- + +### 4.2 Google Login (OAuth) + +Users may authenticate using Google. + +Behavior: + +* Email is verified by Google +* Existing accounts are matched by email +* Google ID is linked on first login + +--- + +### 4.3 Email Code / Magic Link + +Users may log in using one-time codes or magic links. + +Behavior: + +* Code expires in 10 minutes +* One-time use only +* Sent to registered email + +--- + +## 5. Account Claiming Flow + +When a user books without logging in: + +1. System creates unclaimed account +2. Confirmation email includes "Claim Account" link +3. User sets password or links Google +4. Account becomes claimed + +This process is optional but encouraged. + +--- + +## 6. Booking to User Linking + +During booking: + +* Email is mandatory +* System searches for existing user +* If found, booking is linked +* If not found, new user is created + +All tickets are linked to user_id. + +No orphan records are allowed. + +--- + +## 7. Multiple Ticket Management + +### 7.1 Single User, Multiple Events + +Users may book unlimited events. + +Each booking creates a separate ticket record. + +--- + +### 7.2 Group Bookings + +Users may purchase multiple tickets per booking. + +Behavior: + +* One user_id owns all tickets +* Guest names are optional +* Tickets may be reassigned later + +--- + +## 8. RUC & Invoice Management + +### 8.1 RUC Collection + +During booking, users may optionally provide: + +* Paraguayan RUC number +* Legal name (optional) + +This data is stored in the user profile and booking record. + +--- + +### 8.2 Invoice Generation + +When a booking is marked as Paid: + +* System generates a fiscal invoice +* Invoice includes RUC data +* Invoice is stored as PDF +* Invoice is linked to payment record + +Invoices are immutable after generation. + +--- + +### 8.3 Invoice Access + +From the dashboard, users may: + +* View invoices +* Download PDF invoices +* Access invoice history + +Only confirmed and paid bookings generate invoices. + +--- + +## 9. User Dashboard + +### 9.1 Access + +Dashboard URL: + +/dashboard + +Authentication required. + +--- + +### 9.2 Dashboard Sections + +#### 9.2.1 Welcome Panel + +Displays: + +* User name +* Account status +* Membership duration + +--- + +#### 9.2.2 Next Event Panel + +Displays: + +* Upcoming event +* Date and time +* Location +* Payment status + +Actions: + +* View ticket +* Open map +* Add to calendar + +--- + +#### 9.2.3 My Tickets + +Displays all tickets: + +* Event name +* Date +* Payment method +* Status +* Invoice link (if available) + +Tickets link to detail view. + +--- + +#### 9.2.4 Payments & Invoices + +Displays: + +* Payment history +* Pending approvals +* Downloadable invoices +* Payment references + +--- + +#### 9.2.5 Community Access + +Displays: + +* WhatsApp group link +* Instagram link +* Website link + +Links are managed by admin. + +--- + +#### 9.2.6 Profile Settings + +Users may edit: + +* Name +* Email +* Phone +* Preferred language +* RUC number + +Email changes require verification. + +--- + +#### 9.2.7 Security Settings + +Users may: + +* Set or change password +* Link / unlink Google account +* View active sessions +* Logout all sessions + +--- + +#### 9.2.8 Support Panel + +Includes: + +* Contact links +* FAQ +* Support form + +--- + +## 10. Ticket Detail View + +Each ticket page includes: + +* Ticket ID +* QR code (optional) +* Event details +* Payment status +* Invoice download +* Check-in status + +--- + +## 11. Admin User Management + +Admins may: + +* View all users +* Edit profiles +* Reset authentication +* Merge duplicate accounts +* Suspend users +* Edit RUC data + +All actions are logged. + +--- + +## 12. Data Protection & Privacy + +* GDPR-style data rights +* Data export on request +* Account deletion support +* Secure storage +* Encrypted credentials + +--- + +## 13. Notifications + +Users receive system notifications for: + +* Booking confirmation +* Payment approval +* Invoice generation +* Account security changes + +Notifications are delivered via email. + +--- + +## 14. Database Tables (Core) + +### users + +* id +* name +* email +* phone +* password_hash +* google_id +* is_claimed +* ruc_number +* created_at + +### tickets + +* id +* user_id +* event_id +* status +* created_at + +### payments + +* id +* ticket_id +* status +* amount +* reference + +### invoices + +* id +* payment_id +* pdf_url +* ruc_number +* created_at + +--- + +## 15. Security Requirements + +* Argon2 password hashing +* OAuth verification +* Rate-limited login +* Brute-force protection +* Secure cookies +* HTTPS enforced + +--- + +## 16. Future Extensions + +Planned enhancements: + +* Loyalty tiers +* Membership subscriptions +* Family accounts +* Corporate accounts +* Tax reporting exports +* Mobile app support + +--- + +## 17. Summary + +The Spanglish user system provides frictionless onboarding, strong identity management, and full financial transparency. + +It supports both casual participants and professional users who require invoices and account history. + +All implementations must follow this specification. diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..f88031e --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,60 @@ +# Database Configuration +# Use 'sqlite' or 'postgres' +DB_TYPE=sqlite + +# For SQLite (relative or absolute path) +DATABASE_URL=./data/spanglish.db + +# For PostgreSQL +# DATABASE_URL=postgresql://user:password@localhost:5432/spanglish + +# JWT Secret (change in production!) +JWT_SECRET=your-super-secret-key-change-in-production + +# Server Configuration +PORT=3001 +API_URL=http://localhost:3001 +FRONTEND_URL=http://localhost:3002 + +# Payment Providers (optional) +STRIPE_SECRET_KEY= +STRIPE_WEBHOOK_SECRET= +MERCADOPAGO_ACCESS_TOKEN= + +# LNbits Configuration (for Bitcoin Lightning payments) +# Get these from your LNbits instance +# URL should be like: https://lnbits.yourdomain.com or https://legend.lnbits.com +LNBITS_URL= +# Invoice/Read key from your LNbits wallet +LNBITS_API_KEY= +# Optional: webhook secret for additional verification +LNBITS_WEBHOOK_SECRET= + +# Email Service +# Provider options: resend, smtp, console (console = log only, no actual email) +EMAIL_PROVIDER=console +EMAIL_FROM= +EMAIL_FROM_NAME= + +# Resend Configuration (if EMAIL_PROVIDER=resend) +# Get your API key from https://resend.com +EMAIL_API_KEY= +# Alternative env name also supported: +# RESEND_API_KEY= + +# SMTP Configuration (if EMAIL_PROVIDER=smtp) +# Works with any SMTP server: Gmail, SendGrid, Mailgun, Amazon SES, etc. +SMTP_HOST=mail.spango.lat +SMTP_PORT=465 +SMTP_USER= +SMTP_PASS= +# Set to true for port 465 (implicit TLS), false for port 587 (STARTTLS) +SMTP_SECURE=true +# Set to false to allow self-signed certificates (not recommended for production) +SMTP_TLS_REJECT_UNAUTHORIZED=true + +# Common SMTP examples: +# Gmail: SMTP_HOST=smtp.gmail.com, SMTP_PORT=587, use App Password for SMTP_PASS +# SendGrid: SMTP_HOST=smtp.sendgrid.net, SMTP_PORT=587, SMTP_USER=apikey, SMTP_PASS=your_api_key +# Mailgun: SMTP_HOST=smtp.mailgun.org, SMTP_PORT=587 +# Amazon SES: SMTP_HOST=email-smtp.us-east-1.amazonaws.com, SMTP_PORT=587 diff --git a/backend/drizzle.config.ts b/backend/drizzle.config.ts new file mode 100644 index 0000000..dc53608 --- /dev/null +++ b/backend/drizzle.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'drizzle-kit'; + +const dbType = process.env.DB_TYPE || 'sqlite'; + +export default defineConfig({ + schema: './src/db/schema.ts', + out: './drizzle', + dialect: dbType === 'postgres' ? 'postgresql' : 'sqlite', + dbCredentials: dbType === 'postgres' + ? { + url: process.env.DATABASE_URL || 'postgresql://localhost:5432/spanglish', + } + : { + url: process.env.DATABASE_URL || './data/spanglish.db', + }, +}); diff --git a/backend/package.json b/backend/package.json new file mode 100644 index 0000000..d39ed96 --- /dev/null +++ b/backend/package.json @@ -0,0 +1,39 @@ +{ + "name": "backend", + "version": "1.0.0", + "type": "module", + "scripts": { + "dev": "tsx watch src/index.ts", + "build": "tsc", + "start": "node dist/index.js", + "db:generate": "drizzle-kit generate", + "db:migrate": "tsx src/db/migrate.ts", + "db:studio": "drizzle-kit studio" + }, + "dependencies": { + "@hono/node-server": "^1.11.4", + "@hono/swagger-ui": "^0.4.0", + "@hono/zod-openapi": "^0.14.4", + "argon2": "^0.44.0", + "bcryptjs": "^2.4.3", + "better-sqlite3": "^11.0.0", + "dotenv": "^17.2.3", + "drizzle-orm": "^0.31.2", + "hono": "^4.4.7", + "jose": "^5.4.0", + "nanoid": "^5.0.7", + "nodemailer": "^7.0.13", + "pg": "^8.12.0", + "zod": "^3.23.8" + }, + "devDependencies": { + "@types/bcryptjs": "^2.4.6", + "@types/better-sqlite3": "^7.6.10", + "@types/node": "^20.14.9", + "@types/nodemailer": "^7.0.9", + "@types/pg": "^8.11.6", + "drizzle-kit": "^0.22.8", + "tsx": "^4.15.7", + "typescript": "^5.5.2" + } +} diff --git a/backend/src/db/index.ts b/backend/src/db/index.ts new file mode 100644 index 0000000..2d4e359 --- /dev/null +++ b/backend/src/db/index.ts @@ -0,0 +1,33 @@ +import { drizzle as drizzleSqlite } from 'drizzle-orm/better-sqlite3'; +import { drizzle as drizzlePg } from 'drizzle-orm/node-postgres'; +import Database from 'better-sqlite3'; +import pg from 'pg'; +import * as schema from './schema.js'; +import { existsSync, mkdirSync } from 'fs'; +import { dirname } from 'path'; + +const dbType = process.env.DB_TYPE || 'sqlite'; + +let db: ReturnType | ReturnType; + +if (dbType === 'postgres') { + const pool = new pg.Pool({ + connectionString: process.env.DATABASE_URL || 'postgresql://localhost:5432/spanglish', + }); + db = drizzlePg(pool, { schema }); +} else { + const dbPath = process.env.DATABASE_URL || './data/spanglish.db'; + + // Ensure data directory exists + const dir = dirname(dbPath); + if (!existsSync(dir)) { + mkdirSync(dir, { recursive: true }); + } + + const sqlite = new Database(dbPath); + sqlite.pragma('journal_mode = WAL'); + db = drizzleSqlite(sqlite, { schema }); +} + +export { db }; +export * from './schema.js'; diff --git a/backend/src/db/migrate.ts b/backend/src/db/migrate.ts new file mode 100644 index 0000000..d87f28d --- /dev/null +++ b/backend/src/db/migrate.ts @@ -0,0 +1,624 @@ +import { db } from './index.js'; +import { sql } from 'drizzle-orm'; + +const dbType = process.env.DB_TYPE || 'sqlite'; + +async function migrate() { + console.log('Running migrations...'); + + if (dbType === 'sqlite') { + // SQLite migrations + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS users ( + id TEXT PRIMARY KEY, + email TEXT NOT NULL UNIQUE, + password TEXT, + name TEXT NOT NULL, + phone TEXT, + role TEXT NOT NULL DEFAULT 'user', + language_preference TEXT, + is_claimed INTEGER NOT NULL DEFAULT 1, + google_id TEXT, + ruc_number TEXT, + account_status TEXT NOT NULL DEFAULT 'active', + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + + // Add new user columns if they don't exist (for existing databases) + try { + await (db as any).run(sql`ALTER TABLE users ADD COLUMN is_claimed INTEGER NOT NULL DEFAULT 1`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE users ADD COLUMN google_id TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE users ADD COLUMN ruc_number TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE users ADD COLUMN account_status TEXT NOT NULL DEFAULT 'active'`); + } catch (e) { /* column may already exist */ } + + // Magic link tokens table + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS magic_link_tokens ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id), + token TEXT NOT NULL UNIQUE, + type TEXT NOT NULL, + expires_at TEXT NOT NULL, + used_at TEXT, + created_at TEXT NOT NULL + ) + `); + + // User sessions table + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS user_sessions ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id), + token TEXT NOT NULL UNIQUE, + user_agent TEXT, + ip_address TEXT, + last_active_at TEXT NOT NULL, + expires_at TEXT NOT NULL, + created_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS events ( + id TEXT PRIMARY KEY, + title TEXT NOT NULL, + title_es TEXT, + description TEXT NOT NULL, + description_es TEXT, + start_datetime TEXT NOT NULL, + end_datetime TEXT, + location TEXT NOT NULL, + location_url TEXT, + price REAL NOT NULL DEFAULT 0, + currency TEXT NOT NULL DEFAULT 'PYG', + capacity INTEGER NOT NULL DEFAULT 50, + status TEXT NOT NULL DEFAULT 'draft', + banner_url TEXT, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS tickets ( + id TEXT PRIMARY KEY, + user_id TEXT NOT NULL REFERENCES users(id), + event_id TEXT NOT NULL REFERENCES events(id), + attendee_name TEXT NOT NULL, + attendee_email TEXT NOT NULL, + attendee_phone TEXT NOT NULL, + preferred_language TEXT, + status TEXT NOT NULL DEFAULT 'pending', + checkin_at TEXT, + qr_code TEXT, + created_at TEXT NOT NULL + ) + `); + + // Add new columns if they don't exist (for existing databases) + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_name TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_email TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_phone TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN preferred_language TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN admin_note TEXT`); + } catch (e) { /* column may already exist */ } + + // Migration: Add first/last name columns + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_first_name TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_last_name TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE tickets ADD COLUMN attendee_ruc TEXT`); + } catch (e) { /* column may already exist */ } + + // Migration: Copy data from attendee_name to attendee_first_name if attendee_first_name is empty + try { + await (db as any).run(sql` + UPDATE tickets + SET attendee_first_name = attendee_name + WHERE attendee_first_name IS NULL AND attendee_name IS NOT NULL + `); + } catch (e) { /* migration may have already run */ } + + // Make attendee_email and attendee_phone nullable (recreate table if needed or just allow nulls for new entries) + // SQLite doesn't support altering column constraints, so we'll just ensure new entries work + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS payments ( + id TEXT PRIMARY KEY, + ticket_id TEXT NOT NULL REFERENCES tickets(id), + provider TEXT NOT NULL, + amount REAL NOT NULL, + currency TEXT NOT NULL DEFAULT 'PYG', + status TEXT NOT NULL DEFAULT 'pending', + reference TEXT, + paid_at TEXT, + paid_by_admin_id TEXT, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + + // Add new columns if they don't exist (for existing databases) + try { + await (db as any).run(sql`ALTER TABLE payments ADD COLUMN paid_at TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE payments ADD COLUMN paid_by_admin_id TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE payments ADD COLUMN user_marked_paid_at TEXT`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).run(sql`ALTER TABLE payments ADD COLUMN admin_note TEXT`); + } catch (e) { /* column may already exist */ } + + // Invoices table + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS invoices ( + id TEXT PRIMARY KEY, + payment_id TEXT NOT NULL REFERENCES payments(id), + user_id TEXT NOT NULL REFERENCES users(id), + invoice_number TEXT NOT NULL UNIQUE, + ruc_number TEXT, + legal_name TEXT, + amount REAL NOT NULL, + currency TEXT NOT NULL DEFAULT 'PYG', + pdf_url TEXT, + status TEXT NOT NULL DEFAULT 'generated', + created_at TEXT NOT NULL + ) + `); + + // Payment options table + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS payment_options ( + id TEXT PRIMARY KEY, + tpago_enabled INTEGER NOT NULL DEFAULT 0, + tpago_link TEXT, + tpago_instructions TEXT, + tpago_instructions_es TEXT, + bank_transfer_enabled INTEGER NOT NULL DEFAULT 0, + bank_name TEXT, + bank_account_holder TEXT, + bank_account_number TEXT, + bank_alias TEXT, + bank_phone TEXT, + bank_notes TEXT, + bank_notes_es TEXT, + lightning_enabled INTEGER NOT NULL DEFAULT 1, + cash_enabled INTEGER NOT NULL DEFAULT 1, + cash_instructions TEXT, + cash_instructions_es TEXT, + updated_at TEXT NOT NULL, + updated_by TEXT REFERENCES users(id) + ) + `); + + // Event payment overrides table + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS event_payment_overrides ( + id TEXT PRIMARY KEY, + event_id TEXT NOT NULL REFERENCES events(id), + tpago_enabled INTEGER, + tpago_link TEXT, + tpago_instructions TEXT, + tpago_instructions_es TEXT, + bank_transfer_enabled INTEGER, + bank_name TEXT, + bank_account_holder TEXT, + bank_account_number TEXT, + bank_alias TEXT, + bank_phone TEXT, + bank_notes TEXT, + bank_notes_es TEXT, + lightning_enabled INTEGER, + cash_enabled INTEGER, + cash_instructions TEXT, + cash_instructions_es TEXT, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS contacts ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + email TEXT NOT NULL, + message TEXT NOT NULL, + status TEXT NOT NULL DEFAULT 'new', + created_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS email_subscribers ( + id TEXT PRIMARY KEY, + email TEXT NOT NULL UNIQUE, + name TEXT, + status TEXT NOT NULL DEFAULT 'active', + created_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS media ( + id TEXT PRIMARY KEY, + file_url TEXT NOT NULL, + type TEXT NOT NULL, + related_id TEXT, + related_type TEXT, + created_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS audit_logs ( + id TEXT PRIMARY KEY, + user_id TEXT REFERENCES users(id), + action TEXT NOT NULL, + target TEXT, + target_id TEXT, + details TEXT, + timestamp TEXT NOT NULL + ) + `); + + // Email system tables + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS email_templates ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL UNIQUE, + slug TEXT NOT NULL UNIQUE, + subject TEXT NOT NULL, + subject_es TEXT, + body_html TEXT NOT NULL, + body_html_es TEXT, + body_text TEXT, + body_text_es TEXT, + description TEXT, + variables TEXT, + is_system INTEGER NOT NULL DEFAULT 0, + is_active INTEGER NOT NULL DEFAULT 1, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS email_logs ( + id TEXT PRIMARY KEY, + template_id TEXT REFERENCES email_templates(id), + event_id TEXT REFERENCES events(id), + recipient_email TEXT NOT NULL, + recipient_name TEXT, + subject TEXT NOT NULL, + body_html TEXT, + status TEXT NOT NULL DEFAULT 'pending', + error_message TEXT, + sent_at TEXT, + sent_by TEXT REFERENCES users(id), + created_at TEXT NOT NULL + ) + `); + + await (db as any).run(sql` + CREATE TABLE IF NOT EXISTS email_settings ( + id TEXT PRIMARY KEY, + key TEXT NOT NULL UNIQUE, + value TEXT NOT NULL, + updated_at TEXT NOT NULL + ) + `); + } else { + // PostgreSQL migrations + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS users ( + id UUID PRIMARY KEY, + email VARCHAR(255) NOT NULL UNIQUE, + password VARCHAR(255), + name VARCHAR(255) NOT NULL, + phone VARCHAR(50), + role VARCHAR(20) NOT NULL DEFAULT 'user', + language_preference VARCHAR(10), + is_claimed INTEGER NOT NULL DEFAULT 1, + google_id VARCHAR(255), + ruc_number VARCHAR(15), + account_status VARCHAR(20) NOT NULL DEFAULT 'active', + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + + // Add new user columns for existing PostgreSQL databases + try { + await (db as any).execute(sql`ALTER TABLE users ADD COLUMN is_claimed INTEGER NOT NULL DEFAULT 1`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).execute(sql`ALTER TABLE users ADD COLUMN google_id VARCHAR(255)`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).execute(sql`ALTER TABLE users ADD COLUMN ruc_number VARCHAR(15)`); + } catch (e) { /* column may already exist */ } + try { + await (db as any).execute(sql`ALTER TABLE users ADD COLUMN account_status VARCHAR(20) NOT NULL DEFAULT 'active'`); + } catch (e) { /* column may already exist */ } + + // Magic link tokens table + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS magic_link_tokens ( + id UUID PRIMARY KEY, + user_id UUID NOT NULL REFERENCES users(id), + token VARCHAR(255) NOT NULL UNIQUE, + type VARCHAR(30) NOT NULL, + expires_at TIMESTAMP NOT NULL, + used_at TIMESTAMP, + created_at TIMESTAMP NOT NULL + ) + `); + + // User sessions table + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS user_sessions ( + id UUID PRIMARY KEY, + user_id UUID NOT NULL REFERENCES users(id), + token VARCHAR(500) NOT NULL UNIQUE, + user_agent TEXT, + ip_address VARCHAR(45), + last_active_at TIMESTAMP NOT NULL, + expires_at TIMESTAMP NOT NULL, + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS events ( + id UUID PRIMARY KEY, + title VARCHAR(255) NOT NULL, + title_es VARCHAR(255), + description TEXT NOT NULL, + description_es TEXT, + start_datetime TIMESTAMP NOT NULL, + end_datetime TIMESTAMP, + location VARCHAR(500) NOT NULL, + location_url VARCHAR(500), + price DECIMAL(10, 2) NOT NULL DEFAULT 0, + currency VARCHAR(10) NOT NULL DEFAULT 'PYG', + capacity INTEGER NOT NULL DEFAULT 50, + status VARCHAR(20) NOT NULL DEFAULT 'draft', + banner_url VARCHAR(500), + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS tickets ( + id UUID PRIMARY KEY, + user_id UUID NOT NULL REFERENCES users(id), + event_id UUID NOT NULL REFERENCES events(id), + attendee_first_name VARCHAR(255) NOT NULL, + attendee_last_name VARCHAR(255), + attendee_email VARCHAR(255), + attendee_phone VARCHAR(50), + attendee_ruc VARCHAR(15), + preferred_language VARCHAR(10), + status VARCHAR(20) NOT NULL DEFAULT 'pending', + checkin_at TIMESTAMP, + qr_code VARCHAR(255), + admin_note TEXT, + created_at TIMESTAMP NOT NULL + ) + `); + + // Add attendee_ruc column if it doesn't exist + try { + await (db as any).execute(sql`ALTER TABLE tickets ADD COLUMN attendee_ruc VARCHAR(15)`); + } catch (e) { /* column may already exist */ } + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS payments ( + id UUID PRIMARY KEY, + ticket_id UUID NOT NULL REFERENCES tickets(id), + provider VARCHAR(50) NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + currency VARCHAR(10) NOT NULL DEFAULT 'PYG', + status VARCHAR(20) NOT NULL DEFAULT 'pending', + reference VARCHAR(255), + user_marked_paid_at TIMESTAMP, + paid_at TIMESTAMP, + paid_by_admin_id UUID, + admin_note TEXT, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + + // Invoices table + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS invoices ( + id UUID PRIMARY KEY, + payment_id UUID NOT NULL REFERENCES payments(id), + user_id UUID NOT NULL REFERENCES users(id), + invoice_number VARCHAR(50) NOT NULL UNIQUE, + ruc_number VARCHAR(15), + legal_name VARCHAR(255), + amount DECIMAL(10, 2) NOT NULL, + currency VARCHAR(10) NOT NULL DEFAULT 'PYG', + pdf_url VARCHAR(500), + status VARCHAR(20) NOT NULL DEFAULT 'generated', + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS payment_options ( + id UUID PRIMARY KEY, + tpago_enabled INTEGER NOT NULL DEFAULT 0, + tpago_link VARCHAR(500), + tpago_instructions TEXT, + tpago_instructions_es TEXT, + bank_transfer_enabled INTEGER NOT NULL DEFAULT 0, + bank_name VARCHAR(255), + bank_account_holder VARCHAR(255), + bank_account_number VARCHAR(100), + bank_alias VARCHAR(100), + bank_phone VARCHAR(50), + bank_notes TEXT, + bank_notes_es TEXT, + lightning_enabled INTEGER NOT NULL DEFAULT 1, + cash_enabled INTEGER NOT NULL DEFAULT 1, + cash_instructions TEXT, + cash_instructions_es TEXT, + updated_at TIMESTAMP NOT NULL, + updated_by UUID REFERENCES users(id) + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS event_payment_overrides ( + id UUID PRIMARY KEY, + event_id UUID NOT NULL REFERENCES events(id), + tpago_enabled INTEGER, + tpago_link VARCHAR(500), + tpago_instructions TEXT, + tpago_instructions_es TEXT, + bank_transfer_enabled INTEGER, + bank_name VARCHAR(255), + bank_account_holder VARCHAR(255), + bank_account_number VARCHAR(100), + bank_alias VARCHAR(100), + bank_phone VARCHAR(50), + bank_notes TEXT, + bank_notes_es TEXT, + lightning_enabled INTEGER, + cash_enabled INTEGER, + cash_instructions TEXT, + cash_instructions_es TEXT, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS contacts ( + id UUID PRIMARY KEY, + name VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL, + message TEXT NOT NULL, + status VARCHAR(20) NOT NULL DEFAULT 'new', + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS email_subscribers ( + id UUID PRIMARY KEY, + email VARCHAR(255) NOT NULL UNIQUE, + name VARCHAR(255), + status VARCHAR(20) NOT NULL DEFAULT 'active', + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS media ( + id UUID PRIMARY KEY, + file_url VARCHAR(500) NOT NULL, + type VARCHAR(20) NOT NULL, + related_id UUID, + related_type VARCHAR(50), + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS audit_logs ( + id UUID PRIMARY KEY, + user_id UUID REFERENCES users(id), + action VARCHAR(100) NOT NULL, + target VARCHAR(100), + target_id UUID, + details TEXT, + timestamp TIMESTAMP NOT NULL + ) + `); + + // Email system tables + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS email_templates ( + id UUID PRIMARY KEY, + name VARCHAR(255) NOT NULL UNIQUE, + slug VARCHAR(100) NOT NULL UNIQUE, + subject VARCHAR(500) NOT NULL, + subject_es VARCHAR(500), + body_html TEXT NOT NULL, + body_html_es TEXT, + body_text TEXT, + body_text_es TEXT, + description TEXT, + variables TEXT, + is_system INTEGER NOT NULL DEFAULT 0, + is_active INTEGER NOT NULL DEFAULT 1, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS email_logs ( + id UUID PRIMARY KEY, + template_id UUID REFERENCES email_templates(id), + event_id UUID REFERENCES events(id), + recipient_email VARCHAR(255) NOT NULL, + recipient_name VARCHAR(255), + subject VARCHAR(500) NOT NULL, + body_html TEXT, + status VARCHAR(20) NOT NULL DEFAULT 'pending', + error_message TEXT, + sent_at TIMESTAMP, + sent_by UUID REFERENCES users(id), + created_at TIMESTAMP NOT NULL + ) + `); + + await (db as any).execute(sql` + CREATE TABLE IF NOT EXISTS email_settings ( + id UUID PRIMARY KEY, + key VARCHAR(100) NOT NULL UNIQUE, + value TEXT NOT NULL, + updated_at TIMESTAMP NOT NULL + ) + `); + } + + console.log('Migrations completed successfully!'); + process.exit(0); +} + +migrate().catch((err) => { + console.error('Migration failed:', err); + process.exit(1); +}); diff --git a/backend/src/db/schema.ts b/backend/src/db/schema.ts new file mode 100644 index 0000000..b9d824a --- /dev/null +++ b/backend/src/db/schema.ts @@ -0,0 +1,518 @@ +import { sqliteTable, text, integer, real } from 'drizzle-orm/sqlite-core'; +import { pgTable, uuid, varchar, text as pgText, timestamp, decimal, integer as pgInteger } from 'drizzle-orm/pg-core'; + +// Type to determine which schema to use +const dbType = process.env.DB_TYPE || 'sqlite'; + +// ==================== SQLite Schema ==================== +export const sqliteUsers = sqliteTable('users', { + id: text('id').primaryKey(), + email: text('email').notNull().unique(), + password: text('password'), // Nullable for unclaimed accounts + name: text('name').notNull(), + phone: text('phone'), + role: text('role', { enum: ['admin', 'organizer', 'staff', 'marketing', 'user'] }).notNull().default('user'), + languagePreference: text('language_preference'), + // New fields for progressive accounts and OAuth + isClaimed: integer('is_claimed', { mode: 'boolean' }).notNull().default(true), + googleId: text('google_id'), + rucNumber: text('ruc_number'), + accountStatus: text('account_status', { enum: ['active', 'unclaimed', 'suspended'] }).notNull().default('active'), + createdAt: text('created_at').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +// Magic link tokens for passwordless login +export const sqliteMagicLinkTokens = sqliteTable('magic_link_tokens', { + id: text('id').primaryKey(), + userId: text('user_id').notNull().references(() => sqliteUsers.id), + token: text('token').notNull().unique(), + type: text('type', { enum: ['login', 'reset_password', 'claim_account', 'email_verification'] }).notNull(), + expiresAt: text('expires_at').notNull(), + usedAt: text('used_at'), + createdAt: text('created_at').notNull(), +}); + +// User sessions for session management +export const sqliteUserSessions = sqliteTable('user_sessions', { + id: text('id').primaryKey(), + userId: text('user_id').notNull().references(() => sqliteUsers.id), + token: text('token').notNull().unique(), + userAgent: text('user_agent'), + ipAddress: text('ip_address'), + lastActiveAt: text('last_active_at').notNull(), + expiresAt: text('expires_at').notNull(), + createdAt: text('created_at').notNull(), +}); + +// Invoices table +export const sqliteInvoices = sqliteTable('invoices', { + id: text('id').primaryKey(), + paymentId: text('payment_id').notNull().references(() => sqlitePayments.id), + userId: text('user_id').notNull().references(() => sqliteUsers.id), + invoiceNumber: text('invoice_number').notNull().unique(), + rucNumber: text('ruc_number'), + legalName: text('legal_name'), + amount: real('amount').notNull(), + currency: text('currency').notNull().default('PYG'), + pdfUrl: text('pdf_url'), + status: text('status', { enum: ['generated', 'voided'] }).notNull().default('generated'), + createdAt: text('created_at').notNull(), +}); + +export const sqliteEvents = sqliteTable('events', { + id: text('id').primaryKey(), + title: text('title').notNull(), + titleEs: text('title_es'), + description: text('description').notNull(), + descriptionEs: text('description_es'), + startDatetime: text('start_datetime').notNull(), + endDatetime: text('end_datetime'), + location: text('location').notNull(), + locationUrl: text('location_url'), + price: real('price').notNull().default(0), + currency: text('currency').notNull().default('PYG'), + capacity: integer('capacity').notNull().default(50), + status: text('status', { enum: ['draft', 'published', 'cancelled', 'completed', 'archived'] }).notNull().default('draft'), + bannerUrl: text('banner_url'), + createdAt: text('created_at').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +export const sqliteTickets = sqliteTable('tickets', { + id: text('id').primaryKey(), + userId: text('user_id').notNull().references(() => sqliteUsers.id), + eventId: text('event_id').notNull().references(() => sqliteEvents.id), + attendeeFirstName: text('attendee_first_name').notNull(), + attendeeLastName: text('attendee_last_name'), + attendeeEmail: text('attendee_email'), + attendeePhone: text('attendee_phone'), + attendeeRuc: text('attendee_ruc'), // Paraguayan tax ID for invoicing + preferredLanguage: text('preferred_language'), + status: text('status', { enum: ['pending', 'confirmed', 'cancelled', 'checked_in'] }).notNull().default('pending'), + checkinAt: text('checkin_at'), + qrCode: text('qr_code'), + adminNote: text('admin_note'), + createdAt: text('created_at').notNull(), +}); + +export const sqlitePayments = sqliteTable('payments', { + id: text('id').primaryKey(), + ticketId: text('ticket_id').notNull().references(() => sqliteTickets.id), + provider: text('provider', { enum: ['bancard', 'lightning', 'cash', 'bank_transfer', 'tpago'] }).notNull(), + amount: real('amount').notNull(), + currency: text('currency').notNull().default('PYG'), + status: text('status', { enum: ['pending', 'pending_approval', 'paid', 'refunded', 'failed', 'cancelled'] }).notNull().default('pending'), + reference: text('reference'), + userMarkedPaidAt: text('user_marked_paid_at'), // When user clicked "I Have Paid" + paidAt: text('paid_at'), + paidByAdminId: text('paid_by_admin_id'), + adminNote: text('admin_note'), // Internal admin notes + createdAt: text('created_at').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +// Payment Options Configuration Table (global settings) +export const sqlitePaymentOptions = sqliteTable('payment_options', { + id: text('id').primaryKey(), + // TPago configuration + tpagoEnabled: integer('tpago_enabled', { mode: 'boolean' }).notNull().default(false), + tpagoLink: text('tpago_link'), + tpagoInstructions: text('tpago_instructions'), + tpagoInstructionsEs: text('tpago_instructions_es'), + // Bank Transfer configuration + bankTransferEnabled: integer('bank_transfer_enabled', { mode: 'boolean' }).notNull().default(false), + bankName: text('bank_name'), + bankAccountHolder: text('bank_account_holder'), + bankAccountNumber: text('bank_account_number'), + bankAlias: text('bank_alias'), + bankPhone: text('bank_phone'), + bankNotes: text('bank_notes'), + bankNotesEs: text('bank_notes_es'), + // Lightning configuration + lightningEnabled: integer('lightning_enabled', { mode: 'boolean' }).notNull().default(true), + // Cash configuration + cashEnabled: integer('cash_enabled', { mode: 'boolean' }).notNull().default(true), + cashInstructions: text('cash_instructions'), + cashInstructionsEs: text('cash_instructions_es'), + // Metadata + updatedAt: text('updated_at').notNull(), + updatedBy: text('updated_by').references(() => sqliteUsers.id), +}); + +// Event-specific payment overrides +export const sqliteEventPaymentOverrides = sqliteTable('event_payment_overrides', { + id: text('id').primaryKey(), + eventId: text('event_id').notNull().references(() => sqliteEvents.id), + // Override flags (null means use global) + tpagoEnabled: integer('tpago_enabled', { mode: 'boolean' }), + tpagoLink: text('tpago_link'), + tpagoInstructions: text('tpago_instructions'), + tpagoInstructionsEs: text('tpago_instructions_es'), + bankTransferEnabled: integer('bank_transfer_enabled', { mode: 'boolean' }), + bankName: text('bank_name'), + bankAccountHolder: text('bank_account_holder'), + bankAccountNumber: text('bank_account_number'), + bankAlias: text('bank_alias'), + bankPhone: text('bank_phone'), + bankNotes: text('bank_notes'), + bankNotesEs: text('bank_notes_es'), + lightningEnabled: integer('lightning_enabled', { mode: 'boolean' }), + cashEnabled: integer('cash_enabled', { mode: 'boolean' }), + cashInstructions: text('cash_instructions'), + cashInstructionsEs: text('cash_instructions_es'), + // Metadata + createdAt: text('created_at').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +export const sqliteContacts = sqliteTable('contacts', { + id: text('id').primaryKey(), + name: text('name').notNull(), + email: text('email').notNull(), + message: text('message').notNull(), + status: text('status', { enum: ['new', 'read', 'replied'] }).notNull().default('new'), + createdAt: text('created_at').notNull(), +}); + +export const sqliteEmailSubscribers = sqliteTable('email_subscribers', { + id: text('id').primaryKey(), + email: text('email').notNull().unique(), + name: text('name'), + status: text('status', { enum: ['active', 'unsubscribed'] }).notNull().default('active'), + createdAt: text('created_at').notNull(), +}); + +export const sqliteMedia = sqliteTable('media', { + id: text('id').primaryKey(), + fileUrl: text('file_url').notNull(), + type: text('type', { enum: ['image', 'video', 'document'] }).notNull(), + relatedId: text('related_id'), + relatedType: text('related_type'), + createdAt: text('created_at').notNull(), +}); + +export const sqliteAuditLogs = sqliteTable('audit_logs', { + id: text('id').primaryKey(), + userId: text('user_id').references(() => sqliteUsers.id), + action: text('action').notNull(), + target: text('target'), + targetId: text('target_id'), + details: text('details'), + timestamp: text('timestamp').notNull(), +}); + +export const sqliteEmailTemplates = sqliteTable('email_templates', { + id: text('id').primaryKey(), + name: text('name').notNull().unique(), + slug: text('slug').notNull().unique(), + subject: text('subject').notNull(), + subjectEs: text('subject_es'), + bodyHtml: text('body_html').notNull(), + bodyHtmlEs: text('body_html_es'), + bodyText: text('body_text'), + bodyTextEs: text('body_text_es'), + description: text('description'), + variables: text('variables'), // JSON array of available variables + isSystem: integer('is_system', { mode: 'boolean' }).notNull().default(false), + isActive: integer('is_active', { mode: 'boolean' }).notNull().default(true), + createdAt: text('created_at').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +export const sqliteEmailLogs = sqliteTable('email_logs', { + id: text('id').primaryKey(), + templateId: text('template_id').references(() => sqliteEmailTemplates.id), + eventId: text('event_id').references(() => sqliteEvents.id), + recipientEmail: text('recipient_email').notNull(), + recipientName: text('recipient_name'), + subject: text('subject').notNull(), + bodyHtml: text('body_html'), + status: text('status', { enum: ['pending', 'sent', 'failed', 'bounced'] }).notNull().default('pending'), + errorMessage: text('error_message'), + sentAt: text('sent_at'), + sentBy: text('sent_by').references(() => sqliteUsers.id), + createdAt: text('created_at').notNull(), +}); + +export const sqliteEmailSettings = sqliteTable('email_settings', { + id: text('id').primaryKey(), + key: text('key').notNull().unique(), + value: text('value').notNull(), + updatedAt: text('updated_at').notNull(), +}); + +// ==================== PostgreSQL Schema ==================== +export const pgUsers = pgTable('users', { + id: uuid('id').primaryKey(), + email: varchar('email', { length: 255 }).notNull().unique(), + password: varchar('password', { length: 255 }), // Nullable for unclaimed accounts + name: varchar('name', { length: 255 }).notNull(), + phone: varchar('phone', { length: 50 }), + role: varchar('role', { length: 20 }).notNull().default('user'), + languagePreference: varchar('language_preference', { length: 10 }), + // New fields for progressive accounts and OAuth + isClaimed: pgInteger('is_claimed').notNull().default(1), + googleId: varchar('google_id', { length: 255 }), + rucNumber: varchar('ruc_number', { length: 15 }), + accountStatus: varchar('account_status', { length: 20 }).notNull().default('active'), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +// Magic link tokens for passwordless login +export const pgMagicLinkTokens = pgTable('magic_link_tokens', { + id: uuid('id').primaryKey(), + userId: uuid('user_id').notNull().references(() => pgUsers.id), + token: varchar('token', { length: 255 }).notNull().unique(), + type: varchar('type', { length: 30 }).notNull(), + expiresAt: timestamp('expires_at').notNull(), + usedAt: timestamp('used_at'), + createdAt: timestamp('created_at').notNull(), +}); + +// User sessions for session management +export const pgUserSessions = pgTable('user_sessions', { + id: uuid('id').primaryKey(), + userId: uuid('user_id').notNull().references(() => pgUsers.id), + token: varchar('token', { length: 500 }).notNull().unique(), + userAgent: pgText('user_agent'), + ipAddress: varchar('ip_address', { length: 45 }), + lastActiveAt: timestamp('last_active_at').notNull(), + expiresAt: timestamp('expires_at').notNull(), + createdAt: timestamp('created_at').notNull(), +}); + +// Invoices table +export const pgInvoices = pgTable('invoices', { + id: uuid('id').primaryKey(), + paymentId: uuid('payment_id').notNull().references(() => pgPayments.id), + userId: uuid('user_id').notNull().references(() => pgUsers.id), + invoiceNumber: varchar('invoice_number', { length: 50 }).notNull().unique(), + rucNumber: varchar('ruc_number', { length: 15 }), + legalName: varchar('legal_name', { length: 255 }), + amount: decimal('amount', { precision: 10, scale: 2 }).notNull(), + currency: varchar('currency', { length: 10 }).notNull().default('PYG'), + pdfUrl: varchar('pdf_url', { length: 500 }), + status: varchar('status', { length: 20 }).notNull().default('generated'), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgEvents = pgTable('events', { + id: uuid('id').primaryKey(), + title: varchar('title', { length: 255 }).notNull(), + titleEs: varchar('title_es', { length: 255 }), + description: pgText('description').notNull(), + descriptionEs: pgText('description_es'), + startDatetime: timestamp('start_datetime').notNull(), + endDatetime: timestamp('end_datetime'), + location: varchar('location', { length: 500 }).notNull(), + locationUrl: varchar('location_url', { length: 500 }), + price: decimal('price', { precision: 10, scale: 2 }).notNull().default('0'), + currency: varchar('currency', { length: 10 }).notNull().default('PYG'), + capacity: pgInteger('capacity').notNull().default(50), + status: varchar('status', { length: 20 }).notNull().default('draft'), + bannerUrl: varchar('banner_url', { length: 500 }), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +export const pgTickets = pgTable('tickets', { + id: uuid('id').primaryKey(), + userId: uuid('user_id').notNull().references(() => pgUsers.id), + eventId: uuid('event_id').notNull().references(() => pgEvents.id), + attendeeFirstName: varchar('attendee_first_name', { length: 255 }).notNull(), + attendeeLastName: varchar('attendee_last_name', { length: 255 }), + attendeeEmail: varchar('attendee_email', { length: 255 }), + attendeePhone: varchar('attendee_phone', { length: 50 }), + attendeeRuc: varchar('attendee_ruc', { length: 15 }), // Paraguayan tax ID for invoicing + preferredLanguage: varchar('preferred_language', { length: 10 }), + status: varchar('status', { length: 20 }).notNull().default('pending'), + checkinAt: timestamp('checkin_at'), + qrCode: varchar('qr_code', { length: 255 }), + adminNote: pgText('admin_note'), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgPayments = pgTable('payments', { + id: uuid('id').primaryKey(), + ticketId: uuid('ticket_id').notNull().references(() => pgTickets.id), + provider: varchar('provider', { length: 50 }).notNull(), + amount: decimal('amount', { precision: 10, scale: 2 }).notNull(), + currency: varchar('currency', { length: 10 }).notNull().default('PYG'), + status: varchar('status', { length: 20 }).notNull().default('pending'), + reference: varchar('reference', { length: 255 }), + userMarkedPaidAt: timestamp('user_marked_paid_at'), + paidAt: timestamp('paid_at'), + paidByAdminId: uuid('paid_by_admin_id'), + adminNote: pgText('admin_note'), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +// Payment Options Configuration Table (global settings) +export const pgPaymentOptions = pgTable('payment_options', { + id: uuid('id').primaryKey(), + tpagoEnabled: pgInteger('tpago_enabled').notNull().default(0), + tpagoLink: varchar('tpago_link', { length: 500 }), + tpagoInstructions: pgText('tpago_instructions'), + tpagoInstructionsEs: pgText('tpago_instructions_es'), + bankTransferEnabled: pgInteger('bank_transfer_enabled').notNull().default(0), + bankName: varchar('bank_name', { length: 255 }), + bankAccountHolder: varchar('bank_account_holder', { length: 255 }), + bankAccountNumber: varchar('bank_account_number', { length: 100 }), + bankAlias: varchar('bank_alias', { length: 100 }), + bankPhone: varchar('bank_phone', { length: 50 }), + bankNotes: pgText('bank_notes'), + bankNotesEs: pgText('bank_notes_es'), + lightningEnabled: pgInteger('lightning_enabled').notNull().default(1), + cashEnabled: pgInteger('cash_enabled').notNull().default(1), + cashInstructions: pgText('cash_instructions'), + cashInstructionsEs: pgText('cash_instructions_es'), + updatedAt: timestamp('updated_at').notNull(), + updatedBy: uuid('updated_by').references(() => pgUsers.id), +}); + +// Event-specific payment overrides +export const pgEventPaymentOverrides = pgTable('event_payment_overrides', { + id: uuid('id').primaryKey(), + eventId: uuid('event_id').notNull().references(() => pgEvents.id), + tpagoEnabled: pgInteger('tpago_enabled'), + tpagoLink: varchar('tpago_link', { length: 500 }), + tpagoInstructions: pgText('tpago_instructions'), + tpagoInstructionsEs: pgText('tpago_instructions_es'), + bankTransferEnabled: pgInteger('bank_transfer_enabled'), + bankName: varchar('bank_name', { length: 255 }), + bankAccountHolder: varchar('bank_account_holder', { length: 255 }), + bankAccountNumber: varchar('bank_account_number', { length: 100 }), + bankAlias: varchar('bank_alias', { length: 100 }), + bankPhone: varchar('bank_phone', { length: 50 }), + bankNotes: pgText('bank_notes'), + bankNotesEs: pgText('bank_notes_es'), + lightningEnabled: pgInteger('lightning_enabled'), + cashEnabled: pgInteger('cash_enabled'), + cashInstructions: pgText('cash_instructions'), + cashInstructionsEs: pgText('cash_instructions_es'), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +export const pgContacts = pgTable('contacts', { + id: uuid('id').primaryKey(), + name: varchar('name', { length: 255 }).notNull(), + email: varchar('email', { length: 255 }).notNull(), + message: pgText('message').notNull(), + status: varchar('status', { length: 20 }).notNull().default('new'), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgEmailSubscribers = pgTable('email_subscribers', { + id: uuid('id').primaryKey(), + email: varchar('email', { length: 255 }).notNull().unique(), + name: varchar('name', { length: 255 }), + status: varchar('status', { length: 20 }).notNull().default('active'), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgMedia = pgTable('media', { + id: uuid('id').primaryKey(), + fileUrl: varchar('file_url', { length: 500 }).notNull(), + type: varchar('type', { length: 20 }).notNull(), + relatedId: uuid('related_id'), + relatedType: varchar('related_type', { length: 50 }), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgAuditLogs = pgTable('audit_logs', { + id: uuid('id').primaryKey(), + userId: uuid('user_id').references(() => pgUsers.id), + action: varchar('action', { length: 100 }).notNull(), + target: varchar('target', { length: 100 }), + targetId: uuid('target_id'), + details: pgText('details'), + timestamp: timestamp('timestamp').notNull(), +}); + +export const pgEmailTemplates = pgTable('email_templates', { + id: uuid('id').primaryKey(), + name: varchar('name', { length: 255 }).notNull().unique(), + slug: varchar('slug', { length: 100 }).notNull().unique(), + subject: varchar('subject', { length: 500 }).notNull(), + subjectEs: varchar('subject_es', { length: 500 }), + bodyHtml: pgText('body_html').notNull(), + bodyHtmlEs: pgText('body_html_es'), + bodyText: pgText('body_text'), + bodyTextEs: pgText('body_text_es'), + description: pgText('description'), + variables: pgText('variables'), // JSON array of available variables + isSystem: pgInteger('is_system').notNull().default(0), + isActive: pgInteger('is_active').notNull().default(1), + createdAt: timestamp('created_at').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +export const pgEmailLogs = pgTable('email_logs', { + id: uuid('id').primaryKey(), + templateId: uuid('template_id').references(() => pgEmailTemplates.id), + eventId: uuid('event_id').references(() => pgEvents.id), + recipientEmail: varchar('recipient_email', { length: 255 }).notNull(), + recipientName: varchar('recipient_name', { length: 255 }), + subject: varchar('subject', { length: 500 }).notNull(), + bodyHtml: pgText('body_html'), + status: varchar('status', { length: 20 }).notNull().default('pending'), + errorMessage: pgText('error_message'), + sentAt: timestamp('sent_at'), + sentBy: uuid('sent_by').references(() => pgUsers.id), + createdAt: timestamp('created_at').notNull(), +}); + +export const pgEmailSettings = pgTable('email_settings', { + id: uuid('id').primaryKey(), + key: varchar('key', { length: 100 }).notNull().unique(), + value: pgText('value').notNull(), + updatedAt: timestamp('updated_at').notNull(), +}); + +// Export the appropriate schema based on DB_TYPE +export const users = dbType === 'postgres' ? pgUsers : sqliteUsers; +export const events = dbType === 'postgres' ? pgEvents : sqliteEvents; +export const tickets = dbType === 'postgres' ? pgTickets : sqliteTickets; +export const payments = dbType === 'postgres' ? pgPayments : sqlitePayments; +export const contacts = dbType === 'postgres' ? pgContacts : sqliteContacts; +export const emailSubscribers = dbType === 'postgres' ? pgEmailSubscribers : sqliteEmailSubscribers; +export const media = dbType === 'postgres' ? pgMedia : sqliteMedia; +export const auditLogs = dbType === 'postgres' ? pgAuditLogs : sqliteAuditLogs; +export const emailTemplates = dbType === 'postgres' ? pgEmailTemplates : sqliteEmailTemplates; +export const emailLogs = dbType === 'postgres' ? pgEmailLogs : sqliteEmailLogs; +export const emailSettings = dbType === 'postgres' ? pgEmailSettings : sqliteEmailSettings; +export const paymentOptions = dbType === 'postgres' ? pgPaymentOptions : sqlitePaymentOptions; +export const eventPaymentOverrides = dbType === 'postgres' ? pgEventPaymentOverrides : sqliteEventPaymentOverrides; +export const magicLinkTokens = dbType === 'postgres' ? pgMagicLinkTokens : sqliteMagicLinkTokens; +export const userSessions = dbType === 'postgres' ? pgUserSessions : sqliteUserSessions; +export const invoices = dbType === 'postgres' ? pgInvoices : sqliteInvoices; + +// Type exports +export type User = typeof sqliteUsers.$inferSelect; +export type NewUser = typeof sqliteUsers.$inferInsert; +export type Event = typeof sqliteEvents.$inferSelect; +export type NewEvent = typeof sqliteEvents.$inferInsert; +export type Ticket = typeof sqliteTickets.$inferSelect; +export type NewTicket = typeof sqliteTickets.$inferInsert; +export type Payment = typeof sqlitePayments.$inferSelect; +export type NewPayment = typeof sqlitePayments.$inferInsert; +export type Contact = typeof sqliteContacts.$inferSelect; +export type NewContact = typeof sqliteContacts.$inferInsert; +export type EmailTemplate = typeof sqliteEmailTemplates.$inferSelect; +export type NewEmailTemplate = typeof sqliteEmailTemplates.$inferInsert; +export type EmailLog = typeof sqliteEmailLogs.$inferSelect; +export type NewEmailLog = typeof sqliteEmailLogs.$inferInsert; +export type PaymentOptions = typeof sqlitePaymentOptions.$inferSelect; +export type NewPaymentOptions = typeof sqlitePaymentOptions.$inferInsert; +export type EventPaymentOverride = typeof sqliteEventPaymentOverrides.$inferSelect; +export type NewEventPaymentOverride = typeof sqliteEventPaymentOverrides.$inferInsert; +export type MagicLinkToken = typeof sqliteMagicLinkTokens.$inferSelect; +export type NewMagicLinkToken = typeof sqliteMagicLinkTokens.$inferInsert; +export type UserSession = typeof sqliteUserSessions.$inferSelect; +export type NewUserSession = typeof sqliteUserSessions.$inferInsert; +export type Invoice = typeof sqliteInvoices.$inferSelect; +export type NewInvoice = typeof sqliteInvoices.$inferInsert; diff --git a/backend/src/index.ts b/backend/src/index.ts new file mode 100644 index 0000000..402c1b4 --- /dev/null +++ b/backend/src/index.ts @@ -0,0 +1,1720 @@ +import 'dotenv/config'; + +import { serve } from '@hono/node-server'; +import { Hono } from 'hono'; +import { cors } from 'hono/cors'; +import { logger } from 'hono/logger'; +import { swaggerUI } from '@hono/swagger-ui'; + +import { serveStatic } from '@hono/node-server/serve-static'; +import authRoutes from './routes/auth.js'; +import eventsRoutes from './routes/events.js'; +import ticketsRoutes from './routes/tickets.js'; +import usersRoutes from './routes/users.js'; +import contactsRoutes from './routes/contacts.js'; +import paymentsRoutes from './routes/payments.js'; +import adminRoutes from './routes/admin.js'; +import mediaRoutes from './routes/media.js'; +import lnbitsRoutes from './routes/lnbits.js'; +import emailsRoutes from './routes/emails.js'; +import paymentOptionsRoutes from './routes/payment-options.js'; +import dashboardRoutes from './routes/dashboard.js'; +import emailService from './lib/email.js'; + +const app = new Hono(); + +// Middleware +app.use('*', logger()); +app.use('*', cors({ + origin: process.env.FRONTEND_URL || 'http://localhost:3002', + credentials: true, +})); + +// OpenAPI specification +const openApiSpec = { + openapi: '3.0.0', + info: { + title: 'Spanglish API', + version: '2.0.0', + description: 'API for Spanglish Language Exchange Event Platform - includes authentication, user dashboard, event management, tickets, payments, and more.', + contact: { + name: 'Spanglish', + url: 'https://spanglish.com', + }, + }, + servers: [ + { + url: process.env.API_URL || 'http://localhost:3001', + description: 'API Server', + }, + ], + tags: [ + { name: 'Auth', description: 'Authentication and account management' }, + { name: 'User Dashboard', description: 'User dashboard and profile endpoints' }, + { name: 'Events', description: 'Event management' }, + { name: 'Tickets', description: 'Ticket booking and management' }, + { name: 'Payments', description: 'Payment management' }, + { name: 'Payment Options', description: 'Payment configuration' }, + { name: 'Users', description: 'User management (admin)' }, + { name: 'Contacts', description: 'Contact and subscription management' }, + { name: 'Emails', description: 'Email templates and sending' }, + { name: 'Media', description: 'File uploads and media management' }, + { name: 'Lightning', description: 'Lightning/Bitcoin payments via LNBits' }, + { name: 'Admin', description: 'Admin dashboard and analytics' }, + ], + paths: { + // ==================== Auth Endpoints ==================== + '/api/auth/register': { + post: { + tags: ['Auth'], + summary: 'Register a new user', + description: 'Create a new user account. First registered user becomes admin. Password must be at least 10 characters.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email', 'password', 'name'], + properties: { + email: { type: 'string', format: 'email' }, + password: { type: 'string', minLength: 10, description: 'Minimum 10 characters' }, + name: { type: 'string', minLength: 2 }, + phone: { type: 'string' }, + languagePreference: { type: 'string', enum: ['en', 'es'] }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'User created successfully' }, + 400: { description: 'Email already registered or validation error' }, + }, + }, + }, + '/api/auth/login': { + post: { + tags: ['Auth'], + summary: 'Login with email and password', + description: 'Authenticate user with email and password. Rate limited to 5 attempts per 15 minutes.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email', 'password'], + properties: { + email: { type: 'string', format: 'email' }, + password: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Login successful, returns JWT token' }, + 401: { description: 'Invalid credentials' }, + 429: { description: 'Too many login attempts' }, + }, + }, + }, + '/api/auth/google': { + post: { + tags: ['Auth'], + summary: 'Login or register with Google', + description: 'Authenticate using Google OAuth. Creates account if user does not exist.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['credential'], + properties: { + credential: { type: 'string', description: 'Google ID token' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Login successful' }, + 400: { description: 'Invalid Google token' }, + }, + }, + }, + '/api/auth/magic-link/request': { + post: { + tags: ['Auth'], + summary: 'Request magic link login', + description: 'Send a one-time login link to email. Link expires in 10 minutes.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email'], + properties: { + email: { type: 'string', format: 'email' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Magic link sent (if account exists)' }, + }, + }, + }, + '/api/auth/magic-link/verify': { + post: { + tags: ['Auth'], + summary: 'Verify magic link token', + description: 'Verify the magic link token and login user.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['token'], + properties: { + token: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Login successful' }, + 400: { description: 'Invalid or expired token' }, + }, + }, + }, + '/api/auth/password-reset/request': { + post: { + tags: ['Auth'], + summary: 'Request password reset', + description: 'Send a password reset link to email. Link expires in 30 minutes.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email'], + properties: { + email: { type: 'string', format: 'email' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Reset link sent (if account exists)' }, + }, + }, + }, + '/api/auth/password-reset/confirm': { + post: { + tags: ['Auth'], + summary: 'Confirm password reset', + description: 'Reset password using the token from email.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['token', 'password'], + properties: { + token: { type: 'string' }, + password: { type: 'string', minLength: 10 }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Password reset successful' }, + 400: { description: 'Invalid or expired token' }, + }, + }, + }, + '/api/auth/claim-account/request': { + post: { + tags: ['Auth'], + summary: 'Request account claim link', + description: 'For unclaimed accounts created during booking. Link expires in 24 hours.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email'], + properties: { + email: { type: 'string', format: 'email' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Claim link sent (if unclaimed account exists)' }, + }, + }, + }, + '/api/auth/claim-account/confirm': { + post: { + tags: ['Auth'], + summary: 'Confirm account claim', + description: 'Claim an unclaimed account by setting password or linking Google.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['token'], + properties: { + token: { type: 'string' }, + password: { type: 'string', minLength: 10, description: 'Required if not linking Google' }, + googleId: { type: 'string', description: 'Google ID for OAuth linking' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Account claimed successfully' }, + 400: { description: 'Invalid token or missing credentials' }, + }, + }, + }, + '/api/auth/change-password': { + post: { + tags: ['Auth'], + summary: 'Change password', + description: 'Change password for authenticated user.', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['currentPassword', 'newPassword'], + properties: { + currentPassword: { type: 'string' }, + newPassword: { type: 'string', minLength: 10 }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Password changed' }, + 400: { description: 'Current password incorrect' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/auth/me': { + get: { + tags: ['Auth'], + summary: 'Get current user', + description: 'Get the currently authenticated user profile.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Current user data' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/auth/logout': { + post: { + tags: ['Auth'], + summary: 'Logout', + description: 'Logout current user (client-side token removal).', + responses: { + 200: { description: 'Logged out' }, + }, + }, + }, + + // ==================== User Dashboard Endpoints ==================== + '/api/dashboard/summary': { + get: { + tags: ['User Dashboard'], + summary: 'Get dashboard summary', + description: 'Get user stats including ticket counts, membership duration, etc.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Dashboard summary data' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/profile': { + get: { + tags: ['User Dashboard'], + summary: 'Get user profile', + description: 'Get detailed user profile information.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'User profile' }, + 401: { description: 'Unauthorized' }, + }, + }, + put: { + tags: ['User Dashboard'], + summary: 'Update user profile', + description: 'Update user profile fields like name, phone, language preference, RUC number.', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + name: { type: 'string', minLength: 2 }, + phone: { type: 'string' }, + languagePreference: { type: 'string', enum: ['en', 'es'] }, + rucNumber: { type: 'string', maxLength: 15 }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Profile updated' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/tickets': { + get: { + tags: ['User Dashboard'], + summary: 'Get user tickets', + description: 'Get all tickets for the authenticated user with event and payment details.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'List of user tickets' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/tickets/{id}': { + get: { + tags: ['User Dashboard'], + summary: 'Get ticket detail', + description: 'Get detailed information about a specific ticket.', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Ticket details' }, + 404: { description: 'Ticket not found' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/next-event': { + get: { + tags: ['User Dashboard'], + summary: 'Get next upcoming event', + description: 'Get the next upcoming event the user has a ticket for.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Next event info or null' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/payments': { + get: { + tags: ['User Dashboard'], + summary: 'Get payment history', + description: 'Get all payments made by the user.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'List of payments' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/invoices': { + get: { + tags: ['User Dashboard'], + summary: 'Get invoices', + description: 'Get all invoices for the user.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'List of invoices' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/sessions': { + get: { + tags: ['User Dashboard'], + summary: 'Get active sessions', + description: 'Get all active login sessions for the user.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'List of sessions' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/sessions/{id}': { + delete: { + tags: ['User Dashboard'], + summary: 'Revoke session', + description: 'Revoke a specific session.', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Session revoked' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/sessions/revoke-all': { + post: { + tags: ['User Dashboard'], + summary: 'Revoke all sessions', + description: 'Logout from all devices.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'All sessions revoked' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/set-password': { + post: { + tags: ['User Dashboard'], + summary: 'Set password', + description: 'Set a password for users who signed up via Google only.', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['password'], + properties: { + password: { type: 'string', minLength: 10 }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Password set' }, + 400: { description: 'Password already set' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + '/api/dashboard/unlink-google': { + post: { + tags: ['User Dashboard'], + summary: 'Unlink Google account', + description: 'Unlink Google account. Requires password to be set first.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Google unlinked' }, + 400: { description: 'Cannot unlink without password' }, + 401: { description: 'Unauthorized' }, + }, + }, + }, + + // ==================== Events Endpoints ==================== + '/api/events': { + get: { + tags: ['Events'], + summary: 'Get all events', + description: 'Get list of events with optional filters.', + parameters: [ + { name: 'status', in: 'query', schema: { type: 'string', enum: ['draft', 'published', 'cancelled', 'completed', 'archived'] } }, + { name: 'upcoming', in: 'query', schema: { type: 'boolean' }, description: 'Filter to only future events' }, + ], + responses: { + 200: { description: 'List of events' }, + }, + }, + post: { + tags: ['Events'], + summary: 'Create event', + description: 'Create a new event (admin/organizer only).', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['title', 'description', 'startDatetime', 'location'], + properties: { + title: { type: 'string' }, + titleEs: { type: 'string' }, + description: { type: 'string' }, + descriptionEs: { type: 'string' }, + startDatetime: { type: 'string', format: 'date-time' }, + endDatetime: { type: 'string', format: 'date-time' }, + location: { type: 'string' }, + locationUrl: { type: 'string', format: 'uri' }, + price: { type: 'number' }, + currency: { type: 'string', default: 'PYG' }, + capacity: { type: 'integer', default: 50 }, + status: { type: 'string', enum: ['draft', 'published', 'cancelled', 'completed', 'archived'] }, + bannerUrl: { type: 'string', format: 'uri' }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'Event created' }, + 401: { description: 'Unauthorized' }, + 403: { description: 'Forbidden' }, + }, + }, + }, + '/api/events/{id}': { + get: { + tags: ['Events'], + summary: 'Get event by ID', + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Event details' }, + 404: { description: 'Event not found' }, + }, + }, + put: { + tags: ['Events'], + summary: 'Update event', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Event updated' }, + 404: { description: 'Event not found' }, + }, + }, + delete: { + tags: ['Events'], + summary: 'Delete event', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Event deleted' }, + 404: { description: 'Event not found' }, + }, + }, + }, + '/api/events/next/upcoming': { + get: { + tags: ['Events'], + summary: 'Get next upcoming event', + description: 'Get the single next upcoming published event.', + responses: { + 200: { description: 'Next event or null' }, + }, + }, + }, + '/api/events/{id}/duplicate': { + post: { + tags: ['Events'], + summary: 'Duplicate event', + description: 'Create a copy of an existing event.', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 201: { description: 'Event duplicated' }, + 404: { description: 'Event not found' }, + }, + }, + }, + + // ==================== Tickets Endpoints ==================== + '/api/tickets': { + get: { + tags: ['Tickets'], + summary: 'Get all tickets (admin)', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'query', schema: { type: 'string' } }, + { name: 'status', in: 'query', schema: { type: 'string', enum: ['pending', 'confirmed', 'cancelled', 'checked_in'] } }, + ], + responses: { + 200: { description: 'List of tickets' }, + }, + }, + post: { + tags: ['Tickets'], + summary: 'Book a ticket', + description: 'Create a booking for an event. Creates user account if needed.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['eventId', 'firstName', 'email', 'paymentMethod'], + properties: { + eventId: { type: 'string' }, + firstName: { type: 'string' }, + lastName: { type: 'string' }, + email: { type: 'string', format: 'email' }, + phone: { type: 'string' }, + preferredLanguage: { type: 'string', enum: ['en', 'es'] }, + paymentMethod: { type: 'string', enum: ['lightning', 'cash', 'bank_transfer', 'tpago'] }, + ruc: { type: 'string', description: 'Paraguayan RUC for invoice' }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'Ticket booked' }, + 400: { description: 'Booking error' }, + }, + }, + }, + '/api/tickets/{id}': { + get: { + tags: ['Tickets'], + summary: 'Get ticket by ID', + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Ticket details' }, + 404: { description: 'Ticket not found' }, + }, + }, + put: { + tags: ['Tickets'], + summary: 'Update ticket', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Ticket updated' }, + }, + }, + }, + '/api/tickets/{id}/checkin': { + post: { + tags: ['Tickets'], + summary: 'Check in ticket', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Check-in successful' }, + 400: { description: 'Check-in error' }, + }, + }, + }, + '/api/tickets/{id}/remove-checkin': { + post: { + tags: ['Tickets'], + summary: 'Remove check-in', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Check-in removed' }, + }, + }, + }, + '/api/tickets/{id}/cancel': { + post: { + tags: ['Tickets'], + summary: 'Cancel ticket', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Ticket cancelled' }, + }, + }, + }, + '/api/tickets/{id}/mark-paid': { + post: { + tags: ['Tickets'], + summary: 'Mark ticket as paid (admin)', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Marked as paid' }, + }, + }, + }, + '/api/tickets/{id}/mark-payment-sent': { + post: { + tags: ['Tickets'], + summary: 'Mark payment sent', + description: 'User marks their bank transfer or TPago payment as sent.', + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Payment marked as pending approval' }, + }, + }, + }, + '/api/tickets/{id}/note': { + post: { + tags: ['Tickets'], + summary: 'Update ticket note', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + note: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Note updated' }, + }, + }, + }, + '/api/tickets/admin/create': { + post: { + tags: ['Tickets'], + summary: 'Admin create ticket', + description: 'Create ticket directly without payment (admin only).', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['eventId', 'firstName'], + properties: { + eventId: { type: 'string' }, + firstName: { type: 'string' }, + lastName: { type: 'string' }, + email: { type: 'string', format: 'email' }, + phone: { type: 'string' }, + preferredLanguage: { type: 'string', enum: ['en', 'es'] }, + autoCheckin: { type: 'boolean' }, + adminNote: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'Ticket created' }, + }, + }, + }, + + // ==================== Payments Endpoints ==================== + '/api/payments': { + get: { + tags: ['Payments'], + summary: 'Get all payments', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'status', in: 'query', schema: { type: 'string' } }, + { name: 'provider', in: 'query', schema: { type: 'string' } }, + { name: 'pendingApproval', in: 'query', schema: { type: 'boolean' } }, + ], + responses: { + 200: { description: 'List of payments' }, + }, + }, + }, + '/api/payments/pending-approval': { + get: { + tags: ['Payments'], + summary: 'Get pending approval payments', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Payments awaiting approval' }, + }, + }, + }, + '/api/payments/{id}': { + get: { + tags: ['Payments'], + summary: 'Get payment by ID', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Payment details' }, + }, + }, + put: { + tags: ['Payments'], + summary: 'Update payment', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Payment updated' }, + }, + }, + }, + '/api/payments/{id}/approve': { + post: { + tags: ['Payments'], + summary: 'Approve payment', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + adminNote: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Payment approved' }, + }, + }, + }, + '/api/payments/{id}/reject': { + post: { + tags: ['Payments'], + summary: 'Reject payment', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + adminNote: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Payment rejected' }, + }, + }, + }, + '/api/payments/{id}/refund': { + post: { + tags: ['Payments'], + summary: 'Refund payment', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Refund processed' }, + }, + }, + }, + '/api/payments/{id}/note': { + post: { + tags: ['Payments'], + summary: 'Update payment note', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + adminNote: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Note updated' }, + }, + }, + }, + + // ==================== Payment Options Endpoints ==================== + '/api/payment-options': { + get: { + tags: ['Payment Options'], + summary: 'Get global payment options', + responses: { + 200: { description: 'Payment options configuration' }, + }, + }, + put: { + tags: ['Payment Options'], + summary: 'Update global payment options', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + tpagoEnabled: { type: 'boolean' }, + tpagoLink: { type: 'string' }, + tpagoInstructions: { type: 'string' }, + tpagoInstructionsEs: { type: 'string' }, + bankTransferEnabled: { type: 'boolean' }, + bankName: { type: 'string' }, + bankAccountHolder: { type: 'string' }, + bankAccountNumber: { type: 'string' }, + bankAlias: { type: 'string' }, + bankPhone: { type: 'string' }, + bankNotes: { type: 'string' }, + bankNotesEs: { type: 'string' }, + lightningEnabled: { type: 'boolean' }, + cashEnabled: { type: 'boolean' }, + cashInstructions: { type: 'string' }, + cashInstructionsEs: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Options updated' }, + }, + }, + }, + '/api/payment-options/event/{eventId}': { + get: { + tags: ['Payment Options'], + summary: 'Get payment options for event', + description: 'Get merged payment options (global + event overrides).', + parameters: [ + { name: 'eventId', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Payment options for event' }, + }, + }, + }, + '/api/payment-options/event/{eventId}/overrides': { + get: { + tags: ['Payment Options'], + summary: 'Get event payment overrides', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Event-specific overrides' }, + }, + }, + put: { + tags: ['Payment Options'], + summary: 'Update event payment overrides', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Overrides updated' }, + }, + }, + delete: { + tags: ['Payment Options'], + summary: 'Delete event payment overrides', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Overrides deleted' }, + }, + }, + }, + + // ==================== Users Endpoints (Admin) ==================== + '/api/users': { + get: { + tags: ['Users'], + summary: 'Get all users (admin)', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'role', in: 'query', schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'List of users' }, + }, + }, + }, + '/api/users/{id}': { + get: { + tags: ['Users'], + summary: 'Get user by ID', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'User details' }, + }, + }, + put: { + tags: ['Users'], + summary: 'Update user', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'User updated' }, + }, + }, + delete: { + tags: ['Users'], + summary: 'Delete user', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'User deleted' }, + }, + }, + }, + '/api/users/{id}/history': { + get: { + tags: ['Users'], + summary: 'Get user ticket history', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'User ticket history' }, + }, + }, + }, + '/api/users/stats/overview': { + get: { + tags: ['Users'], + summary: 'Get user statistics', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'User statistics' }, + }, + }, + }, + + // ==================== Contacts Endpoints ==================== + '/api/contacts': { + get: { + tags: ['Contacts'], + summary: 'Get all contacts (admin)', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'status', in: 'query', schema: { type: 'string', enum: ['new', 'read', 'replied'] } }, + ], + responses: { + 200: { description: 'List of contacts' }, + }, + }, + post: { + tags: ['Contacts'], + summary: 'Submit contact form', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['name', 'email', 'message'], + properties: { + name: { type: 'string' }, + email: { type: 'string', format: 'email' }, + message: { type: 'string', minLength: 10 }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'Message sent' }, + }, + }, + }, + '/api/contacts/{id}': { + put: { + tags: ['Contacts'], + summary: 'Update contact status', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + status: { type: 'string', enum: ['new', 'read', 'replied'] }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Contact updated' }, + }, + }, + }, + '/api/contacts/subscribe': { + post: { + tags: ['Contacts'], + summary: 'Subscribe to newsletter', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['email'], + properties: { + email: { type: 'string', format: 'email' }, + name: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'Subscribed successfully' }, + }, + }, + }, + + // ==================== Email Endpoints ==================== + '/api/emails/templates': { + get: { + tags: ['Emails'], + summary: 'Get all email templates', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'List of templates' }, + }, + }, + post: { + tags: ['Emails'], + summary: 'Create email template', + security: [{ bearerAuth: [] }], + responses: { + 201: { description: 'Template created' }, + }, + }, + }, + '/api/emails/templates/{id}': { + get: { + tags: ['Emails'], + summary: 'Get template by ID', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Template details' }, + }, + }, + put: { + tags: ['Emails'], + summary: 'Update template', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Template updated' }, + }, + }, + delete: { + tags: ['Emails'], + summary: 'Delete template', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Template deleted' }, + }, + }, + }, + '/api/emails/send/event/{eventId}': { + post: { + tags: ['Emails'], + summary: 'Send email to event attendees', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'path', required: true, schema: { type: 'string' } }, + ], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['templateSlug'], + properties: { + templateSlug: { type: 'string' }, + customVariables: { type: 'object' }, + recipientFilter: { type: 'string', enum: ['all', 'confirmed', 'pending', 'checked_in'] }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Emails sent' }, + }, + }, + }, + '/api/emails/send/custom': { + post: { + tags: ['Emails'], + summary: 'Send custom email', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['to', 'subject', 'bodyHtml'], + properties: { + to: { type: 'string', format: 'email' }, + toName: { type: 'string' }, + subject: { type: 'string' }, + bodyHtml: { type: 'string' }, + bodyText: { type: 'string' }, + eventId: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Email sent' }, + }, + }, + }, + '/api/emails/preview': { + post: { + tags: ['Emails'], + summary: 'Preview email template', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['templateSlug'], + properties: { + templateSlug: { type: 'string' }, + variables: { type: 'object' }, + locale: { type: 'string', enum: ['en', 'es'] }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Preview HTML' }, + }, + }, + }, + '/api/emails/logs': { + get: { + tags: ['Emails'], + summary: 'Get email logs', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'query', schema: { type: 'string' } }, + { name: 'status', in: 'query', schema: { type: 'string' } }, + { name: 'limit', in: 'query', schema: { type: 'integer' } }, + { name: 'offset', in: 'query', schema: { type: 'integer' } }, + ], + responses: { + 200: { description: 'Email logs' }, + }, + }, + }, + '/api/emails/stats': { + get: { + tags: ['Emails'], + summary: 'Get email stats', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'query', schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Email statistics' }, + }, + }, + }, + '/api/emails/seed-templates': { + post: { + tags: ['Emails'], + summary: 'Seed default templates', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Templates seeded' }, + }, + }, + }, + + // ==================== Media Endpoints ==================== + '/api/media/upload': { + post: { + tags: ['Media'], + summary: 'Upload file', + security: [{ bearerAuth: [] }], + requestBody: { + required: true, + content: { + 'multipart/form-data': { + schema: { + type: 'object', + properties: { + file: { type: 'string', format: 'binary' }, + relatedId: { type: 'string' }, + relatedType: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 201: { description: 'File uploaded' }, + }, + }, + }, + '/api/media/{id}': { + delete: { + tags: ['Media'], + summary: 'Delete media', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'id', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Media deleted' }, + }, + }, + }, + + // ==================== Lightning (LNBits) Endpoints ==================== + '/api/lnbits/invoice': { + post: { + tags: ['Lightning'], + summary: 'Create Lightning invoice', + description: 'Create a Lightning Network invoice for payment.', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + required: ['ticketId'], + properties: { + ticketId: { type: 'string' }, + }, + }, + }, + }, + }, + responses: { + 200: { description: 'Invoice created' }, + }, + }, + }, + '/api/lnbits/status/{ticketId}': { + get: { + tags: ['Lightning'], + summary: 'Check payment status', + description: 'Check the payment status for a ticket.', + parameters: [ + { name: 'ticketId', in: 'path', required: true, schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Payment status' }, + }, + }, + }, + '/api/lnbits/webhook': { + post: { + tags: ['Lightning'], + summary: 'LNBits webhook', + description: 'Webhook endpoint for LNBits payment notifications.', + responses: { + 200: { description: 'Webhook processed' }, + }, + }, + }, + + // ==================== Admin Endpoints ==================== + '/api/admin/dashboard': { + get: { + tags: ['Admin'], + summary: 'Get admin dashboard', + description: 'Get statistics, recent activity, and overview data.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Dashboard data' }, + }, + }, + }, + '/api/admin/analytics': { + get: { + tags: ['Admin'], + summary: 'Get analytics', + description: 'Get detailed analytics data.', + security: [{ bearerAuth: [] }], + responses: { + 200: { description: 'Analytics data' }, + }, + }, + }, + '/api/admin/export/tickets': { + get: { + tags: ['Admin'], + summary: 'Export tickets', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'eventId', in: 'query', schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Exported ticket data' }, + }, + }, + }, + '/api/admin/export/financial': { + get: { + tags: ['Admin'], + summary: 'Export financial data', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'startDate', in: 'query', schema: { type: 'string', format: 'date' } }, + { name: 'endDate', in: 'query', schema: { type: 'string', format: 'date' } }, + { name: 'eventId', in: 'query', schema: { type: 'string' } }, + ], + responses: { + 200: { description: 'Exported financial data' }, + }, + }, + }, + }, + components: { + securitySchemes: { + bearerAuth: { + type: 'http', + scheme: 'bearer', + bearerFormat: 'JWT', + description: 'JWT token obtained from login endpoint', + }, + }, + schemas: { + User: { + type: 'object', + properties: { + id: { type: 'string' }, + email: { type: 'string' }, + name: { type: 'string' }, + phone: { type: 'string' }, + role: { type: 'string', enum: ['admin', 'organizer', 'staff', 'marketing', 'user'] }, + languagePreference: { type: 'string' }, + isClaimed: { type: 'boolean' }, + rucNumber: { type: 'string' }, + accountStatus: { type: 'string', enum: ['active', 'unclaimed', 'suspended'] }, + createdAt: { type: 'string', format: 'date-time' }, + }, + }, + Event: { + type: 'object', + properties: { + id: { type: 'string' }, + title: { type: 'string' }, + titleEs: { type: 'string' }, + description: { type: 'string' }, + descriptionEs: { type: 'string' }, + startDatetime: { type: 'string', format: 'date-time' }, + endDatetime: { type: 'string', format: 'date-time' }, + location: { type: 'string' }, + locationUrl: { type: 'string' }, + price: { type: 'number' }, + currency: { type: 'string' }, + capacity: { type: 'integer' }, + status: { type: 'string', enum: ['draft', 'published', 'cancelled', 'completed', 'archived'] }, + bannerUrl: { type: 'string' }, + createdAt: { type: 'string', format: 'date-time' }, + }, + }, + Ticket: { + type: 'object', + properties: { + id: { type: 'string' }, + userId: { type: 'string' }, + eventId: { type: 'string' }, + attendeeFirstName: { type: 'string' }, + attendeeLastName: { type: 'string' }, + attendeeEmail: { type: 'string' }, + attendeePhone: { type: 'string' }, + attendeeRuc: { type: 'string' }, + preferredLanguage: { type: 'string' }, + status: { type: 'string', enum: ['pending', 'confirmed', 'cancelled', 'checked_in'] }, + qrCode: { type: 'string' }, + checkinAt: { type: 'string', format: 'date-time' }, + createdAt: { type: 'string', format: 'date-time' }, + }, + }, + Payment: { + type: 'object', + properties: { + id: { type: 'string' }, + ticketId: { type: 'string' }, + provider: { type: 'string', enum: ['lightning', 'cash', 'bank_transfer', 'tpago'] }, + amount: { type: 'number' }, + currency: { type: 'string' }, + status: { type: 'string', enum: ['pending', 'pending_approval', 'paid', 'refunded', 'failed', 'cancelled'] }, + reference: { type: 'string' }, + paidAt: { type: 'string', format: 'date-time' }, + createdAt: { type: 'string', format: 'date-time' }, + }, + }, + Invoice: { + type: 'object', + properties: { + id: { type: 'string' }, + paymentId: { type: 'string' }, + userId: { type: 'string' }, + invoiceNumber: { type: 'string' }, + rucNumber: { type: 'string' }, + legalName: { type: 'string' }, + amount: { type: 'number' }, + currency: { type: 'string' }, + pdfUrl: { type: 'string' }, + status: { type: 'string', enum: ['generated', 'voided'] }, + createdAt: { type: 'string', format: 'date-time' }, + }, + }, + }, + }, +}; + +// OpenAPI JSON endpoint +app.get('/openapi.json', (c) => { + return c.json(openApiSpec); +}); + +// Swagger UI +app.get('/api-docs', swaggerUI({ url: '/openapi.json' })); + +// Static file serving for uploads +app.use('/uploads/*', serveStatic({ root: './' })); + +// Health check +app.get('/health', (c) => { + return c.json({ status: 'ok', timestamp: new Date().toISOString() }); +}); + +// API Routes +app.route('/api/auth', authRoutes); +app.route('/api/events', eventsRoutes); +app.route('/api/tickets', ticketsRoutes); +app.route('/api/users', usersRoutes); +app.route('/api/contacts', contactsRoutes); +app.route('/api/payments', paymentsRoutes); +app.route('/api/admin', adminRoutes); +app.route('/api/media', mediaRoutes); +app.route('/api/lnbits', lnbitsRoutes); +app.route('/api/emails', emailsRoutes); +app.route('/api/payment-options', paymentOptionsRoutes); +app.route('/api/dashboard', dashboardRoutes); + +// 404 handler +app.notFound((c) => { + return c.json({ error: 'Not Found' }, 404); +}); + +// Error handler +app.onError((err, c) => { + console.error('Error:', err); + return c.json({ error: 'Internal Server Error' }, 500); +}); + +const port = parseInt(process.env.PORT || '3001'); + +// Initialize email templates on startup +emailService.seedDefaultTemplates().catch(err => { + console.error('[Email] Failed to seed templates:', err); +}); + +console.log(`🚀 Spanglish API server starting on port ${port}`); +console.log(`📚 API docs available at http://localhost:${port}/api-docs`); +console.log(`📋 OpenAPI spec at http://localhost:${port}/openapi.json`); + +serve({ + fetch: app.fetch, + port, +}); diff --git a/backend/src/lib/auth.ts b/backend/src/lib/auth.ts new file mode 100644 index 0000000..925c09f --- /dev/null +++ b/backend/src/lib/auth.ts @@ -0,0 +1,248 @@ +import * as jose from 'jose'; +import * as argon2 from 'argon2'; +import bcrypt from 'bcryptjs'; +import crypto from 'crypto'; +import { Context } from 'hono'; +import { db, users, magicLinkTokens, userSessions } from '../db/index.js'; +import { eq, and, gt } from 'drizzle-orm'; +import { generateId, getNow } from './utils.js'; + +const JWT_SECRET = new TextEncoder().encode(process.env.JWT_SECRET || 'your-super-secret-key-change-in-production'); +const JWT_ISSUER = 'spanglish'; +const JWT_AUDIENCE = 'spanglish-app'; + +export interface JWTPayload { + sub: string; + email: string; + role: string; + iat: number; + exp: number; +} + +// Password hashing with Argon2 (spec requirement) +export async function hashPassword(password: string): Promise { + return argon2.hash(password, { + type: argon2.argon2id, + memoryCost: 65536, // 64 MB + timeCost: 3, + parallelism: 4, + }); +} + +export async function verifyPassword(password: string, hash: string): Promise { + // Support both bcrypt (legacy) and argon2 hashes for migration + if (hash.startsWith('$argon2')) { + return argon2.verify(hash, password); + } + // Legacy bcrypt support + return bcrypt.compare(password, hash); +} + +// Generate secure random token for magic links +export function generateSecureToken(): string { + return crypto.randomBytes(32).toString('hex'); +} + +// Create magic link token +export async function createMagicLinkToken( + userId: string, + type: 'login' | 'reset_password' | 'claim_account' | 'email_verification', + expiresInMinutes: number = 10 +): Promise { + const token = generateSecureToken(); + const now = getNow(); + const expiresAt = new Date(Date.now() + expiresInMinutes * 60 * 1000).toISOString(); + + await (db as any).insert(magicLinkTokens).values({ + id: generateId(), + userId, + token, + type, + expiresAt, + createdAt: now, + }); + + return token; +} + +// Verify and consume magic link token +export async function verifyMagicLinkToken( + token: string, + type: 'login' | 'reset_password' | 'claim_account' | 'email_verification' +): Promise<{ valid: boolean; userId?: string; error?: string }> { + const now = getNow(); + + const tokenRecord = await (db as any) + .select() + .from(magicLinkTokens) + .where( + and( + eq((magicLinkTokens as any).token, token), + eq((magicLinkTokens as any).type, type) + ) + ) + .get(); + + if (!tokenRecord) { + return { valid: false, error: 'Invalid token' }; + } + + if (tokenRecord.usedAt) { + return { valid: false, error: 'Token already used' }; + } + + if (new Date(tokenRecord.expiresAt) < new Date()) { + return { valid: false, error: 'Token expired' }; + } + + // Mark token as used + await (db as any) + .update(magicLinkTokens) + .set({ usedAt: now }) + .where(eq((magicLinkTokens as any).id, tokenRecord.id)); + + return { valid: true, userId: tokenRecord.userId }; +} + +// Create user session +export async function createUserSession( + userId: string, + userAgent?: string, + ipAddress?: string +): Promise { + const sessionToken = generateSecureToken(); + const now = getNow(); + const expiresAt = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(); // 30 days + + await (db as any).insert(userSessions).values({ + id: generateId(), + userId, + token: sessionToken, + userAgent: userAgent || null, + ipAddress: ipAddress || null, + lastActiveAt: now, + expiresAt, + createdAt: now, + }); + + return sessionToken; +} + +// Get user's active sessions +export async function getUserSessions(userId: string) { + const now = getNow(); + + return (db as any) + .select() + .from(userSessions) + .where( + and( + eq((userSessions as any).userId, userId), + gt((userSessions as any).expiresAt, now) + ) + ) + .all(); +} + +// Invalidate a specific session +export async function invalidateSession(sessionId: string, userId: string): Promise { + const result = await (db as any) + .delete(userSessions) + .where( + and( + eq((userSessions as any).id, sessionId), + eq((userSessions as any).userId, userId) + ) + ); + + return true; +} + +// Invalidate all user sessions (logout everywhere) +export async function invalidateAllUserSessions(userId: string): Promise { + await (db as any) + .delete(userSessions) + .where(eq((userSessions as any).userId, userId)); +} + +// Password validation (min 10 characters per spec) +export function validatePassword(password: string): { valid: boolean; error?: string } { + if (password.length < 10) { + return { valid: false, error: 'Password must be at least 10 characters long' }; + } + return { valid: true }; +} + +export async function createToken(userId: string, email: string, role: string): Promise { + const token = await new jose.SignJWT({ sub: userId, email, role }) + .setProtectedHeader({ alg: 'HS256' }) + .setIssuedAt() + .setIssuer(JWT_ISSUER) + .setAudience(JWT_AUDIENCE) + .setExpirationTime('7d') + .sign(JWT_SECRET); + + return token; +} + +export async function createRefreshToken(userId: string): Promise { + const token = await new jose.SignJWT({ sub: userId, type: 'refresh' }) + .setProtectedHeader({ alg: 'HS256' }) + .setIssuedAt() + .setIssuer(JWT_ISSUER) + .setExpirationTime('30d') + .sign(JWT_SECRET); + + return token; +} + +export async function verifyToken(token: string): Promise { + try { + const { payload } = await jose.jwtVerify(token, JWT_SECRET, { + issuer: JWT_ISSUER, + audience: JWT_AUDIENCE, + }); + return payload as unknown as JWTPayload; + } catch { + return null; + } +} + +export async function getAuthUser(c: Context) { + const authHeader = c.req.header('Authorization'); + if (!authHeader?.startsWith('Bearer ')) { + return null; + } + + const token = authHeader.slice(7); + const payload = await verifyToken(token); + + if (!payload) { + return null; + } + + const user = await (db as any).select().from(users).where(eq((users as any).id, payload.sub)).get(); + return user || null; +} + +export function requireAuth(roles?: string[]) { + return async (c: Context, next: () => Promise) => { + const user = await getAuthUser(c); + + if (!user) { + return c.json({ error: 'Unauthorized' }, 401); + } + + if (roles && !roles.includes(user.role)) { + return c.json({ error: 'Forbidden' }, 403); + } + + c.set('user', user); + await next(); + }; +} + +export async function isFirstUser(): Promise { + const result = await (db as any).select().from(users).limit(1).all(); + return !result || result.length === 0; +} diff --git a/backend/src/lib/email.ts b/backend/src/lib/email.ts new file mode 100644 index 0000000..4ba1dc2 --- /dev/null +++ b/backend/src/lib/email.ts @@ -0,0 +1,784 @@ +// Email service for Spanglish platform +// Supports multiple email providers: Resend, SMTP (Nodemailer) + +import { db, emailTemplates, emailLogs, events, tickets, payments, users } from '../db/index.js'; +import { eq, and } from 'drizzle-orm'; +import { nanoid } from 'nanoid'; +import { getNow } from './utils.js'; +import { + replaceTemplateVariables, + wrapInBaseTemplate, + defaultTemplates, + type DefaultTemplate +} from './emailTemplates.js'; +import nodemailer from 'nodemailer'; +import type { Transporter } from 'nodemailer'; + +// ==================== Types ==================== + +interface SendEmailOptions { + to: string | string[]; + subject: string; + html: string; + text?: string; + replyTo?: string; +} + +interface SendEmailResult { + success: boolean; + messageId?: string; + error?: string; +} + +type EmailProvider = 'resend' | 'smtp' | 'console'; + +// ==================== Provider Configuration ==================== + +function getEmailProvider(): EmailProvider { + const provider = (process.env.EMAIL_PROVIDER || 'console').toLowerCase(); + if (provider === 'resend' || provider === 'smtp' || provider === 'console') { + return provider; + } + console.warn(`[Email] Unknown provider "${provider}", falling back to console`); + return 'console'; +} + +function getFromEmail(): string { + return process.env.EMAIL_FROM || 'noreply@spanglish.com'; +} + +function getFromName(): string { + return process.env.EMAIL_FROM_NAME || 'Spanglish'; +} + +// ==================== SMTP Configuration ==================== + +interface SMTPConfig { + host: string; + port: number; + secure: boolean; + auth?: { + user: string; + pass: string; + }; +} + +function getSMTPConfig(): SMTPConfig | null { + const host = process.env.SMTP_HOST; + const port = parseInt(process.env.SMTP_PORT || '587'); + const user = process.env.SMTP_USER; + const pass = process.env.SMTP_PASS; + const secure = process.env.SMTP_SECURE === 'true' || port === 465; + + if (!host) { + return null; + } + + const config: SMTPConfig = { + host, + port, + secure, + }; + + if (user && pass) { + config.auth = { user, pass }; + } + + return config; +} + +// Cached SMTP transporter +let smtpTransporter: Transporter | null = null; + +function getSMTPTransporter(): Transporter | null { + if (smtpTransporter) { + return smtpTransporter; + } + + const config = getSMTPConfig(); + if (!config) { + console.error('[Email] SMTP configuration missing'); + return null; + } + + smtpTransporter = nodemailer.createTransport({ + host: config.host, + port: config.port, + secure: config.secure, + auth: config.auth, + // Additional options for better deliverability + pool: true, + maxConnections: 5, + maxMessages: 100, + // TLS options + tls: { + rejectUnauthorized: process.env.SMTP_TLS_REJECT_UNAUTHORIZED !== 'false', + }, + }); + + // Verify connection configuration + smtpTransporter.verify((error, success) => { + if (error) { + console.error('[Email] SMTP connection verification failed:', error.message); + } else { + console.log('[Email] SMTP server is ready to send emails'); + } + }); + + return smtpTransporter; +} + +// ==================== Email Providers ==================== + +/** + * Send email using Resend API + */ +async function sendWithResend(options: SendEmailOptions): Promise { + const apiKey = process.env.EMAIL_API_KEY || process.env.RESEND_API_KEY; + const fromEmail = getFromEmail(); + const fromName = getFromName(); + + if (!apiKey) { + console.error('[Email] Resend API key not configured'); + return { success: false, error: 'Resend API key not configured' }; + } + + try { + const response = await fetch('https://api.resend.com/emails', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${apiKey}`, + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + from: `${fromName} <${fromEmail}>`, + to: Array.isArray(options.to) ? options.to : [options.to], + subject: options.subject, + html: options.html, + text: options.text, + reply_to: options.replyTo, + }), + }); + + const data = await response.json(); + + if (!response.ok) { + console.error('[Email] Resend API error:', data); + return { + success: false, + error: data.message || data.error || 'Failed to send email' + }; + } + + console.log('[Email] Email sent via Resend:', data.id); + return { + success: true, + messageId: data.id + }; + } catch (error: any) { + console.error('[Email] Resend error:', error); + return { + success: false, + error: error.message || 'Failed to send email via Resend' + }; + } +} + +/** + * Send email using SMTP (Nodemailer) + */ +async function sendWithSMTP(options: SendEmailOptions): Promise { + const transporter = getSMTPTransporter(); + + if (!transporter) { + return { success: false, error: 'SMTP not configured' }; + } + + const fromEmail = getFromEmail(); + const fromName = getFromName(); + + try { + const info = await transporter.sendMail({ + from: `"${fromName}" <${fromEmail}>`, + to: Array.isArray(options.to) ? options.to.join(', ') : options.to, + replyTo: options.replyTo, + subject: options.subject, + html: options.html, + text: options.text, + }); + + console.log('[Email] Email sent via SMTP:', info.messageId); + return { + success: true, + messageId: info.messageId + }; + } catch (error: any) { + console.error('[Email] SMTP error:', error); + return { + success: false, + error: error.message || 'Failed to send email via SMTP' + }; + } +} + +/** + * Console logger for development/testing (no actual email sent) + */ +async function sendWithConsole(options: SendEmailOptions): Promise { + const to = Array.isArray(options.to) ? options.to.join(', ') : options.to; + + console.log('\n========================================'); + console.log('[Email] Console Mode - Email Preview'); + console.log('========================================'); + console.log(`To: ${to}`); + console.log(`Subject: ${options.subject}`); + console.log(`Reply-To: ${options.replyTo || 'N/A'}`); + console.log('----------------------------------------'); + console.log('HTML Body (truncated):'); + console.log(options.html?.substring(0, 500) + '...'); + console.log('========================================\n'); + + return { + success: true, + messageId: `console-${Date.now()}` + }; +} + +/** + * Main send function that routes to the appropriate provider + */ +async function sendEmail(options: SendEmailOptions): Promise { + const provider = getEmailProvider(); + + console.log(`[Email] Sending email via ${provider} to ${Array.isArray(options.to) ? options.to.join(', ') : options.to}`); + + switch (provider) { + case 'resend': + return sendWithResend(options); + case 'smtp': + return sendWithSMTP(options); + case 'console': + default: + return sendWithConsole(options); + } +} + +// ==================== Email Service ==================== + +export const emailService = { + /** + * Get current email provider info + */ + getProviderInfo(): { provider: EmailProvider; configured: boolean } { + const provider = getEmailProvider(); + let configured = false; + + switch (provider) { + case 'resend': + configured = !!(process.env.EMAIL_API_KEY || process.env.RESEND_API_KEY); + break; + case 'smtp': + configured = !!process.env.SMTP_HOST; + break; + case 'console': + configured = true; + break; + } + + return { provider, configured }; + }, + + /** + * Test email configuration by sending a test email + */ + async testConnection(to: string): Promise { + const { provider, configured } = this.getProviderInfo(); + + if (!configured) { + return { success: false, error: `Email provider "${provider}" is not configured` }; + } + + return sendEmail({ + to, + subject: 'Spanglish - Email Test', + html: ` +

Email Configuration Test

+

This is a test email from your Spanglish platform.

+

Provider: ${provider}

+

Timestamp: ${new Date().toISOString()}

+

If you received this email, your email configuration is working correctly!

+ `, + text: `Email Configuration Test\n\nProvider: ${provider}\nTimestamp: ${new Date().toISOString()}\n\nIf you received this email, your email configuration is working correctly!`, + }); + }, + + /** + * Get common variables for all emails + */ + getCommonVariables(): Record { + return { + siteName: 'Spanglish', + siteUrl: process.env.FRONTEND_URL || 'https://spanglish.com', + currentYear: new Date().getFullYear().toString(), + supportEmail: process.env.EMAIL_FROM || 'hello@spanglish.com', + }; + }, + + /** + * Format date for emails + */ + formatDate(dateStr: string, locale: string = 'en'): string { + const date = new Date(dateStr); + return date.toLocaleDateString(locale === 'es' ? 'es-ES' : 'en-US', { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric', + }); + }, + + /** + * Format time for emails + */ + formatTime(dateStr: string, locale: string = 'en'): string { + const date = new Date(dateStr); + return date.toLocaleTimeString(locale === 'es' ? 'es-ES' : 'en-US', { + hour: '2-digit', + minute: '2-digit', + }); + }, + + /** + * Format currency + */ + formatCurrency(amount: number, currency: string = 'PYG'): string { + if (currency === 'PYG') { + return `${amount.toLocaleString('es-PY')} PYG`; + } + return `$${amount.toFixed(2)} ${currency}`; + }, + + /** + * Get a template by slug + */ + async getTemplate(slug: string): Promise { + const template = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).slug, slug)) + .get(); + + return template || null; + }, + + /** + * Seed default templates if they don't exist + */ + async seedDefaultTemplates(): Promise { + console.log('[Email] Checking for default templates...'); + + for (const template of defaultTemplates) { + const existing = await this.getTemplate(template.slug); + + if (!existing) { + console.log(`[Email] Creating template: ${template.name}`); + const now = getNow(); + + await (db as any).insert(emailTemplates).values({ + id: nanoid(), + name: template.name, + slug: template.slug, + subject: template.subject, + subjectEs: template.subjectEs, + bodyHtml: template.bodyHtml, + bodyHtmlEs: template.bodyHtmlEs, + bodyText: template.bodyText, + bodyTextEs: template.bodyTextEs, + description: template.description, + variables: JSON.stringify(template.variables), + isSystem: template.isSystem ? 1 : 0, + isActive: 1, + createdAt: now, + updatedAt: now, + }); + } + } + + console.log('[Email] Default templates check complete'); + }, + + /** + * Send an email using a template + */ + async sendTemplateEmail(params: { + templateSlug: string; + to: string; + toName?: string; + variables: Record; + locale?: string; + eventId?: string; + sentBy?: string; + }): Promise<{ success: boolean; logId?: string; error?: string }> { + const { templateSlug, to, toName, variables, locale = 'en', eventId, sentBy } = params; + + // Get template + const template = await this.getTemplate(templateSlug); + if (!template) { + return { success: false, error: `Template "${templateSlug}" not found` }; + } + + // Build variables + const allVariables = { + ...this.getCommonVariables(), + lang: locale, + ...variables, + }; + + // Get localized content + const subject = locale === 'es' && template.subjectEs + ? template.subjectEs + : template.subject; + const bodyHtml = locale === 'es' && template.bodyHtmlEs + ? template.bodyHtmlEs + : template.bodyHtml; + const bodyText = locale === 'es' && template.bodyTextEs + ? template.bodyTextEs + : template.bodyText; + + // Replace variables + const finalSubject = replaceTemplateVariables(subject, allVariables); + const finalBodyContent = replaceTemplateVariables(bodyHtml, allVariables); + const finalBodyHtml = wrapInBaseTemplate(finalBodyContent, { ...allVariables, subject: finalSubject }); + const finalBodyText = bodyText ? replaceTemplateVariables(bodyText, allVariables) : undefined; + + // Create log entry + const logId = nanoid(); + const now = getNow(); + + await (db as any).insert(emailLogs).values({ + id: logId, + templateId: template.id, + eventId: eventId || null, + recipientEmail: to, + recipientName: toName || null, + subject: finalSubject, + bodyHtml: finalBodyHtml, + status: 'pending', + sentBy: sentBy || null, + createdAt: now, + }); + + // Send email + const result = await sendEmail({ + to, + subject: finalSubject, + html: finalBodyHtml, + text: finalBodyText, + }); + + // Update log with result + if (result.success) { + await (db as any) + .update(emailLogs) + .set({ + status: 'sent', + sentAt: getNow(), + }) + .where(eq((emailLogs as any).id, logId)); + } else { + await (db as any) + .update(emailLogs) + .set({ + status: 'failed', + errorMessage: result.error, + }) + .where(eq((emailLogs as any).id, logId)); + } + + return { + success: result.success, + logId, + error: result.error + }; + }, + + /** + * Send booking confirmation email + */ + async sendBookingConfirmation(ticketId: string): Promise<{ success: boolean; error?: string }> { + // Get ticket with event info + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, ticketId)) + .get(); + + if (!ticket) { + return { success: false, error: 'Ticket not found' }; + } + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + if (!event) { + return { success: false, error: 'Event not found' }; + } + + const locale = ticket.preferredLanguage || 'en'; + const eventTitle = locale === 'es' && event.titleEs ? event.titleEs : event.title; + + const attendeeFullName = `${ticket.attendeeFirstName} ${ticket.attendeeLastName || ''}`.trim(); + return this.sendTemplateEmail({ + templateSlug: 'booking-confirmation', + to: ticket.attendeeEmail, + toName: attendeeFullName, + locale, + eventId: event.id, + variables: { + attendeeName: attendeeFullName, + attendeeEmail: ticket.attendeeEmail, + ticketId: ticket.id, + qrCode: ticket.qrCode || '', + eventTitle, + eventDate: this.formatDate(event.startDatetime, locale), + eventTime: this.formatTime(event.startDatetime, locale), + eventLocation: event.location, + eventLocationUrl: event.locationUrl || '', + eventPrice: this.formatCurrency(event.price, event.currency), + }, + }); + }, + + /** + * Send payment receipt email + */ + async sendPaymentReceipt(paymentId: string): Promise<{ success: boolean; error?: string }> { + // Get payment with ticket and event info + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, paymentId)) + .get(); + + if (!payment) { + return { success: false, error: 'Payment not found' }; + } + + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + if (!ticket) { + return { success: false, error: 'Ticket not found' }; + } + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + if (!event) { + return { success: false, error: 'Event not found' }; + } + + const locale = ticket.preferredLanguage || 'en'; + const eventTitle = locale === 'es' && event.titleEs ? event.titleEs : event.title; + + const paymentMethodNames: Record> = { + en: { bancard: 'Card', lightning: 'Lightning (Bitcoin)', cash: 'Cash' }, + es: { bancard: 'Tarjeta', lightning: 'Lightning (Bitcoin)', cash: 'Efectivo' }, + }; + + const receiptFullName = `${ticket.attendeeFirstName} ${ticket.attendeeLastName || ''}`.trim(); + return this.sendTemplateEmail({ + templateSlug: 'payment-receipt', + to: ticket.attendeeEmail, + toName: receiptFullName, + locale, + eventId: event.id, + variables: { + attendeeName: receiptFullName, + ticketId: ticket.id, + eventTitle, + eventDate: this.formatDate(event.startDatetime, locale), + paymentAmount: this.formatCurrency(payment.amount, payment.currency), + paymentMethod: paymentMethodNames[locale]?.[payment.provider] || payment.provider, + paymentReference: payment.reference || payment.id, + paymentDate: this.formatDate(payment.paidAt || payment.createdAt, locale), + }, + }); + }, + + /** + * Send custom email to event attendees + */ + async sendToEventAttendees(params: { + eventId: string; + templateSlug: string; + customVariables?: Record; + recipientFilter?: 'all' | 'confirmed' | 'pending' | 'checked_in'; + sentBy: string; + }): Promise<{ success: boolean; sentCount: number; failedCount: number; errors: string[] }> { + const { eventId, templateSlug, customVariables = {}, recipientFilter = 'confirmed', sentBy } = params; + + // Get event + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, eventId)) + .get(); + + if (!event) { + return { success: false, sentCount: 0, failedCount: 0, errors: ['Event not found'] }; + } + + // Get tickets based on filter + let ticketQuery = (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).eventId, eventId)); + + if (recipientFilter !== 'all') { + ticketQuery = ticketQuery.where( + and( + eq((tickets as any).eventId, eventId), + eq((tickets as any).status, recipientFilter) + ) + ); + } + + const eventTickets = await ticketQuery.all(); + + if (eventTickets.length === 0) { + return { success: true, sentCount: 0, failedCount: 0, errors: ['No recipients found'] }; + } + + let sentCount = 0; + let failedCount = 0; + const errors: string[] = []; + + // Send to each attendee + for (const ticket of eventTickets) { + const locale = ticket.preferredLanguage || 'en'; + const eventTitle = locale === 'es' && event.titleEs ? event.titleEs : event.title; + + const bulkFullName = `${ticket.attendeeFirstName} ${ticket.attendeeLastName || ''}`.trim(); + const result = await this.sendTemplateEmail({ + templateSlug, + to: ticket.attendeeEmail, + toName: bulkFullName, + locale, + eventId: event.id, + sentBy, + variables: { + attendeeName: bulkFullName, + attendeeEmail: ticket.attendeeEmail, + ticketId: ticket.id, + eventTitle, + eventDate: this.formatDate(event.startDatetime, locale), + eventTime: this.formatTime(event.startDatetime, locale), + eventLocation: event.location, + eventLocationUrl: event.locationUrl || '', + ...customVariables, + }, + }); + + if (result.success) { + sentCount++; + } else { + failedCount++; + errors.push(`Failed to send to ${ticket.attendeeEmail}: ${result.error}`); + } + } + + return { + success: failedCount === 0, + sentCount, + failedCount, + errors, + }; + }, + + /** + * Send a custom email (not from template) + */ + async sendCustomEmail(params: { + to: string; + toName?: string; + subject: string; + bodyHtml: string; + bodyText?: string; + eventId?: string; + sentBy: string; + }): Promise<{ success: boolean; logId?: string; error?: string }> { + const { to, toName, subject, bodyHtml, bodyText, eventId, sentBy } = params; + + const allVariables = { + ...this.getCommonVariables(), + subject, + }; + + const finalBodyHtml = wrapInBaseTemplate(bodyHtml, allVariables); + + // Create log entry + const logId = nanoid(); + const now = getNow(); + + await (db as any).insert(emailLogs).values({ + id: logId, + templateId: null, + eventId: eventId || null, + recipientEmail: to, + recipientName: toName || null, + subject, + bodyHtml: finalBodyHtml, + status: 'pending', + sentBy, + createdAt: now, + }); + + // Send email + const result = await sendEmail({ + to, + subject, + html: finalBodyHtml, + text: bodyText, + }); + + // Update log + if (result.success) { + await (db as any) + .update(emailLogs) + .set({ + status: 'sent', + sentAt: getNow(), + }) + .where(eq((emailLogs as any).id, logId)); + } else { + await (db as any) + .update(emailLogs) + .set({ + status: 'failed', + errorMessage: result.error, + }) + .where(eq((emailLogs as any).id, logId)); + } + + return { + success: result.success, + logId, + error: result.error + }; + }, +}; + +// Export the main sendEmail function for direct use +export { sendEmail }; + +export default emailService; diff --git a/backend/src/lib/emailTemplates.ts b/backend/src/lib/emailTemplates.ts new file mode 100644 index 0000000..c4b39eb --- /dev/null +++ b/backend/src/lib/emailTemplates.ts @@ -0,0 +1,675 @@ +// Email templates for Spanglish platform +// These are the default templates that get seeded into the database + +export interface EmailVariable { + name: string; + description: string; + example: string; +} + +export interface DefaultTemplate { + name: string; + slug: string; + subject: string; + subjectEs: string; + bodyHtml: string; + bodyHtmlEs: string; + bodyText: string; + bodyTextEs: string; + description: string; + variables: EmailVariable[]; + isSystem: boolean; +} + +// Common variables available in all templates +export const commonVariables: EmailVariable[] = [ + { name: 'siteName', description: 'Website name', example: 'Spanglish' }, + { name: 'siteUrl', description: 'Website URL', example: 'https://spanglish.com' }, + { name: 'currentYear', description: 'Current year', example: '2026' }, + { name: 'supportEmail', description: 'Support email address', example: 'hello@spanglish.com' }, +]; + +// Booking-specific variables +export const bookingVariables: EmailVariable[] = [ + { name: 'attendeeName', description: 'Attendee full name', example: 'John Doe' }, + { name: 'attendeeEmail', description: 'Attendee email', example: 'john@example.com' }, + { name: 'ticketId', description: 'Unique ticket ID', example: 'TKT-ABC123' }, + { name: 'qrCode', description: 'QR code for check-in', example: 'data:image/png;base64,...' }, + { name: 'eventTitle', description: 'Event title', example: 'Spanglish Night - January Edition' }, + { name: 'eventDate', description: 'Event date formatted', example: 'January 28, 2026' }, + { name: 'eventTime', description: 'Event time', example: '7:00 PM' }, + { name: 'eventLocation', description: 'Event location', example: 'Casa Cultural, Asunción' }, + { name: 'eventLocationUrl', description: 'Google Maps link', example: 'https://maps.google.com/...' }, + { name: 'eventPrice', description: 'Event price with currency', example: '50,000 PYG' }, +]; + +// Payment-specific variables +export const paymentVariables: EmailVariable[] = [ + { name: 'paymentAmount', description: 'Payment amount with currency', example: '50,000 PYG' }, + { name: 'paymentMethod', description: 'Payment method used', example: 'Lightning' }, + { name: 'paymentReference', description: 'Payment reference ID', example: 'PAY-XYZ789' }, + { name: 'paymentDate', description: 'Payment date', example: 'January 28, 2026' }, +]; + +// Base HTML wrapper for all emails +export const baseEmailWrapper = ` + + + + + + {{subject}} + + + +
+
+

Spanglish

+
+
+ {{content}} +
+ +
+ + +`; + +// Default templates +export const defaultTemplates: DefaultTemplate[] = [ + { + name: 'Booking Confirmation', + slug: 'booking-confirmation', + subject: 'Your Spanglish ticket is confirmed 🎉', + subjectEs: 'Tu entrada de Spanglish está confirmada 🎉', + bodyHtml: ` +

Your Booking is Confirmed!

+

Hi {{attendeeName}},

+

Great news! Your spot for {{eventTitle}} has been confirmed. We can't wait to see you there!

+ +
+

📅 Event Details

+
Event: {{eventTitle}}
+
Date: {{eventDate}}
+
Time: {{eventTime}}
+
Location: {{eventLocation}}
+ {{#if eventLocationUrl}} +

📍 View on Map

+ {{/if}} +
+ +
+

Your Ticket ID

+

{{ticketId}}

+
+ + {{#if qrCode}} +
+

Show this QR code at check-in:

+ Check-in QR Code +
+ {{/if}} + +
+ 💡 Important: Please arrive 10-15 minutes early for check-in. Bring your ticket ID or show this email. +
+ +

See you at Spanglish!

+

The Spanglish Team

+ `, + bodyHtmlEs: ` +

¡Tu Reserva está Confirmada!

+

Hola {{attendeeName}},

+

¡Excelentes noticias! Tu lugar para {{eventTitle}} ha sido confirmado. ¡No podemos esperar a verte ahí!

+ +
+

📅 Detalles del Evento

+
Evento: {{eventTitle}}
+
Fecha: {{eventDate}}
+
Hora: {{eventTime}}
+
Ubicación: {{eventLocation}}
+ {{#if eventLocationUrl}} +

📍 Ver en el Mapa

+ {{/if}} +
+ +
+

Tu ID de Ticket

+

{{ticketId}}

+
+ + {{#if qrCode}} +
+

Muestra este código QR en el check-in:

+ Código QR de Check-in +
+ {{/if}} + +
+ 💡 Importante: Por favor llega 10-15 minutos antes para el check-in. Trae tu ID de ticket o muestra este email. +
+ +

¡Nos vemos en Spanglish!

+

El Equipo de Spanglish

+ `, + bodyText: `Your Booking is Confirmed! + +Hi {{attendeeName}}, + +Great news! Your spot for {{eventTitle}} has been confirmed. + +Event Details: +- Event: {{eventTitle}} +- Date: {{eventDate}} +- Time: {{eventTime}} +- Location: {{eventLocation}} + +Your Ticket ID: {{ticketId}} + +Important: Please arrive 10-15 minutes early for check-in. Bring your ticket ID or show this email. + +See you at Spanglish! +The Spanglish Team`, + bodyTextEs: `¡Tu Reserva está Confirmada! + +Hola {{attendeeName}}, + +¡Excelentes noticias! Tu lugar para {{eventTitle}} ha sido confirmado. + +Detalles del Evento: +- Evento: {{eventTitle}} +- Fecha: {{eventDate}} +- Hora: {{eventTime}} +- Ubicación: {{eventLocation}} + +Tu ID de Ticket: {{ticketId}} + +Importante: Por favor llega 10-15 minutos antes para el check-in. Trae tu ID de ticket o muestra este email. + +¡Nos vemos en Spanglish! +El Equipo de Spanglish`, + description: 'Sent automatically when a booking is confirmed after payment', + variables: [...commonVariables, ...bookingVariables], + isSystem: true, + }, + { + name: 'Payment Receipt', + slug: 'payment-receipt', + subject: 'Payment Receipt - Spanglish', + subjectEs: 'Recibo de Pago - Spanglish', + bodyHtml: ` +

Payment Received

+

Hi {{attendeeName}},

+

Thank you for your payment! Here's your receipt for your records.

+ +
+

💳 Payment Details

+
Amount: {{paymentAmount}}
+
Method: {{paymentMethod}}
+
Reference: {{paymentReference}}
+
Date: {{paymentDate}}
+
+ +
+ +
+

📅 Event

+
Event: {{eventTitle}}
+
Date: {{eventDate}}
+
Ticket ID: {{ticketId}}
+
+ +

Keep this email as your payment confirmation.

+

The Spanglish Team

+ `, + bodyHtmlEs: ` +

Pago Recibido

+

Hola {{attendeeName}},

+

¡Gracias por tu pago! Aquí está tu recibo para tus registros.

+ +
+

💳 Detalles del Pago

+
Monto: {{paymentAmount}}
+
Método: {{paymentMethod}}
+
Referencia: {{paymentReference}}
+
Fecha: {{paymentDate}}
+
+ +
+ +
+

📅 Evento

+
Evento: {{eventTitle}}
+
Fecha: {{eventDate}}
+
ID de Ticket: {{ticketId}}
+
+ +

Guarda este email como tu confirmación de pago.

+

El Equipo de Spanglish

+ `, + bodyText: `Payment Received + +Hi {{attendeeName}}, + +Thank you for your payment! Here's your receipt: + +Payment Details: +- Amount: {{paymentAmount}} +- Method: {{paymentMethod}} +- Reference: {{paymentReference}} +- Date: {{paymentDate}} + +Event: {{eventTitle}} +Date: {{eventDate}} +Ticket ID: {{ticketId}} + +Keep this email as your payment confirmation. + +The Spanglish Team`, + bodyTextEs: `Pago Recibido + +Hola {{attendeeName}}, + +¡Gracias por tu pago! Aquí está tu recibo: + +Detalles del Pago: +- Monto: {{paymentAmount}} +- Método: {{paymentMethod}} +- Referencia: {{paymentReference}} +- Fecha: {{paymentDate}} + +Evento: {{eventTitle}} +Fecha: {{eventDate}} +ID de Ticket: {{ticketId}} + +Guarda este email como tu confirmación de pago. + +El Equipo de Spanglish`, + description: 'Sent automatically after payment is processed', + variables: [...commonVariables, ...bookingVariables, ...paymentVariables], + isSystem: true, + }, + { + name: 'Event Update', + slug: 'event-update', + subject: 'Important Update: {{eventTitle}}', + subjectEs: 'Actualización Importante: {{eventTitle}}', + bodyHtml: ` +

Important Event Update

+

Hi {{attendeeName}},

+

We have an important update regarding {{eventTitle}}.

+ +
+

📢 Message

+

{{customMessage}}

+
+ +
+

📅 Event Details

+
Event: {{eventTitle}}
+
Date: {{eventDate}}
+
Time: {{eventTime}}
+
Location: {{eventLocation}}
+
+ +

If you have any questions, please don't hesitate to contact us.

+

The Spanglish Team

+ `, + bodyHtmlEs: ` +

Actualización Importante del Evento

+

Hola {{attendeeName}},

+

Tenemos una actualización importante sobre {{eventTitle}}.

+ +
+

📢 Mensaje

+

{{customMessage}}

+
+ +
+

📅 Detalles del Evento

+
Evento: {{eventTitle}}
+
Fecha: {{eventDate}}
+
Hora: {{eventTime}}
+
Ubicación: {{eventLocation}}
+
+ +

Si tienes alguna pregunta, no dudes en contactarnos.

+

El Equipo de Spanglish

+ `, + bodyText: `Important Event Update + +Hi {{attendeeName}}, + +We have an important update regarding {{eventTitle}}. + +Message: +{{customMessage}} + +Event Details: +- Event: {{eventTitle}} +- Date: {{eventDate}} +- Time: {{eventTime}} +- Location: {{eventLocation}} + +If you have any questions, please don't hesitate to contact us. + +The Spanglish Team`, + bodyTextEs: `Actualización Importante del Evento + +Hola {{attendeeName}}, + +Tenemos una actualización importante sobre {{eventTitle}}. + +Mensaje: +{{customMessage}} + +Detalles del Evento: +- Evento: {{eventTitle}} +- Fecha: {{eventDate}} +- Hora: {{eventTime}} +- Ubicación: {{eventLocation}} + +Si tienes alguna pregunta, no dudes en contactarnos. + +El Equipo de Spanglish`, + description: 'Template for sending event updates to attendees (sent manually)', + variables: [ + ...commonVariables, + ...bookingVariables, + { name: 'customMessage', description: 'Custom message from admin', example: 'The venue has changed...' } + ], + isSystem: true, + }, + { + name: 'Post-Event Follow-Up', + slug: 'post-event-followup', + subject: 'Thanks for joining {{eventTitle}}! 🙏', + subjectEs: '¡Gracias por asistir a {{eventTitle}}! 🙏', + bodyHtml: ` +

Thank You for Joining Us!

+

Hi {{attendeeName}},

+

Thank you so much for being part of {{eventTitle}}! We hope you had a great time practicing languages and meeting new people.

+ +
+

💬 Share Your Experience

+

{{customMessage}}

+
+ + {{#if nextEventTitle}} +
+

📅 Next Event

+
Event: {{nextEventTitle}}
+
Date: {{nextEventDate}}
+

+ Reserve Your Spot +

+
+ {{/if}} + +

Follow us on social media for updates and photos from the event!

+

See you at the next Spanglish!

+

The Spanglish Team

+ `, + bodyHtmlEs: ` +

¡Gracias por Unirte!

+

Hola {{attendeeName}},

+

¡Muchas gracias por ser parte de {{eventTitle}}! Esperamos que hayas pasado un gran momento practicando idiomas y conociendo gente nueva.

+ +
+

💬 Comparte tu Experiencia

+

{{customMessage}}

+
+ + {{#if nextEventTitle}} +
+

📅 Próximo Evento

+
Evento: {{nextEventTitle}}
+
Fecha: {{nextEventDate}}
+

+ Reserva tu Lugar +

+
+ {{/if}} + +

¡Síguenos en redes sociales para actualizaciones y fotos del evento!

+

¡Nos vemos en el próximo Spanglish!

+

El Equipo de Spanglish

+ `, + bodyText: `Thank You for Joining Us! + +Hi {{attendeeName}}, + +Thank you so much for being part of {{eventTitle}}! We hope you had a great time. + +{{customMessage}} + +Follow us on social media for updates and photos from the event! + +See you at the next Spanglish! +The Spanglish Team`, + bodyTextEs: `¡Gracias por Unirte! + +Hola {{attendeeName}}, + +¡Muchas gracias por ser parte de {{eventTitle}}! Esperamos que hayas pasado un gran momento. + +{{customMessage}} + +¡Síguenos en redes sociales para actualizaciones y fotos del evento! + +¡Nos vemos en el próximo Spanglish! +El Equipo de Spanglish`, + description: 'Template for post-event follow-up emails (sent manually)', + variables: [ + ...commonVariables, + ...bookingVariables, + { name: 'customMessage', description: 'Custom message from admin', example: 'We would love to hear your feedback!' }, + { name: 'nextEventTitle', description: 'Next event title (optional)', example: 'Spanglish Night - February' }, + { name: 'nextEventDate', description: 'Next event date (optional)', example: 'February 25, 2026' }, + { name: 'nextEventUrl', description: 'Next event booking URL (optional)', example: 'https://spanglish.com/book/...' }, + ], + isSystem: true, + }, + { + name: 'Custom Email', + slug: 'custom-email', + subject: '{{customSubject}}', + subjectEs: '{{customSubject}}', + bodyHtml: ` +

{{customTitle}}

+

Hi {{attendeeName}},

+ +
+ {{customMessage}} +
+ +

The Spanglish Team

+ `, + bodyHtmlEs: ` +

{{customTitle}}

+

Hola {{attendeeName}},

+ +
+ {{customMessage}} +
+ +

El Equipo de Spanglish

+ `, + bodyText: `{{customTitle}} + +Hi {{attendeeName}}, + +{{customMessage}} + +The Spanglish Team`, + bodyTextEs: `{{customTitle}} + +Hola {{attendeeName}}, + +{{customMessage}} + +El Equipo de Spanglish`, + description: 'Blank template for fully custom emails', + variables: [ + ...commonVariables, + { name: 'attendeeName', description: 'Recipient name', example: 'John Doe' }, + { name: 'customSubject', description: 'Email subject', example: 'Special Announcement' }, + { name: 'customTitle', description: 'Email title/heading', example: 'Special Announcement' }, + { name: 'customMessage', description: 'Email body content (supports HTML)', example: '

Your message here...

' }, + ], + isSystem: true, + }, +]; + +// Helper function to replace template variables +export function replaceTemplateVariables(template: string, variables: Record): string { + let result = template; + + // Handle conditional blocks {{#if variable}}...{{/if}} + const conditionalRegex = /\{\{#if\s+(\w+)\}\}([\s\S]*?)\{\{\/if\}\}/g; + result = result.replace(conditionalRegex, (match, varName, content) => { + return variables[varName] ? content : ''; + }); + + // Replace simple variables {{variable}} + const variableRegex = /\{\{(\w+)\}\}/g; + result = result.replace(variableRegex, (match, varName) => { + return variables[varName] !== undefined ? String(variables[varName]) : match; + }); + + return result; +} + +// Helper to wrap content in the base template +export function wrapInBaseTemplate(content: string, variables: Record): string { + const wrappedContent = baseEmailWrapper.replace('{{content}}', content); + return replaceTemplateVariables(wrappedContent, variables); +} + +// Get all available variables for a template by slug +export function getTemplateVariables(slug: string): EmailVariable[] { + const template = defaultTemplates.find(t => t.slug === slug); + return template?.variables || commonVariables; +} diff --git a/backend/src/lib/lnbits.ts b/backend/src/lib/lnbits.ts new file mode 100644 index 0000000..5bdb13c --- /dev/null +++ b/backend/src/lib/lnbits.ts @@ -0,0 +1,212 @@ +/** + * LNbits API client for Lightning Network payments + * + * Uses LNbits API to create and manage Lightning invoices with webhook support + * for payment detection. + */ + +// Read environment variables dynamically to ensure dotenv has loaded +function getConfig() { + return { + url: process.env.LNBITS_URL || '', + apiKey: process.env.LNBITS_API_KEY || '', // Invoice/read key + webhookSecret: process.env.LNBITS_WEBHOOK_SECRET || '', + }; +} + +export interface LNbitsInvoice { + paymentHash: string; + paymentRequest: string; // BOLT11 invoice string + checkingId: string; + amount: number; // Amount in satoshis (after conversion) + fiatAmount?: number; // Original fiat amount + fiatCurrency?: string; // Original fiat currency + memo: string; + expiry: string; + status: string; + extra?: Record; +} + +export interface CreateInvoiceParams { + amount: number; // Amount in the specified unit + unit?: string; // Currency unit: 'sat', 'USD', 'PYG', etc. (default: 'sat') + memo: string; + webhookUrl?: string; + expiry?: number; // Expiry in seconds (default 3600 = 1 hour) + extra?: Record; // Additional metadata +} + +/** + * Check if LNbits is configured + */ +export function isLNbitsConfigured(): boolean { + const config = getConfig(); + return !!(config.url && config.apiKey); +} + + +/** + * Create a Lightning invoice using LNbits + * LNbits supports fiat currencies directly - it will convert to sats automatically + */ +export async function createInvoice(params: CreateInvoiceParams): Promise { + const config = getConfig(); + + if (!config.url || !config.apiKey) { + throw new Error('LNbits is not configured. Please set LNBITS_URL and LNBITS_API_KEY.'); + } + + const apiEndpoint = '/api/v1/payments'; + + // LNbits supports fiat currencies via the 'unit' parameter + // It will automatically convert to sats using its exchange rate provider + const payload: any = { + out: false, // false = create invoice for receiving payment + amount: params.amount, + unit: params.unit || 'sat', // Support fiat currencies like 'USD', 'PYG', etc. + memo: params.memo, + }; + + if (params.webhookUrl) { + payload.webhook = params.webhookUrl; + } + + if (params.expiry) { + payload.expiry = params.expiry; + } + + if (params.extra) { + payload.extra = params.extra; + } + + console.log('Creating LNbits invoice:', { + url: `${config.url}${apiEndpoint}`, + amount: params.amount, + unit: payload.unit, + memo: params.memo, + webhook: params.webhookUrl, + }); + + const response = await fetch(`${config.url}${apiEndpoint}`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Api-Key': config.apiKey, + }, + body: JSON.stringify(payload), + }); + + if (!response.ok) { + const errorText = await response.text(); + console.error('LNbits invoice creation failed:', { + status: response.status, + statusText: response.statusText, + error: errorText, + }); + throw new Error(`Failed to create Lightning invoice: ${errorText}`); + } + + const data = await response.json(); + + // LNbits returns amount in millisatoshis for the actual invoice + // Convert to satoshis for display + const amountSats = data.amount ? Math.round(data.amount / 1000) : params.amount; + + console.log('LNbits invoice created successfully:', { + paymentHash: data.payment_hash, + amountMsats: data.amount, + amountSats, + hasPaymentRequest: !!data.payment_request, + }); + + return { + paymentHash: data.payment_hash, + paymentRequest: data.payment_request || data.bolt11, + checkingId: data.checking_id, + amount: amountSats, // Amount in satoshis + fiatAmount: params.unit && params.unit !== 'sat' ? params.amount : undefined, + fiatCurrency: params.unit && params.unit !== 'sat' ? params.unit : undefined, + memo: params.memo, + expiry: data.expiry || '', + status: data.status || 'pending', + extra: params.extra, + }; +} + +/** + * Get invoice/payment status from LNbits + */ +export async function getPaymentStatus(paymentHash: string): Promise<{ + paid: boolean; + status: string; + preimage?: string; +} | null> { + const config = getConfig(); + + if (!config.url || !config.apiKey) { + throw new Error('LNbits is not configured'); + } + + const apiEndpoint = `/api/v1/payments/${paymentHash}`; + + const response = await fetch(`${config.url}${apiEndpoint}`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + 'X-Api-Key': config.apiKey, + }, + }); + + if (!response.ok) { + if (response.status === 404) { + return null; + } + throw new Error('Failed to get payment status from LNbits'); + } + + const data = await response.json(); + + // LNbits payment status: "pending", "complete", "failed" + // For incoming payments, "complete" means paid + const isPaid = data.status === 'complete' || data.paid === true; + + return { + paid: isPaid, + status: data.status, + preimage: data.preimage, + }; +} + +/** + * Verify webhook payload from LNbits + * LNbits webhooks don't have signature verification by default, + * but we can verify the payment hash matches and check payment status + */ +export async function verifyWebhookPayment(paymentHash: string): Promise { + try { + const status = await getPaymentStatus(paymentHash); + return status?.paid === true; + } catch (error) { + console.error('Error verifying webhook payment:', error); + return false; + } +} + +/** + * Payment status types + */ +export type LNbitsPaymentStatus = 'pending' | 'complete' | 'failed' | 'expired'; + +/** + * Check if payment is complete + */ +export function isPaymentComplete(status: string): boolean { + return status === 'complete'; +} + +/** + * Check if payment is still pending + */ +export function isPaymentPending(status: string): boolean { + return status === 'pending'; +} diff --git a/backend/src/lib/utils.ts b/backend/src/lib/utils.ts new file mode 100644 index 0000000..c1372c9 --- /dev/null +++ b/backend/src/lib/utils.ts @@ -0,0 +1,37 @@ +import { nanoid } from 'nanoid'; + +export function generateId(): string { + return nanoid(21); +} + +export function generateTicketCode(): string { + return `TKT-${nanoid(8).toUpperCase()}`; +} + +export function getNow(): string { + return new Date().toISOString(); +} + +export function formatCurrency(amount: number, currency: string = 'PYG'): string { + return new Intl.NumberFormat('es-PY', { + style: 'currency', + currency, + }).format(amount); +} + +export function calculateAvailableSeats(capacity: number, bookedCount: number): number { + return Math.max(0, capacity - bookedCount); +} + +export function isEventSoldOut(capacity: number, bookedCount: number): boolean { + return bookedCount >= capacity; +} + +export function sanitizeHtml(str: string): string { + return str + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); +} diff --git a/backend/src/routes/admin.ts b/backend/src/routes/admin.ts new file mode 100644 index 0000000..e870e8a --- /dev/null +++ b/backend/src/routes/admin.ts @@ -0,0 +1,284 @@ +import { Hono } from 'hono'; +import { db, users, events, tickets, payments, contacts, emailSubscribers } from '../db/index.js'; +import { eq, and, gte, sql, desc } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { getNow } from '../lib/utils.js'; + +const adminRouter = new Hono(); + +// Dashboard overview stats (admin) +adminRouter.get('/dashboard', requireAuth(['admin', 'organizer']), async (c) => { + const now = getNow(); + + // Get upcoming events + const upcomingEvents = await (db as any) + .select() + .from(events) + .where( + and( + eq((events as any).status, 'published'), + gte((events as any).startDatetime, now) + ) + ) + .orderBy((events as any).startDatetime) + .limit(5) + .all(); + + // Get recent tickets + const recentTickets = await (db as any) + .select() + .from(tickets) + .orderBy(desc((tickets as any).createdAt)) + .limit(10) + .all(); + + // Get total stats + const totalUsers = await (db as any) + .select({ count: sql`count(*)` }) + .from(users) + .get(); + + const totalEvents = await (db as any) + .select({ count: sql`count(*)` }) + .from(events) + .get(); + + const totalTickets = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .get(); + + const confirmedTickets = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where(eq((tickets as any).status, 'confirmed')) + .get(); + + const pendingPayments = await (db as any) + .select({ count: sql`count(*)` }) + .from(payments) + .where(eq((payments as any).status, 'pending')) + .get(); + + const paidPayments = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).status, 'paid')) + .all(); + + const totalRevenue = paidPayments.reduce((sum: number, p: any) => sum + (p.amount || 0), 0); + + const newContacts = await (db as any) + .select({ count: sql`count(*)` }) + .from(contacts) + .where(eq((contacts as any).status, 'new')) + .get(); + + const totalSubscribers = await (db as any) + .select({ count: sql`count(*)` }) + .from(emailSubscribers) + .where(eq((emailSubscribers as any).status, 'active')) + .get(); + + return c.json({ + dashboard: { + stats: { + totalUsers: totalUsers?.count || 0, + totalEvents: totalEvents?.count || 0, + totalTickets: totalTickets?.count || 0, + confirmedTickets: confirmedTickets?.count || 0, + pendingPayments: pendingPayments?.count || 0, + totalRevenue, + newContacts: newContacts?.count || 0, + totalSubscribers: totalSubscribers?.count || 0, + }, + upcomingEvents, + recentTickets, + }, + }); +}); + +// Get analytics data (admin) +adminRouter.get('/analytics', requireAuth(['admin']), async (c) => { + // Get events with ticket counts + const allEvents = await (db as any).select().from(events).all(); + + const eventStats = await Promise.all( + allEvents.map(async (event: any) => { + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where(eq((tickets as any).eventId, event.id)) + .get(); + + const confirmedCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, event.id), + eq((tickets as any).status, 'confirmed') + ) + ) + .get(); + + const checkedInCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, event.id), + eq((tickets as any).status, 'checked_in') + ) + ) + .get(); + + return { + id: event.id, + title: event.title, + date: event.startDatetime, + capacity: event.capacity, + totalBookings: ticketCount?.count || 0, + confirmedBookings: confirmedCount?.count || 0, + checkedIn: checkedInCount?.count || 0, + revenue: (confirmedCount?.count || 0) * event.price, + }; + }) + ); + + return c.json({ + analytics: { + events: eventStats, + }, + }); +}); + +// Export data (admin) +adminRouter.get('/export/tickets', requireAuth(['admin']), async (c) => { + const eventId = c.req.query('eventId'); + + let query = (db as any).select().from(tickets); + + if (eventId) { + query = query.where(eq((tickets as any).eventId, eventId)); + } + + const ticketList = await query.all(); + + // Get user and event details for each ticket + const enrichedTickets = await Promise.all( + ticketList.map(async (ticket: any) => { + const user = await (db as any) + .select() + .from(users) + .where(eq((users as any).id, ticket.userId)) + .get(); + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticket.id)) + .get(); + + return { + ticketId: ticket.id, + ticketStatus: ticket.status, + qrCode: ticket.qrCode, + checkinAt: ticket.checkinAt, + userName: user?.name, + userEmail: user?.email, + userPhone: user?.phone, + eventTitle: event?.title, + eventDate: event?.startDatetime, + paymentStatus: payment?.status, + paymentAmount: payment?.amount, + createdAt: ticket.createdAt, + }; + }) + ); + + return c.json({ tickets: enrichedTickets }); +}); + +// Export financial data (admin) +adminRouter.get('/export/financial', requireAuth(['admin']), async (c) => { + const startDate = c.req.query('startDate'); + const endDate = c.req.query('endDate'); + const eventId = c.req.query('eventId'); + + // Get all payments + let query = (db as any).select().from(payments); + + const allPayments = await query.all(); + + // Enrich with event and ticket data + const enrichedPayments = await Promise.all( + allPayments.map(async (payment: any) => { + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + if (!ticket) return null; + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + // Apply filters + if (eventId && ticket.eventId !== eventId) return null; + if (startDate && payment.createdAt < startDate) return null; + if (endDate && payment.createdAt > endDate) return null; + + return { + paymentId: payment.id, + amount: payment.amount, + currency: payment.currency, + provider: payment.provider, + status: payment.status, + reference: payment.reference, + paidAt: payment.paidAt, + createdAt: payment.createdAt, + ticketId: ticket.id, + attendeeFirstName: ticket.attendeeFirstName, + attendeeLastName: ticket.attendeeLastName, + attendeeEmail: ticket.attendeeEmail, + eventId: event?.id, + eventTitle: event?.title, + eventDate: event?.startDatetime, + }; + }) + ); + + const filteredPayments = enrichedPayments.filter(p => p !== null); + + // Calculate summary + const summary = { + totalPayments: filteredPayments.length, + totalPaid: filteredPayments.filter((p: any) => p.status === 'paid').reduce((sum: number, p: any) => sum + p.amount, 0), + totalPending: filteredPayments.filter((p: any) => p.status === 'pending').reduce((sum: number, p: any) => sum + p.amount, 0), + totalRefunded: filteredPayments.filter((p: any) => p.status === 'refunded').reduce((sum: number, p: any) => sum + p.amount, 0), + byProvider: { + bancard: filteredPayments.filter((p: any) => p.provider === 'bancard' && p.status === 'paid').reduce((sum: number, p: any) => sum + p.amount, 0), + lightning: filteredPayments.filter((p: any) => p.provider === 'lightning' && p.status === 'paid').reduce((sum: number, p: any) => sum + p.amount, 0), + cash: filteredPayments.filter((p: any) => p.provider === 'cash' && p.status === 'paid').reduce((sum: number, p: any) => sum + p.amount, 0), + }, + paidCount: filteredPayments.filter((p: any) => p.status === 'paid').length, + pendingCount: filteredPayments.filter((p: any) => p.status === 'pending').length, + refundedCount: filteredPayments.filter((p: any) => p.status === 'refunded').length, + failedCount: filteredPayments.filter((p: any) => p.status === 'failed').length, + }; + + return c.json({ payments: filteredPayments, summary }); +}); + +export default adminRouter; diff --git a/backend/src/routes/auth.ts b/backend/src/routes/auth.ts new file mode 100644 index 0000000..45464a7 --- /dev/null +++ b/backend/src/routes/auth.ts @@ -0,0 +1,652 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, users, magicLinkTokens, User } from '../db/index.js'; +import { eq } from 'drizzle-orm'; +import { + hashPassword, + verifyPassword, + createToken, + createRefreshToken, + isFirstUser, + getAuthUser, + validatePassword, + createMagicLinkToken, + verifyMagicLinkToken, + invalidateAllUserSessions, + requireAuth, +} from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; +import { sendEmail } from '../lib/email.js'; + +// User type that includes all fields (some added in schema updates) +type AuthUser = User & { + isClaimed: boolean; + googleId: string | null; + rucNumber: string | null; + accountStatus: string; +}; + +const auth = new Hono(); + +// Rate limiting store (in production, use Redis) +const loginAttempts = new Map(); +const MAX_LOGIN_ATTEMPTS = 5; +const LOCKOUT_DURATION = 15 * 60 * 1000; // 15 minutes + +function checkRateLimit(email: string): { allowed: boolean; retryAfter?: number } { + const now = Date.now(); + const attempts = loginAttempts.get(email); + + if (!attempts) { + return { allowed: true }; + } + + if (now > attempts.resetAt) { + loginAttempts.delete(email); + return { allowed: true }; + } + + if (attempts.count >= MAX_LOGIN_ATTEMPTS) { + return { allowed: false, retryAfter: Math.ceil((attempts.resetAt - now) / 1000) }; + } + + return { allowed: true }; +} + +function recordFailedAttempt(email: string): void { + const now = Date.now(); + const attempts = loginAttempts.get(email) || { count: 0, resetAt: now + LOCKOUT_DURATION }; + attempts.count++; + loginAttempts.set(email, attempts); +} + +function clearFailedAttempts(email: string): void { + loginAttempts.delete(email); +} + +const registerSchema = z.object({ + email: z.string().email(), + password: z.string().min(10, 'Password must be at least 10 characters'), + name: z.string().min(2), + phone: z.string().optional(), + languagePreference: z.enum(['en', 'es']).optional(), +}); + +const loginSchema = z.object({ + email: z.string().email(), + password: z.string(), +}); + +const magicLinkRequestSchema = z.object({ + email: z.string().email(), +}); + +const magicLinkVerifySchema = z.object({ + token: z.string(), +}); + +const passwordResetRequestSchema = z.object({ + email: z.string().email(), +}); + +const passwordResetSchema = z.object({ + token: z.string(), + password: z.string().min(10, 'Password must be at least 10 characters'), +}); + +const claimAccountSchema = z.object({ + token: z.string(), + password: z.string().min(10, 'Password must be at least 10 characters').optional(), + googleId: z.string().optional(), +}); + +const changePasswordSchema = z.object({ + currentPassword: z.string(), + newPassword: z.string().min(10, 'Password must be at least 10 characters'), +}); + +const googleAuthSchema = z.object({ + credential: z.string(), // Google ID token +}); + +// Register +auth.post('/register', zValidator('json', registerSchema), async (c) => { + const data = c.req.valid('json'); + + // Validate password strength + const passwordValidation = validatePassword(data.password); + if (!passwordValidation.valid) { + return c.json({ error: passwordValidation.error }, 400); + } + + // Check if email exists + const existing = await (db as any).select().from(users).where(eq((users as any).email, data.email)).get(); + if (existing) { + // If user exists but is unclaimed, allow claiming + if (!existing.isClaimed || existing.accountStatus === 'unclaimed') { + return c.json({ + error: 'Email already registered', + canClaim: true, + message: 'This email has an unclaimed account. Please check your email for the claim link or request a new one.' + }, 400); + } + return c.json({ error: 'Email already registered' }, 400); + } + + // Check if first user (becomes admin) + const firstUser = await isFirstUser(); + + const hashedPassword = await hashPassword(data.password); + const now = getNow(); + const id = generateId(); + + const newUser = { + id, + email: data.email, + password: hashedPassword, + name: data.name, + phone: data.phone || null, + role: firstUser ? 'admin' : 'user', + languagePreference: data.languagePreference || null, + isClaimed: true, + googleId: null, + rucNumber: null, + accountStatus: 'active', + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(users).values(newUser); + + const token = await createToken(id, data.email, newUser.role); + const refreshToken = await createRefreshToken(id); + + return c.json({ + user: { + id, + email: data.email, + name: data.name, + role: newUser.role, + isClaimed: true, + }, + token, + refreshToken, + message: firstUser ? 'Admin account created successfully' : 'Account created successfully', + }, 201); +}); + +// Login with email/password +auth.post('/login', zValidator('json', loginSchema), async (c) => { + const data = c.req.valid('json'); + + // Check rate limit + const rateLimit = checkRateLimit(data.email); + if (!rateLimit.allowed) { + return c.json({ + error: 'Too many login attempts. Please try again later.', + retryAfter: rateLimit.retryAfter + }, 429); + } + + const user = await (db as any).select().from(users).where(eq((users as any).email, data.email)).get(); + if (!user) { + recordFailedAttempt(data.email); + return c.json({ error: 'Invalid credentials' }, 401); + } + + // Check if account is suspended + if (user.accountStatus === 'suspended') { + return c.json({ error: 'Account is suspended. Please contact support.' }, 403); + } + + // Check if user has a password set + if (!user.password) { + return c.json({ + error: 'No password set for this account', + needsClaim: !user.isClaimed, + message: user.isClaimed + ? 'Please use Google login or request a password reset.' + : 'Please claim your account first.' + }, 400); + } + + const validPassword = await verifyPassword(data.password, user.password); + if (!validPassword) { + recordFailedAttempt(data.email); + return c.json({ error: 'Invalid credentials' }, 401); + } + + // Clear failed attempts on successful login + clearFailedAttempts(data.email); + + const token = await createToken(user.id, user.email, user.role); + const refreshToken = await createRefreshToken(user.id); + + return c.json({ + user: { + id: user.id, + email: user.email, + name: user.name, + role: user.role, + isClaimed: user.isClaimed, + phone: user.phone, + rucNumber: user.rucNumber, + languagePreference: user.languagePreference, + }, + token, + refreshToken, + }); +}); + +// Request magic link login +auth.post('/magic-link/request', zValidator('json', magicLinkRequestSchema), async (c) => { + const { email } = c.req.valid('json'); + + const user = await (db as any).select().from(users).where(eq((users as any).email, email)).get(); + + if (!user) { + // Don't reveal if email exists + return c.json({ message: 'If an account exists with this email, a login link has been sent.' }); + } + + if (user.accountStatus === 'suspended') { + return c.json({ message: 'If an account exists with this email, a login link has been sent.' }); + } + + // Create magic link token (expires in 10 minutes) + const token = await createMagicLinkToken(user.id, 'login', 10); + const magicLink = `${process.env.FRONTEND_URL || 'http://localhost:3000'}/auth/magic-link?token=${token}`; + + // Send email + try { + await sendEmail({ + to: email, + subject: 'Your Spanglish Login Link', + html: ` +

Login to Spanglish

+

Click the link below to log in. This link expires in 10 minutes.

+

Log In

+

Or copy this link: ${magicLink}

+

If you didn't request this, you can safely ignore this email.

+ `, + }); + } catch (error) { + console.error('Failed to send magic link email:', error); + } + + return c.json({ message: 'If an account exists with this email, a login link has been sent.' }); +}); + +// Verify magic link and login +auth.post('/magic-link/verify', zValidator('json', magicLinkVerifySchema), async (c) => { + const { token } = c.req.valid('json'); + + const verification = await verifyMagicLinkToken(token, 'login'); + + if (!verification.valid) { + return c.json({ error: verification.error }, 400); + } + + const user = await (db as any).select().from(users).where(eq((users as any).id, verification.userId)).get(); + + if (!user || user.accountStatus === 'suspended') { + return c.json({ error: 'Invalid token' }, 400); + } + + const authToken = await createToken(user.id, user.email, user.role); + const refreshToken = await createRefreshToken(user.id); + + return c.json({ + user: { + id: user.id, + email: user.email, + name: user.name, + role: user.role, + isClaimed: user.isClaimed, + phone: user.phone, + rucNumber: user.rucNumber, + languagePreference: user.languagePreference, + }, + token: authToken, + refreshToken, + }); +}); + +// Request password reset +auth.post('/password-reset/request', zValidator('json', passwordResetRequestSchema), async (c) => { + const { email } = c.req.valid('json'); + + const user = await (db as any).select().from(users).where(eq((users as any).email, email)).get(); + + if (!user) { + // Don't reveal if email exists + return c.json({ message: 'If an account exists with this email, a password reset link has been sent.' }); + } + + if (user.accountStatus === 'suspended') { + return c.json({ message: 'If an account exists with this email, a password reset link has been sent.' }); + } + + // Create reset token (expires in 30 minutes) + const token = await createMagicLinkToken(user.id, 'reset_password', 30); + const resetLink = `${process.env.FRONTEND_URL || 'http://localhost:3000'}/auth/reset-password?token=${token}`; + + // Send email + try { + await sendEmail({ + to: email, + subject: 'Reset Your Spanglish Password', + html: ` +

Reset Your Password

+

Click the link below to reset your password. This link expires in 30 minutes.

+

Reset Password

+

Or copy this link: ${resetLink}

+

If you didn't request this, you can safely ignore this email.

+ `, + }); + } catch (error) { + console.error('Failed to send password reset email:', error); + } + + return c.json({ message: 'If an account exists with this email, a password reset link has been sent.' }); +}); + +// Reset password +auth.post('/password-reset/confirm', zValidator('json', passwordResetSchema), async (c) => { + const { token, password } = c.req.valid('json'); + + // Validate password strength + const passwordValidation = validatePassword(password); + if (!passwordValidation.valid) { + return c.json({ error: passwordValidation.error }, 400); + } + + const verification = await verifyMagicLinkToken(token, 'reset_password'); + + if (!verification.valid) { + return c.json({ error: verification.error }, 400); + } + + const hashedPassword = await hashPassword(password); + const now = getNow(); + + await (db as any) + .update(users) + .set({ + password: hashedPassword, + updatedAt: now, + }) + .where(eq((users as any).id, verification.userId)); + + // Invalidate all existing sessions for security + await invalidateAllUserSessions(verification.userId!); + + return c.json({ message: 'Password reset successfully. Please log in with your new password.' }); +}); + +// Claim unclaimed account +auth.post('/claim-account/request', zValidator('json', magicLinkRequestSchema), async (c) => { + const { email } = c.req.valid('json'); + + const user = await (db as any).select().from(users).where(eq((users as any).email, email)).get(); + + if (!user) { + return c.json({ message: 'If an unclaimed account exists with this email, a claim link has been sent.' }); + } + + if (user.isClaimed && user.accountStatus !== 'unclaimed') { + return c.json({ error: 'Account is already claimed' }, 400); + } + + // Create claim token (expires in 24 hours) + const token = await createMagicLinkToken(user.id, 'claim_account', 24 * 60); + const claimLink = `${process.env.FRONTEND_URL || 'http://localhost:3000'}/auth/claim-account?token=${token}`; + + // Send email + try { + await sendEmail({ + to: email, + subject: 'Claim Your Spanglish Account', + html: ` +

Claim Your Account

+

An account was created for you during booking. Click below to set up your login credentials.

+

Claim Account

+

Or copy this link: ${claimLink}

+

This link expires in 24 hours.

+ `, + }); + } catch (error) { + console.error('Failed to send claim account email:', error); + } + + return c.json({ message: 'If an unclaimed account exists with this email, a claim link has been sent.' }); +}); + +// Complete account claim +auth.post('/claim-account/confirm', zValidator('json', claimAccountSchema), async (c) => { + const { token, password, googleId } = c.req.valid('json'); + + if (!password && !googleId) { + return c.json({ error: 'Please provide either a password or link a Google account' }, 400); + } + + const verification = await verifyMagicLinkToken(token, 'claim_account'); + + if (!verification.valid) { + return c.json({ error: verification.error }, 400); + } + + const now = getNow(); + const updates: Record = { + isClaimed: true, + accountStatus: 'active', + updatedAt: now, + }; + + if (password) { + const passwordValidation = validatePassword(password); + if (!passwordValidation.valid) { + return c.json({ error: passwordValidation.error }, 400); + } + updates.password = await hashPassword(password); + } + + if (googleId) { + updates.googleId = googleId; + } + + await (db as any) + .update(users) + .set(updates) + .where(eq((users as any).id, verification.userId)); + + const user = await (db as any).select().from(users).where(eq((users as any).id, verification.userId)).get(); + + const authToken = await createToken(user.id, user.email, user.role); + const refreshToken = await createRefreshToken(user.id); + + return c.json({ + user: { + id: user.id, + email: user.email, + name: user.name, + role: user.role, + isClaimed: user.isClaimed, + phone: user.phone, + rucNumber: user.rucNumber, + languagePreference: user.languagePreference, + }, + token: authToken, + refreshToken, + message: 'Account claimed successfully!', + }); +}); + +// Google OAuth login/register +auth.post('/google', zValidator('json', googleAuthSchema), async (c) => { + const { credential } = c.req.valid('json'); + + try { + // Verify Google token + // In production, use Google's library to verify: https://developers.google.com/identity/gsi/web/guides/verify-google-id-token + const response = await fetch(`https://oauth2.googleapis.com/tokeninfo?id_token=${credential}`); + + if (!response.ok) { + return c.json({ error: 'Invalid Google token' }, 400); + } + + const googleData = await response.json() as { + sub: string; + email: string; + name: string; + email_verified: string; + }; + + if (googleData.email_verified !== 'true') { + return c.json({ error: 'Google email not verified' }, 400); + } + + const { sub: googleId, email, name } = googleData; + + // Check if user exists by email or google_id + let user = await (db as any).select().from(users).where(eq((users as any).email, email)).get(); + + if (!user) { + // Check by google_id + user = await (db as any).select().from(users).where(eq((users as any).googleId, googleId)).get(); + } + + const now = getNow(); + + if (user) { + // User exists - link Google account if not already linked + if (user.accountStatus === 'suspended') { + return c.json({ error: 'Account is suspended. Please contact support.' }, 403); + } + + if (!user.googleId) { + await (db as any) + .update(users) + .set({ + googleId, + isClaimed: true, + accountStatus: 'active', + updatedAt: now, + }) + .where(eq((users as any).id, user.id)); + } + + // Refresh user data + user = await (db as any).select().from(users).where(eq((users as any).id, user.id)).get(); + } else { + // Create new user + const firstUser = await isFirstUser(); + const id = generateId(); + + const newUser = { + id, + email, + password: null, + name, + phone: null, + role: firstUser ? 'admin' : 'user', + languagePreference: null, + isClaimed: true, + googleId, + rucNumber: null, + accountStatus: 'active', + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(users).values(newUser); + user = newUser; + } + + const authToken = await createToken(user.id, user.email, user.role); + const refreshToken = await createRefreshToken(user.id); + + return c.json({ + user: { + id: user.id, + email: user.email, + name: user.name, + role: user.role, + isClaimed: user.isClaimed, + phone: user.phone, + rucNumber: user.rucNumber, + languagePreference: user.languagePreference, + }, + token: authToken, + refreshToken, + }); + } catch (error) { + console.error('Google auth error:', error); + return c.json({ error: 'Failed to authenticate with Google' }, 500); + } +}); + +// Get current user +auth.get('/me', async (c) => { + const user = await getAuthUser(c); + + if (!user) { + return c.json({ error: 'Unauthorized' }, 401); + } + + return c.json({ + user: { + id: user.id, + email: user.email, + name: user.name, + role: user.role, + phone: user.phone, + isClaimed: user.isClaimed, + rucNumber: user.rucNumber, + languagePreference: user.languagePreference, + accountStatus: user.accountStatus, + createdAt: user.createdAt, + }, + }); +}); + +// Change password (authenticated users) +auth.post('/change-password', requireAuth(), zValidator('json', changePasswordSchema), async (c) => { + const user = (c as any).get('user') as AuthUser; + const { currentPassword, newPassword } = c.req.valid('json'); + + // Validate new password + const passwordValidation = validatePassword(newPassword); + if (!passwordValidation.valid) { + return c.json({ error: passwordValidation.error }, 400); + } + + // Verify current password if user has one + if (user.password) { + const validPassword = await verifyPassword(currentPassword, user.password); + if (!validPassword) { + return c.json({ error: 'Current password is incorrect' }, 400); + } + } + + const hashedPassword = await hashPassword(newPassword); + const now = getNow(); + + await (db as any) + .update(users) + .set({ + password: hashedPassword, + updatedAt: now, + }) + .where(eq((users as any).id, user.id)); + + return c.json({ message: 'Password changed successfully' }); +}); + +// Logout (client-side token removal, but we can log the action) +auth.post('/logout', async (c) => { + return c.json({ message: 'Logged out successfully' }); +}); + +export default auth; diff --git a/backend/src/routes/contacts.ts b/backend/src/routes/contacts.ts new file mode 100644 index 0000000..efc7581 --- /dev/null +++ b/backend/src/routes/contacts.ts @@ -0,0 +1,193 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, contacts, emailSubscribers } from '../db/index.js'; +import { eq, desc } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; + +const contactsRouter = new Hono(); + +const createContactSchema = z.object({ + name: z.string().min(2), + email: z.string().email(), + message: z.string().min(10), +}); + +const subscribeSchema = z.object({ + email: z.string().email(), + name: z.string().optional(), +}); + +const updateContactSchema = z.object({ + status: z.enum(['new', 'read', 'replied']), +}); + +// Submit contact form (public) +contactsRouter.post('/', zValidator('json', createContactSchema), async (c) => { + const data = c.req.valid('json'); + const now = getNow(); + const id = generateId(); + + const newContact = { + id, + name: data.name, + email: data.email, + message: data.message, + status: 'new' as const, + createdAt: now, + }; + + await (db as any).insert(contacts).values(newContact); + + return c.json({ message: 'Message sent successfully' }, 201); +}); + +// Subscribe to newsletter (public) +contactsRouter.post('/subscribe', zValidator('json', subscribeSchema), async (c) => { + const data = c.req.valid('json'); + + // Check if already subscribed + const existing = await (db as any) + .select() + .from(emailSubscribers) + .where(eq((emailSubscribers as any).email, data.email)) + .get(); + + if (existing) { + if (existing.status === 'unsubscribed') { + // Resubscribe + await (db as any) + .update(emailSubscribers) + .set({ status: 'active' }) + .where(eq((emailSubscribers as any).id, existing.id)); + + return c.json({ message: 'Successfully resubscribed' }); + } + return c.json({ message: 'Already subscribed' }); + } + + const now = getNow(); + const id = generateId(); + + const newSubscriber = { + id, + email: data.email, + name: data.name || null, + status: 'active' as const, + createdAt: now, + }; + + await (db as any).insert(emailSubscribers).values(newSubscriber); + + return c.json({ message: 'Successfully subscribed' }, 201); +}); + +// Unsubscribe from newsletter (public) +contactsRouter.post('/unsubscribe', zValidator('json', z.object({ email: z.string().email() })), async (c) => { + const { email } = c.req.valid('json'); + + const existing = await (db as any) + .select() + .from(emailSubscribers) + .where(eq((emailSubscribers as any).email, email)) + .get(); + + if (!existing) { + return c.json({ error: 'Email not found' }, 404); + } + + await (db as any) + .update(emailSubscribers) + .set({ status: 'unsubscribed' }) + .where(eq((emailSubscribers as any).id, existing.id)); + + return c.json({ message: 'Successfully unsubscribed' }); +}); + +// Get all contacts (admin) +contactsRouter.get('/', requireAuth(['admin', 'organizer']), async (c) => { + const status = c.req.query('status'); + + let query = (db as any).select().from(contacts); + + if (status) { + query = query.where(eq((contacts as any).status, status)); + } + + const result = await query.orderBy(desc((contacts as any).createdAt)).all(); + + return c.json({ contacts: result }); +}); + +// Get single contact (admin) +contactsRouter.get('/:id', requireAuth(['admin', 'organizer']), async (c) => { + const id = c.req.param('id'); + + const contact = await (db as any) + .select() + .from(contacts) + .where(eq((contacts as any).id, id)) + .get(); + + if (!contact) { + return c.json({ error: 'Contact not found' }, 404); + } + + return c.json({ contact }); +}); + +// Update contact status (admin) +contactsRouter.put('/:id', requireAuth(['admin', 'organizer']), zValidator('json', updateContactSchema), async (c) => { + const id = c.req.param('id'); + const data = c.req.valid('json'); + + const existing = await (db as any) + .select() + .from(contacts) + .where(eq((contacts as any).id, id)) + .get(); + + if (!existing) { + return c.json({ error: 'Contact not found' }, 404); + } + + await (db as any) + .update(contacts) + .set({ status: data.status }) + .where(eq((contacts as any).id, id)); + + const updated = await (db as any) + .select() + .from(contacts) + .where(eq((contacts as any).id, id)) + .get(); + + return c.json({ contact: updated }); +}); + +// Delete contact (admin) +contactsRouter.delete('/:id', requireAuth(['admin']), async (c) => { + const id = c.req.param('id'); + + await (db as any).delete(contacts).where(eq((contacts as any).id, id)); + + return c.json({ message: 'Contact deleted successfully' }); +}); + +// Get all subscribers (admin) +contactsRouter.get('/subscribers/list', requireAuth(['admin', 'marketing']), async (c) => { + const status = c.req.query('status'); + + let query = (db as any).select().from(emailSubscribers); + + if (status) { + query = query.where(eq((emailSubscribers as any).status, status)); + } + + const result = await query.orderBy(desc((emailSubscribers as any).createdAt)).all(); + + return c.json({ subscribers: result }); +}); + +export default contactsRouter; diff --git a/backend/src/routes/dashboard.ts b/backend/src/routes/dashboard.ts new file mode 100644 index 0000000..c3a4126 --- /dev/null +++ b/backend/src/routes/dashboard.ts @@ -0,0 +1,576 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, users, tickets, payments, events, invoices, User } from '../db/index.js'; +import { eq, desc, and, gt, sql } from 'drizzle-orm'; +import { requireAuth, getUserSessions, invalidateSession, invalidateAllUserSessions, hashPassword, validatePassword } from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; + +// User type that includes all fields (some added in schema updates) +type AuthUser = User & { + isClaimed: boolean; + googleId: string | null; + rucNumber: string | null; + accountStatus: string; +}; + +const dashboard = new Hono(); + +// Apply authentication to all routes +dashboard.use('*', requireAuth()); + +// ==================== Profile Routes ==================== + +const updateProfileSchema = z.object({ + name: z.string().min(2).optional(), + phone: z.string().optional(), + languagePreference: z.enum(['en', 'es']).optional(), + rucNumber: z.string().max(15).optional(), +}); + +// Get user profile +dashboard.get('/profile', async (c) => { + const user = (c as any).get('user') as AuthUser; + + // Get membership duration + const createdDate = new Date(user.createdAt); + const now = new Date(); + const membershipDays = Math.floor((now.getTime() - createdDate.getTime()) / (1000 * 60 * 60 * 24)); + + return c.json({ + profile: { + id: user.id, + email: user.email, + name: user.name, + phone: user.phone, + languagePreference: user.languagePreference, + rucNumber: user.rucNumber, + isClaimed: user.isClaimed, + accountStatus: user.accountStatus, + hasPassword: !!user.password, + hasGoogleLinked: !!user.googleId, + memberSince: user.createdAt, + membershipDays, + createdAt: user.createdAt, + }, + }); +}); + +// Update profile +dashboard.put('/profile', zValidator('json', updateProfileSchema), async (c) => { + const user = (c as any).get('user') as AuthUser; + const data = c.req.valid('json'); + const now = getNow(); + + await (db as any) + .update(users) + .set({ + ...data, + updatedAt: now, + }) + .where(eq((users as any).id, user.id)); + + const updatedUser = await (db as any) + .select() + .from(users) + .where(eq((users as any).id, user.id)) + .get(); + + return c.json({ + profile: { + id: updatedUser.id, + email: updatedUser.email, + name: updatedUser.name, + phone: updatedUser.phone, + languagePreference: updatedUser.languagePreference, + rucNumber: updatedUser.rucNumber, + }, + message: 'Profile updated successfully', + }); +}); + +// ==================== Tickets Routes ==================== + +// Get user's tickets +dashboard.get('/tickets', async (c) => { + const user = (c as any).get('user') as AuthUser; + + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, user.id)) + .orderBy(desc((tickets as any).createdAt)) + .all(); + + // Get event details for each ticket + const ticketsWithEvents = await Promise.all( + userTickets.map(async (ticket: any) => { + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticket.id)) + .get(); + + // Check for invoice + let invoice = null; + if (payment && payment.status === 'paid') { + invoice = await (db as any) + .select() + .from(invoices) + .where(eq((invoices as any).paymentId, payment.id)) + .get(); + } + + return { + ...ticket, + event: event ? { + id: event.id, + title: event.title, + titleEs: event.titleEs, + startDatetime: event.startDatetime, + endDatetime: event.endDatetime, + location: event.location, + locationUrl: event.locationUrl, + price: event.price, + currency: event.currency, + status: event.status, + bannerUrl: event.bannerUrl, + } : null, + payment: payment ? { + id: payment.id, + provider: payment.provider, + amount: payment.amount, + currency: payment.currency, + status: payment.status, + paidAt: payment.paidAt, + } : null, + invoice: invoice ? { + id: invoice.id, + invoiceNumber: invoice.invoiceNumber, + pdfUrl: invoice.pdfUrl, + createdAt: invoice.createdAt, + } : null, + }; + }) + ); + + return c.json({ tickets: ticketsWithEvents }); +}); + +// Get single ticket detail +dashboard.get('/tickets/:id', async (c) => { + const user = (c as any).get('user') as AuthUser; + const ticketId = c.req.param('id'); + + const ticket = await (db as any) + .select() + .from(tickets) + .where( + and( + eq((tickets as any).id, ticketId), + eq((tickets as any).userId, user.id) + ) + ) + .get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticket.id)) + .get(); + + let invoice = null; + if (payment && payment.status === 'paid') { + invoice = await (db as any) + .select() + .from(invoices) + .where(eq((invoices as any).paymentId, payment.id)) + .get(); + } + + return c.json({ + ticket: { + ...ticket, + event, + payment, + invoice, + }, + }); +}); + +// ==================== Next Event Route ==================== + +// Get next upcoming event for user +dashboard.get('/next-event', async (c) => { + const user = (c as any).get('user') as AuthUser; + const now = getNow(); + + // Get user's tickets for upcoming events + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, user.id)) + .all(); + + if (userTickets.length === 0) { + return c.json({ nextEvent: null }); + } + + // Find the next upcoming event + let nextEvent = null; + let nextTicket = null; + let nextPayment = null; + + for (const ticket of userTickets) { + if (ticket.status === 'cancelled') continue; + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + if (!event) continue; + + // Check if event is in the future + if (new Date(event.startDatetime) > new Date()) { + if (!nextEvent || new Date(event.startDatetime) < new Date(nextEvent.startDatetime)) { + nextEvent = event; + nextTicket = ticket; + nextPayment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticket.id)) + .get(); + } + } + } + + if (!nextEvent) { + return c.json({ nextEvent: null }); + } + + return c.json({ + nextEvent: { + event: nextEvent, + ticket: nextTicket, + payment: nextPayment, + }, + }); +}); + +// ==================== Payments & Invoices Routes ==================== + +// Get payment history +dashboard.get('/payments', async (c) => { + const user = (c as any).get('user') as AuthUser; + + // Get all user's tickets first + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, user.id)) + .all(); + + const ticketIds = userTickets.map((t: any) => t.id); + + if (ticketIds.length === 0) { + return c.json({ payments: [] }); + } + + // Get all payments for user's tickets + const allPayments = []; + for (const ticketId of ticketIds) { + const ticketPayments = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticketId)) + .all(); + + for (const payment of ticketPayments) { + const ticket = userTickets.find((t: any) => t.id === payment.ticketId); + const event = ticket + ? await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get() + : null; + + let invoice = null; + if (payment.status === 'paid') { + invoice = await (db as any) + .select() + .from(invoices) + .where(eq((invoices as any).paymentId, payment.id)) + .get(); + } + + allPayments.push({ + ...payment, + ticket: ticket ? { + id: ticket.id, + attendeeFirstName: ticket.attendeeFirstName, + attendeeLastName: ticket.attendeeLastName, + status: ticket.status, + } : null, + event: event ? { + id: event.id, + title: event.title, + titleEs: event.titleEs, + startDatetime: event.startDatetime, + } : null, + invoice: invoice ? { + id: invoice.id, + invoiceNumber: invoice.invoiceNumber, + pdfUrl: invoice.pdfUrl, + } : null, + }); + } + } + + // Sort by createdAt desc + allPayments.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()); + + return c.json({ payments: allPayments }); +}); + +// Get invoices +dashboard.get('/invoices', async (c) => { + const user = (c as any).get('user') as AuthUser; + + const userInvoices = await (db as any) + .select() + .from(invoices) + .where(eq((invoices as any).userId, user.id)) + .orderBy(desc((invoices as any).createdAt)) + .all(); + + // Get payment and event details for each invoice + const invoicesWithDetails = await Promise.all( + userInvoices.map(async (invoice: any) => { + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, invoice.paymentId)) + .get(); + + let event = null; + if (payment) { + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + if (ticket) { + event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + } + } + + return { + ...invoice, + event: event ? { + id: event.id, + title: event.title, + titleEs: event.titleEs, + startDatetime: event.startDatetime, + } : null, + }; + }) + ); + + return c.json({ invoices: invoicesWithDetails }); +}); + +// ==================== Security Routes ==================== + +// Get active sessions +dashboard.get('/sessions', async (c) => { + const user = (c as any).get('user') as AuthUser; + + const sessions = await getUserSessions(user.id); + + return c.json({ + sessions: sessions.map((s: any) => ({ + id: s.id, + userAgent: s.userAgent, + ipAddress: s.ipAddress, + lastActiveAt: s.lastActiveAt, + createdAt: s.createdAt, + })), + }); +}); + +// Revoke a specific session +dashboard.delete('/sessions/:id', async (c) => { + const user = (c as any).get('user') as AuthUser; + const sessionId = c.req.param('id'); + + await invalidateSession(sessionId, user.id); + + return c.json({ message: 'Session revoked' }); +}); + +// Revoke all sessions (logout everywhere) +dashboard.post('/sessions/revoke-all', async (c) => { + const user = (c as any).get('user') as AuthUser; + + await invalidateAllUserSessions(user.id); + + return c.json({ message: 'All sessions revoked. Please log in again.' }); +}); + +// Set password (for users without one) +const setPasswordSchema = z.object({ + password: z.string().min(10, 'Password must be at least 10 characters'), +}); + +dashboard.post('/set-password', zValidator('json', setPasswordSchema), async (c) => { + const user = (c as any).get('user') as AuthUser; + const { password } = c.req.valid('json'); + + // Check if user already has a password + if (user.password) { + return c.json({ error: 'Password already set. Use change password instead.' }, 400); + } + + const passwordValidation = validatePassword(password); + if (!passwordValidation.valid) { + return c.json({ error: passwordValidation.error }, 400); + } + + const hashedPassword = await hashPassword(password); + const now = getNow(); + + await (db as any) + .update(users) + .set({ + password: hashedPassword, + updatedAt: now, + }) + .where(eq((users as any).id, user.id)); + + return c.json({ message: 'Password set successfully' }); +}); + +// Unlink Google account (only if password is set) +dashboard.post('/unlink-google', async (c) => { + const user = (c as any).get('user') as AuthUser; + + if (!user.googleId) { + return c.json({ error: 'Google account not linked' }, 400); + } + + if (!user.password) { + return c.json({ error: 'Cannot unlink Google without a password set' }, 400); + } + + const now = getNow(); + + await (db as any) + .update(users) + .set({ + googleId: null, + updatedAt: now, + }) + .where(eq((users as any).id, user.id)); + + return c.json({ message: 'Google account unlinked' }); +}); + +// ==================== Dashboard Summary Route ==================== + +// Get dashboard summary (welcome panel data) +dashboard.get('/summary', async (c) => { + const user = (c as any).get('user') as AuthUser; + const now = new Date(); + + // Get membership duration + const createdDate = new Date(user.createdAt); + const membershipDays = Math.floor((now.getTime() - createdDate.getTime()) / (1000 * 60 * 60 * 24)); + + // Get ticket count + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, user.id)) + .all(); + + const totalTickets = userTickets.length; + const confirmedTickets = userTickets.filter((t: any) => t.status === 'confirmed' || t.status === 'checked_in').length; + const upcomingTickets = []; + + for (const ticket of userTickets) { + if (ticket.status === 'cancelled') continue; + + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + if (event && new Date(event.startDatetime) > now) { + upcomingTickets.push({ ticket, event }); + } + } + + // Get pending payments count + const ticketIds = userTickets.map((t: any) => t.id); + let pendingPayments = 0; + + for (const ticketId of ticketIds) { + const payment = await (db as any) + .select() + .from(payments) + .where( + and( + eq((payments as any).ticketId, ticketId), + eq((payments as any).status, 'pending_approval') + ) + ) + .get(); + + if (payment) pendingPayments++; + } + + return c.json({ + summary: { + user: { + name: user.name, + email: user.email, + accountStatus: user.accountStatus, + memberSince: user.createdAt, + membershipDays, + }, + stats: { + totalTickets, + confirmedTickets, + upcomingEvents: upcomingTickets.length, + pendingPayments, + }, + }, + }); +}); + +export default dashboard; diff --git a/backend/src/routes/emails.ts b/backend/src/routes/emails.ts new file mode 100644 index 0000000..9506560 --- /dev/null +++ b/backend/src/routes/emails.ts @@ -0,0 +1,419 @@ +import { Hono } from 'hono'; +import { db, emailTemplates, emailLogs, events, tickets } from '../db/index.js'; +import { eq, desc, and, sql } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { getNow } from '../lib/utils.js'; +import { nanoid } from 'nanoid'; +import emailService from '../lib/email.js'; +import { getTemplateVariables, defaultTemplates } from '../lib/emailTemplates.js'; + +const emailsRouter = new Hono(); + +// ==================== Template Routes ==================== + +// Get all email templates +emailsRouter.get('/templates', requireAuth(['admin', 'organizer']), async (c) => { + const templates = await (db as any) + .select() + .from(emailTemplates) + .orderBy(desc((emailTemplates as any).createdAt)) + .all(); + + // Parse variables JSON for each template + const parsedTemplates = templates.map((t: any) => ({ + ...t, + variables: t.variables ? JSON.parse(t.variables) : [], + isSystem: Boolean(t.isSystem), + isActive: Boolean(t.isActive), + })); + + return c.json({ templates: parsedTemplates }); +}); + +// Get single email template +emailsRouter.get('/templates/:id', requireAuth(['admin', 'organizer']), async (c) => { + const { id } = c.req.param(); + + const template = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).id, id)) + .get(); + + if (!template) { + return c.json({ error: 'Template not found' }, 404); + } + + return c.json({ + template: { + ...template, + variables: template.variables ? JSON.parse(template.variables) : [], + isSystem: Boolean(template.isSystem), + isActive: Boolean(template.isActive), + } + }); +}); + +// Create new email template +emailsRouter.post('/templates', requireAuth(['admin']), async (c) => { + const body = await c.req.json(); + const { name, slug, subject, subjectEs, bodyHtml, bodyHtmlEs, bodyText, bodyTextEs, description, variables } = body; + + if (!name || !slug || !subject || !bodyHtml) { + return c.json({ error: 'Name, slug, subject, and bodyHtml are required' }, 400); + } + + // Check if slug already exists + const existing = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).slug, slug)) + .get(); + + if (existing) { + return c.json({ error: 'Template with this slug already exists' }, 400); + } + + const now = getNow(); + const template = { + id: nanoid(), + name, + slug, + subject, + subjectEs: subjectEs || null, + bodyHtml, + bodyHtmlEs: bodyHtmlEs || null, + bodyText: bodyText || null, + bodyTextEs: bodyTextEs || null, + description: description || null, + variables: variables ? JSON.stringify(variables) : null, + isSystem: 0, + isActive: 1, + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(emailTemplates).values(template); + + return c.json({ + template: { + ...template, + variables: variables || [], + isSystem: false, + isActive: true, + }, + message: 'Template created successfully' + }, 201); +}); + +// Update email template +emailsRouter.put('/templates/:id', requireAuth(['admin']), async (c) => { + const { id } = c.req.param(); + const body = await c.req.json(); + + const existing = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).id, id)) + .get(); + + if (!existing) { + return c.json({ error: 'Template not found' }, 404); + } + + const updateData: any = { updatedAt: getNow() }; + + // Only allow updating certain fields for system templates + const systemProtectedFields = ['slug', 'isSystem']; + + const allowedFields = ['name', 'subject', 'subjectEs', 'bodyHtml', 'bodyHtmlEs', 'bodyText', 'bodyTextEs', 'description', 'variables', 'isActive']; + if (!existing.isSystem) { + allowedFields.push('slug'); + } + + for (const field of allowedFields) { + if (body[field] !== undefined) { + if (field === 'variables') { + updateData[field] = JSON.stringify(body[field]); + } else if (field === 'isActive') { + updateData[field] = body[field] ? 1 : 0; + } else { + updateData[field] = body[field]; + } + } + } + + await (db as any) + .update(emailTemplates) + .set(updateData) + .where(eq((emailTemplates as any).id, id)); + + const updated = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).id, id)) + .get(); + + return c.json({ + template: { + ...updated, + variables: updated.variables ? JSON.parse(updated.variables) : [], + isSystem: Boolean(updated.isSystem), + isActive: Boolean(updated.isActive), + }, + message: 'Template updated successfully' + }); +}); + +// Delete email template (only non-system templates) +emailsRouter.delete('/templates/:id', requireAuth(['admin']), async (c) => { + const { id } = c.req.param(); + + const template = await (db as any) + .select() + .from(emailTemplates) + .where(eq((emailTemplates as any).id, id)) + .get(); + + if (!template) { + return c.json({ error: 'Template not found' }, 404); + } + + if (template.isSystem) { + return c.json({ error: 'Cannot delete system templates' }, 400); + } + + await (db as any) + .delete(emailTemplates) + .where(eq((emailTemplates as any).id, id)); + + return c.json({ message: 'Template deleted successfully' }); +}); + +// Get available template variables +emailsRouter.get('/templates/:slug/variables', requireAuth(['admin', 'organizer']), async (c) => { + const { slug } = c.req.param(); + const variables = getTemplateVariables(slug); + return c.json({ variables }); +}); + +// ==================== Email Sending Routes ==================== + +// Send email using template to event attendees +emailsRouter.post('/send/event/:eventId', requireAuth(['admin', 'organizer']), async (c) => { + const { eventId } = c.req.param(); + const user = (c as any).get('user'); + const body = await c.req.json(); + const { templateSlug, customVariables, recipientFilter } = body; + + if (!templateSlug) { + return c.json({ error: 'Template slug is required' }, 400); + } + + const result = await emailService.sendToEventAttendees({ + eventId, + templateSlug, + customVariables, + recipientFilter: recipientFilter || 'confirmed', + sentBy: user?.id, + }); + + return c.json(result); +}); + +// Send custom email to specific recipients +emailsRouter.post('/send/custom', requireAuth(['admin', 'organizer']), async (c) => { + const user = (c as any).get('user'); + const body = await c.req.json(); + const { to, toName, subject, bodyHtml, bodyText, eventId } = body; + + if (!to || !subject || !bodyHtml) { + return c.json({ error: 'Recipient (to), subject, and bodyHtml are required' }, 400); + } + + const result = await emailService.sendCustomEmail({ + to, + toName, + subject, + bodyHtml, + bodyText, + eventId, + sentBy: user?.id, + }); + + return c.json(result); +}); + +// Preview email (render template without sending) +emailsRouter.post('/preview', requireAuth(['admin', 'organizer']), async (c) => { + const body = await c.req.json(); + const { templateSlug, variables, locale } = body; + + if (!templateSlug) { + return c.json({ error: 'Template slug is required' }, 400); + } + + const template = await emailService.getTemplate(templateSlug); + if (!template) { + return c.json({ error: 'Template not found' }, 404); + } + + const { replaceTemplateVariables, wrapInBaseTemplate } = await import('../lib/emailTemplates.js'); + + const allVariables = { + ...emailService.getCommonVariables(), + lang: locale || 'en', + ...variables, + }; + + const subject = locale === 'es' && template.subjectEs + ? template.subjectEs + : template.subject; + const bodyHtml = locale === 'es' && template.bodyHtmlEs + ? template.bodyHtmlEs + : template.bodyHtml; + + const finalSubject = replaceTemplateVariables(subject, allVariables); + const finalBodyContent = replaceTemplateVariables(bodyHtml, allVariables); + const finalBodyHtml = wrapInBaseTemplate(finalBodyContent, { ...allVariables, subject: finalSubject }); + + return c.json({ + subject: finalSubject, + bodyHtml: finalBodyHtml, + }); +}); + +// ==================== Email Logs Routes ==================== + +// Get email logs +emailsRouter.get('/logs', requireAuth(['admin', 'organizer']), async (c) => { + const eventId = c.req.query('eventId'); + const status = c.req.query('status'); + const limit = parseInt(c.req.query('limit') || '50'); + const offset = parseInt(c.req.query('offset') || '0'); + + let query = (db as any).select().from(emailLogs); + + const conditions = []; + if (eventId) { + conditions.push(eq((emailLogs as any).eventId, eventId)); + } + if (status) { + conditions.push(eq((emailLogs as any).status, status)); + } + + if (conditions.length > 0) { + query = query.where(and(...conditions)); + } + + const logs = await query + .orderBy(desc((emailLogs as any).createdAt)) + .limit(limit) + .offset(offset) + .all(); + + // Get total count + let countQuery = (db as any) + .select({ count: sql`count(*)` }) + .from(emailLogs); + + if (conditions.length > 0) { + countQuery = countQuery.where(and(...conditions)); + } + + const totalResult = await countQuery.get(); + const total = totalResult?.count || 0; + + return c.json({ + logs, + pagination: { + total, + limit, + offset, + hasMore: offset + logs.length < total, + } + }); +}); + +// Get single email log +emailsRouter.get('/logs/:id', requireAuth(['admin', 'organizer']), async (c) => { + const { id } = c.req.param(); + + const log = await (db as any) + .select() + .from(emailLogs) + .where(eq((emailLogs as any).id, id)) + .get(); + + if (!log) { + return c.json({ error: 'Email log not found' }, 404); + } + + return c.json({ log }); +}); + +// Get email stats +emailsRouter.get('/stats', requireAuth(['admin', 'organizer']), async (c) => { + const eventId = c.req.query('eventId'); + + let baseCondition = eventId ? eq((emailLogs as any).eventId, eventId) : undefined; + + const totalQuery = baseCondition + ? (db as any).select({ count: sql`count(*)` }).from(emailLogs).where(baseCondition) + : (db as any).select({ count: sql`count(*)` }).from(emailLogs); + + const total = (await totalQuery.get())?.count || 0; + + const sentCondition = baseCondition + ? and(baseCondition, eq((emailLogs as any).status, 'sent')) + : eq((emailLogs as any).status, 'sent'); + const sent = (await (db as any).select({ count: sql`count(*)` }).from(emailLogs).where(sentCondition).get())?.count || 0; + + const failedCondition = baseCondition + ? and(baseCondition, eq((emailLogs as any).status, 'failed')) + : eq((emailLogs as any).status, 'failed'); + const failed = (await (db as any).select({ count: sql`count(*)` }).from(emailLogs).where(failedCondition).get())?.count || 0; + + const pendingCondition = baseCondition + ? and(baseCondition, eq((emailLogs as any).status, 'pending')) + : eq((emailLogs as any).status, 'pending'); + const pending = (await (db as any).select({ count: sql`count(*)` }).from(emailLogs).where(pendingCondition).get())?.count || 0; + + return c.json({ + stats: { + total, + sent, + failed, + pending, + } + }); +}); + +// Seed default templates (admin only) +emailsRouter.post('/seed-templates', requireAuth(['admin']), async (c) => { + await emailService.seedDefaultTemplates(); + return c.json({ message: 'Default templates seeded successfully' }); +}); + +// ==================== Configuration Routes ==================== + +// Get email provider info +emailsRouter.get('/config', requireAuth(['admin']), async (c) => { + const providerInfo = emailService.getProviderInfo(); + return c.json(providerInfo); +}); + +// Test email configuration +emailsRouter.post('/test', requireAuth(['admin']), async (c) => { + const body = await c.req.json(); + const { to } = body; + + if (!to) { + return c.json({ error: 'Recipient email (to) is required' }, 400); + } + + const result = await emailService.testConnection(to); + return c.json(result); +}); + +export default emailsRouter; diff --git a/backend/src/routes/events.ts b/backend/src/routes/events.ts new file mode 100644 index 0000000..c6f4b4c --- /dev/null +++ b/backend/src/routes/events.ts @@ -0,0 +1,269 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, events, tickets } from '../db/index.js'; +import { eq, desc, and, gte, sql } from 'drizzle-orm'; +import { requireAuth, getAuthUser } from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; + +interface UserContext { + id: string; + email: string; + name: string; + role: string; +} + +const eventsRouter = new Hono<{ Variables: { user: UserContext } }>(); + +// Custom validation error handler +const validationHook = (result: any, c: any) => { + if (!result.success) { + const errors = result.error.issues.map((i: any) => `${i.path.join('.')}: ${i.message}`).join(', '); + return c.json({ error: errors }, 400); + } +}; + +const createEventSchema = z.object({ + title: z.string().min(1), + titleEs: z.string().optional().nullable(), + description: z.string().min(1), + descriptionEs: z.string().optional().nullable(), + startDatetime: z.string(), + endDatetime: z.string().optional().nullable(), + location: z.string().min(1), + locationUrl: z.string().url().optional().nullable().or(z.literal('')), + price: z.number().min(0).default(0), + currency: z.string().default('PYG'), + capacity: z.number().min(1).default(50), + status: z.enum(['draft', 'published', 'cancelled', 'completed', 'archived']).default('draft'), + // Accept relative paths (/uploads/...) or full URLs + bannerUrl: z.string().optional().nullable().or(z.literal('')), +}); + +const updateEventSchema = createEventSchema.partial(); + +// Get all events (public) +eventsRouter.get('/', async (c) => { + const status = c.req.query('status'); + const upcoming = c.req.query('upcoming'); + + let query = (db as any).select().from(events); + + if (status) { + query = query.where(eq((events as any).status, status)); + } + + if (upcoming === 'true') { + const now = getNow(); + query = query.where( + and( + eq((events as any).status, 'published'), + gte((events as any).startDatetime, now) + ) + ); + } + + const result = await query.orderBy(desc((events as any).startDatetime)).all(); + + // Get ticket counts for each event + const eventsWithCounts = await Promise.all( + result.map(async (event: any) => { + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, event.id), + eq((tickets as any).status, 'confirmed') + ) + ) + .get(); + + return { + ...event, + bookedCount: ticketCount?.count || 0, + availableSeats: event.capacity - (ticketCount?.count || 0), + }; + }) + ); + + return c.json({ events: eventsWithCounts }); +}); + +// Get single event (public) +eventsRouter.get('/:id', async (c) => { + const id = c.req.param('id'); + + const event = await (db as any).select().from(events).where(eq((events as any).id, id)).get(); + + if (!event) { + return c.json({ error: 'Event not found' }, 404); + } + + // Get ticket count + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, id), + eq((tickets as any).status, 'confirmed') + ) + ) + .get(); + + return c.json({ + event: { + ...event, + bookedCount: ticketCount?.count || 0, + availableSeats: event.capacity - (ticketCount?.count || 0), + }, + }); +}); + +// Get next upcoming event (public) +eventsRouter.get('/next/upcoming', async (c) => { + const now = getNow(); + + const event = await (db as any) + .select() + .from(events) + .where( + and( + eq((events as any).status, 'published'), + gte((events as any).startDatetime, now) + ) + ) + .orderBy((events as any).startDatetime) + .limit(1) + .get(); + + if (!event) { + return c.json({ event: null }); + } + + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, event.id), + eq((tickets as any).status, 'confirmed') + ) + ) + .get(); + + return c.json({ + event: { + ...event, + bookedCount: ticketCount?.count || 0, + availableSeats: event.capacity - (ticketCount?.count || 0), + }, + }); +}); + +// Create event (admin/organizer only) +eventsRouter.post('/', requireAuth(['admin', 'organizer']), zValidator('json', createEventSchema, validationHook), async (c) => { + const data = c.req.valid('json'); + const user = c.get('user'); + const now = getNow(); + const id = generateId(); + + const newEvent = { + id, + ...data, + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(events).values(newEvent); + + return c.json({ event: newEvent }, 201); +}); + +// Update event (admin/organizer only) +eventsRouter.put('/:id', requireAuth(['admin', 'organizer']), zValidator('json', updateEventSchema, validationHook), async (c) => { + const id = c.req.param('id'); + const data = c.req.valid('json'); + + const existing = await (db as any).select().from(events).where(eq((events as any).id, id)).get(); + if (!existing) { + return c.json({ error: 'Event not found' }, 404); + } + + const now = getNow(); + await (db as any) + .update(events) + .set({ ...data, updatedAt: now }) + .where(eq((events as any).id, id)); + + const updated = await (db as any).select().from(events).where(eq((events as any).id, id)).get(); + + return c.json({ event: updated }); +}); + +// Delete event (admin only) +eventsRouter.delete('/:id', requireAuth(['admin']), async (c) => { + const id = c.req.param('id'); + + const existing = await (db as any).select().from(events).where(eq((events as any).id, id)).get(); + if (!existing) { + return c.json({ error: 'Event not found' }, 404); + } + + await (db as any).delete(events).where(eq((events as any).id, id)); + + return c.json({ message: 'Event deleted successfully' }); +}); + +// Get event attendees (admin/organizer only) +eventsRouter.get('/:id/attendees', requireAuth(['admin', 'organizer', 'staff']), async (c) => { + const id = c.req.param('id'); + + const attendees = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).eventId, id)) + .all(); + + return c.json({ attendees }); +}); + +// Duplicate event (admin/organizer only) +eventsRouter.post('/:id/duplicate', requireAuth(['admin', 'organizer']), async (c) => { + const id = c.req.param('id'); + + const existing = await (db as any).select().from(events).where(eq((events as any).id, id)).get(); + if (!existing) { + return c.json({ error: 'Event not found' }, 404); + } + + const now = getNow(); + const newId = generateId(); + + // Create a copy with modified title and draft status + const duplicatedEvent = { + id: newId, + title: `${existing.title} (Copy)`, + titleEs: existing.titleEs ? `${existing.titleEs} (Copia)` : null, + description: existing.description, + descriptionEs: existing.descriptionEs, + startDatetime: existing.startDatetime, + endDatetime: existing.endDatetime, + location: existing.location, + locationUrl: existing.locationUrl, + price: existing.price, + currency: existing.currency, + capacity: existing.capacity, + status: 'draft', + bannerUrl: existing.bannerUrl, + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(events).values(duplicatedEvent); + + return c.json({ event: duplicatedEvent, message: 'Event duplicated successfully' }, 201); +}); + +export default eventsRouter; diff --git a/backend/src/routes/lnbits.ts b/backend/src/routes/lnbits.ts new file mode 100644 index 0000000..1282724 --- /dev/null +++ b/backend/src/routes/lnbits.ts @@ -0,0 +1,340 @@ +import { Hono } from 'hono'; +import { streamSSE } from 'hono/streaming'; +import { db, tickets, payments } from '../db/index.js'; +import { eq } from 'drizzle-orm'; +import { getNow } from '../lib/utils.js'; +import { verifyWebhookPayment, getPaymentStatus } from '../lib/lnbits.js'; +import emailService from '../lib/email.js'; + +const lnbitsRouter = new Hono(); + +// Store for active SSE connections (ticketId -> Set of response writers) +const activeConnections = new Map void>>(); + +// Store for active background checkers (ticketId -> intervalId) +const activeCheckers = new Map(); + +/** + * LNbits webhook payload structure + */ +interface LNbitsWebhookPayload { + payment_hash: string; + payment_request?: string; + amount: number; + memo?: string; + status: string; + preimage?: string; + extra?: { + ticketId?: string; + eventId?: string; + [key: string]: any; + }; +} + +/** + * Notify all connected clients for a ticket + */ +function notifyClients(ticketId: string, data: any) { + const connections = activeConnections.get(ticketId); + if (connections) { + connections.forEach(send => { + try { + send(data); + } catch (e) { + // Connection might be closed + } + }); + } +} + +/** + * Start background payment checking for a ticket + */ +function startBackgroundChecker(ticketId: string, paymentHash: string, expirySeconds: number = 900) { + // Don't start if already checking + if (activeCheckers.has(ticketId)) { + return; + } + + const startTime = Date.now(); + const expiryMs = expirySeconds * 1000; + let checkCount = 0; + + console.log(`Starting background checker for ticket ${ticketId}, expires in ${expirySeconds}s`); + + const checkInterval = setInterval(async () => { + checkCount++; + const elapsed = Date.now() - startTime; + + // Stop if expired + if (elapsed >= expiryMs) { + console.log(`Invoice expired for ticket ${ticketId}`); + clearInterval(checkInterval); + activeCheckers.delete(ticketId); + notifyClients(ticketId, { type: 'expired', ticketId }); + return; + } + + try { + const status = await getPaymentStatus(paymentHash); + + if (status?.paid) { + console.log(`Payment confirmed for ticket ${ticketId} (check #${checkCount})`); + clearInterval(checkInterval); + activeCheckers.delete(ticketId); + + await handlePaymentComplete(ticketId, paymentHash); + notifyClients(ticketId, { type: 'paid', ticketId, paymentHash }); + } + } catch (error) { + console.error(`Error checking payment for ticket ${ticketId}:`, error); + } + }, 3000); // Check every 3 seconds + + activeCheckers.set(ticketId, checkInterval); +} + +/** + * Stop background checker for a ticket + */ +function stopBackgroundChecker(ticketId: string) { + const interval = activeCheckers.get(ticketId); + if (interval) { + clearInterval(interval); + activeCheckers.delete(ticketId); + } +} + +/** + * LNbits webhook endpoint + * Called by LNbits when a payment is received + */ +lnbitsRouter.post('/webhook', async (c) => { + try { + const payload: LNbitsWebhookPayload = await c.req.json(); + + console.log('LNbits webhook received:', { + paymentHash: payload.payment_hash, + status: payload.status, + amount: payload.amount, + extra: payload.extra, + }); + + // Verify the payment is actually complete by checking with LNbits + const isVerified = await verifyWebhookPayment(payload.payment_hash); + + if (!isVerified) { + console.warn('LNbits webhook payment not verified:', payload.payment_hash); + return c.json({ received: true, processed: false }, 200); + } + + const ticketId = payload.extra?.ticketId; + + if (!ticketId) { + console.error('No ticketId in LNbits webhook extra data'); + return c.json({ received: true, processed: false }, 200); + } + + // Stop background checker since webhook confirmed payment + stopBackgroundChecker(ticketId); + + await handlePaymentComplete(ticketId, payload.payment_hash); + + // Notify connected clients via SSE + notifyClients(ticketId, { type: 'paid', ticketId, paymentHash: payload.payment_hash }); + + return c.json({ received: true, processed: true }, 200); + } catch (error) { + console.error('LNbits webhook error:', error); + return c.json({ error: 'Webhook processing failed' }, 500); + } +}); + +/** + * Handle successful payment + */ +async function handlePaymentComplete(ticketId: string, paymentHash: string) { + const now = getNow(); + + // Check if already confirmed to avoid duplicate updates + const existingTicket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, ticketId)) + .get(); + + if (existingTicket?.status === 'confirmed') { + console.log(`Ticket ${ticketId} already confirmed, skipping update`); + return; + } + + // Update ticket status to confirmed + await (db as any) + .update(tickets) + .set({ status: 'confirmed' }) + .where(eq((tickets as any).id, ticketId)); + + // Update payment status to paid + await (db as any) + .update(payments) + .set({ + status: 'paid', + reference: paymentHash, + paidAt: now, + updatedAt: now, + }) + .where(eq((payments as any).ticketId, ticketId)); + + console.log(`Ticket ${ticketId} confirmed via Lightning payment (hash: ${paymentHash})`); + + // Get payment for sending receipt + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticketId)) + .get(); + + // Send confirmation emails asynchronously + Promise.all([ + emailService.sendBookingConfirmation(ticketId), + payment ? emailService.sendPaymentReceipt(payment.id) : Promise.resolve(), + ]).catch(err => { + console.error('[Email] Failed to send confirmation emails:', err); + }); +} + +/** + * SSE endpoint for real-time payment status updates + * Frontend connects here to receive instant payment notifications + */ +lnbitsRouter.get('/stream/:ticketId', async (c) => { + const ticketId = c.req.param('ticketId'); + + // Verify ticket exists + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, ticketId)) + .get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + // If already paid, return immediately + if (ticket.status === 'confirmed') { + return c.json({ type: 'already_paid', ticketId }, 200); + } + + // Get payment to start background checker + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticketId)) + .get(); + + // Start background checker if not already running + if (payment?.reference && !activeCheckers.has(ticketId)) { + startBackgroundChecker(ticketId, payment.reference, 900); // 15 min expiry + } + + return streamSSE(c, async (stream) => { + // Register this connection + if (!activeConnections.has(ticketId)) { + activeConnections.set(ticketId, new Set()); + } + + const sendEvent = (data: any) => { + stream.writeSSE({ data: JSON.stringify(data), event: 'payment' }); + }; + + activeConnections.get(ticketId)!.add(sendEvent); + + // Send initial status + await stream.writeSSE({ + data: JSON.stringify({ type: 'connected', ticketId }), + event: 'payment' + }); + + // Keep connection alive with heartbeat + const heartbeat = setInterval(async () => { + try { + await stream.writeSSE({ data: 'ping', event: 'heartbeat' }); + } catch (e) { + clearInterval(heartbeat); + } + }, 15000); + + // Clean up on disconnect + stream.onAbort(() => { + clearInterval(heartbeat); + const connections = activeConnections.get(ticketId); + if (connections) { + connections.delete(sendEvent); + if (connections.size === 0) { + activeConnections.delete(ticketId); + } + } + }); + + // Keep the stream open + while (true) { + await stream.sleep(30000); + } + }); +}); + +/** + * Get payment status for a ticket (fallback polling endpoint) + */ +lnbitsRouter.get('/status/:ticketId', async (c) => { + const ticketId = c.req.param('ticketId'); + + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, ticketId)) + .get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, ticketId)) + .get(); + + return c.json({ + ticketStatus: ticket.status, + paymentStatus: payment?.status || 'unknown', + isPaid: ticket.status === 'confirmed' || payment?.status === 'paid', + }); +}); + +/** + * Manual payment check endpoint + */ +lnbitsRouter.post('/check/:paymentHash', async (c) => { + const paymentHash = c.req.param('paymentHash'); + + try { + const status = await getPaymentStatus(paymentHash); + + if (!status) { + return c.json({ error: 'Payment not found' }, 404); + } + + return c.json({ + paymentHash, + paid: status.paid, + status: status.status, + }); + } catch (error) { + console.error('Error checking payment:', error); + return c.json({ error: 'Failed to check payment status' }, 500); + } +}); + +export default lnbitsRouter; diff --git a/backend/src/routes/media.ts b/backend/src/routes/media.ts new file mode 100644 index 0000000..7b4160a --- /dev/null +++ b/backend/src/routes/media.ts @@ -0,0 +1,148 @@ +import { Hono } from 'hono'; +import { db, media } from '../db/index.js'; +import { eq } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; +import { writeFile, mkdir, unlink } from 'fs/promises'; +import { existsSync } from 'fs'; +import { join, extname } from 'path'; + +const mediaRouter = new Hono(); + +const UPLOAD_DIR = './uploads'; +const ALLOWED_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif']; +const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB + +// Ensure upload directory exists +async function ensureUploadDir() { + if (!existsSync(UPLOAD_DIR)) { + await mkdir(UPLOAD_DIR, { recursive: true }); + } +} + +// Upload image +mediaRouter.post('/upload', requireAuth(['admin', 'organizer']), async (c) => { + try { + const body = await c.req.parseBody(); + const file = body['file'] as File; + + if (!file) { + return c.json({ error: 'No file provided' }, 400); + } + + // Validate file type + if (!ALLOWED_TYPES.includes(file.type)) { + return c.json({ error: 'Invalid file type. Allowed: JPEG, PNG, GIF, WebP, AVIF' }, 400); + } + + // Validate file size + if (file.size > MAX_FILE_SIZE) { + return c.json({ error: 'File too large. Maximum size: 5MB' }, 400); + } + + await ensureUploadDir(); + + // Generate unique filename + const id = generateId(); + const ext = extname(file.name) || '.jpg'; + const filename = `${id}${ext}`; + const filepath = join(UPLOAD_DIR, filename); + + // Write file + const arrayBuffer = await file.arrayBuffer(); + await writeFile(filepath, Buffer.from(arrayBuffer)); + + // Get related info from form data + const relatedId = body['relatedId'] as string | undefined; + const relatedType = body['relatedType'] as string | undefined; + + // Save to database + const now = getNow(); + const mediaRecord = { + id, + fileUrl: `/uploads/${filename}`, + type: 'image' as const, + relatedId: relatedId || null, + relatedType: relatedType || null, + createdAt: now, + }; + + await (db as any).insert(media).values(mediaRecord); + + return c.json({ + media: mediaRecord, + url: mediaRecord.fileUrl, + }, 201); + } catch (error) { + console.error('Upload error:', error); + return c.json({ error: 'Failed to upload file' }, 500); + } +}); + +// Get media by ID +mediaRouter.get('/:id', async (c) => { + const id = c.req.param('id'); + + const mediaRecord = await (db as any) + .select() + .from(media) + .where(eq((media as any).id, id)) + .get(); + + if (!mediaRecord) { + return c.json({ error: 'Media not found' }, 404); + } + + return c.json({ media: mediaRecord }); +}); + +// Delete media +mediaRouter.delete('/:id', requireAuth(['admin', 'organizer']), async (c) => { + const id = c.req.param('id'); + + const mediaRecord = await (db as any) + .select() + .from(media) + .where(eq((media as any).id, id)) + .get(); + + if (!mediaRecord) { + return c.json({ error: 'Media not found' }, 404); + } + + // Delete file from disk + try { + const filepath = join('.', mediaRecord.fileUrl); + if (existsSync(filepath)) { + await unlink(filepath); + } + } catch (error) { + console.error('Failed to delete file:', error); + } + + // Delete from database + await (db as any).delete(media).where(eq((media as any).id, id)); + + return c.json({ message: 'Media deleted successfully' }); +}); + +// List media (admin) +mediaRouter.get('/', requireAuth(['admin', 'organizer']), async (c) => { + const relatedType = c.req.query('relatedType'); + const relatedId = c.req.query('relatedId'); + + let query = (db as any).select().from(media); + + if (relatedType) { + query = query.where(eq((media as any).relatedType, relatedType)); + } + if (relatedId) { + query = query.where(eq((media as any).relatedId, relatedId)); + } + + const result = await query.all(); + + return c.json({ media: result }); +}); + +export default mediaRouter; diff --git a/backend/src/routes/payment-options.ts b/backend/src/routes/payment-options.ts new file mode 100644 index 0000000..7e4797a --- /dev/null +++ b/backend/src/routes/payment-options.ts @@ -0,0 +1,278 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, paymentOptions, eventPaymentOverrides, events } from '../db/index.js'; +import { eq } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { generateId, getNow } from '../lib/utils.js'; + +const paymentOptionsRouter = new Hono(); + +// Schema for updating global payment options +const updatePaymentOptionsSchema = z.object({ + tpagoEnabled: z.boolean().optional(), + tpagoLink: z.string().optional().nullable(), + tpagoInstructions: z.string().optional().nullable(), + tpagoInstructionsEs: z.string().optional().nullable(), + bankTransferEnabled: z.boolean().optional(), + bankName: z.string().optional().nullable(), + bankAccountHolder: z.string().optional().nullable(), + bankAccountNumber: z.string().optional().nullable(), + bankAlias: z.string().optional().nullable(), + bankPhone: z.string().optional().nullable(), + bankNotes: z.string().optional().nullable(), + bankNotesEs: z.string().optional().nullable(), + lightningEnabled: z.boolean().optional(), + cashEnabled: z.boolean().optional(), + cashInstructions: z.string().optional().nullable(), + cashInstructionsEs: z.string().optional().nullable(), +}); + +// Schema for event-level overrides +const updateEventOverridesSchema = z.object({ + tpagoEnabled: z.boolean().optional().nullable(), + tpagoLink: z.string().optional().nullable(), + tpagoInstructions: z.string().optional().nullable(), + tpagoInstructionsEs: z.string().optional().nullable(), + bankTransferEnabled: z.boolean().optional().nullable(), + bankName: z.string().optional().nullable(), + bankAccountHolder: z.string().optional().nullable(), + bankAccountNumber: z.string().optional().nullable(), + bankAlias: z.string().optional().nullable(), + bankPhone: z.string().optional().nullable(), + bankNotes: z.string().optional().nullable(), + bankNotesEs: z.string().optional().nullable(), + lightningEnabled: z.boolean().optional().nullable(), + cashEnabled: z.boolean().optional().nullable(), + cashInstructions: z.string().optional().nullable(), + cashInstructionsEs: z.string().optional().nullable(), +}); + +// Get global payment options +paymentOptionsRouter.get('/', requireAuth(['admin']), async (c) => { + const options = await (db as any) + .select() + .from(paymentOptions) + .get(); + + // If no options exist yet, return defaults + if (!options) { + return c.json({ + paymentOptions: { + tpagoEnabled: false, + tpagoLink: null, + tpagoInstructions: null, + tpagoInstructionsEs: null, + bankTransferEnabled: false, + bankName: null, + bankAccountHolder: null, + bankAccountNumber: null, + bankAlias: null, + bankPhone: null, + bankNotes: null, + bankNotesEs: null, + lightningEnabled: true, + cashEnabled: true, + cashInstructions: null, + cashInstructionsEs: null, + }, + }); + } + + return c.json({ paymentOptions: options }); +}); + +// Update global payment options +paymentOptionsRouter.put('/', requireAuth(['admin']), zValidator('json', updatePaymentOptionsSchema), async (c) => { + const data = c.req.valid('json'); + const user = (c as any).get('user'); + const now = getNow(); + + // Check if options exist + const existing = await (db as any) + .select() + .from(paymentOptions) + .get(); + + if (existing) { + // Update existing + await (db as any) + .update(paymentOptions) + .set({ + ...data, + updatedAt: now, + updatedBy: user.id, + }) + .where(eq((paymentOptions as any).id, existing.id)); + } else { + // Create new + const id = generateId(); + await (db as any).insert(paymentOptions).values({ + id, + ...data, + updatedAt: now, + updatedBy: user.id, + }); + } + + const updated = await (db as any) + .select() + .from(paymentOptions) + .get(); + + return c.json({ paymentOptions: updated, message: 'Payment options updated successfully' }); +}); + +// Get payment options for a specific event (merged with global) +paymentOptionsRouter.get('/event/:eventId', async (c) => { + const eventId = c.req.param('eventId'); + + // Get the event first to verify it exists + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, eventId)) + .get(); + + if (!event) { + return c.json({ error: 'Event not found' }, 404); + } + + // Get global options + const globalOptions = await (db as any) + .select() + .from(paymentOptions) + .get(); + + // Get event overrides + const overrides = await (db as any) + .select() + .from(eventPaymentOverrides) + .where(eq((eventPaymentOverrides as any).eventId, eventId)) + .get(); + + // Merge global with overrides (override takes precedence if not null) + const defaults = { + tpagoEnabled: false, + tpagoLink: null, + tpagoInstructions: null, + tpagoInstructionsEs: null, + bankTransferEnabled: false, + bankName: null, + bankAccountHolder: null, + bankAccountNumber: null, + bankAlias: null, + bankPhone: null, + bankNotes: null, + bankNotesEs: null, + lightningEnabled: true, + cashEnabled: true, + cashInstructions: null, + cashInstructionsEs: null, + }; + + const global = globalOptions || defaults; + + // Merge: override values take precedence if they're not null/undefined + const merged = { + tpagoEnabled: overrides?.tpagoEnabled ?? global.tpagoEnabled, + tpagoLink: overrides?.tpagoLink ?? global.tpagoLink, + tpagoInstructions: overrides?.tpagoInstructions ?? global.tpagoInstructions, + tpagoInstructionsEs: overrides?.tpagoInstructionsEs ?? global.tpagoInstructionsEs, + bankTransferEnabled: overrides?.bankTransferEnabled ?? global.bankTransferEnabled, + bankName: overrides?.bankName ?? global.bankName, + bankAccountHolder: overrides?.bankAccountHolder ?? global.bankAccountHolder, + bankAccountNumber: overrides?.bankAccountNumber ?? global.bankAccountNumber, + bankAlias: overrides?.bankAlias ?? global.bankAlias, + bankPhone: overrides?.bankPhone ?? global.bankPhone, + bankNotes: overrides?.bankNotes ?? global.bankNotes, + bankNotesEs: overrides?.bankNotesEs ?? global.bankNotesEs, + lightningEnabled: overrides?.lightningEnabled ?? global.lightningEnabled, + cashEnabled: overrides?.cashEnabled ?? global.cashEnabled, + cashInstructions: overrides?.cashInstructions ?? global.cashInstructions, + cashInstructionsEs: overrides?.cashInstructionsEs ?? global.cashInstructionsEs, + }; + + return c.json({ + paymentOptions: merged, + hasOverrides: !!overrides, + }); +}); + +// Get event payment overrides (admin only) +paymentOptionsRouter.get('/event/:eventId/overrides', requireAuth(['admin', 'organizer']), async (c) => { + const eventId = c.req.param('eventId'); + + const overrides = await (db as any) + .select() + .from(eventPaymentOverrides) + .where(eq((eventPaymentOverrides as any).eventId, eventId)) + .get(); + + return c.json({ overrides: overrides || null }); +}); + +// Update event payment overrides +paymentOptionsRouter.put('/event/:eventId/overrides', requireAuth(['admin', 'organizer']), zValidator('json', updateEventOverridesSchema), async (c) => { + const eventId = c.req.param('eventId'); + const data = c.req.valid('json'); + const now = getNow(); + + // Verify event exists + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, eventId)) + .get(); + + if (!event) { + return c.json({ error: 'Event not found' }, 404); + } + + // Check if overrides exist + const existing = await (db as any) + .select() + .from(eventPaymentOverrides) + .where(eq((eventPaymentOverrides as any).eventId, eventId)) + .get(); + + if (existing) { + await (db as any) + .update(eventPaymentOverrides) + .set({ + ...data, + updatedAt: now, + }) + .where(eq((eventPaymentOverrides as any).id, existing.id)); + } else { + const id = generateId(); + await (db as any).insert(eventPaymentOverrides).values({ + id, + eventId, + ...data, + createdAt: now, + updatedAt: now, + }); + } + + const updated = await (db as any) + .select() + .from(eventPaymentOverrides) + .where(eq((eventPaymentOverrides as any).eventId, eventId)) + .get(); + + return c.json({ overrides: updated, message: 'Event payment overrides updated successfully' }); +}); + +// Delete event payment overrides (revert to global) +paymentOptionsRouter.delete('/event/:eventId/overrides', requireAuth(['admin', 'organizer']), async (c) => { + const eventId = c.req.param('eventId'); + + await (db as any) + .delete(eventPaymentOverrides) + .where(eq((eventPaymentOverrides as any).eventId, eventId)); + + return c.json({ message: 'Event payment overrides removed' }); +}); + +export default paymentOptionsRouter; diff --git a/backend/src/routes/payments.ts b/backend/src/routes/payments.ts new file mode 100644 index 0000000..5320453 --- /dev/null +++ b/backend/src/routes/payments.ts @@ -0,0 +1,431 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, payments, tickets, events } from '../db/index.js'; +import { eq, desc, and, or, sql } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { getNow } from '../lib/utils.js'; +import emailService from '../lib/email.js'; + +const paymentsRouter = new Hono(); + +const updatePaymentSchema = z.object({ + status: z.enum(['pending', 'pending_approval', 'paid', 'refunded', 'failed']), + reference: z.string().optional(), + adminNote: z.string().optional(), +}); + +const approvePaymentSchema = z.object({ + adminNote: z.string().optional(), +}); + +const rejectPaymentSchema = z.object({ + adminNote: z.string().optional(), +}); + +// Get all payments (admin) - with ticket and event details +paymentsRouter.get('/', requireAuth(['admin']), async (c) => { + const status = c.req.query('status'); + const provider = c.req.query('provider'); + const pendingApproval = c.req.query('pendingApproval'); + + // Get all payments with their associated tickets + let allPayments = await (db as any) + .select() + .from(payments) + .orderBy(desc((payments as any).createdAt)) + .all(); + + // Filter by status + if (status) { + allPayments = allPayments.filter((p: any) => p.status === status); + } + + // Filter for pending approval specifically + if (pendingApproval === 'true') { + allPayments = allPayments.filter((p: any) => p.status === 'pending_approval'); + } + + // Filter by provider + if (provider) { + allPayments = allPayments.filter((p: any) => p.provider === provider); + } + + // Enrich with ticket and event data + const enrichedPayments = await Promise.all( + allPayments.map(async (payment: any) => { + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + let event = null; + if (ticket) { + event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + } + + return { + ...payment, + ticket: ticket ? { + id: ticket.id, + attendeeFirstName: ticket.attendeeFirstName, + attendeeLastName: ticket.attendeeLastName, + attendeeEmail: ticket.attendeeEmail, + attendeePhone: ticket.attendeePhone, + status: ticket.status, + } : null, + event: event ? { + id: event.id, + title: event.title, + startDatetime: event.startDatetime, + } : null, + }; + }) + ); + + return c.json({ payments: enrichedPayments }); +}); + +// Get payments pending approval (admin dashboard view) +paymentsRouter.get('/pending-approval', requireAuth(['admin', 'organizer']), async (c) => { + const pendingPayments = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).status, 'pending_approval')) + .orderBy(desc((payments as any).userMarkedPaidAt)) + .all(); + + // Enrich with ticket and event data + const enrichedPayments = await Promise.all( + pendingPayments.map(async (payment: any) => { + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + let event = null; + if (ticket) { + event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + } + + return { + ...payment, + ticket: ticket ? { + id: ticket.id, + attendeeFirstName: ticket.attendeeFirstName, + attendeeLastName: ticket.attendeeLastName, + attendeeEmail: ticket.attendeeEmail, + attendeePhone: ticket.attendeePhone, + status: ticket.status, + } : null, + event: event ? { + id: event.id, + title: event.title, + startDatetime: event.startDatetime, + } : null, + }; + }) + ); + + return c.json({ payments: enrichedPayments }); +}); + +// Get payment by ID (admin) +paymentsRouter.get('/:id', requireAuth(['admin', 'organizer']), async (c) => { + const id = c.req.param('id'); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + // Get associated ticket + const ticket = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).id, payment.ticketId)) + .get(); + + return c.json({ payment: { ...payment, ticket } }); +}); + +// Update payment (admin) - for manual payment confirmation +paymentsRouter.put('/:id', requireAuth(['admin', 'organizer']), zValidator('json', updatePaymentSchema), async (c) => { + const id = c.req.param('id'); + const data = c.req.valid('json'); + const user = (c as any).get('user'); + + const existing = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!existing) { + return c.json({ error: 'Payment not found' }, 404); + } + + const now = getNow(); + + const updateData: any = { ...data, updatedAt: now }; + + // If marking as paid, record who approved it and when + if (data.status === 'paid' && existing.status !== 'paid') { + updateData.paidAt = now; + updateData.paidByAdminId = user.id; + } + + await (db as any) + .update(payments) + .set(updateData) + .where(eq((payments as any).id, id)); + + // If payment confirmed, update ticket status and send emails + if (data.status === 'paid') { + await (db as any) + .update(tickets) + .set({ status: 'confirmed' }) + .where(eq((tickets as any).id, existing.ticketId)); + + // Send confirmation emails asynchronously (don't block the response) + Promise.all([ + emailService.sendBookingConfirmation(existing.ticketId), + emailService.sendPaymentReceipt(id), + ]).catch(err => { + console.error('[Email] Failed to send confirmation emails:', err); + }); + } + + const updated = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + return c.json({ payment: updated }); +}); + +// Approve payment (admin) - specifically for pending_approval payments +paymentsRouter.post('/:id/approve', requireAuth(['admin', 'organizer']), zValidator('json', approvePaymentSchema), async (c) => { + const id = c.req.param('id'); + const { adminNote } = c.req.valid('json'); + const user = (c as any).get('user'); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + // Can approve pending or pending_approval payments + if (!['pending', 'pending_approval'].includes(payment.status)) { + return c.json({ error: 'Payment cannot be approved in its current state' }, 400); + } + + const now = getNow(); + + // Update payment status to paid + await (db as any) + .update(payments) + .set({ + status: 'paid', + paidAt: now, + paidByAdminId: user.id, + adminNote: adminNote || payment.adminNote, + updatedAt: now, + }) + .where(eq((payments as any).id, id)); + + // Update ticket status to confirmed + await (db as any) + .update(tickets) + .set({ status: 'confirmed' }) + .where(eq((tickets as any).id, payment.ticketId)); + + // Send confirmation emails asynchronously + Promise.all([ + emailService.sendBookingConfirmation(payment.ticketId), + emailService.sendPaymentReceipt(id), + ]).catch(err => { + console.error('[Email] Failed to send confirmation emails:', err); + }); + + const updated = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + return c.json({ payment: updated, message: 'Payment approved successfully' }); +}); + +// Reject payment (admin) +paymentsRouter.post('/:id/reject', requireAuth(['admin', 'organizer']), zValidator('json', rejectPaymentSchema), async (c) => { + const id = c.req.param('id'); + const { adminNote } = c.req.valid('json'); + const user = (c as any).get('user'); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + if (!['pending', 'pending_approval'].includes(payment.status)) { + return c.json({ error: 'Payment cannot be rejected in its current state' }, 400); + } + + const now = getNow(); + + // Update payment status to failed + await (db as any) + .update(payments) + .set({ + status: 'failed', + paidByAdminId: user.id, + adminNote: adminNote || payment.adminNote, + updatedAt: now, + }) + .where(eq((payments as any).id, id)); + + // Note: We don't cancel the ticket automatically - admin can do that separately if needed + + const updated = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + return c.json({ payment: updated, message: 'Payment rejected' }); +}); + +// Update admin note +paymentsRouter.post('/:id/note', requireAuth(['admin', 'organizer']), async (c) => { + const id = c.req.param('id'); + const body = await c.req.json(); + const { adminNote } = body; + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + const now = getNow(); + + await (db as any) + .update(payments) + .set({ + adminNote: adminNote || null, + updatedAt: now, + }) + .where(eq((payments as any).id, id)); + + const updated = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + return c.json({ payment: updated, message: 'Note updated' }); +}); + +// Process refund (admin) +paymentsRouter.post('/:id/refund', requireAuth(['admin']), async (c) => { + const id = c.req.param('id'); + + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + if (payment.status !== 'paid') { + return c.json({ error: 'Can only refund paid payments' }, 400); + } + + const now = getNow(); + + // Update payment status + await (db as any) + .update(payments) + .set({ status: 'refunded', updatedAt: now }) + .where(eq((payments as any).id, id)); + + // Cancel associated ticket + await (db as any) + .update(tickets) + .set({ status: 'cancelled' }) + .where(eq((tickets as any).id, payment.ticketId)); + + return c.json({ message: 'Refund processed successfully' }); +}); + +// Payment webhook (for Stripe/MercadoPago) +paymentsRouter.post('/webhook', async (c) => { + // This would handle webhook notifications from payment providers + // Implementation depends on which provider is used + + const body = await c.req.json(); + + // Log webhook for debugging + console.log('Payment webhook received:', body); + + // TODO: Implement provider-specific webhook handling + // - Verify webhook signature + // - Update payment status + // - Update ticket status + + return c.json({ received: true }); +}); + +// Get payment statistics (admin) +paymentsRouter.get('/stats/overview', requireAuth(['admin']), async (c) => { + const allPayments = await (db as any).select().from(payments).all(); + + const stats = { + total: allPayments.length, + pending: allPayments.filter((p: any) => p.status === 'pending').length, + paid: allPayments.filter((p: any) => p.status === 'paid').length, + refunded: allPayments.filter((p: any) => p.status === 'refunded').length, + failed: allPayments.filter((p: any) => p.status === 'failed').length, + totalRevenue: allPayments + .filter((p: any) => p.status === 'paid') + .reduce((sum: number, p: any) => sum + (p.amount || 0), 0), + }; + + return c.json({ stats }); +}); + +export default paymentsRouter; diff --git a/backend/src/routes/tickets.ts b/backend/src/routes/tickets.ts new file mode 100644 index 0000000..756bcf2 --- /dev/null +++ b/backend/src/routes/tickets.ts @@ -0,0 +1,652 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, tickets, events, users, payments } from '../db/index.js'; +import { eq, and, sql } from 'drizzle-orm'; +import { requireAuth, getAuthUser } from '../lib/auth.js'; +import { generateId, generateTicketCode, getNow } from '../lib/utils.js'; +import { createInvoice, isLNbitsConfigured } from '../lib/lnbits.js'; +import emailService from '../lib/email.js'; + +const ticketsRouter = new Hono(); + +const createTicketSchema = z.object({ + eventId: z.string(), + firstName: z.string().min(2), + lastName: z.string().min(2), + email: z.string().email(), + phone: z.string().min(6, 'Phone number is required'), + preferredLanguage: z.enum(['en', 'es']).optional(), + paymentMethod: z.enum(['bancard', 'lightning', 'cash', 'bank_transfer', 'tpago']).default('cash'), + ruc: z.string().regex(/^[0-9]{6,8}-[0-9]{1}$/, 'Invalid RUC format').optional(), +}); + +const updateTicketSchema = z.object({ + status: z.enum(['pending', 'confirmed', 'cancelled', 'checked_in']).optional(), + adminNote: z.string().optional(), +}); + +const updateNoteSchema = z.object({ + note: z.string().max(1000), +}); + +const adminCreateTicketSchema = z.object({ + eventId: z.string(), + firstName: z.string().min(2), + lastName: z.string().optional().or(z.literal('')), + email: z.string().email().optional().or(z.literal('')), + phone: z.string().optional().or(z.literal('')), + preferredLanguage: z.enum(['en', 'es']).optional(), + autoCheckin: z.boolean().optional().default(false), + adminNote: z.string().max(1000).optional(), +}); + +// Book a ticket (public) +ticketsRouter.post('/', zValidator('json', createTicketSchema), async (c) => { + const data = c.req.valid('json'); + + // Get event + const event = await (db as any).select().from(events).where(eq((events as any).id, data.eventId)).get(); + if (!event) { + return c.json({ error: 'Event not found' }, 404); + } + + if (event.status !== 'published') { + return c.json({ error: 'Event is not available for booking' }, 400); + } + + // Check capacity + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, data.eventId), + eq((tickets as any).status, 'confirmed') + ) + ) + .get(); + + if ((ticketCount?.count || 0) >= event.capacity) { + return c.json({ error: 'Event is sold out' }, 400); + } + + // Find or create user + let user = await (db as any).select().from(users).where(eq((users as any).email, data.email)).get(); + + const now = getNow(); + + const fullName = `${data.firstName} ${data.lastName}`.trim(); + + if (!user) { + const userId = generateId(); + user = { + id: userId, + email: data.email, + password: '', // No password for guest bookings + name: fullName, + phone: data.phone || null, + role: 'user', + languagePreference: null, + createdAt: now, + updatedAt: now, + }; + await (db as any).insert(users).values(user); + } + + // Check for duplicate booking + const existingTicket = await (db as any) + .select() + .from(tickets) + .where( + and( + eq((tickets as any).userId, user.id), + eq((tickets as any).eventId, data.eventId) + ) + ) + .get(); + + if (existingTicket && existingTicket.status !== 'cancelled') { + return c.json({ error: 'You have already booked this event' }, 400); + } + + // Create ticket + const ticketId = generateId(); + const qrCode = generateTicketCode(); + + // Cash payments start as pending, card/lightning start as pending until payment confirmed + const ticketStatus = 'pending'; + + const newTicket = { + id: ticketId, + userId: user.id, + eventId: data.eventId, + attendeeFirstName: data.firstName, + attendeeLastName: data.lastName, + attendeeEmail: data.email, + attendeePhone: data.phone, + attendeeRuc: data.ruc || null, + preferredLanguage: data.preferredLanguage || null, + status: ticketStatus, + qrCode, + checkinAt: null, + createdAt: now, + }; + + await (db as any).insert(tickets).values(newTicket); + + // Create payment record + const paymentId = generateId(); + const newPayment = { + id: paymentId, + ticketId, + provider: data.paymentMethod, + amount: event.price, + currency: event.currency, + status: 'pending', + reference: null, + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(payments).values(newPayment); + + // If Lightning payment, create LNbits invoice + let lnbitsInvoice = null; + if (data.paymentMethod === 'lightning' && event.price > 0) { + if (!isLNbitsConfigured()) { + // Delete the ticket and payment we just created + await (db as any).delete(payments).where(eq((payments as any).id, paymentId)); + await (db as any).delete(tickets).where(eq((tickets as any).id, ticketId)); + return c.json({ + error: 'Bitcoin Lightning payments are not available at this time' + }, 400); + } + + try { + const apiUrl = process.env.API_URL || 'http://localhost:3001'; + + // Pass the fiat currency directly to LNbits - it handles conversion automatically + lnbitsInvoice = await createInvoice({ + amount: event.price, + unit: event.currency, // LNbits supports fiat currencies like USD, PYG, etc. + memo: `Spanglish: ${event.title} - ${fullName}`, + webhookUrl: `${apiUrl}/api/lnbits/webhook`, + expiry: 900, // 15 minutes expiry for faster UX + extra: { + ticketId, + eventId: event.id, + eventTitle: event.title, + attendeeName: fullName, + attendeeEmail: data.email, + }, + }); + + // Update payment with LNbits payment hash reference + await (db as any) + .update(payments) + .set({ reference: lnbitsInvoice.paymentHash }) + .where(eq((payments as any).id, paymentId)); + + (newPayment as any).reference = lnbitsInvoice.paymentHash; + } catch (error: any) { + console.error('Failed to create Lightning invoice:', error); + // Delete the ticket and payment we just created since Lightning payment failed + await (db as any).delete(payments).where(eq((payments as any).id, paymentId)); + await (db as any).delete(tickets).where(eq((tickets as any).id, ticketId)); + return c.json({ + error: `Failed to create Lightning invoice: ${error.message || 'Unknown error'}` + }, 500); + } + } + + return c.json({ + ticket: { + ...newTicket, + event: { + title: event.title, + startDatetime: event.startDatetime, + location: event.location, + }, + }, + payment: newPayment, + lightningInvoice: lnbitsInvoice ? { + paymentHash: lnbitsInvoice.paymentHash, + paymentRequest: lnbitsInvoice.paymentRequest, + amount: lnbitsInvoice.amount, // Amount in satoshis + fiatAmount: lnbitsInvoice.fiatAmount, + fiatCurrency: lnbitsInvoice.fiatCurrency, + expiry: lnbitsInvoice.expiry, + } : null, + message: 'Booking created successfully', + }, 201); +}); + +// Get ticket by ID +ticketsRouter.get('/:id', async (c) => { + const id = c.req.param('id'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + // Get associated event + const event = await (db as any).select().from(events).where(eq((events as any).id, ticket.eventId)).get(); + + // Get payment + const payment = await (db as any).select().from(payments).where(eq((payments as any).ticketId, id)).get(); + + return c.json({ + ticket: { + ...ticket, + event, + payment, + }, + }); +}); + +// Update ticket status (admin/organizer) +ticketsRouter.put('/:id', requireAuth(['admin', 'organizer', 'staff']), zValidator('json', updateTicketSchema), async (c) => { + const id = c.req.param('id'); + const data = c.req.valid('json'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + const updates: any = {}; + + if (data.status) { + updates.status = data.status; + if (data.status === 'checked_in') { + updates.checkinAt = getNow(); + } + } + + if (Object.keys(updates).length > 0) { + await (db as any).update(tickets).set(updates).where(eq((tickets as any).id, id)); + } + + const updated = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + return c.json({ ticket: updated }); +}); + +// Check-in ticket +ticketsRouter.post('/:id/checkin', requireAuth(['admin', 'organizer', 'staff']), async (c) => { + const id = c.req.param('id'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + if (ticket.status === 'checked_in') { + return c.json({ error: 'Ticket already checked in' }, 400); + } + + if (ticket.status !== 'confirmed') { + return c.json({ error: 'Ticket must be confirmed before check-in' }, 400); + } + + await (db as any) + .update(tickets) + .set({ status: 'checked_in', checkinAt: getNow() }) + .where(eq((tickets as any).id, id)); + + const updated = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + return c.json({ ticket: updated, message: 'Check-in successful' }); +}); + +// Mark payment as received (for cash payments - admin only) +ticketsRouter.post('/:id/mark-paid', requireAuth(['admin', 'organizer', 'staff']), async (c) => { + const id = c.req.param('id'); + const user = (c as any).get('user'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + if (ticket.status === 'confirmed') { + return c.json({ error: 'Ticket already confirmed' }, 400); + } + + if (ticket.status === 'cancelled') { + return c.json({ error: 'Cannot confirm cancelled ticket' }, 400); + } + + const now = getNow(); + + // Update ticket status + await (db as any) + .update(tickets) + .set({ status: 'confirmed' }) + .where(eq((tickets as any).id, id)); + + // Update payment status + await (db as any) + .update(payments) + .set({ + status: 'paid', + paidAt: now, + paidByAdminId: user.id, + updatedAt: now, + }) + .where(eq((payments as any).ticketId, id)); + + // Get payment for sending receipt + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, id)) + .get(); + + // Send confirmation emails asynchronously (don't block the response) + Promise.all([ + emailService.sendBookingConfirmation(id), + payment ? emailService.sendPaymentReceipt(payment.id) : Promise.resolve(), + ]).catch(err => { + console.error('[Email] Failed to send confirmation emails:', err); + }); + + const updated = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + return c.json({ ticket: updated, message: 'Payment marked as received' }); +}); + +// User marks payment as sent (for manual payment methods: bank_transfer, tpago) +// This sets status to "pending_approval" and notifies admin +ticketsRouter.post('/:id/mark-payment-sent', async (c) => { + const id = c.req.param('id'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + // Get the payment + const payment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).ticketId, id)) + .get(); + + if (!payment) { + return c.json({ error: 'Payment not found' }, 404); + } + + // Only allow for manual payment methods + if (!['bank_transfer', 'tpago'].includes(payment.provider)) { + return c.json({ error: 'This action is only available for bank transfer or TPago payments' }, 400); + } + + // Only allow if currently pending + if (payment.status !== 'pending') { + return c.json({ error: 'Payment has already been processed' }, 400); + } + + const now = getNow(); + + // Update payment status to pending_approval + await (db as any) + .update(payments) + .set({ + status: 'pending_approval', + userMarkedPaidAt: now, + updatedAt: now, + }) + .where(eq((payments as any).id, payment.id)); + + // Get updated payment + const updatedPayment = await (db as any) + .select() + .from(payments) + .where(eq((payments as any).id, payment.id)) + .get(); + + // TODO: Send notification to admin about pending payment approval + + return c.json({ + payment: updatedPayment, + message: 'Payment marked as sent. Waiting for admin approval.' + }); +}); + +// Cancel ticket +ticketsRouter.post('/:id/cancel', async (c) => { + const id = c.req.param('id'); + const user = await getAuthUser(c); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + // Check authorization (admin or ticket owner) + if (!user || (user.role !== 'admin' && user.id !== ticket.userId)) { + return c.json({ error: 'Unauthorized' }, 403); + } + + if (ticket.status === 'cancelled') { + return c.json({ error: 'Ticket already cancelled' }, 400); + } + + await (db as any).update(tickets).set({ status: 'cancelled' }).where(eq((tickets as any).id, id)); + + return c.json({ message: 'Ticket cancelled successfully' }); +}); + +// Remove check-in (reset to confirmed) +ticketsRouter.post('/:id/remove-checkin', requireAuth(['admin', 'organizer', 'staff']), async (c) => { + const id = c.req.param('id'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + if (ticket.status !== 'checked_in') { + return c.json({ error: 'Ticket is not checked in' }, 400); + } + + await (db as any) + .update(tickets) + .set({ status: 'confirmed', checkinAt: null }) + .where(eq((tickets as any).id, id)); + + const updated = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + return c.json({ ticket: updated, message: 'Check-in removed successfully' }); +}); + +// Update admin note +ticketsRouter.post('/:id/note', requireAuth(['admin', 'organizer', 'staff']), zValidator('json', updateNoteSchema), async (c) => { + const id = c.req.param('id'); + const { note } = c.req.valid('json'); + + const ticket = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + if (!ticket) { + return c.json({ error: 'Ticket not found' }, 404); + } + + await (db as any) + .update(tickets) + .set({ adminNote: note || null }) + .where(eq((tickets as any).id, id)); + + const updated = await (db as any).select().from(tickets).where(eq((tickets as any).id, id)).get(); + + return c.json({ ticket: updated, message: 'Note updated successfully' }); +}); + +// Admin create ticket (at the door) +ticketsRouter.post('/admin/create', requireAuth(['admin', 'organizer', 'staff']), zValidator('json', adminCreateTicketSchema), async (c) => { + const data = c.req.valid('json'); + + // Get event + const event = await (db as any).select().from(events).where(eq((events as any).id, data.eventId)).get(); + if (!event) { + return c.json({ error: 'Event not found' }, 404); + } + + // Check capacity + const ticketCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(tickets) + .where( + and( + eq((tickets as any).eventId, data.eventId), + sql`${(tickets as any).status} IN ('confirmed', 'checked_in')` + ) + ) + .get(); + + if ((ticketCount?.count || 0) >= event.capacity) { + return c.json({ error: 'Event is at capacity' }, 400); + } + + const now = getNow(); + + // For door sales, email might be empty - use a generated placeholder + const attendeeEmail = data.email && data.email.trim() + ? data.email.trim() + : `door-${generateId()}@doorentry.local`; + + // Find or create user + let user = await (db as any).select().from(users).where(eq((users as any).email, attendeeEmail)).get(); + + const adminFullName = data.lastName && data.lastName.trim() + ? `${data.firstName} ${data.lastName}`.trim() + : data.firstName; + + if (!user) { + const userId = generateId(); + user = { + id: userId, + email: attendeeEmail, + password: '', + name: adminFullName, + phone: data.phone || null, + role: 'user', + languagePreference: null, + createdAt: now, + updatedAt: now, + }; + await (db as any).insert(users).values(user); + } + + // Check for existing active ticket for this user and event (only if real email provided) + if (data.email && data.email.trim() && !data.email.includes('@doorentry.local')) { + const existingTicket = await (db as any) + .select() + .from(tickets) + .where( + and( + eq((tickets as any).userId, user.id), + eq((tickets as any).eventId, data.eventId) + ) + ) + .get(); + + if (existingTicket && existingTicket.status !== 'cancelled') { + return c.json({ error: 'This person already has a ticket for this event' }, 400); + } + } + + // Create ticket + const ticketId = generateId(); + const qrCode = generateTicketCode(); + + // For door sales, mark as confirmed (or checked_in if auto-checkin) + const ticketStatus = data.autoCheckin ? 'checked_in' : 'confirmed'; + + const newTicket = { + id: ticketId, + userId: user.id, + eventId: data.eventId, + attendeeFirstName: data.firstName, + attendeeLastName: data.lastName && data.lastName.trim() ? data.lastName.trim() : null, + attendeeEmail: data.email && data.email.trim() ? data.email.trim() : null, + attendeePhone: data.phone && data.phone.trim() ? data.phone.trim() : null, + preferredLanguage: data.preferredLanguage || null, + status: ticketStatus, + qrCode, + checkinAt: data.autoCheckin ? now : null, + adminNote: data.adminNote || null, + createdAt: now, + }; + + await (db as any).insert(tickets).values(newTicket); + + // Create payment record (marked as paid for door sales) + const paymentId = generateId(); + const adminUser = (c as any).get('user'); + const newPayment = { + id: paymentId, + ticketId, + provider: 'cash', + amount: event.price, + currency: event.currency, + status: 'paid', + reference: 'Door sale', + paidAt: now, + paidByAdminId: adminUser?.id || null, + createdAt: now, + updatedAt: now, + }; + + await (db as any).insert(payments).values(newPayment); + + return c.json({ + ticket: { + ...newTicket, + event: { + title: event.title, + startDatetime: event.startDatetime, + location: event.location, + }, + }, + payment: newPayment, + message: data.autoCheckin + ? 'Attendee added and checked in successfully' + : 'Attendee added successfully', + }, 201); +}); + +// Get all tickets (admin) +ticketsRouter.get('/', requireAuth(['admin', 'organizer']), async (c) => { + const eventId = c.req.query('eventId'); + const status = c.req.query('status'); + + let query = (db as any).select().from(tickets); + + const conditions = []; + if (eventId) { + conditions.push(eq((tickets as any).eventId, eventId)); + } + if (status) { + conditions.push(eq((tickets as any).status, status)); + } + + if (conditions.length > 0) { + query = query.where(and(...conditions)); + } + + const result = await query.all(); + + return c.json({ tickets: result }); +}); + +export default ticketsRouter; diff --git a/backend/src/routes/users.ts b/backend/src/routes/users.ts new file mode 100644 index 0000000..e2d90fb --- /dev/null +++ b/backend/src/routes/users.ts @@ -0,0 +1,224 @@ +import { Hono } from 'hono'; +import { zValidator } from '@hono/zod-validator'; +import { z } from 'zod'; +import { db, users, tickets, events, payments } from '../db/index.js'; +import { eq, desc, sql } from 'drizzle-orm'; +import { requireAuth } from '../lib/auth.js'; +import { getNow } from '../lib/utils.js'; + +interface UserContext { + id: string; + email: string; + name: string; + role: string; +} + +const usersRouter = new Hono<{ Variables: { user: UserContext } }>(); + +const updateUserSchema = z.object({ + name: z.string().min(2).optional(), + phone: z.string().optional(), + role: z.enum(['admin', 'organizer', 'staff', 'marketing', 'user']).optional(), + languagePreference: z.enum(['en', 'es']).optional(), +}); + +// Get all users (admin only) +usersRouter.get('/', requireAuth(['admin']), async (c) => { + const role = c.req.query('role'); + + let query = (db as any).select({ + id: (users as any).id, + email: (users as any).email, + name: (users as any).name, + phone: (users as any).phone, + role: (users as any).role, + languagePreference: (users as any).languagePreference, + createdAt: (users as any).createdAt, + }).from(users); + + if (role) { + query = query.where(eq((users as any).role, role)); + } + + const result = await query.orderBy(desc((users as any).createdAt)).all(); + + return c.json({ users: result }); +}); + +// Get user by ID (admin or self) +usersRouter.get('/:id', requireAuth(['admin', 'organizer', 'staff', 'marketing', 'user']), async (c) => { + const id = c.req.param('id'); + const currentUser = c.get('user'); + + // Users can only view their own profile unless admin + if (currentUser.role !== 'admin' && currentUser.id !== id) { + return c.json({ error: 'Forbidden' }, 403); + } + + const user = await (db as any) + .select({ + id: (users as any).id, + email: (users as any).email, + name: (users as any).name, + phone: (users as any).phone, + role: (users as any).role, + languagePreference: (users as any).languagePreference, + createdAt: (users as any).createdAt, + }) + .from(users) + .where(eq((users as any).id, id)) + .get(); + + if (!user) { + return c.json({ error: 'User not found' }, 404); + } + + return c.json({ user }); +}); + +// Update user (admin or self) +usersRouter.put('/:id', requireAuth(['admin', 'organizer', 'staff', 'marketing', 'user']), zValidator('json', updateUserSchema), async (c) => { + const id = c.req.param('id'); + const data = c.req.valid('json'); + const currentUser = c.get('user'); + + // Users can only update their own profile unless admin + if (currentUser.role !== 'admin' && currentUser.id !== id) { + return c.json({ error: 'Forbidden' }, 403); + } + + // Only admin can change roles + if (data.role && currentUser.role !== 'admin') { + delete data.role; + } + + const existing = await (db as any).select().from(users).where(eq((users as any).id, id)).get(); + if (!existing) { + return c.json({ error: 'User not found' }, 404); + } + + await (db as any) + .update(users) + .set({ ...data, updatedAt: getNow() }) + .where(eq((users as any).id, id)); + + const updated = await (db as any) + .select({ + id: (users as any).id, + email: (users as any).email, + name: (users as any).name, + phone: (users as any).phone, + role: (users as any).role, + languagePreference: (users as any).languagePreference, + }) + .from(users) + .where(eq((users as any).id, id)) + .get(); + + return c.json({ user: updated }); +}); + +// Get user's ticket history +usersRouter.get('/:id/history', requireAuth(['admin', 'organizer', 'staff', 'marketing', 'user']), async (c) => { + const id = c.req.param('id'); + const currentUser = c.get('user'); + + // Users can only view their own history unless admin/organizer + if (!['admin', 'organizer'].includes(currentUser.role) && currentUser.id !== id) { + return c.json({ error: 'Forbidden' }, 403); + } + + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, id)) + .orderBy(desc((tickets as any).createdAt)) + .all(); + + // Get event details for each ticket + const history = await Promise.all( + userTickets.map(async (ticket: any) => { + const event = await (db as any) + .select() + .from(events) + .where(eq((events as any).id, ticket.eventId)) + .get(); + + return { + ...ticket, + event, + }; + }) + ); + + return c.json({ history }); +}); + +// Delete user (admin only) +usersRouter.delete('/:id', requireAuth(['admin']), async (c) => { + const id = c.req.param('id'); + const currentUser = c.get('user'); + + // Prevent self-deletion + if (currentUser.id === id) { + return c.json({ error: 'Cannot delete your own account' }, 400); + } + + const existing = await (db as any).select().from(users).where(eq((users as any).id, id)).get(); + if (!existing) { + return c.json({ error: 'User not found' }, 404); + } + + // Prevent deleting admin users + if (existing.role === 'admin') { + return c.json({ error: 'Cannot delete admin users' }, 400); + } + + try { + // Get all tickets for this user + const userTickets = await (db as any) + .select() + .from(tickets) + .where(eq((tickets as any).userId, id)) + .all(); + + // Delete payments associated with user's tickets + for (const ticket of userTickets) { + await (db as any).delete(payments).where(eq((payments as any).ticketId, ticket.id)); + } + + // Delete user's tickets + await (db as any).delete(tickets).where(eq((tickets as any).userId, id)); + + // Delete the user + await (db as any).delete(users).where(eq((users as any).id, id)); + + return c.json({ message: 'User deleted successfully' }); + } catch (error) { + console.error('Error deleting user:', error); + return c.json({ error: 'Failed to delete user. They may have related records.' }, 500); + } +}); + +// Get user statistics (admin) +usersRouter.get('/stats/overview', requireAuth(['admin']), async (c) => { + const totalUsers = await (db as any) + .select({ count: sql`count(*)` }) + .from(users) + .get(); + + const adminCount = await (db as any) + .select({ count: sql`count(*)` }) + .from(users) + .where(eq((users as any).role, 'admin')) + .get(); + + return c.json({ + stats: { + total: totalUsers?.count || 0, + admins: adminCount?.count || 0, + }, + }); +}); + +export default usersRouter; diff --git a/backend/tsconfig.json b/backend/tsconfig.json new file mode 100644 index 0000000..83e9234 --- /dev/null +++ b/backend/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "outDir": "./dist", + "rootDir": "./src", + "declaration": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/frontend/.env.example b/frontend/.env.example new file mode 100644 index 0000000..515c1d4 --- /dev/null +++ b/frontend/.env.example @@ -0,0 +1,8 @@ +# API URL (leave empty for same-origin proxy) +NEXT_PUBLIC_API_URL= + +# Social Links (optional - leave empty to hide) +NEXT_PUBLIC_WHATSAPP=+595991234567 +NEXT_PUBLIC_INSTAGRAM=spanglish_py +NEXT_PUBLIC_EMAIL=hola@spanglish.com.py +NEXT_PUBLIC_TELEGRAM=spanglish_py diff --git a/frontend/legal/privacy_policy.md b/frontend/legal/privacy_policy.md new file mode 100644 index 0000000..0083966 --- /dev/null +++ b/frontend/legal/privacy_policy.md @@ -0,0 +1,221 @@ +# Spanglish Website – Privacy Policy + +Last updated: [Insert Date] + +--- + +## 1. Introduction + +Spanglish ("we", "us", "our") operates a community events and language exchange platform in Paraguay. + +This Privacy Policy explains how we collect, use, store, and protect personal data when users interact with our website, services, and events. + +By using our website and services, you agree to the practices described in this policy. + +--- + +## 2. Legal Basis + +This policy is aligned with Paraguayan regulations on electronic commerce and personal data protection, as well as international best practices. + +We process personal data based on: + +* User consent +* Contractual necessity (event participation) +* Legal obligations (invoicing, accounting) +* Legitimate business interests + +--- + +## 3. Information We Collect + +We may collect the following personal data: + +### 3.1 Identification Data + +* Full name +* Email address +* Phone number +* Username (if applicable) + +### 3.2 Account Data + +* Login credentials (encrypted) +* Authentication methods (Google, email code) +* Account status + +### 3.3 Booking & Event Data + +* Event registrations +* Ticket history +* Attendance records +* Payment status + +### 3.4 Financial & Tax Data + +* Payment references +* Transaction records +* RUC number (if provided) +* Invoice information + +We do not store credit card details. + +### 3.5 Technical Data + +* IP address +* Browser type +* Device information +* Access logs + +--- + +## 4. How We Use Your Information + +We use personal data to: + +* Manage event registrations +* Process payments +* Generate invoices +* Communicate with users +* Provide customer support +* Improve our services +* Comply with legal obligations +* Prevent fraud and abuse + +We do not sell personal data to third parties. + +--- + +## 5. Legal Use of RUC Information + +If you provide a RUC number, it is used exclusively for: + +* Issuing tax-compliant invoices +* Accounting and reporting obligations + +RUC data is stored securely and accessed only by authorized staff. + +--- + +## 6. Cookies and Tracking + +We may use cookies and similar technologies to: + +* Maintain user sessions +* Analyze website usage +* Improve performance + +Users may disable cookies in their browser settings. Some features may not function correctly without cookies. + +--- + +## 7. Data Sharing + +We may share limited data with trusted service providers, including: + +* Payment processors (TPago, Bancard, LNbits) +* Email service providers +* Hosting providers +* Analytics providers + +These providers process data only under our instructions. + +We may disclose information when required by law. + +--- + +## 8. Data Storage and Security + +We implement technical and organizational measures to protect personal data, including: + +* Encrypted passwords +* Secure servers +* Access controls +* Regular backups +* Monitoring and logging + +Despite our efforts, no system is completely secure. + +--- + +## 9. Data Retention + +We retain personal data only as long as necessary for: + +* Service provision +* Legal compliance +* Accounting requirements +* Dispute resolution + +When no longer required, data is securely deleted or anonymized. + +--- + +## 10. User Rights + +Users have the right to: + +* Access their personal data +* Correct inaccurate data +* Request deletion +* Withdraw consent +* Object to certain processing +* Request data export + +Requests may be submitted via our contact page. + +--- + +## 11. Marketing Communications + +Users may opt in to receive promotional emails. + +Users may opt out at any time using the unsubscribe link or account settings. + +--- + +## 12. International Data Transfers + +Some service providers may be located outside Paraguay. + +When data is transferred internationally, we ensure adequate protection measures. + +--- + +## 13. Children’s Privacy + +Our services are intended for users aged 16 and older. + +We do not knowingly collect data from minors without parental consent. + +--- + +## 14. Changes to This Policy + +We may update this Privacy Policy periodically. + +Changes will be published on this page with an updated date. + +Continued use of the service constitutes acceptance of the revised policy. + +--- + +## 15. Contact Information + +For privacy-related questions or requests, contact: + +Spanglish +Email: [Insert Contact Email] +Website: [Insert Website URL] + +--- + +## 16. Supervisory Authority + +If you believe your data protection rights have been violated, you may contact the relevant Paraguayan regulatory authority. + +--- + +## 17. Acceptance + +By using our website and services, you acknowledge that you have read and understood this Privacy Policy. diff --git a/frontend/legal/refund_cancelation_policy.md b/frontend/legal/refund_cancelation_policy.md new file mode 100644 index 0000000..50064dc --- /dev/null +++ b/frontend/legal/refund_cancelation_policy.md @@ -0,0 +1,189 @@ +# Spanglish Website – Refund & Cancellation Policy + +Last updated: [Insert Date] + +--- + +## 1. Purpose + +This Refund & Cancellation Policy defines the conditions under which refunds, cancellations, and changes are handled by Spanglish. + +Its purpose is to ensure transparency, fairness, and operational stability for both participants and organizers. + +--- + +## 2. Scope + +This policy applies to all event bookings made through the Spanglish platform, including in-person and online events. + +By purchasing a ticket, users agree to this policy. + +--- + +## 3. Booking Confirmation + +A booking is considered confirmed only after payment has been approved. + +Unpaid or unapproved bookings do not guarantee participation. + +--- + +## 4. User-Initiated Cancellations + +### 4.1 Cancellation Deadline + +Users may request a cancellation up to **48 hours before** the scheduled start of the event. + +Cancellation requests must be submitted through the user dashboard or via official support channels. + +--- + +### 4.2 Refund Eligibility + +If a valid cancellation request is received within the deadline: + +* The user may choose a full refund, or +* A credit for a future event + +The chosen option must be indicated at the time of request. + +--- + +### 4.3 Late Cancellations and No-Shows + +Cancellations made less than 48 hours before the event, or failure to attend without notice, are not eligible for a refund. + +Exceptions may be granted at Spanglish’s discretion in cases of emergency. + +--- + +## 5. Organizer-Initiated Cancellations + +### 5.1 Event Cancellation + +If Spanglish cancels an event, users may choose: + +* A full refund, or +* Transfer to a future event + +Users will be notified promptly. + +--- + +### 5.2 Event Rescheduling + +If an event is rescheduled: + +* Tickets remain valid for the new date +* Users unable to attend may request a refund + +--- + +## 6. Payment Method Refund Processing + +### 6.1 Card and Online Payments + +Refunds are processed using the original payment method when possible. + +Processing times depend on the payment provider. + +--- + +### 6.2 Bank Transfers + +Refunds via bank transfer require valid bank details from the user. + +Processing may take up to 10 business days. + +--- + +### 6.3 Bitcoin / Lightning + +Lightning payments are refunded in Bitcoin when technically feasible. + +If not feasible, alternative compensation may be offered. + +--- + +### 6.4 Cash Payments + +Cash payments are refunded in cash at a future event or by arrangement. + +--- + +## 7. Administrative Fees + +Spanglish reserves the right to deduct reasonable administrative or processing fees from refunds when applicable. + +Any deductions will be clearly communicated. + +--- + +## 8. Non-Refundable Situations + +Refunds are not provided in the following cases: + +* Removal due to misconduct +* Violation of event rules +* False or misleading information +* Force majeure events + +--- + +## 9. Force Majeure + +In cases of force majeure, including natural disasters, government restrictions, or public emergencies, Spanglish may: + +* Reschedule events +* Offer credits +* Provide partial refunds + +Decisions are made in good faith. + +--- + +## 10. Refund Requests Procedure + +To request a refund, users must provide: + +* Full name +* Email address +* Event details +* Reason for request +* Preferred refund method + +Requests are reviewed within 5 business days. + +--- + +## 11. Dispute Resolution + +If a user disagrees with a refund decision, they may submit a formal appeal. + +Appeals are reviewed by management. + +Decisions are final. + +--- + +## 12. Policy Changes + +Spanglish may update this policy periodically. + +Updates will be published with a revised date. + +--- + +## 13. Contact Information + +For refund and cancellation inquiries, contact: + +Spanglish +Email: [Insert Contact Email] +Website: [Insert Website URL] + +--- + +## 14. Acceptance + +By purchasing a ticket, users acknowledge and agree to this Refund & Cancellation Policy. diff --git a/frontend/legal/terms_policy.md b/frontend/legal/terms_policy.md new file mode 100644 index 0000000..7e92891 --- /dev/null +++ b/frontend/legal/terms_policy.md @@ -0,0 +1,241 @@ +# Spanglish Website – Terms & Conditions + +Last updated: [Insert Date] + +--- + +## 1. Introduction + +These Terms and Conditions ("Terms") govern the use of the Spanglish website and services. + +By accessing or using our platform, you agree to be bound by these Terms. + +If you do not agree, you must not use our services. + +--- + +## 2. About Spanglish + +Spanglish is a community-based language exchange and cultural events platform operating in Paraguay. + +We organize in-person and online events for language learning and social interaction. + +--- + +## 3. Eligibility + +To use our services, you must: + +* Be at least 16 years old +* Provide accurate and complete information +* Have legal capacity to enter into agreements + +We reserve the right to refuse service to anyone at our discretion. + +--- + +## 4. User Accounts + +### 4.1 Account Creation + +Users may create accounts using email, password, Google login, or email codes. + +Accounts may also be created automatically during booking. + +### 4.2 Account Responsibility + +Users are responsible for: + +* Maintaining account security +* Protecting login credentials +* All activity under their account + +We are not liable for unauthorized access caused by user negligence. + +--- + +## 5. Event Registration and Tickets + +### 5.1 Booking + +Event bookings are subject to availability. + +A booking is only considered confirmed after payment is approved. + +### 5.2 Ticket Ownership + +Tickets are personal and non-transferable unless explicitly allowed. + +Group tickets remain the responsibility of the purchaser. + +### 5.3 Admission Rights + +We reserve the right to deny entry to participants who: + +* Violate event rules +* Engage in disruptive behavior +* Appear intoxicated +* Harass other participants + +No refunds are provided in such cases. + +--- + +## 6. Payments + +### 6.1 Accepted Methods + +We accept payments through: + +* Paraguayan bank transfer +* TPago / Bancard +* Bitcoin / Lightning +* Cash at the door + +Availability may vary per event. + +--- + +### 6.2 Payment Approval + +Some payment methods require manual verification. + +Tickets are confirmed only after payment approval. + +--- + +### 6.3 Pricing + +All prices are displayed in Paraguayan Guaraní (Gs) unless otherwise stated. + +Prices may change without prior notice for future events. + +--- + +## 7. Invoices + +Invoices are issued for paid bookings when RUC information is provided. + +Users are responsible for providing accurate tax data. + +Incorrect data may result in invalid invoices. + +--- + +## 8. Cancellations and Changes + +Event details such as date, time, or location may change due to unforeseen circumstances. + +Users will be notified of significant changes. + +Spanglish reserves the right to cancel events if necessary. + +Refunds in such cases are governed by the Refund & Cancellation Policy. + +--- + +## 9. Refund Policy Reference + +Refunds and cancellations are governed by the separate Refund & Cancellation Policy document, which forms part of these Terms. + +--- + +## 10. User Conduct + +Users agree to: + +* Respect other participants +* Follow staff instructions +* Avoid discriminatory or abusive behavior +* Comply with local laws + +Violations may result in removal without refund. + +--- + +## 11. Intellectual Property + +All website content, including text, graphics, logos, and software, is owned by Spanglish or its licensors. + +Unauthorized use is prohibited. + +--- + +## 12. Limitation of Liability + +To the maximum extent permitted by law: + +* Spanglish is not liable for indirect damages +* Participation is at the user’s own risk +* We are not responsible for lost belongings +* We are not responsible for third-party services + +--- + +## 13. Health and Safety + +Participants are responsible for their own health and safety during events. + +Users must inform staff of relevant medical conditions if necessary. + +We may refuse participation if safety is compromised. + +--- + +## 14. Force Majeure + +We are not liable for failure to perform due to events beyond our control, including: + +* Natural disasters +* Government actions +* Pandemics +* Power failures +* Internet outages + +--- + +## 15. Termination + +We may suspend or terminate accounts for violations of these Terms. + +Termination does not affect outstanding payment obligations. + +--- + +## 16. Privacy + +Personal data is processed in accordance with our Privacy Policy. + +--- + +## 17. Governing Law and Jurisdiction + +These Terms are governed by the laws of the Republic of Paraguay. + +Any disputes shall be resolved in the courts of Paraguay. + +--- + +## 18. Changes to These Terms + +We may update these Terms periodically. + +Changes will be published with an updated date. + +Continued use constitutes acceptance. + +--- + +## 19. Contact Information + +For questions regarding these Terms, contact: + +Spanglish +Email: [Insert Contact Email] +Website: [Insert Website URL] + +--- + +## 20. Acceptance + +By using our website and services, you confirm that you have read, understood, and agreed to these Terms and Conditions. diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts new file mode 100644 index 0000000..40c3d68 --- /dev/null +++ b/frontend/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/frontend/next.config.js b/frontend/next.config.js new file mode 100644 index 0000000..264227e --- /dev/null +++ b/frontend/next.config.js @@ -0,0 +1,31 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + images: { + domains: ['localhost', 'images.unsplash.com'], + remotePatterns: [ + { + protocol: 'https', + hostname: '**', + }, + { + protocol: 'http', + hostname: 'localhost', + port: '3001', + }, + ], + }, + async rewrites() { + return [ + { + source: '/api/:path*', + destination: 'http://localhost:3001/api/:path*', + }, + { + source: '/uploads/:path*', + destination: 'http://localhost:3001/uploads/:path*', + }, + ]; + }, +}; + +module.exports = nextConfig; diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..711d068 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,32 @@ +{ + "name": "frontend", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev -p 3002", + "build": "next build", + "start": "next start -p 3002", + "lint": "next lint" + }, + "dependencies": { + "@heroicons/react": "^2.1.4", + "clsx": "^2.1.1", + "next": "^14.2.4", + "qrcode.react": "^4.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-hot-toast": "^2.4.1", + "react-markdown": "^10.1.0", + "remark-gfm": "^4.0.1", + "swr": "^2.2.5" + }, + "devDependencies": { + "@types/node": "^20.14.9", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.4", + "typescript": "^5.5.2" + } +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js new file mode 100644 index 0000000..12a703d --- /dev/null +++ b/frontend/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/frontend/public/images/2026-01-29 13.09.59.jpg b/frontend/public/images/2026-01-29 13.09.59.jpg new file mode 100644 index 0000000..a986426 Binary files /dev/null and b/frontend/public/images/2026-01-29 13.09.59.jpg differ diff --git a/frontend/public/images/2026-01-29 13.10.16.jpg b/frontend/public/images/2026-01-29 13.10.16.jpg new file mode 100644 index 0000000..7dbb84f Binary files /dev/null and b/frontend/public/images/2026-01-29 13.10.16.jpg differ diff --git a/frontend/public/images/2026-01-29 13.10.23.jpg b/frontend/public/images/2026-01-29 13.10.23.jpg new file mode 100644 index 0000000..3f0a3a4 Binary files /dev/null and b/frontend/public/images/2026-01-29 13.10.23.jpg differ diff --git a/frontend/public/images/2026-01-29 13.10.26.jpg b/frontend/public/images/2026-01-29 13.10.26.jpg new file mode 100644 index 0000000..903a9ba Binary files /dev/null and b/frontend/public/images/2026-01-29 13.10.26.jpg differ diff --git a/frontend/src/app/(public)/auth/claim-account/page.tsx b/frontend/src/app/(public)/auth/claim-account/page.tsx new file mode 100644 index 0000000..1a9debf --- /dev/null +++ b/frontend/src/app/(public)/auth/claim-account/page.tsx @@ -0,0 +1,172 @@ +'use client'; + +import { useState, Suspense } from 'react'; +import { useRouter, useSearchParams } from 'next/navigation'; +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import { useAuth } from '@/context/AuthContext'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import Input from '@/components/ui/Input'; +import { authApi } from '@/lib/api'; +import toast from 'react-hot-toast'; + +function ClaimAccountContent() { + const router = useRouter(); + const searchParams = useSearchParams(); + const { locale: language } = useLanguage(); + const { setAuthData } = useAuth(); + const [loading, setLoading] = useState(false); + const [formData, setFormData] = useState({ + password: '', + confirmPassword: '', + }); + + const token = searchParams.get('token'); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + if (!token) { + toast.error(language === 'es' ? 'Token no válido' : 'Invalid token'); + return; + } + + if (formData.password !== formData.confirmPassword) { + toast.error(language === 'es' ? 'Las contraseñas no coinciden' : 'Passwords do not match'); + return; + } + + if (formData.password.length < 10) { + toast.error( + language === 'es' + ? 'La contraseña debe tener al menos 10 caracteres' + : 'Password must be at least 10 characters' + ); + return; + } + + setLoading(true); + + try { + const result = await authApi.confirmClaimAccount(token, { password: formData.password }); + setAuthData({ user: result.user, token: result.token }); + toast.success(language === 'es' ? '¡Cuenta activada!' : 'Account activated!'); + router.push('/dashboard'); + } catch (error: any) { + toast.error(error.message || (language === 'es' ? 'Error' : 'Failed')); + } finally { + setLoading(false); + } + }; + + if (!token) { + return ( +
+
+
+ +
+ + + +
+

+ {language === 'es' ? 'Enlace Inválido' : 'Invalid Link'} +

+

+ {language === 'es' + ? 'Este enlace de activación no es válido o ha expirado.' + : 'This activation link is invalid or has expired.'} +

+ + + +
+
+
+
+ ); + } + + return ( +
+
+
+
+

+ {language === 'es' ? 'Activar tu Cuenta' : 'Activate Your Account'} +

+

+ {language === 'es' + ? 'Configura una contraseña para acceder a tu cuenta' + : 'Set a password to access your account'} +

+
+ + +
+

+ {language === 'es' + ? 'Tu cuenta fue creada durante una reservación. Establece una contraseña para acceder a tu historial de entradas y más.' + : 'Your account was created during a booking. Set a password to access your ticket history and more.'} +

+
+ +
+ setFormData({ ...formData, password: e.target.value })} + required + /> +

+ {language === 'es' ? 'Mínimo 10 caracteres' : 'Minimum 10 characters'} +

+ + setFormData({ ...formData, confirmPassword: e.target.value })} + required + /> + + +
+ +

+ {language === 'es' ? '¿Ya tienes acceso?' : 'Already have access?'}{' '} + + {language === 'es' ? 'Iniciar Sesión' : 'Log In'} + +

+
+
+
+
+ ); +} + +function LoadingFallback() { + return ( +
+
+
+ ); +} + +export default function ClaimAccountPage() { + return ( + }> + + + ); +} diff --git a/frontend/src/app/(public)/auth/forgot-password/page.tsx b/frontend/src/app/(public)/auth/forgot-password/page.tsx new file mode 100644 index 0000000..94a63ca --- /dev/null +++ b/frontend/src/app/(public)/auth/forgot-password/page.tsx @@ -0,0 +1,103 @@ +'use client'; + +import { useState } from 'react'; +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import Input from '@/components/ui/Input'; +import { authApi } from '@/lib/api'; +import toast from 'react-hot-toast'; + +export default function ForgotPasswordPage() { + const { locale: language } = useLanguage(); + const [loading, setLoading] = useState(false); + const [sent, setSent] = useState(false); + const [email, setEmail] = useState(''); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setLoading(true); + + try { + await authApi.requestPasswordReset(email); + setSent(true); + toast.success( + language === 'es' + ? 'Revisa tu correo para el enlace de restablecimiento' + : 'Check your email for the reset link' + ); + } catch (error: any) { + toast.error(error.message || (language === 'es' ? 'Error' : 'Failed')); + } finally { + setLoading(false); + } + }; + + return ( +
+
+
+
+

+ {language === 'es' ? 'Restablecer Contraseña' : 'Reset Password'} +

+

+ {language === 'es' + ? 'Ingresa tu email para recibir un enlace de restablecimiento' + : 'Enter your email to receive a reset link'} +

+
+ + + {sent ? ( +
+
+ + + +
+

+ {language === 'es' ? 'Revisa tu Email' : 'Check Your Email'} +

+

+ {language === 'es' + ? `Si existe una cuenta con ${email}, recibirás un enlace para restablecer tu contraseña.` + : `If an account exists with ${email}, you'll receive a password reset link.`} +

+ +
+ ) : ( +
+ setEmail(e.target.value)} + required + /> + + +
+ )} + +

+ {language === 'es' ? '¿Recordaste tu contraseña?' : 'Remember your password?'}{' '} + + {language === 'es' ? 'Iniciar Sesión' : 'Log In'} + +

+
+
+
+
+ ); +} diff --git a/frontend/src/app/(public)/auth/magic-link/page.tsx b/frontend/src/app/(public)/auth/magic-link/page.tsx new file mode 100644 index 0000000..a068cd2 --- /dev/null +++ b/frontend/src/app/(public)/auth/magic-link/page.tsx @@ -0,0 +1,119 @@ +'use client'; + +import { useEffect, useState, Suspense, useRef } from 'react'; +import { useRouter, useSearchParams } from 'next/navigation'; +import { useLanguage } from '@/context/LanguageContext'; +import { useAuth } from '@/context/AuthContext'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import toast from 'react-hot-toast'; + +function MagicLinkContent() { + const router = useRouter(); + const searchParams = useSearchParams(); + const { locale: language } = useLanguage(); + const { loginWithMagicLink } = useAuth(); + const [status, setStatus] = useState<'loading' | 'success' | 'error'>('loading'); + const [error, setError] = useState(''); + const verificationAttempted = useRef(false); + + const token = searchParams.get('token'); + + useEffect(() => { + // Prevent duplicate verification attempts (React StrictMode double-invokes effects) + if (verificationAttempted.current) return; + + if (token) { + verificationAttempted.current = true; + verifyToken(); + } else { + setStatus('error'); + setError(language === 'es' ? 'Token no encontrado' : 'Token not found'); + } + }, [token]); + + const verifyToken = async () => { + try { + await loginWithMagicLink(token!); + setStatus('success'); + toast.success(language === 'es' ? '¡Bienvenido!' : 'Welcome!'); + setTimeout(() => { + router.push('/dashboard'); + }, 1500); + } catch (err: any) { + setStatus('error'); + setError(err.message || (language === 'es' ? 'Enlace inválido o expirado' : 'Invalid or expired link')); + } + }; + + return ( +
+
+
+ + {status === 'loading' && ( + <> +
+

+ {language === 'es' ? 'Verificando...' : 'Verifying...'} +

+

+ {language === 'es' ? 'Por favor espera' : 'Please wait'} +

+ + )} + + {status === 'success' && ( + <> +
+ + + +
+

+ {language === 'es' ? '¡Inicio de sesión exitoso!' : 'Login successful!'} +

+

+ {language === 'es' ? 'Redirigiendo...' : 'Redirecting...'} +

+ + )} + + {status === 'error' && ( + <> +
+ + + +
+

+ {language === 'es' ? 'Error de Verificación' : 'Verification Error'} +

+

{error}

+ + + )} +
+
+
+
+ ); +} + +function LoadingFallback() { + return ( +
+
+
+ ); +} + +export default function MagicLinkPage() { + return ( + }> + + + ); +} diff --git a/frontend/src/app/(public)/auth/reset-password/page.tsx b/frontend/src/app/(public)/auth/reset-password/page.tsx new file mode 100644 index 0000000..8a94a83 --- /dev/null +++ b/frontend/src/app/(public)/auth/reset-password/page.tsx @@ -0,0 +1,178 @@ +'use client'; + +import { useState, Suspense } from 'react'; +import { useRouter, useSearchParams } from 'next/navigation'; +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import Input from '@/components/ui/Input'; +import { authApi } from '@/lib/api'; +import toast from 'react-hot-toast'; + +function ResetPasswordContent() { + const router = useRouter(); + const searchParams = useSearchParams(); + const { locale: language } = useLanguage(); + const [loading, setLoading] = useState(false); + const [success, setSuccess] = useState(false); + const [formData, setFormData] = useState({ + password: '', + confirmPassword: '', + }); + + const token = searchParams.get('token'); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + if (!token) { + toast.error(language === 'es' ? 'Token no válido' : 'Invalid token'); + return; + } + + if (formData.password !== formData.confirmPassword) { + toast.error(language === 'es' ? 'Las contraseñas no coinciden' : 'Passwords do not match'); + return; + } + + if (formData.password.length < 10) { + toast.error( + language === 'es' + ? 'La contraseña debe tener al menos 10 caracteres' + : 'Password must be at least 10 characters' + ); + return; + } + + setLoading(true); + + try { + await authApi.confirmPasswordReset(token, formData.password); + setSuccess(true); + toast.success(language === 'es' ? 'Contraseña actualizada' : 'Password updated'); + } catch (error: any) { + toast.error(error.message || (language === 'es' ? 'Error' : 'Failed')); + } finally { + setLoading(false); + } + }; + + if (!token) { + return ( +
+
+
+ +
+ + + +
+

+ {language === 'es' ? 'Enlace Inválido' : 'Invalid Link'} +

+

+ {language === 'es' + ? 'Este enlace de restablecimiento no es válido o ha expirado.' + : 'This reset link is invalid or has expired.'} +

+ + + +
+
+
+
+ ); + } + + return ( +
+
+
+
+

+ {language === 'es' ? 'Nueva Contraseña' : 'New Password'} +

+

+ {language === 'es' + ? 'Ingresa tu nueva contraseña' + : 'Enter your new password'} +

+
+ + + {success ? ( +
+
+ + + +
+

+ {language === 'es' ? '¡Contraseña Actualizada!' : 'Password Updated!'} +

+

+ {language === 'es' + ? 'Tu contraseña ha sido cambiada exitosamente.' + : 'Your password has been successfully changed.'} +

+ + + +
+ ) : ( +
+ setFormData({ ...formData, password: e.target.value })} + required + /> +

+ {language === 'es' ? 'Mínimo 10 caracteres' : 'Minimum 10 characters'} +

+ + setFormData({ ...formData, confirmPassword: e.target.value })} + required + /> + + +
+ )} +
+
+
+
+ ); +} + +function LoadingFallback() { + return ( +
+
+
+ ); +} + +export default function ResetPasswordPage() { + return ( + }> + + + ); +} diff --git a/frontend/src/app/(public)/book/[eventId]/page.tsx b/frontend/src/app/(public)/book/[eventId]/page.tsx new file mode 100644 index 0000000..8c47de5 --- /dev/null +++ b/frontend/src/app/(public)/book/[eventId]/page.tsx @@ -0,0 +1,1073 @@ +'use client'; + +import { useState, useEffect } from 'react'; +import { useParams, useRouter } from 'next/navigation'; +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import { useAuth } from '@/context/AuthContext'; +import { eventsApi, ticketsApi, paymentOptionsApi, Event, PaymentOptionsConfig } from '@/lib/api'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import Input from '@/components/ui/Input'; +import { QRCodeSVG } from 'qrcode.react'; +import { + CalendarIcon, + MapPinIcon, + UserGroupIcon, + CurrencyDollarIcon, + ArrowLeftIcon, + CheckCircleIcon, + CreditCardIcon, + BanknotesIcon, + BoltIcon, + TicketIcon, + ClipboardDocumentIcon, + BuildingLibraryIcon, + ClockIcon, + ArrowTopRightOnSquareIcon, +} from '@heroicons/react/24/outline'; +import toast from 'react-hot-toast'; + +type PaymentMethod = 'bancard' | 'lightning' | 'cash' | 'bank_transfer' | 'tpago'; + +interface BookingFormData { + firstName: string; + lastName: string; + email: string; + phone: string; + preferredLanguage: 'en' | 'es'; + paymentMethod: PaymentMethod; + ruc: string; +} + +interface LightningInvoice { + paymentHash: string; + paymentRequest: string; // BOLT11 invoice + amount: number; // Amount in satoshis + fiatAmount?: number; // Original fiat amount + fiatCurrency?: string; // Original fiat currency + expiry?: string; +} + +interface BookingResult { + ticketId: string; + qrCode: string; + paymentMethod: PaymentMethod; + lightningInvoice?: LightningInvoice; +} + +export default function BookingPage() { + const params = useParams(); + const router = useRouter(); + const { t, locale } = useLanguage(); + const { user } = useAuth(); + const [event, setEvent] = useState(null); + const [paymentConfig, setPaymentConfig] = useState(null); + const [loading, setLoading] = useState(true); + const [step, setStep] = useState<'form' | 'paying' | 'manual_payment' | 'pending_approval' | 'success'>('form'); + const [submitting, setSubmitting] = useState(false); + const [bookingResult, setBookingResult] = useState(null); + const [paymentPending, setPaymentPending] = useState(false); + const [markingPaid, setMarkingPaid] = useState(false); + + const [formData, setFormData] = useState({ + firstName: '', + lastName: '', + email: '', + phone: '', + preferredLanguage: locale as 'en' | 'es', + paymentMethod: 'cash', + ruc: '', + }); + + const [errors, setErrors] = useState>>({}); + + // RUC validation using modulo 11 algorithm + const validateRucCheckDigit = (ruc: string): boolean => { + const match = ruc.match(/^(\d{6,8})-(\d)$/); + if (!match) return false; + + const baseNumber = match[1]; + const checkDigit = parseInt(match[2], 10); + + // Modulo 11 algorithm for Paraguayan RUC + const weights = [2, 3, 4, 5, 6, 7, 2, 3]; + let sum = 0; + const digits = baseNumber.split('').reverse(); + + for (let i = 0; i < digits.length; i++) { + sum += parseInt(digits[i], 10) * weights[i]; + } + + const remainder = sum % 11; + const expectedCheckDigit = remainder < 2 ? 0 : 11 - remainder; + + return checkDigit === expectedCheckDigit; + }; + + // Format RUC input: auto-insert hyphen before last digit + const formatRuc = (value: string): string => { + // Remove non-numeric characters + const digits = value.replace(/\D/g, ''); + + // Limit to 9 digits (8 base + 1 check) + const limited = digits.slice(0, 9); + + // Auto-insert hyphen before last digit if we have more than 6 digits + if (limited.length > 6) { + return `${limited.slice(0, -1)}-${limited.slice(-1)}`; + } + + return limited; + }; + + // Handle RUC input change + const handleRucChange = (e: React.ChangeEvent) => { + const formatted = formatRuc(e.target.value); + setFormData({ ...formData, ruc: formatted }); + + // Clear error on change + if (errors.ruc) { + setErrors({ ...errors, ruc: undefined }); + } + }; + + // Validate RUC on blur + const handleRucBlur = () => { + if (!formData.ruc) return; // Optional field, no validation if empty + + const rucPattern = /^[0-9]{6,8}-[0-9]{1}$/; + + if (!rucPattern.test(formData.ruc)) { + setErrors({ ...errors, ruc: t('booking.form.errors.rucInvalidFormat') }); + return; + } + + if (!validateRucCheckDigit(formData.ruc)) { + setErrors({ ...errors, ruc: t('booking.form.errors.rucInvalidCheckDigit') }); + } + }; + + useEffect(() => { + if (params.eventId) { + Promise.all([ + eventsApi.getById(params.eventId as string), + paymentOptionsApi.getForEvent(params.eventId as string), + ]) + .then(([eventRes, paymentRes]) => { + if (!eventRes.event || eventRes.event.status !== 'published') { + toast.error('Event is not available for booking'); + router.push('/events'); + return; + } + setEvent(eventRes.event); + setPaymentConfig(paymentRes.paymentOptions); + + // Set default payment method based on what's enabled + const config = paymentRes.paymentOptions; + if (config.lightningEnabled) { + setFormData(prev => ({ ...prev, paymentMethod: 'lightning' })); + } else if (config.cashEnabled) { + setFormData(prev => ({ ...prev, paymentMethod: 'cash' })); + } else if (config.bankTransferEnabled) { + setFormData(prev => ({ ...prev, paymentMethod: 'bank_transfer' })); + } else if (config.tpagoEnabled) { + setFormData(prev => ({ ...prev, paymentMethod: 'tpago' })); + } + }) + .catch(() => router.push('/events')) + .finally(() => setLoading(false)); + } + }, [params.eventId, router]); + + // Auto-fill form fields when user is logged in + useEffect(() => { + if (user) { + setFormData(prev => { + // Split user's full name into first and last name + const nameParts = (user.name || '').trim().split(' '); + const firstName = nameParts[0] || ''; + const lastName = nameParts.slice(1).join(' ') || ''; + + return { + ...prev, + firstName: prev.firstName || firstName, + lastName: prev.lastName || lastName, + email: prev.email || user.email || '', + phone: prev.phone || user.phone || '', + preferredLanguage: (user.languagePreference as 'en' | 'es') || prev.preferredLanguage, + ruc: prev.ruc || user.rucNumber || '', + }; + }); + } + }, [user]); + + const formatDate = (dateStr: string) => { + return new Date(dateStr).toLocaleDateString(locale === 'es' ? 'es-ES' : 'en-US', { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric', + }); + }; + + const formatTime = (dateStr: string) => { + return new Date(dateStr).toLocaleTimeString(locale === 'es' ? 'es-ES' : 'en-US', { + hour: '2-digit', + minute: '2-digit', + }); + }; + + const validateForm = (): boolean => { + const newErrors: Partial> = {}; + + if (!formData.firstName.trim() || formData.firstName.length < 2) { + newErrors.firstName = t('booking.form.errors.firstNameRequired'); + } + + if (!formData.lastName.trim() || formData.lastName.length < 2) { + newErrors.lastName = t('booking.form.errors.lastNameRequired'); + } + + if (!formData.email.trim() || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) { + newErrors.email = t('booking.form.errors.emailInvalid'); + } + + if (!formData.phone.trim() || formData.phone.length < 6) { + newErrors.phone = t('booking.form.errors.phoneRequired'); + } + + // RUC validation (optional field - only validate if filled) + if (formData.ruc.trim()) { + const rucPattern = /^[0-9]{6,8}-[0-9]{1}$/; + if (!rucPattern.test(formData.ruc)) { + newErrors.ruc = t('booking.form.errors.rucInvalidFormat'); + } else if (!validateRucCheckDigit(formData.ruc)) { + newErrors.ruc = t('booking.form.errors.rucInvalidCheckDigit'); + } + } + + setErrors(newErrors); + return Object.keys(newErrors).length === 0; + }; + + // Connect to SSE for real-time payment updates + const connectPaymentStream = (ticketId: string) => { + const apiUrl = process.env.NEXT_PUBLIC_API_URL || ''; + const eventSource = new EventSource(`${apiUrl}/api/lnbits/stream/${ticketId}`); + + eventSource.addEventListener('payment', (event) => { + try { + const data = JSON.parse(event.data); + console.log('Payment event:', data); + + if (data.type === 'paid') { + toast.success(locale === 'es' ? '¡Pago confirmado!' : 'Payment confirmed!'); + setPaymentPending(false); + setStep('success'); + eventSource.close(); + } else if (data.type === 'expired') { + toast.error(locale === 'es' ? 'La factura ha expirado' : 'Invoice has expired'); + setPaymentPending(false); + eventSource.close(); + } else if (data.type === 'already_paid') { + setPaymentPending(false); + setStep('success'); + eventSource.close(); + } + } catch (e) { + console.error('Error parsing payment event:', e); + } + }); + + eventSource.onerror = (error) => { + console.error('SSE error:', error); + // Fallback to polling if SSE fails + eventSource.close(); + fallbackPoll(ticketId); + }; + + return eventSource; + }; + + // Fallback polling if SSE is not available + const fallbackPoll = async (ticketId: string) => { + const maxAttempts = 60; + let attempts = 0; + + const poll = async () => { + attempts++; + try { + const status = await ticketsApi.checkPaymentStatus(ticketId); + if (status.isPaid) { + toast.success(locale === 'es' ? '¡Pago confirmado!' : 'Payment confirmed!'); + setPaymentPending(false); + setStep('success'); + return; + } + } catch (error) { + console.error('Error checking payment status:', error); + } + + if (attempts < maxAttempts && paymentPending) { + setTimeout(poll, 5000); + } + }; + + poll(); + }; + + // Copy invoice to clipboard + const copyInvoiceToClipboard = (invoice: string) => { + navigator.clipboard.writeText(invoice).then(() => { + toast.success(locale === 'es' ? '¡Copiado!' : 'Copied!'); + }).catch(() => { + toast.error(locale === 'es' ? 'Error al copiar' : 'Failed to copy'); + }); + }; + + // Truncate invoice for display + const truncateInvoice = (invoice: string, chars: number = 20) => { + if (invoice.length <= chars * 2) return invoice; + return `${invoice.slice(0, chars)}...${invoice.slice(-chars)}`; + }; + + // Handle "I Have Paid" button click + const handleMarkPaymentSent = async () => { + if (!bookingResult) return; + + setMarkingPaid(true); + try { + await ticketsApi.markPaymentSent(bookingResult.ticketId); + setStep('pending_approval'); + toast.success(locale === 'es' + ? 'Pago marcado como enviado. Esperando aprobación.' + : 'Payment marked as sent. Waiting for approval.'); + } catch (error: any) { + toast.error(error.message || 'Failed to mark payment as sent'); + } finally { + setMarkingPaid(false); + } + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + if (!event || !validateForm()) return; + + setSubmitting(true); + try { + const response = await ticketsApi.book({ + eventId: event.id, + firstName: formData.firstName, + lastName: formData.lastName, + email: formData.email, + phone: formData.phone, + preferredLanguage: formData.preferredLanguage, + paymentMethod: formData.paymentMethod, + ...(formData.ruc.trim() && { ruc: formData.ruc }), + }); + + const { ticket, lightningInvoice } = response as any; + + // If Lightning payment with invoice, go to paying step + if (formData.paymentMethod === 'lightning' && lightningInvoice?.paymentRequest) { + const result: BookingResult = { + ticketId: ticket.id, + qrCode: ticket.qrCode, + paymentMethod: formData.paymentMethod as PaymentMethod, + lightningInvoice: { + paymentHash: lightningInvoice.paymentHash, + paymentRequest: lightningInvoice.paymentRequest, + amount: lightningInvoice.amount, + fiatAmount: lightningInvoice.fiatAmount, + fiatCurrency: lightningInvoice.fiatCurrency, + expiry: lightningInvoice.expiry, + }, + }; + setBookingResult(result); + setStep('paying'); + setPaymentPending(true); + + // Connect to SSE for real-time payment updates + connectPaymentStream(ticket.id); + } else if (formData.paymentMethod === 'bank_transfer' || formData.paymentMethod === 'tpago') { + // Manual payment methods - show payment details + setBookingResult({ + ticketId: ticket.id, + qrCode: ticket.qrCode, + paymentMethod: formData.paymentMethod, + }); + setStep('manual_payment'); + } else { + // Cash payment - go straight to success + setBookingResult({ + ticketId: ticket.id, + qrCode: ticket.qrCode, + paymentMethod: formData.paymentMethod, + }); + setStep('success'); + toast.success(t('booking.success.message')); + } + } catch (error: any) { + toast.error(error.message || t('booking.form.errors.bookingFailed')); + } finally { + setSubmitting(false); + } + }; + + // Build payment methods list based on configuration + const paymentMethods: { id: PaymentMethod; icon: typeof CreditCardIcon; label: string; description: string; badge?: string }[] = []; + + if (paymentConfig?.lightningEnabled) { + paymentMethods.push({ + id: 'lightning', + icon: BoltIcon, + label: 'Bitcoin Lightning', + description: locale === 'es' ? 'Pago instantáneo con Bitcoin' : 'Instant payment with Bitcoin', + badge: locale === 'es' ? 'Instantáneo' : 'Instant', + }); + } + + if (paymentConfig?.tpagoEnabled) { + paymentMethods.push({ + id: 'tpago', + icon: CreditCardIcon, + label: locale === 'es' ? 'TPago / Tarjeta Internacional' : 'TPago / International Card', + description: locale === 'es' ? 'Paga con tarjeta de crédito o débito' : 'Pay with credit or debit card', + badge: locale === 'es' ? 'Manual' : 'Manual', + }); + } + + if (paymentConfig?.bankTransferEnabled) { + paymentMethods.push({ + id: 'bank_transfer', + icon: BuildingLibraryIcon, + label: locale === 'es' ? 'Transferencia Bancaria' : 'Bank Transfer', + description: locale === 'es' ? 'Transferencia bancaria local' : 'Local bank transfer', + badge: locale === 'es' ? 'Manual' : 'Manual', + }); + } + + if (paymentConfig?.cashEnabled) { + paymentMethods.push({ + id: 'cash', + icon: BanknotesIcon, + label: locale === 'es' ? 'Efectivo en el Evento' : 'Cash at Event', + description: locale === 'es' ? 'Paga cuando llegues al evento' : 'Pay when you arrive at the event', + badge: locale === 'es' ? 'Manual' : 'Manual', + }); + } + + if (loading) { + return ( +
+
+
+
+
+ ); + } + + if (!event) { + return null; + } + + const isSoldOut = event.availableSeats === 0; + + // Get title and description based on payment method + const getSuccessContent = () => { + if (bookingResult?.paymentMethod === 'cash') { + return { + title: locale === 'es' ? '¡Reserva Recibida!' : 'Reservation Received!', + description: locale === 'es' + ? 'Tu lugar está reservado. El pago se realizará en el evento.' + : 'Your spot is reserved. Payment will be collected at the event.', + iconColor: 'bg-yellow-100', + iconTextColor: 'text-yellow-600', + }; + } + if (bookingResult?.paymentMethod === 'lightning') { + // For Lightning, if we're on success step, payment was confirmed + return { + title: locale === 'es' ? '¡Pago Confirmado!' : 'Payment Confirmed!', + description: locale === 'es' + ? '¡Tu reserva está confirmada! Te esperamos en el evento.' + : 'Your booking is confirmed! See you at the event.', + iconColor: 'bg-green-100', + iconTextColor: 'text-green-600', + }; + } + return { + title: t('booking.success.title'), + description: t('booking.success.description'), + iconColor: 'bg-green-100', + iconTextColor: 'text-green-600', + }; + }; + + // Paying step - waiting for Lightning payment (compact design) + if (step === 'paying' && bookingResult && bookingResult.lightningInvoice) { + const invoice = bookingResult.lightningInvoice; + + return ( +
+
+ + {/* Amount - prominent at top */} +
+ {invoice.fiatAmount && invoice.fiatCurrency && ( +

+ {invoice.fiatAmount.toLocaleString()} {invoice.fiatCurrency} +

+ )} +

+ ≈ {invoice.amount.toLocaleString()} sats +

+
+ + {/* QR Code - clickable to copy */} +
copyInvoiceToClipboard(invoice.paymentRequest)} + title={locale === 'es' ? 'Clic para copiar' : 'Click to copy'} + > + +
+ + {/* Invoice string - truncated, clickable */} +
copyInvoiceToClipboard(invoice.paymentRequest)} + > +

+ + {truncateInvoice(invoice.paymentRequest, 16)} +

+

+ {locale === 'es' ? 'Toca para copiar' : 'Tap to copy'} +

+
+ + {/* Open in Wallet - primary action */} + + + {locale === 'es' ? 'Abrir en Billetera' : 'Open in Wallet'} + + + {/* Status indicator */} +
+
+ {locale === 'es' ? 'Esperando pago...' : 'Waiting for payment...'} +
+ + {/* Ticket reference - small */} +

+ {locale === 'es' ? 'Ref' : 'Ref'}: {bookingResult.qrCode} +

+ +
+
+ ); + } + + // Manual payment step - showing bank transfer details or TPago link + if (step === 'manual_payment' && bookingResult && paymentConfig) { + const isBankTransfer = bookingResult.paymentMethod === 'bank_transfer'; + const isTpago = bookingResult.paymentMethod === 'tpago'; + + return ( +
+
+ +
+
+ {isBankTransfer ? ( + + ) : ( + + )} +
+

+ {locale === 'es' ? 'Completa tu Pago' : 'Complete Your Payment'} +

+

+ {locale === 'es' + ? 'Sigue las instrucciones para completar tu pago' + : 'Follow the instructions to complete your payment'} +

+
+ + {/* Amount to pay */} +
+

+ {locale === 'es' ? 'Monto a pagar' : 'Amount to pay'} +

+

+ {event?.price?.toLocaleString()} {event?.currency} +

+
+ + {/* Bank Transfer Details */} + {isBankTransfer && ( +
+

+ {locale === 'es' ? 'Datos Bancarios' : 'Bank Details'} +

+
+ {paymentConfig.bankName && ( +
+ {locale === 'es' ? 'Banco' : 'Bank'}: + {paymentConfig.bankName} +
+ )} + {paymentConfig.bankAccountHolder && ( +
+ {locale === 'es' ? 'Titular' : 'Account Holder'}: + {paymentConfig.bankAccountHolder} +
+ )} + {paymentConfig.bankAccountNumber && ( +
+ {locale === 'es' ? 'Nro. Cuenta' : 'Account Number'}: + {paymentConfig.bankAccountNumber} +
+ )} + {paymentConfig.bankAlias && ( +
+ Alias: + {paymentConfig.bankAlias} +
+ )} + {paymentConfig.bankPhone && ( +
+ {locale === 'es' ? 'Teléfono' : 'Phone'}: + {paymentConfig.bankPhone} +
+ )} +
+ {(locale === 'es' ? paymentConfig.bankNotesEs : paymentConfig.bankNotes) && ( +

+ {locale === 'es' ? paymentConfig.bankNotesEs : paymentConfig.bankNotes} +

+ )} +
+ )} + + {/* TPago Link */} + {isTpago && ( +
+

+ {locale === 'es' ? 'Pago con Tarjeta' : 'Card Payment'} +

+ {paymentConfig.tpagoLink && ( + + + {locale === 'es' ? 'Abrir TPago para Pagar' : 'Open TPago to Pay'} + + )} + {(locale === 'es' ? paymentConfig.tpagoInstructionsEs : paymentConfig.tpagoInstructions) && ( +

+ {locale === 'es' ? paymentConfig.tpagoInstructionsEs : paymentConfig.tpagoInstructions} +

+ )} +
+ )} + + {/* Reference */} +
+

+ {locale === 'es' ? 'Referencia de tu reserva' : 'Your booking reference'} +

+

{bookingResult.qrCode}

+
+ + {/* I Have Paid Button */} + + +

+ {locale === 'es' + ? 'Tu reserva será confirmada una vez que verifiquemos el pago' + : 'Your booking will be confirmed once we verify the payment'} +

+
+
+
+ ); + } + + // Pending approval step - user has marked payment as sent + if (step === 'pending_approval' && bookingResult) { + return ( +
+
+ +
+ +
+ +

+ {locale === 'es' ? '¡Pago en Verificación!' : 'Payment Being Verified!'} +

+

+ {locale === 'es' + ? 'Estamos verificando tu pago. Recibirás un email de confirmación una vez aprobado.' + : 'We are verifying your payment. You will receive a confirmation email once approved.'} +

+ +
+
+ + {bookingResult.qrCode} +
+ +
+

{t('booking.success.event')}: {event?.title}

+

{t('booking.success.date')}: {event && formatDate(event.startDatetime)}

+

{t('booking.success.time')}: {event && formatTime(event.startDatetime)}

+

{t('booking.success.location')}: {event?.location}

+
+
+ +
+

+ {locale === 'es' + ? 'La verificación del pago puede tomar hasta 24 horas hábiles. Por favor revisa tu email regularmente.' + : 'Payment verification may take up to 24 business hours. Please check your email regularly.'} +

+
+ +
+ + + + + + +
+
+
+
+ ); + } + + // Success step + if (step === 'success' && bookingResult) { + const successContent = getSuccessContent(); + + return ( +
+
+ +
+ +
+ +

+ {successContent.title} +

+

+ {successContent.description} +

+ +
+
+ + {bookingResult.qrCode} +
+ +
+

{t('booking.success.event')}: {event.title}

+

{t('booking.success.date')}: {formatDate(event.startDatetime)}

+

{t('booking.success.time')}: {formatTime(event.startDatetime)}

+

{t('booking.success.location')}: {event.location}

+
+
+ + {bookingResult.paymentMethod === 'cash' && ( +
+

+ {t('booking.success.cashNote')}: {t('booking.success.cashDescription')} +

+
+ )} + + {bookingResult.paymentMethod === 'bancard' && ( +
+

+ {t('booking.success.cardNote')} +

+
+ )} + + {bookingResult.paymentMethod === 'lightning' && ( +
+

+ + {locale === 'es' + ? '¡Pago con Bitcoin Lightning recibido exitosamente!' + : 'Bitcoin Lightning payment received successfully!'} +

+
+ )} + +

+ {t('booking.success.emailSent')} +

+ +
+ + + + + + +
+
+
+
+ ); + } + + return ( +
+
+ + + {t('common.back')} + + + {/* Event Summary - Always Visible */} + +
+

+ {locale === 'es' && event.titleEs ? event.titleEs : event.title} +

+
+
+
+ + {formatDate(event.startDatetime)} • {formatTime(event.startDatetime)} +
+
+ + {event.location} +
+
+ + {event.availableSeats} {t('events.details.spotsLeft')} +
+
+ + + {event.price === 0 + ? t('events.details.free') + : `${event.price.toLocaleString()} ${event.currency}`} + +
+
+
+ + {isSoldOut ? ( + + +

{t('events.details.soldOut')}

+

{t('booking.form.soldOutMessage')}

+
+ ) : ( +
+ {/* User Information Section */} + +

+ {t('booking.form.personalInfo')} +

+ +
+
+ setFormData({ ...formData, firstName: e.target.value })} + placeholder={t('booking.form.firstNamePlaceholder')} + error={errors.firstName} + required + /> + setFormData({ ...formData, lastName: e.target.value })} + placeholder={t('booking.form.lastNamePlaceholder')} + error={errors.lastName} + required + /> +
+ +
+ setFormData({ ...formData, email: e.target.value })} + placeholder={t('booking.form.emailPlaceholder')} + error={errors.email} + required + /> +
+ +
+ setFormData({ ...formData, phone: e.target.value })} + placeholder={t('booking.form.phonePlaceholder')} + error={errors.phone} + required + /> +
+ +
+
+ + + {t('booking.form.rucOptional')} + +
+ +
+ +
+ + +
+
+
+ + {/* Payment Selection Section */} + +

+ {t('booking.form.paymentMethod')} +

+ +
+ {paymentMethods.length === 0 ? ( +
+ {locale === 'es' + ? 'No hay métodos de pago disponibles para este evento.' + : 'No payment methods available for this event.'} +
+ ) : ( + paymentMethods.map((method) => ( + + )) + )} +
+
+ + {/* Submit Button */} + + +

+ {t('booking.form.termsNote')} +

+
+ )} +
+
+ ); +} diff --git a/frontend/src/app/(public)/booking/success/[ticketId]/page.tsx b/frontend/src/app/(public)/booking/success/[ticketId]/page.tsx new file mode 100644 index 0000000..c97d55e --- /dev/null +++ b/frontend/src/app/(public)/booking/success/[ticketId]/page.tsx @@ -0,0 +1,244 @@ +'use client'; + +import { useState, useEffect } from 'react'; +import { useParams } from 'next/navigation'; +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import { ticketsApi, Ticket } from '@/lib/api'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import { + CheckCircleIcon, + ClockIcon, + XCircleIcon, + TicketIcon, + ArrowPathIcon, +} from '@heroicons/react/24/outline'; + +export default function BookingSuccessPage() { + const params = useParams(); + const { t, locale } = useLanguage(); + const [ticket, setTicket] = useState(null); + const [loading, setLoading] = useState(true); + const [polling, setPolling] = useState(false); + + const ticketId = params.ticketId as string; + + const checkPaymentStatus = async () => { + try { + const { ticket: ticketData } = await ticketsApi.getById(ticketId); + setTicket(ticketData); + + // If still pending, continue polling + if (ticketData.status === 'pending' && ticketData.payment?.status === 'pending') { + return false; // Not done yet + } + return true; // Done polling + } catch (error) { + console.error('Error checking payment status:', error); + return true; // Stop polling on error + } + }; + + useEffect(() => { + if (!ticketId) return; + + // Initial load + checkPaymentStatus().finally(() => setLoading(false)); + + // Poll for payment status every 3 seconds + setPolling(true); + const interval = setInterval(async () => { + const isDone = await checkPaymentStatus(); + if (isDone) { + setPolling(false); + clearInterval(interval); + } + }, 3000); + + // Stop polling after 5 minutes + const timeout = setTimeout(() => { + setPolling(false); + clearInterval(interval); + }, 5 * 60 * 1000); + + return () => { + clearInterval(interval); + clearTimeout(timeout); + }; + }, [ticketId]); + + const formatDate = (dateStr: string) => { + return new Date(dateStr).toLocaleDateString(locale === 'es' ? 'es-ES' : 'en-US', { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric', + }); + }; + + const formatTime = (dateStr: string) => { + return new Date(dateStr).toLocaleTimeString(locale === 'es' ? 'es-ES' : 'en-US', { + hour: '2-digit', + minute: '2-digit', + }); + }; + + if (loading) { + return ( +
+
+
+

+ {locale === 'es' ? 'Verificando pago...' : 'Verifying payment...'} +

+
+
+ ); + } + + if (!ticket) { + return ( +
+
+ + +

+ {locale === 'es' ? 'Reserva no encontrada' : 'Booking not found'} +

+

+ {locale === 'es' + ? 'No pudimos encontrar tu reserva. Por favor, contacta con soporte.' + : 'We could not find your booking. Please contact support.'} +

+ + + +
+
+
+ ); + } + + const isPaid = ticket.status === 'confirmed' || ticket.payment?.status === 'paid'; + const isPending = ticket.status === 'pending' && ticket.payment?.status === 'pending'; + const isFailed = ticket.payment?.status === 'failed'; + + return ( +
+
+ + {/* Status Icon */} + {isPaid ? ( +
+ +
+ ) : isPending ? ( +
+ +
+ ) : ( +
+ +
+ )} + + {/* Title */} +

+ {isPaid + ? (locale === 'es' ? '¡Pago Confirmado!' : 'Payment Confirmed!') + : isPending + ? (locale === 'es' ? 'Esperando Pago...' : 'Waiting for Payment...') + : (locale === 'es' ? 'Pago Fallido' : 'Payment Failed') + } +

+ +

+ {isPaid + ? (locale === 'es' + ? 'Tu reserva está confirmada. ¡Te esperamos!' + : 'Your booking is confirmed. See you there!') + : isPending + ? (locale === 'es' + ? 'Estamos verificando tu pago. Esto puede tomar unos segundos.' + : 'We are verifying your payment. This may take a few seconds.') + : (locale === 'es' + ? 'Hubo un problema con tu pago. Por favor, intenta de nuevo.' + : 'There was an issue with your payment. Please try again.') + } +

+ + {/* Polling indicator */} + {polling && isPending && ( +
+ + + {locale === 'es' ? 'Verificando...' : 'Checking...'} + +
+ )} + + {/* Ticket Details */} +
+
+ + {ticket.qrCode} +
+ +
+ {ticket.event && ( + <> +

{locale === 'es' ? 'Evento' : 'Event'}: {ticket.event.title}

+

{locale === 'es' ? 'Fecha' : 'Date'}: {formatDate(ticket.event.startDatetime)}

+

{locale === 'es' ? 'Hora' : 'Time'}: {formatTime(ticket.event.startDatetime)}

+

{locale === 'es' ? 'Ubicación' : 'Location'}: {ticket.event.location}

+ + )} +
+
+ + {/* Status Badge */} +
+ + {isPaid + ? (locale === 'es' ? 'Confirmado' : 'Confirmed') + : isPending + ? (locale === 'es' ? 'Pendiente de Pago' : 'Pending Payment') + : (locale === 'es' ? 'Pago Fallido' : 'Payment Failed') + } + +
+ + {/* Email note */} + {isPaid && ( +

+ {locale === 'es' + ? 'Un correo de confirmación ha sido enviado a tu bandeja de entrada.' + : 'A confirmation email has been sent to your inbox.'} +

+ )} + + {/* Actions */} +
+ + + + + + +
+
+
+
+ ); +} diff --git a/frontend/src/app/(public)/community/page.tsx b/frontend/src/app/(public)/community/page.tsx new file mode 100644 index 0000000..de1deff --- /dev/null +++ b/frontend/src/app/(public)/community/page.tsx @@ -0,0 +1,153 @@ +'use client'; + +import Link from 'next/link'; +import { useLanguage } from '@/context/LanguageContext'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import { + ChatBubbleLeftRightIcon, + CameraIcon, + UserGroupIcon, + HeartIcon +} from '@heroicons/react/24/outline'; +import { + socialConfig, + getWhatsAppUrl, + getInstagramUrl, + getTelegramUrl +} from '@/lib/socialLinks'; + +export default function CommunityPage() { + const { t } = useLanguage(); + + // Get social URLs from environment config + const whatsappUrl = getWhatsAppUrl(socialConfig.whatsapp); + const instagramUrl = getInstagramUrl(socialConfig.instagram); + const telegramUrl = getTelegramUrl(socialConfig.telegram); + + const guidelines = t('community.guidelines.items') as unknown as string[]; + + return ( +
+
+
+

{t('community.title')}

+

{t('community.subtitle')}

+
+ + {/* Social Links */} +
+ {/* WhatsApp Card */} + {whatsappUrl && ( + +
+ + + +
+

{t('community.whatsapp.title')}

+

{t('community.whatsapp.description')}

+ + + +
+ )} + + {/* Telegram Card */} + {telegramUrl && ( + +
+ + + +
+

{t('community.telegram.title')}

+

{t('community.telegram.description')}

+ + + +
+ )} + + {/* Instagram Card */} + {instagramUrl && ( + +
+ +
+

{t('community.instagram.title')}

+

{t('community.instagram.description')}

+ + + +
+ )} +
+ + {/* Guidelines */} +
+ +
+
+ +
+

{t('community.guidelines.title')}

+
+ +
    + {Array.isArray(guidelines) && guidelines.map((item, index) => ( +
  • + + {index + 1} + + {item} +
  • + ))} +
+
+
+ + {/* Volunteer Section */} +
+ +
+
+ +
+
+

{t('community.volunteer.title')}

+

{t('community.volunteer.description')}

+ + + +
+
+
+
+
+
+ ); +} diff --git a/frontend/src/app/(public)/contact/page.tsx b/frontend/src/app/(public)/contact/page.tsx new file mode 100644 index 0000000..ea9de2f --- /dev/null +++ b/frontend/src/app/(public)/contact/page.tsx @@ -0,0 +1,158 @@ +'use client'; + +import { useState } from 'react'; +import { useLanguage } from '@/context/LanguageContext'; +import { contactsApi } from '@/lib/api'; +import Card from '@/components/ui/Card'; +import Button from '@/components/ui/Button'; +import Input from '@/components/ui/Input'; +import { ChatBubbleLeftRightIcon } from '@heroicons/react/24/outline'; +import { getSocialLinks, socialIcons, socialConfig } from '@/lib/socialLinks'; +import toast from 'react-hot-toast'; + +export default function ContactPage() { + const { t } = useLanguage(); + const [loading, setLoading] = useState(false); + const [formData, setFormData] = useState({ + name: '', + email: '', + message: '', + }); + + const socialLinks = getSocialLinks(); + const emailLink = socialLinks.find(l => l.type === 'email'); + const otherLinks = socialLinks.filter(l => l.type !== 'email'); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setLoading(true); + + try { + await contactsApi.submit(formData); + toast.success(t('contact.success')); + setFormData({ name: '', email: '', message: '' }); + } catch (error) { + toast.error(t('contact.error')); + } finally { + setLoading(false); + } + }; + + return ( +
+
+
+

{t('contact.title')}

+

{t('contact.subtitle')}

+
+ +
+ {/* Contact Form */} + +
+ setFormData({ ...formData, name: e.target.value })} + required + /> + + setFormData({ ...formData, email: e.target.value })} + required + /> + +
+ +