Compare commits
74 Commits
mobile-rej
...
mobile-api
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f5849aa29 | |||
| 6aceb212e4 | |||
| 42803f9b92 | |||
| 2a857f54e7 | |||
| bb79a68f44 | |||
| f103ae93ad | |||
| 1c9459dcf3 | |||
| 8b54f5ca65 | |||
| c94da645f3 | |||
| da0477102e | |||
| 70db97f5bb | |||
| 8ccf1f2b6e | |||
| 048b7b6094 | |||
| fc23e01275 | |||
| 20d05c1cc7 | |||
| 2c269db250 | |||
| fea94df7bb | |||
| 3c6dde6204 | |||
| cb0845e264 | |||
| d09e30c049 | |||
| c8bd928c33 | |||
| 3a558cec8e | |||
| b9354cb6bf | |||
| 7cdde6b5a9 | |||
| e77e5eb3ac | |||
| 8f3f27122a | |||
| d84a1d84ff | |||
| 40ba31edec | |||
| a54f8599b4 | |||
| 09825756f3 | |||
| 2086692897 | |||
| 87515ae19f | |||
| 44d6788f6e | |||
| ac634100b5 | |||
| 1b206102b0 | |||
| 94a545bd30 | |||
| 3552cf4f39 | |||
| d50fda90e0 | |||
| d3d4912a5f | |||
| b2e8bc3caf | |||
| d207b6feed | |||
| f05571caa4 | |||
| 6507bdcd35 | |||
| e2c8a1edbc | |||
| 02b25ffc84 | |||
| f1c8432fdc | |||
| 3e0d2743fb | |||
| fc3ee6724e | |||
| 1cd4c3713e | |||
| a72cf866fa | |||
| c50e0ceaf7 | |||
| 4307b383e3 | |||
| 563d95b928 | |||
| 0786d23336 | |||
| c0a9832c66 | |||
| cb3511f973 | |||
| f06482a159 | |||
| 7ab25655f2 | |||
| 9d17b442e2 | |||
| b4921c4e82 | |||
| b3410a5804 | |||
| 2cdc57d844 | |||
| 695046583f | |||
| a9325054eb | |||
| 6ee0b98f07 | |||
| cc78d82ca4 | |||
| 819812149f | |||
| 3c2a8b3543 | |||
| 75ba2b29ae | |||
| 54a4d15bdd | |||
| 1321f33da9 | |||
| fad0c33b9a | |||
| 565bab4998 | |||
| 7530a38c4d |
32
CHANGELOG.md
32
CHANGELOG.md
@@ -2,6 +2,38 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.5.39](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.38...v1.5.39) (2026-01-30)
|
||||||
|
|
||||||
|
## [1.5.38](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.37...v1.5.38) (2026-01-27)
|
||||||
|
|
||||||
|
## [1.5.37](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.36...v1.5.37) (2026-01-23)
|
||||||
|
|
||||||
|
## [1.5.36](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.35...v1.5.36) (2026-01-13)
|
||||||
|
|
||||||
|
## [1.5.35](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.34...v1.5.35) (2026-01-12)
|
||||||
|
|
||||||
|
## [1.5.34](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.33...v1.5.34) (2026-01-09)
|
||||||
|
|
||||||
|
## [1.5.33](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.32...v1.5.33) (2026-01-06)
|
||||||
|
|
||||||
|
## [1.5.32](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.31...v1.5.32) (2026-01-05)
|
||||||
|
|
||||||
|
## [1.5.31](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.30...v1.5.31) (2025-12-24)
|
||||||
|
|
||||||
|
## [1.5.30](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.29...v1.5.30) (2025-12-19)
|
||||||
|
|
||||||
|
## [1.5.29](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.28...v1.5.29) (2025-12-17)
|
||||||
|
|
||||||
|
## [1.5.28](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.27...v1.5.28) (2025-12-17)
|
||||||
|
|
||||||
|
## [1.5.27](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.26...v1.5.27) (2025-12-17)
|
||||||
|
|
||||||
|
## [1.5.26](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.25...v1.5.26) (2025-12-10)
|
||||||
|
|
||||||
|
## [1.5.25](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.24...v1.5.25) (2025-12-09)
|
||||||
|
|
||||||
|
## [1.5.24](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.22...v1.5.24) (2025-12-08)
|
||||||
|
|
||||||
## [1.5.22](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.21...v1.5.22) (2025-12-03)
|
## [1.5.22](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.21...v1.5.22) (2025-12-03)
|
||||||
|
|
||||||
## [1.5.21](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.20...v1.5.21) (2025-12-03)
|
## [1.5.21](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.20...v1.5.21) (2025-12-03)
|
||||||
|
|||||||
20
PROMPT-AI.md
Normal file
20
PROMPT-AI.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
File utama: src/app/api/mobile/voting/[id]/contribution/route.ts
|
||||||
|
|
||||||
|
Terapkan pagination pada file "File utama" pada method GET
|
||||||
|
Analisa juga file "File utama", jika belum memiliki page dari seachParams maka terapkan. Juga pastikan take dan skip sudah sesuai dengan pagination. Buat default nya menjadi 10 untuk take data
|
||||||
|
|
||||||
|
Contoh:
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
|
const takeData = 10;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
|
dan penerapannya pada query
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
|
|
||||||
|
Gunakan bahasa indonesia pada cli agar saya mudah membacanya.
|
||||||
|
|
||||||
|
<!-- Additinal prompt -->
|
||||||
|
File refrensi: src/app/api/mobile/event/[id]/[status]/route.ts
|
||||||
|
Anda bisa menggunakan refrensi dari "File refrensi" jika butuh pemahaman dengan tipe fitur yang sama
|
||||||
201
QWEN.md
Normal file
201
QWEN.md
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
# HIPMI Project - QWEN.md
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
HIPMI (Himpunan Pengusaha Muda Indonesia) is a comprehensive Next.js-based web application built for the Indonesian Young Entrepreneurs Association. The project is a sophisticated platform that provides multiple business functionalities including investment management, donations, events, job listings, forums, voting systems, and collaborative projects.
|
||||||
|
|
||||||
|
### Key Technologies
|
||||||
|
- **Framework**: Next.js 13+ (with App Router)
|
||||||
|
- **Language**: TypeScript
|
||||||
|
- **Database**: PostgreSQL with Prisma ORM
|
||||||
|
- **Styling**: Tailwind CSS with Mantine UI components
|
||||||
|
- **Authentication**: JWT-based with custom middleware
|
||||||
|
- **Runtime**: Bun (instead of Node.js)
|
||||||
|
- **Deployment**: Standalone output configuration
|
||||||
|
|
||||||
|
### Team Structure
|
||||||
|
- **bagas**: Frontend, DevOps
|
||||||
|
- **lukman**: Frontend, UI
|
||||||
|
- **lia**: Backend, Frontend, QC
|
||||||
|
- **malik**: Leader
|
||||||
|
|
||||||
|
## Architecture & Features
|
||||||
|
|
||||||
|
### Core Modules
|
||||||
|
The application is organized into several major functional areas:
|
||||||
|
|
||||||
|
1. **Authentication System** (`/auth`) - Login, registration, validation
|
||||||
|
2. **Investment Platform** (`/investasi`) - Investment creation, trading, portfolio management
|
||||||
|
3. **Donation System** (`/donasi`) - Fundraising campaigns, donation processing
|
||||||
|
4. **Event Management** (`/event`) - Event creation, participation, management
|
||||||
|
5. **Voting System** (`/vote`) - Voting creation and participation
|
||||||
|
6. **Job Board** (`/job`) - Job posting and application system
|
||||||
|
7. **Forum** (`/forum`) - Discussion platform with reporting features
|
||||||
|
8. **Collaboration Platform** (`/colab`) - Project collaboration tools
|
||||||
|
9. **User Profiles** (`/profile`) - User profile management
|
||||||
|
10. **Business Maps** (`/maps`) - Business location mapping
|
||||||
|
|
||||||
|
### Admin Panel
|
||||||
|
The application includes a comprehensive admin panel (`/admin`) with modules for managing:
|
||||||
|
- Investment approvals and transfers
|
||||||
|
- Donation campaign reviews
|
||||||
|
- Event management
|
||||||
|
- Forum moderation
|
||||||
|
- Job posting reviews
|
||||||
|
- User access management
|
||||||
|
- Voting oversight
|
||||||
|
|
||||||
|
### Technical Architecture
|
||||||
|
|
||||||
|
#### Routing & Authentication
|
||||||
|
- Custom middleware handles authentication and authorization
|
||||||
|
- Public routes are defined in the middleware configuration
|
||||||
|
- JWT tokens are stored in cookies with secure options
|
||||||
|
- Role-based access control (MasterUserRole model)
|
||||||
|
|
||||||
|
#### Database Schema
|
||||||
|
The Prisma schema defines a comprehensive data model with:
|
||||||
|
- User management with roles and profiles
|
||||||
|
- Investment and financial systems
|
||||||
|
- Donation and crowdfunding features
|
||||||
|
- Event management
|
||||||
|
- Forum and discussion systems
|
||||||
|
- Collaboration platforms
|
||||||
|
- Notification systems
|
||||||
|
- Business mapping features
|
||||||
|
|
||||||
|
#### Environment Configuration
|
||||||
|
The application uses multiple environment files for different deployment stages:
|
||||||
|
- Development: `run.env.dev`, `run.env.local.dev`
|
||||||
|
- Build: `run.env.build.dev`, `run.env.build.local`
|
||||||
|
- Runtime: `run.env.start.dev`, `run.env.start.local`
|
||||||
|
|
||||||
|
## Building and Running
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- Bun runtime installed
|
||||||
|
- PostgreSQL database
|
||||||
|
- Required environment variables configured
|
||||||
|
|
||||||
|
### Setup Commands
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
bun install
|
||||||
|
|
||||||
|
# Setup database (Prisma)
|
||||||
|
bun prisma generate
|
||||||
|
bun prisma db push
|
||||||
|
bun prisma db seed
|
||||||
|
|
||||||
|
# Development server
|
||||||
|
bun run dev
|
||||||
|
|
||||||
|
# Build for production
|
||||||
|
bun run build
|
||||||
|
|
||||||
|
# Start production server
|
||||||
|
bun run start
|
||||||
|
```
|
||||||
|
|
||||||
|
### Development Scripts
|
||||||
|
- `dev`: Starts development server with HTTPS
|
||||||
|
- `build`: Builds the application for production
|
||||||
|
- `start`: Starts the production server
|
||||||
|
- `lint`: Runs Next.js linting
|
||||||
|
- `ver`: Creates version tags
|
||||||
|
|
||||||
|
## Development Conventions
|
||||||
|
|
||||||
|
### Git Workflow
|
||||||
|
The team follows a structured Git workflow:
|
||||||
|
1. Check status with `git status`
|
||||||
|
2. Add specific files with `git add <file>` (avoid `git add -A`)
|
||||||
|
3. Commit with structured messages following conventional commits:
|
||||||
|
- `feat`: New features
|
||||||
|
- `fix`: Bug fixes
|
||||||
|
- `docs`: Documentation updates
|
||||||
|
- `chore`: Routine tasks
|
||||||
|
- `refactor`: Code restructuring
|
||||||
|
- `test`: Testing additions
|
||||||
|
- `style`: Styling changes
|
||||||
|
- `perf`: Performance improvements
|
||||||
|
|
||||||
|
### Code Standards
|
||||||
|
- TypeScript with strict mode enabled
|
||||||
|
- Component header comments with file description, creator, date
|
||||||
|
- Function comments with parameter and return value descriptions
|
||||||
|
- Custom type interface comments
|
||||||
|
- Error handling comments
|
||||||
|
- Complex logic comments
|
||||||
|
|
||||||
|
### Commit Message Format
|
||||||
|
```
|
||||||
|
type: Short description
|
||||||
|
|
||||||
|
Body:
|
||||||
|
- Detailed description of changes
|
||||||
|
- Motivation for changes
|
||||||
|
- Breaking changes if any
|
||||||
|
|
||||||
|
References: #issue-number
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
### Main Directories
|
||||||
|
- `src/app`: Next.js App Router pages and layouts
|
||||||
|
- `src/app_modules`: Reusable application modules
|
||||||
|
- `src/lib`: Shared libraries and utilities
|
||||||
|
- `src/util`: Utility functions
|
||||||
|
- `prisma`: Database schema and migrations
|
||||||
|
- `public`: Static assets
|
||||||
|
- `certificates`, `logs`: Application data directories
|
||||||
|
|
||||||
|
### Key Files
|
||||||
|
- `package.json`: Dependencies and scripts
|
||||||
|
- `next.config.js`: Next.js configuration
|
||||||
|
- `middleware.tsx`: Authentication and routing middleware
|
||||||
|
- `tsconfig.json`: TypeScript configuration
|
||||||
|
- `tailwind.config.js`: Styling configuration
|
||||||
|
- `gen_page.tsx`: Generated page routing utility
|
||||||
|
- `prisma/schema.prisma`: Database schema definition
|
||||||
|
|
||||||
|
## Special Features
|
||||||
|
|
||||||
|
### Real-time Capabilities
|
||||||
|
- WebSocket integration for real-time updates
|
||||||
|
- MQTT support for messaging
|
||||||
|
- Live notifications system
|
||||||
|
|
||||||
|
### Payment Integration
|
||||||
|
- Midtrans payment gateway for investments
|
||||||
|
- Multiple payment methods
|
||||||
|
- Invoice generation and tracking
|
||||||
|
|
||||||
|
### File Handling
|
||||||
|
- PDF generation and viewing
|
||||||
|
- Image processing and storage
|
||||||
|
- Document management for investments
|
||||||
|
|
||||||
|
### Mobile Support
|
||||||
|
- Responsive design
|
||||||
|
- Mobile-specific features
|
||||||
|
- Device token management
|
||||||
|
|
||||||
|
## Security Measures
|
||||||
|
|
||||||
|
### Authentication
|
||||||
|
- JWT-based authentication
|
||||||
|
- Session management
|
||||||
|
- Role-based access control
|
||||||
|
- Secure token storage in cookies
|
||||||
|
|
||||||
|
### Input Validation
|
||||||
|
- Prisma schema validations
|
||||||
|
- Server-side validation
|
||||||
|
- Sanitization of user inputs
|
||||||
|
|
||||||
|
### Data Protection
|
||||||
|
- Encrypted tokens
|
||||||
|
- Secure API routes
|
||||||
|
- Proper CORS configuration
|
||||||
207
bun.lock
207
bun.lock
@@ -50,6 +50,7 @@
|
|||||||
"echarts-for-react": "^3.0.2",
|
"echarts-for-react": "^3.0.2",
|
||||||
"embla-carousel-react": "^8.0.0-rc14",
|
"embla-carousel-react": "^8.0.0-rc14",
|
||||||
"eslint-config-next": "^13.5.4",
|
"eslint-config-next": "^13.5.4",
|
||||||
|
"firebase-admin": "^13.6.0",
|
||||||
"iron-session": "^6.3.1",
|
"iron-session": "^6.3.1",
|
||||||
"jose": "^5.9.2",
|
"jose": "^5.9.2",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.4.3",
|
||||||
@@ -509,6 +510,26 @@
|
|||||||
|
|
||||||
"@expo/xcpretty": ["@expo/xcpretty@4.3.2", "", { "dependencies": { "@babel/code-frame": "7.10.4", "chalk": "^4.1.0", "find-up": "^5.0.0", "js-yaml": "^4.1.0" }, "bin": { "excpretty": "build/cli.js" } }, "sha512-ReZxZ8pdnoI3tP/dNnJdnmAk7uLT4FjsKDGW7YeDdvdOMz2XCQSmSCM9IWlrXuWtMF9zeSB6WJtEhCQ41gQOfw=="],
|
"@expo/xcpretty": ["@expo/xcpretty@4.3.2", "", { "dependencies": { "@babel/code-frame": "7.10.4", "chalk": "^4.1.0", "find-up": "^5.0.0", "js-yaml": "^4.1.0" }, "bin": { "excpretty": "build/cli.js" } }, "sha512-ReZxZ8pdnoI3tP/dNnJdnmAk7uLT4FjsKDGW7YeDdvdOMz2XCQSmSCM9IWlrXuWtMF9zeSB6WJtEhCQ41gQOfw=="],
|
||||||
|
|
||||||
|
"@fastify/busboy": ["@fastify/busboy@3.2.0", "", {}, "sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA=="],
|
||||||
|
|
||||||
|
"@firebase/app-check-interop-types": ["@firebase/app-check-interop-types@0.3.3", "", {}, "sha512-gAlxfPLT2j8bTI/qfe3ahl2I2YcBQ8cFIBdhAQA4I2f3TndcO+22YizyGYuttLHPQEpWkhmpFW60VCFEPg4g5A=="],
|
||||||
|
|
||||||
|
"@firebase/app-types": ["@firebase/app-types@0.9.3", "", {}, "sha512-kRVpIl4vVGJ4baogMDINbyrIOtOxqhkZQg4jTq3l8Lw6WSk0xfpEYzezFu+Kl4ve4fbPl79dvwRtaFqAC/ucCw=="],
|
||||||
|
|
||||||
|
"@firebase/auth-interop-types": ["@firebase/auth-interop-types@0.2.4", "", {}, "sha512-JPgcXKCuO+CWqGDnigBtvo09HeBs5u/Ktc2GaFj2m01hLarbxthLNm7Fk8iOP1aqAtXV+fnnGj7U28xmk7IwVA=="],
|
||||||
|
|
||||||
|
"@firebase/component": ["@firebase/component@0.7.0", "", { "dependencies": { "@firebase/util": "1.13.0", "tslib": "^2.1.0" } }, "sha512-wR9En2A+WESUHexjmRHkqtaVH94WLNKt6rmeqZhSLBybg4Wyf0Umk04SZsS6sBq4102ZsDBFwoqMqJYj2IoDSg=="],
|
||||||
|
|
||||||
|
"@firebase/database": ["@firebase/database@1.1.0", "", { "dependencies": { "@firebase/app-check-interop-types": "0.3.3", "@firebase/auth-interop-types": "0.2.4", "@firebase/component": "0.7.0", "@firebase/logger": "0.5.0", "@firebase/util": "1.13.0", "faye-websocket": "0.11.4", "tslib": "^2.1.0" } }, "sha512-gM6MJFae3pTyNLoc9VcJNuaUDej0ctdjn3cVtILo3D5lpp0dmUHHLFN/pUKe7ImyeB1KAvRlEYxvIHNF04Filg=="],
|
||||||
|
|
||||||
|
"@firebase/database-compat": ["@firebase/database-compat@2.1.0", "", { "dependencies": { "@firebase/component": "0.7.0", "@firebase/database": "1.1.0", "@firebase/database-types": "1.0.16", "@firebase/logger": "0.5.0", "@firebase/util": "1.13.0", "tslib": "^2.1.0" } }, "sha512-8nYc43RqxScsePVd1qe1xxvWNf0OBnbwHxmXJ7MHSuuTVYFO3eLyLW3PiCKJ9fHnmIz4p4LbieXwz+qtr9PZDg=="],
|
||||||
|
|
||||||
|
"@firebase/database-types": ["@firebase/database-types@1.0.16", "", { "dependencies": { "@firebase/app-types": "0.9.3", "@firebase/util": "1.13.0" } }, "sha512-xkQLQfU5De7+SPhEGAXFBnDryUWhhlFXelEg2YeZOQMCdoe7dL64DDAd77SQsR+6uoXIZY5MB4y/inCs4GTfcw=="],
|
||||||
|
|
||||||
|
"@firebase/logger": ["@firebase/logger@0.5.0", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-cGskaAvkrnh42b3BA3doDWeBmuHFO/Mx5A83rbRDYakPjO9bJtRL3dX7javzc2Rr/JHZf4HlterTW2lUkfeN4g=="],
|
||||||
|
|
||||||
|
"@firebase/util": ["@firebase/util@1.13.0", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-0AZUyYUfpMNcztR5l09izHwXkZpghLgCUaAGjtMwXnCg3bj4ml5VgiwqOMOxJ+Nw4qN/zJAaOQBcJ7KGkWStqQ=="],
|
||||||
|
|
||||||
"@floating-ui/core": ["@floating-ui/core@1.6.9", "", { "dependencies": { "@floating-ui/utils": "^0.2.9" } }, "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw=="],
|
"@floating-ui/core": ["@floating-ui/core@1.6.9", "", { "dependencies": { "@floating-ui/utils": "^0.2.9" } }, "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw=="],
|
||||||
|
|
||||||
"@floating-ui/dom": ["@floating-ui/dom@1.6.13", "", { "dependencies": { "@floating-ui/core": "^1.6.0", "@floating-ui/utils": "^0.2.9" } }, "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w=="],
|
"@floating-ui/dom": ["@floating-ui/dom@1.6.13", "", { "dependencies": { "@floating-ui/core": "^1.6.0", "@floating-ui/utils": "^0.2.9" } }, "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w=="],
|
||||||
@@ -519,8 +540,22 @@
|
|||||||
|
|
||||||
"@floating-ui/utils": ["@floating-ui/utils@0.2.9", "", {}, "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg=="],
|
"@floating-ui/utils": ["@floating-ui/utils@0.2.9", "", {}, "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg=="],
|
||||||
|
|
||||||
|
"@google-cloud/firestore": ["@google-cloud/firestore@7.11.6", "", { "dependencies": { "@opentelemetry/api": "^1.3.0", "fast-deep-equal": "^3.1.1", "functional-red-black-tree": "^1.0.1", "google-gax": "^4.3.3", "protobufjs": "^7.2.6" } }, "sha512-EW/O8ktzwLfyWBOsNuhRoMi8lrC3clHM5LVFhGvO1HCsLozCOOXRAlHrYBoE6HL42Sc8yYMuCb2XqcnJ4OOEpw=="],
|
||||||
|
|
||||||
|
"@google-cloud/paginator": ["@google-cloud/paginator@5.0.2", "", { "dependencies": { "arrify": "^2.0.0", "extend": "^3.0.2" } }, "sha512-DJS3s0OVH4zFDB1PzjxAsHqJT6sKVbRwwML0ZBP9PbU7Yebtu/7SWMRzvO2J3nUi9pRNITCfu4LJeooM2w4pjg=="],
|
||||||
|
|
||||||
|
"@google-cloud/projectify": ["@google-cloud/projectify@4.0.0", "", {}, "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA=="],
|
||||||
|
|
||||||
|
"@google-cloud/promisify": ["@google-cloud/promisify@4.0.0", "", {}, "sha512-Orxzlfb9c67A15cq2JQEyVc7wEsmFBmHjZWZYQMUyJ1qivXyMwdyNOs9odi79hze+2zqdTtu1E19IM/FtqZ10g=="],
|
||||||
|
|
||||||
|
"@google-cloud/storage": ["@google-cloud/storage@7.18.0", "", { "dependencies": { "@google-cloud/paginator": "^5.0.0", "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "<4.1.0", "abort-controller": "^3.0.0", "async-retry": "^1.3.3", "duplexify": "^4.1.3", "fast-xml-parser": "^4.4.1", "gaxios": "^6.0.2", "google-auth-library": "^9.6.3", "html-entities": "^2.5.2", "mime": "^3.0.0", "p-limit": "^3.0.1", "retry-request": "^7.0.0", "teeny-request": "^9.0.0", "uuid": "^8.0.0" } }, "sha512-r3ZwDMiz4nwW6R922Z1pwpePxyRwE5GdevYX63hRmAQUkUQJcBH/79EnQPDv5cOv1mFBgevdNWQfi3tie3dHrQ=="],
|
||||||
|
|
||||||
"@google/generative-ai": ["@google/generative-ai@0.19.0", "", {}, "sha512-iGf/62v3sTwtEJGJY6S5m7PfkglU8hi1URaxqIjiRg1OItV27xyc4aVeR0og8cDkZFkUlGZKv+23bJtT1QWFzQ=="],
|
"@google/generative-ai": ["@google/generative-ai@0.19.0", "", {}, "sha512-iGf/62v3sTwtEJGJY6S5m7PfkglU8hi1URaxqIjiRg1OItV27xyc4aVeR0og8cDkZFkUlGZKv+23bJtT1QWFzQ=="],
|
||||||
|
|
||||||
|
"@grpc/grpc-js": ["@grpc/grpc-js@1.14.3", "", { "dependencies": { "@grpc/proto-loader": "^0.8.0", "@js-sdsl/ordered-map": "^4.4.2" } }, "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA=="],
|
||||||
|
|
||||||
|
"@grpc/proto-loader": ["@grpc/proto-loader@0.7.15", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.2.5", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ=="],
|
||||||
|
|
||||||
"@hookstate/core": ["@hookstate/core@4.0.1", "", { "peerDependencies": { "react": "^16.8.6 || ^17.0.0 || ^18.0.0" } }, "sha512-Uh2D8Z0z/pqOJ7t+SfC+2sj13JQcB4yFhtL+T1choCaBxTSlgOS/CKRBohgJ4cjTKoxOmTT8uSQysu3gUjX+Gw=="],
|
"@hookstate/core": ["@hookstate/core@4.0.1", "", { "peerDependencies": { "react": "^16.8.6 || ^17.0.0 || ^18.0.0" } }, "sha512-Uh2D8Z0z/pqOJ7t+SfC+2sj13JQcB4yFhtL+T1choCaBxTSlgOS/CKRBohgJ4cjTKoxOmTT8uSQysu3gUjX+Gw=="],
|
||||||
|
|
||||||
"@huggingface/jinja": ["@huggingface/jinja@0.3.3", "", {}, "sha512-vQQr2JyWvVFba3Lj9es4q9vCl1sAc74fdgnEMoX8qHrXtswap9ge9uO3ONDzQB0cQ0PUyaKY2N6HaVbTBvSXvw=="],
|
"@huggingface/jinja": ["@huggingface/jinja@0.3.3", "", {}, "sha512-vQQr2JyWvVFba3Lj9es4q9vCl1sAc74fdgnEMoX8qHrXtswap9ge9uO3ONDzQB0cQ0PUyaKY2N6HaVbTBvSXvw=="],
|
||||||
@@ -605,6 +640,8 @@
|
|||||||
|
|
||||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],
|
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],
|
||||||
|
|
||||||
|
"@js-sdsl/ordered-map": ["@js-sdsl/ordered-map@4.4.2", "", {}, "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw=="],
|
||||||
|
|
||||||
"@mantine/carousel": ["@mantine/carousel@7.17.0", "", { "peerDependencies": { "@mantine/core": "7.17.0", "@mantine/hooks": "7.17.0", "embla-carousel-react": ">=7.0.0", "react": "^18.x || ^19.x", "react-dom": "^18.x || ^19.x" } }, "sha512-NrgfUBa7tbtDFem6TAntZjQknymqhzZ/d52szheRu+3GIfd9d8qEPHV1sMFRQ3DkzMxiJfzI6G61GvW6yLOaGg=="],
|
"@mantine/carousel": ["@mantine/carousel@7.17.0", "", { "peerDependencies": { "@mantine/core": "7.17.0", "@mantine/hooks": "7.17.0", "embla-carousel-react": ">=7.0.0", "react": "^18.x || ^19.x", "react-dom": "^18.x || ^19.x" } }, "sha512-NrgfUBa7tbtDFem6TAntZjQknymqhzZ/d52szheRu+3GIfd9d8qEPHV1sMFRQ3DkzMxiJfzI6G61GvW6yLOaGg=="],
|
||||||
|
|
||||||
"@mantine/core": ["@mantine/core@6.0.22", "", { "dependencies": { "@floating-ui/react": "^0.19.1", "@mantine/styles": "6.0.22", "@mantine/utils": "6.0.22", "@radix-ui/react-scroll-area": "1.0.2", "react-remove-scroll": "^2.5.5", "react-textarea-autosize": "8.3.4" }, "peerDependencies": { "@mantine/hooks": "6.0.22", "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-6kv0eY7n565fyjgS20qUYeCSxg3f1TJ5vurzbP1HHtFXXKSY0bYoqqDoHipFCt6NxsPQGeiC6cC0c/IWIlxoKQ=="],
|
"@mantine/core": ["@mantine/core@6.0.22", "", { "dependencies": { "@floating-ui/react": "^0.19.1", "@mantine/styles": "6.0.22", "@mantine/utils": "6.0.22", "@radix-ui/react-scroll-area": "1.0.2", "react-remove-scroll": "^2.5.5", "react-textarea-autosize": "8.3.4" }, "peerDependencies": { "@mantine/hooks": "6.0.22", "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-6kv0eY7n565fyjgS20qUYeCSxg3f1TJ5vurzbP1HHtFXXKSY0bYoqqDoHipFCt6NxsPQGeiC6cC0c/IWIlxoKQ=="],
|
||||||
@@ -751,6 +788,8 @@
|
|||||||
|
|
||||||
"@octokit/webhooks-methods": ["@octokit/webhooks-methods@5.1.1", "", {}, "sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg=="],
|
"@octokit/webhooks-methods": ["@octokit/webhooks-methods@5.1.1", "", {}, "sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
|
||||||
|
|
||||||
"@oven/bun-darwin-aarch64": ["@oven/bun-darwin-aarch64@1.2.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-xBz/Q7X6AFwMg7MXtBemjjt5uB+tvEYBmi9Zbm1r8qnI2V8m/Smuhma0EARhiVfLuIAYj2EM5qjzxeAFV4TBJA=="],
|
"@oven/bun-darwin-aarch64": ["@oven/bun-darwin-aarch64@1.2.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-xBz/Q7X6AFwMg7MXtBemjjt5uB+tvEYBmi9Zbm1r8qnI2V8m/Smuhma0EARhiVfLuIAYj2EM5qjzxeAFV4TBJA=="],
|
||||||
|
|
||||||
"@oven/bun-darwin-x64": ["@oven/bun-darwin-x64@1.2.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ufyty+2754QCFDhq447H39JiqabMlFRItLn1YFp+2hdpKak7KCYLGOUuHnlr1pmImKJzDHURjnvTTq1QRlUWAA=="],
|
"@oven/bun-darwin-x64": ["@oven/bun-darwin-x64@1.2.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ufyty+2754QCFDhq447H39JiqabMlFRItLn1YFp+2hdpKak7KCYLGOUuHnlr1pmImKJzDHURjnvTTq1QRlUWAA=="],
|
||||||
@@ -997,6 +1036,8 @@
|
|||||||
|
|
||||||
"@tiptap/starter-kit": ["@tiptap/starter-kit@2.11.5", "", { "dependencies": { "@tiptap/core": "^2.11.5", "@tiptap/extension-blockquote": "^2.11.5", "@tiptap/extension-bold": "^2.11.5", "@tiptap/extension-bullet-list": "^2.11.5", "@tiptap/extension-code": "^2.11.5", "@tiptap/extension-code-block": "^2.11.5", "@tiptap/extension-document": "^2.11.5", "@tiptap/extension-dropcursor": "^2.11.5", "@tiptap/extension-gapcursor": "^2.11.5", "@tiptap/extension-hard-break": "^2.11.5", "@tiptap/extension-heading": "^2.11.5", "@tiptap/extension-history": "^2.11.5", "@tiptap/extension-horizontal-rule": "^2.11.5", "@tiptap/extension-italic": "^2.11.5", "@tiptap/extension-list-item": "^2.11.5", "@tiptap/extension-ordered-list": "^2.11.5", "@tiptap/extension-paragraph": "^2.11.5", "@tiptap/extension-strike": "^2.11.5", "@tiptap/extension-text": "^2.11.5", "@tiptap/extension-text-style": "^2.11.5", "@tiptap/pm": "^2.11.5" } }, "sha512-SLI7Aj2ruU1t//6Mk8f+fqW+18uTqpdfLUJYgwu0CkqBckrkRZYZh6GVLk/02k3H2ki7QkFxiFbZrdbZdng0JA=="],
|
"@tiptap/starter-kit": ["@tiptap/starter-kit@2.11.5", "", { "dependencies": { "@tiptap/core": "^2.11.5", "@tiptap/extension-blockquote": "^2.11.5", "@tiptap/extension-bold": "^2.11.5", "@tiptap/extension-bullet-list": "^2.11.5", "@tiptap/extension-code": "^2.11.5", "@tiptap/extension-code-block": "^2.11.5", "@tiptap/extension-document": "^2.11.5", "@tiptap/extension-dropcursor": "^2.11.5", "@tiptap/extension-gapcursor": "^2.11.5", "@tiptap/extension-hard-break": "^2.11.5", "@tiptap/extension-heading": "^2.11.5", "@tiptap/extension-history": "^2.11.5", "@tiptap/extension-horizontal-rule": "^2.11.5", "@tiptap/extension-italic": "^2.11.5", "@tiptap/extension-list-item": "^2.11.5", "@tiptap/extension-ordered-list": "^2.11.5", "@tiptap/extension-paragraph": "^2.11.5", "@tiptap/extension-strike": "^2.11.5", "@tiptap/extension-text": "^2.11.5", "@tiptap/extension-text-style": "^2.11.5", "@tiptap/pm": "^2.11.5" } }, "sha512-SLI7Aj2ruU1t//6Mk8f+fqW+18uTqpdfLUJYgwu0CkqBckrkRZYZh6GVLk/02k3H2ki7QkFxiFbZrdbZdng0JA=="],
|
||||||
|
|
||||||
|
"@tootallnate/once": ["@tootallnate/once@2.0.0", "", {}, "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A=="],
|
||||||
|
|
||||||
"@tsconfig/node10": ["@tsconfig/node10@1.0.11", "", {}, "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw=="],
|
"@tsconfig/node10": ["@tsconfig/node10@1.0.11", "", {}, "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw=="],
|
||||||
|
|
||||||
"@tsconfig/node12": ["@tsconfig/node12@1.0.11", "", {}, "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag=="],
|
"@tsconfig/node12": ["@tsconfig/node12@1.0.11", "", {}, "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag=="],
|
||||||
@@ -1025,6 +1066,8 @@
|
|||||||
|
|
||||||
"@types/bun": ["@types/bun@1.2.4", "", { "dependencies": { "bun-types": "1.2.4" } }, "sha512-QtuV5OMR8/rdKJs213iwXDpfVvnskPXY/S0ZiFbsTjQZycuqPbMW8Gf/XhLfwE5njW8sxI2WjISURXPlHypMFA=="],
|
"@types/bun": ["@types/bun@1.2.4", "", { "dependencies": { "bun-types": "1.2.4" } }, "sha512-QtuV5OMR8/rdKJs213iwXDpfVvnskPXY/S0ZiFbsTjQZycuqPbMW8Gf/XhLfwE5njW8sxI2WjISURXPlHypMFA=="],
|
||||||
|
|
||||||
|
"@types/caseless": ["@types/caseless@0.12.5", "", {}, "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg=="],
|
||||||
|
|
||||||
"@types/cli-progress": ["@types/cli-progress@3.11.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA=="],
|
"@types/cli-progress": ["@types/cli-progress@3.11.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA=="],
|
||||||
|
|
||||||
"@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="],
|
"@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="],
|
||||||
@@ -1059,6 +1102,8 @@
|
|||||||
|
|
||||||
"@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="],
|
"@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="],
|
||||||
|
|
||||||
|
"@types/jsonwebtoken": ["@types/jsonwebtoken@9.0.10", "", { "dependencies": { "@types/ms": "*", "@types/node": "*" } }, "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA=="],
|
||||||
|
|
||||||
"@types/keygrip": ["@types/keygrip@1.0.6", "", {}, "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ=="],
|
"@types/keygrip": ["@types/keygrip@1.0.6", "", {}, "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ=="],
|
||||||
|
|
||||||
"@types/koa": ["@types/koa@2.15.0", "", { "dependencies": { "@types/accepts": "*", "@types/content-disposition": "*", "@types/cookies": "*", "@types/http-assert": "*", "@types/http-errors": "*", "@types/keygrip": "*", "@types/koa-compose": "*", "@types/node": "*" } }, "sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g=="],
|
"@types/koa": ["@types/koa@2.15.0", "", { "dependencies": { "@types/accepts": "*", "@types/content-disposition": "*", "@types/cookies": "*", "@types/http-assert": "*", "@types/http-errors": "*", "@types/keygrip": "*", "@types/koa-compose": "*", "@types/node": "*" } }, "sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g=="],
|
||||||
@@ -1069,6 +1114,8 @@
|
|||||||
|
|
||||||
"@types/lodash": ["@types/lodash@4.17.15", "", {}, "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw=="],
|
"@types/lodash": ["@types/lodash@4.17.15", "", {}, "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw=="],
|
||||||
|
|
||||||
|
"@types/long": ["@types/long@4.0.2", "", {}, "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="],
|
||||||
|
|
||||||
"@types/mapbox-gl": ["@types/mapbox-gl@3.4.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-NsGKKtgW93B+UaLPti6B7NwlxYlES5DpV5Gzj9F75rK5ALKsqSk15CiEHbOnTr09RGbr6ZYiCdI+59NNNcAImg=="],
|
"@types/mapbox-gl": ["@types/mapbox-gl@3.4.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-NsGKKtgW93B+UaLPti6B7NwlxYlES5DpV5Gzj9F75rK5ALKsqSk15CiEHbOnTr09RGbr6ZYiCdI+59NNNcAImg=="],
|
||||||
|
|
||||||
"@types/mapbox__point-geometry": ["@types/mapbox__point-geometry@0.1.4", "", {}, "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA=="],
|
"@types/mapbox__point-geometry": ["@types/mapbox__point-geometry@0.1.4", "", {}, "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA=="],
|
||||||
@@ -1081,6 +1128,8 @@
|
|||||||
|
|
||||||
"@types/mime": ["@types/mime@1.3.5", "", {}, "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w=="],
|
"@types/mime": ["@types/mime@1.3.5", "", {}, "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w=="],
|
||||||
|
|
||||||
|
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||||
|
|
||||||
"@types/mustache": ["@types/mustache@4.2.5", "", {}, "sha512-PLwiVvTBg59tGFL/8VpcGvqOu3L4OuveNvPi0EYbWchRdEVP++yRUXJPFl+CApKEq13017/4Nf7aQ5lTtHUNsA=="],
|
"@types/mustache": ["@types/mustache@4.2.5", "", {}, "sha512-PLwiVvTBg59tGFL/8VpcGvqOu3L4OuveNvPi0EYbWchRdEVP++yRUXJPFl+CApKEq13017/4Nf7aQ5lTtHUNsA=="],
|
||||||
|
|
||||||
"@types/node": ["@types/node@20.4.5", "", {}, "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg=="],
|
"@types/node": ["@types/node@20.4.5", "", {}, "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg=="],
|
||||||
@@ -1111,6 +1160,8 @@
|
|||||||
|
|
||||||
"@types/readable-stream": ["@types/readable-stream@4.0.18", "", { "dependencies": { "@types/node": "*", "safe-buffer": "~5.1.1" } }, "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA=="],
|
"@types/readable-stream": ["@types/readable-stream@4.0.18", "", { "dependencies": { "@types/node": "*", "safe-buffer": "~5.1.1" } }, "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA=="],
|
||||||
|
|
||||||
|
"@types/request": ["@types/request@2.48.13", "", { "dependencies": { "@types/caseless": "*", "@types/node": "*", "@types/tough-cookie": "*", "form-data": "^2.5.5" } }, "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg=="],
|
||||||
|
|
||||||
"@types/scheduler": ["@types/scheduler@0.23.0", "", {}, "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw=="],
|
"@types/scheduler": ["@types/scheduler@0.23.0", "", {}, "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw=="],
|
||||||
|
|
||||||
"@types/send": ["@types/send@0.17.4", "", { "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA=="],
|
"@types/send": ["@types/send@0.17.4", "", { "dependencies": { "@types/mime": "^1", "@types/node": "*" } }, "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA=="],
|
||||||
@@ -1123,6 +1174,8 @@
|
|||||||
|
|
||||||
"@types/supercluster": ["@types/supercluster@7.1.3", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA=="],
|
"@types/supercluster": ["@types/supercluster@7.1.3", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA=="],
|
||||||
|
|
||||||
|
"@types/tough-cookie": ["@types/tough-cookie@4.0.5", "", {}, "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA=="],
|
||||||
|
|
||||||
"@types/triple-beam": ["@types/triple-beam@1.3.5", "", {}, "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw=="],
|
"@types/triple-beam": ["@types/triple-beam@1.3.5", "", {}, "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw=="],
|
||||||
|
|
||||||
"@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],
|
"@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="],
|
||||||
@@ -1237,6 +1290,8 @@
|
|||||||
|
|
||||||
"arraybuffer.prototype.slice": ["arraybuffer.prototype.slice@1.0.4", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "is-array-buffer": "^3.0.4" } }, "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ=="],
|
"arraybuffer.prototype.slice": ["arraybuffer.prototype.slice@1.0.4", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "is-array-buffer": "^3.0.4" } }, "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ=="],
|
||||||
|
|
||||||
|
"arrify": ["arrify@2.0.1", "", {}, "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug=="],
|
||||||
|
|
||||||
"asap": ["asap@2.0.6", "", {}, "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA=="],
|
"asap": ["asap@2.0.6", "", {}, "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA=="],
|
||||||
|
|
||||||
"asn1.js": ["asn1.js@5.4.1", "", { "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "safer-buffer": "^2.1.0" } }, "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA=="],
|
"asn1.js": ["asn1.js@5.4.1", "", { "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "safer-buffer": "^2.1.0" } }, "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA=="],
|
||||||
@@ -1255,6 +1310,8 @@
|
|||||||
|
|
||||||
"async-limiter": ["async-limiter@1.0.1", "", {}, "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="],
|
"async-limiter": ["async-limiter@1.0.1", "", {}, "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="],
|
||||||
|
|
||||||
|
"async-retry": ["async-retry@1.3.3", "", { "dependencies": { "retry": "0.13.1" } }, "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw=="],
|
||||||
|
|
||||||
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
|
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
|
||||||
|
|
||||||
"at-least-node": ["at-least-node@1.0.0", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="],
|
"at-least-node": ["at-least-node@1.0.0", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="],
|
||||||
@@ -1311,6 +1368,8 @@
|
|||||||
|
|
||||||
"big-integer": ["big-integer@1.6.52", "", {}, "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg=="],
|
"big-integer": ["big-integer@1.6.52", "", {}, "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg=="],
|
||||||
|
|
||||||
|
"bignumber.js": ["bignumber.js@9.3.1", "", {}, "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ=="],
|
||||||
|
|
||||||
"binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="],
|
"binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="],
|
||||||
|
|
||||||
"bl": ["bl@6.0.19", "", { "dependencies": { "@types/readable-stream": "^4.0.0", "buffer": "^6.0.3", "inherits": "^2.0.4", "readable-stream": "^4.2.0" } }, "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA=="],
|
"bl": ["bl@6.0.19", "", { "dependencies": { "@types/readable-stream": "^4.0.0", "buffer": "^6.0.3", "inherits": "^2.0.4", "readable-stream": "^4.2.0" } }, "sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA=="],
|
||||||
@@ -1603,6 +1662,8 @@
|
|||||||
|
|
||||||
"duplexer2": ["duplexer2@0.1.4", "", { "dependencies": { "readable-stream": "^2.0.2" } }, "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA=="],
|
"duplexer2": ["duplexer2@0.1.4", "", { "dependencies": { "readable-stream": "^2.0.2" } }, "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA=="],
|
||||||
|
|
||||||
|
"duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="],
|
||||||
|
|
||||||
"earcut": ["earcut@3.0.1", "", {}, "sha512-0l1/0gOjESMeQyYaK5IDiPNvFeu93Z/cO0TjZh9eZ1vyCtZnA7KMZ8rQggpsJHIbGSdrqYq9OhuveadOVHCshw=="],
|
"earcut": ["earcut@3.0.1", "", {}, "sha512-0l1/0gOjESMeQyYaK5IDiPNvFeu93Z/cO0TjZh9eZ1vyCtZnA7KMZ8rQggpsJHIbGSdrqYq9OhuveadOVHCshw=="],
|
||||||
|
|
||||||
"eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
|
"eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
|
||||||
@@ -1751,6 +1812,8 @@
|
|||||||
|
|
||||||
"extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="],
|
"extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="],
|
||||||
|
|
||||||
|
"farmhash-modern": ["farmhash-modern@1.1.0", "", {}, "sha512-6ypT4XfgqJk/F3Yuv4SX26I3doUjt0GTG4a+JgWxXQpxXzTBq8fPUeGHfcYMMDPHJHm3yPOSjaeBwBGAHWXCdA=="],
|
||||||
|
|
||||||
"fast-content-type-parse": ["fast-content-type-parse@2.0.1", "", {}, "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="],
|
"fast-content-type-parse": ["fast-content-type-parse@2.0.1", "", {}, "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="],
|
||||||
|
|
||||||
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
||||||
@@ -1769,8 +1832,12 @@
|
|||||||
|
|
||||||
"fast-unique-numbers": ["fast-unique-numbers@8.0.13", "", { "dependencies": { "@babel/runtime": "^7.23.8", "tslib": "^2.6.2" } }, "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g=="],
|
"fast-unique-numbers": ["fast-unique-numbers@8.0.13", "", { "dependencies": { "@babel/runtime": "^7.23.8", "tslib": "^2.6.2" } }, "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g=="],
|
||||||
|
|
||||||
|
"fast-xml-parser": ["fast-xml-parser@4.5.3", "", { "dependencies": { "strnum": "^1.1.1" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig=="],
|
||||||
|
|
||||||
"fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="],
|
"fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="],
|
||||||
|
|
||||||
|
"faye-websocket": ["faye-websocket@0.11.4", "", { "dependencies": { "websocket-driver": ">=0.5.1" } }, "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g=="],
|
||||||
|
|
||||||
"fb-watchman": ["fb-watchman@2.0.2", "", { "dependencies": { "bser": "2.1.1" } }, "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA=="],
|
"fb-watchman": ["fb-watchman@2.0.2", "", { "dependencies": { "bser": "2.1.1" } }, "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA=="],
|
||||||
|
|
||||||
"fbemitter": ["fbemitter@3.0.0", "", { "dependencies": { "fbjs": "^3.0.0" } }, "sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw=="],
|
"fbemitter": ["fbemitter@3.0.0", "", { "dependencies": { "fbjs": "^3.0.0" } }, "sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw=="],
|
||||||
@@ -1801,6 +1868,8 @@
|
|||||||
|
|
||||||
"find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
|
"find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
|
||||||
|
|
||||||
|
"firebase-admin": ["firebase-admin@13.6.0", "", { "dependencies": { "@fastify/busboy": "^3.0.0", "@firebase/database-compat": "^2.0.0", "@firebase/database-types": "^1.0.6", "@types/node": "^22.8.7", "farmhash-modern": "^1.1.0", "fast-deep-equal": "^3.1.1", "google-auth-library": "^9.14.2", "jsonwebtoken": "^9.0.0", "jwks-rsa": "^3.1.0", "node-forge": "^1.3.1", "uuid": "^11.0.2" }, "optionalDependencies": { "@google-cloud/firestore": "^7.11.0", "@google-cloud/storage": "^7.14.0" } }, "sha512-GdPA/t0+Cq8p1JnjFRBmxRxAGvF/kl2yfdhALl38PrRp325YxyQ5aNaHui0XmaKcKiGRFIJ/EgBNWFoDP0onjw=="],
|
||||||
|
|
||||||
"flat-cache": ["flat-cache@3.2.0", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw=="],
|
"flat-cache": ["flat-cache@3.2.0", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw=="],
|
||||||
|
|
||||||
"flatbuffers": ["flatbuffers@25.2.10", "", {}, "sha512-7JlN9ZvLDG1McO3kbX0k4v+SUAg48L1rIwEvN6ZQl/eCtgJz9UylTMzE9wrmYrcorgxm3CX/3T/w5VAub99UUw=="],
|
"flatbuffers": ["flatbuffers@25.2.10", "", {}, "sha512-7JlN9ZvLDG1McO3kbX0k4v+SUAg48L1rIwEvN6ZQl/eCtgJz9UylTMzE9wrmYrcorgxm3CX/3T/w5VAub99UUw=="],
|
||||||
@@ -1851,8 +1920,14 @@
|
|||||||
|
|
||||||
"function.prototype.name": ["function.prototype.name@1.1.8", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "functions-have-names": "^1.2.3", "hasown": "^2.0.2", "is-callable": "^1.2.7" } }, "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q=="],
|
"function.prototype.name": ["function.prototype.name@1.1.8", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "functions-have-names": "^1.2.3", "hasown": "^2.0.2", "is-callable": "^1.2.7" } }, "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q=="],
|
||||||
|
|
||||||
|
"functional-red-black-tree": ["functional-red-black-tree@1.0.1", "", {}, "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g=="],
|
||||||
|
|
||||||
"functions-have-names": ["functions-have-names@1.2.3", "", {}, "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="],
|
"functions-have-names": ["functions-have-names@1.2.3", "", {}, "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="],
|
||||||
|
|
||||||
|
"gaxios": ["gaxios@6.7.1", "", { "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "is-stream": "^2.0.0", "node-fetch": "^2.6.9", "uuid": "^9.0.1" } }, "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ=="],
|
||||||
|
|
||||||
|
"gcp-metadata": ["gcp-metadata@6.1.1", "", { "dependencies": { "gaxios": "^6.1.1", "google-logging-utils": "^0.0.2", "json-bigint": "^1.0.0" } }, "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A=="],
|
||||||
|
|
||||||
"gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="],
|
"gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="],
|
||||||
|
|
||||||
"geojson-vt": ["geojson-vt@4.0.2", "", {}, "sha512-AV9ROqlNqoZEIJGfm1ncNjEXfkz2hdFlZf0qkVfmkwdKa8vj7H16YUOT81rJw1rdFhyEDlN2Tds91p/glzbl5A=="],
|
"geojson-vt": ["geojson-vt@4.0.2", "", {}, "sha512-AV9ROqlNqoZEIJGfm1ncNjEXfkz2hdFlZf0qkVfmkwdKa8vj7H16YUOT81rJw1rdFhyEDlN2Tds91p/glzbl5A=="],
|
||||||
@@ -1897,6 +1972,12 @@
|
|||||||
|
|
||||||
"gm": ["gm@1.25.1", "", { "dependencies": { "array-parallel": "~0.1.3", "array-series": "~0.1.5", "cross-spawn": "^7.0.5", "debug": "^3.1.0" } }, "sha512-jgcs2vKir9hFogGhXIfs0ODhJTfIrbECCehg38tqFgHm8zqXx7kAJyCYAFK4jTjx71AxrkFtkJBawbAxYUPX9A=="],
|
"gm": ["gm@1.25.1", "", { "dependencies": { "array-parallel": "~0.1.3", "array-series": "~0.1.5", "cross-spawn": "^7.0.5", "debug": "^3.1.0" } }, "sha512-jgcs2vKir9hFogGhXIfs0ODhJTfIrbECCehg38tqFgHm8zqXx7kAJyCYAFK4jTjx71AxrkFtkJBawbAxYUPX9A=="],
|
||||||
|
|
||||||
|
"google-auth-library": ["google-auth-library@9.15.1", "", { "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", "gaxios": "^6.1.1", "gcp-metadata": "^6.1.0", "gtoken": "^7.0.0", "jws": "^4.0.0" } }, "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng=="],
|
||||||
|
|
||||||
|
"google-gax": ["google-gax@4.6.1", "", { "dependencies": { "@grpc/grpc-js": "^1.10.9", "@grpc/proto-loader": "^0.7.13", "@types/long": "^4.0.0", "abort-controller": "^3.0.0", "duplexify": "^4.0.0", "google-auth-library": "^9.3.0", "node-fetch": "^2.7.0", "object-hash": "^3.0.0", "proto3-json-serializer": "^2.0.2", "protobufjs": "^7.3.2", "retry-request": "^7.0.0", "uuid": "^9.0.1" } }, "sha512-V6eky/xz2mcKfAd1Ioxyd6nmA61gao3n01C+YeuIwu3vzM9EDR6wcVzMSIbLMDXWeoi9SHYctXuKYC5uJUT3eQ=="],
|
||||||
|
|
||||||
|
"google-logging-utils": ["google-logging-utils@0.0.2", "", {}, "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ=="],
|
||||||
|
|
||||||
"gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
|
"gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
|
||||||
|
|
||||||
"gpt-3-encoder": ["gpt-3-encoder@1.1.4", "", {}, "sha512-fSQRePV+HUAhCn7+7HL7lNIXNm6eaFWFbNLOOGtmSJ0qJycyQvj60OvRlH7mee8xAMjBDNRdMXlMwjAbMTDjkg=="],
|
"gpt-3-encoder": ["gpt-3-encoder@1.1.4", "", {}, "sha512-fSQRePV+HUAhCn7+7HL7lNIXNm6eaFWFbNLOOGtmSJ0qJycyQvj60OvRlH7mee8xAMjBDNRdMXlMwjAbMTDjkg=="],
|
||||||
@@ -1907,6 +1988,8 @@
|
|||||||
|
|
||||||
"grid-index": ["grid-index@1.1.0", "", {}, "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA=="],
|
"grid-index": ["grid-index@1.1.0", "", {}, "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA=="],
|
||||||
|
|
||||||
|
"gtoken": ["gtoken@7.1.0", "", { "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" } }, "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw=="],
|
||||||
|
|
||||||
"guid-typescript": ["guid-typescript@1.0.9", "", {}, "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ=="],
|
"guid-typescript": ["guid-typescript@1.0.9", "", {}, "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ=="],
|
||||||
|
|
||||||
"has-ansi": ["has-ansi@2.0.0", "", { "dependencies": { "ansi-regex": "^2.0.0" } }, "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg=="],
|
"has-ansi": ["has-ansi@2.0.0", "", { "dependencies": { "ansi-regex": "^2.0.0" } }, "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg=="],
|
||||||
@@ -1951,6 +2034,8 @@
|
|||||||
|
|
||||||
"html-dom-parser": ["html-dom-parser@1.2.0", "", { "dependencies": { "domhandler": "4.3.1", "htmlparser2": "7.2.0" } }, "sha512-2HIpFMvvffsXHFUFjso0M9LqM+1Lm22BF+Df2ba+7QHJXjk63pWChEnI6YG27eaWqUdfnh5/Vy+OXrNTtepRsg=="],
|
"html-dom-parser": ["html-dom-parser@1.2.0", "", { "dependencies": { "domhandler": "4.3.1", "htmlparser2": "7.2.0" } }, "sha512-2HIpFMvvffsXHFUFjso0M9LqM+1Lm22BF+Df2ba+7QHJXjk63pWChEnI6YG27eaWqUdfnh5/Vy+OXrNTtepRsg=="],
|
||||||
|
|
||||||
|
"html-entities": ["html-entities@2.6.0", "", {}, "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ=="],
|
||||||
|
|
||||||
"html-react-parser": ["html-react-parser@1.4.12", "", { "dependencies": { "domhandler": "4.3.1", "html-dom-parser": "1.2.0", "react-property": "2.0.0", "style-to-js": "1.1.0" }, "peerDependencies": { "react": "0.14 || 15 || 16 || 17 || 18" } }, "sha512-nqYQzr4uXh67G9ejAG7djupTHmQvSTgjY83zbXLRfKHJ0F06751jXx6WKSFARDdXxCngo2/7H4Rwtfeowql4gQ=="],
|
"html-react-parser": ["html-react-parser@1.4.12", "", { "dependencies": { "domhandler": "4.3.1", "html-dom-parser": "1.2.0", "react-property": "2.0.0", "style-to-js": "1.1.0" }, "peerDependencies": { "react": "0.14 || 15 || 16 || 17 || 18" } }, "sha512-nqYQzr4uXh67G9ejAG7djupTHmQvSTgjY83zbXLRfKHJ0F06751jXx6WKSFARDdXxCngo2/7H4Rwtfeowql4gQ=="],
|
||||||
|
|
||||||
"html-to-text": ["html-to-text@9.0.5", "", { "dependencies": { "@selderee/plugin-htmlparser2": "^0.11.0", "deepmerge": "^4.3.1", "dom-serializer": "^2.0.0", "htmlparser2": "^8.0.2", "selderee": "^0.11.0" } }, "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg=="],
|
"html-to-text": ["html-to-text@9.0.5", "", { "dependencies": { "@selderee/plugin-htmlparser2": "^0.11.0", "deepmerge": "^4.3.1", "dom-serializer": "^2.0.0", "htmlparser2": "^8.0.2", "selderee": "^0.11.0" } }, "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg=="],
|
||||||
@@ -1963,6 +2048,8 @@
|
|||||||
|
|
||||||
"http-parser-js": ["http-parser-js@0.5.9", "", {}, "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw=="],
|
"http-parser-js": ["http-parser-js@0.5.9", "", {}, "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw=="],
|
||||||
|
|
||||||
|
"http-proxy-agent": ["http-proxy-agent@5.0.0", "", { "dependencies": { "@tootallnate/once": "2", "agent-base": "6", "debug": "4" } }, "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w=="],
|
||||||
|
|
||||||
"http_ece": ["http_ece@1.2.0", "", {}, "sha512-JrF8SSLVmcvc5NducxgyOrKXe3EsyHMgBFgSaIUGmArKe+rwr0uphRkRXvwiom3I+fpIfoItveHrfudL8/rxuA=="],
|
"http_ece": ["http_ece@1.2.0", "", {}, "sha512-JrF8SSLVmcvc5NducxgyOrKXe3EsyHMgBFgSaIUGmArKe+rwr0uphRkRXvwiom3I+fpIfoItveHrfudL8/rxuA=="],
|
||||||
|
|
||||||
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
||||||
@@ -2145,6 +2232,8 @@
|
|||||||
|
|
||||||
"jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
|
"jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
|
||||||
|
|
||||||
|
"json-bigint": ["json-bigint@1.0.0", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="],
|
||||||
|
|
||||||
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
|
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
|
||||||
|
|
||||||
"json-parse-better-errors": ["json-parse-better-errors@1.0.2", "", {}, "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="],
|
"json-parse-better-errors": ["json-parse-better-errors@1.0.2", "", {}, "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="],
|
||||||
@@ -2163,11 +2252,15 @@
|
|||||||
|
|
||||||
"jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="],
|
"jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="],
|
||||||
|
|
||||||
|
"jsonwebtoken": ["jsonwebtoken@9.0.3", "", { "dependencies": { "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g=="],
|
||||||
|
|
||||||
"jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="],
|
"jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="],
|
||||||
|
|
||||||
"jwa": ["jwa@2.0.0", "", { "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA=="],
|
"jwa": ["jwa@2.0.1", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="],
|
||||||
|
|
||||||
"jws": ["jws@4.0.0", "", { "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" } }, "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg=="],
|
"jwks-rsa": ["jwks-rsa@3.2.0", "", { "dependencies": { "@types/express": "^4.17.20", "@types/jsonwebtoken": "^9.0.4", "debug": "^4.3.4", "jose": "^4.15.4", "limiter": "^1.1.5", "lru-memoizer": "^2.2.0" } }, "sha512-PwchfHcQK/5PSydeKCs1ylNym0w/SSv8a62DgHJ//7x2ZclCoinlsjAfDxAAbpoTPybOum/Jgy+vkvMmKz89Ww=="],
|
||||||
|
|
||||||
|
"jws": ["jws@4.0.1", "", { "dependencies": { "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA=="],
|
||||||
|
|
||||||
"kdbush": ["kdbush@4.0.2", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
|
"kdbush": ["kdbush@4.0.2", "", {}, "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA=="],
|
||||||
|
|
||||||
@@ -2217,6 +2310,8 @@
|
|||||||
|
|
||||||
"lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="],
|
"lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="],
|
||||||
|
|
||||||
|
"limiter": ["limiter@1.1.5", "", {}, "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA=="],
|
||||||
|
|
||||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||||
|
|
||||||
"linkify-it": ["linkify-it@5.0.0", "", { "dependencies": { "uc.micro": "^2.0.0" } }, "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ=="],
|
"linkify-it": ["linkify-it@5.0.0", "", { "dependencies": { "uc.micro": "^2.0.0" } }, "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ=="],
|
||||||
@@ -2231,6 +2326,8 @@
|
|||||||
|
|
||||||
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
||||||
|
|
||||||
|
"lodash.camelcase": ["lodash.camelcase@4.3.0", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="],
|
||||||
|
|
||||||
"lodash.chunk": ["lodash.chunk@4.2.0", "", {}, "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w=="],
|
"lodash.chunk": ["lodash.chunk@4.2.0", "", {}, "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w=="],
|
||||||
|
|
||||||
"lodash.clonedeep": ["lodash.clonedeep@4.5.0", "", {}, "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="],
|
"lodash.clonedeep": ["lodash.clonedeep@4.5.0", "", {}, "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="],
|
||||||
@@ -2239,8 +2336,22 @@
|
|||||||
|
|
||||||
"lodash.flatten": ["lodash.flatten@4.4.0", "", {}, "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g=="],
|
"lodash.flatten": ["lodash.flatten@4.4.0", "", {}, "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g=="],
|
||||||
|
|
||||||
|
"lodash.includes": ["lodash.includes@4.3.0", "", {}, "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="],
|
||||||
|
|
||||||
|
"lodash.isboolean": ["lodash.isboolean@3.0.3", "", {}, "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="],
|
||||||
|
|
||||||
|
"lodash.isinteger": ["lodash.isinteger@4.0.4", "", {}, "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="],
|
||||||
|
|
||||||
|
"lodash.isnumber": ["lodash.isnumber@3.0.3", "", {}, "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="],
|
||||||
|
|
||||||
|
"lodash.isplainobject": ["lodash.isplainobject@4.0.6", "", {}, "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="],
|
||||||
|
|
||||||
|
"lodash.isstring": ["lodash.isstring@4.0.1", "", {}, "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="],
|
||||||
|
|
||||||
"lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="],
|
"lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="],
|
||||||
|
|
||||||
|
"lodash.once": ["lodash.once@4.1.1", "", {}, "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="],
|
||||||
|
|
||||||
"lodash.throttle": ["lodash.throttle@4.1.1", "", {}, "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="],
|
"lodash.throttle": ["lodash.throttle@4.1.1", "", {}, "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="],
|
||||||
|
|
||||||
"log-symbols": ["log-symbols@2.2.0", "", { "dependencies": { "chalk": "^2.0.1" } }, "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg=="],
|
"log-symbols": ["log-symbols@2.2.0", "", { "dependencies": { "chalk": "^2.0.1" } }, "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg=="],
|
||||||
@@ -2253,6 +2364,8 @@
|
|||||||
|
|
||||||
"lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
"lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
||||||
|
|
||||||
|
"lru-memoizer": ["lru-memoizer@2.3.0", "", { "dependencies": { "lodash.clonedeep": "^4.5.0", "lru-cache": "6.0.0" } }, "sha512-GXn7gyHAMhO13WSKrIiNfztwxodVsP8IoZ3XfrJV4yH2x0/OeTO/FIaAHTY5YekdGgW94njfuKmyyt1E0mR6Ug=="],
|
||||||
|
|
||||||
"make-cancellable-promise": ["make-cancellable-promise@1.3.2", "", {}, "sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww=="],
|
"make-cancellable-promise": ["make-cancellable-promise@1.3.2", "", {}, "sha512-GCXh3bq/WuMbS+Ky4JBPW1hYTOU+znU+Q5m9Pu+pI8EoUqIHk9+tviOKC6/qhHh8C4/As3tzJ69IF32kdz85ww=="],
|
||||||
|
|
||||||
"make-dir": ["make-dir@2.1.0", "", { "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="],
|
"make-dir": ["make-dir@2.1.0", "", { "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="],
|
||||||
@@ -2331,7 +2444,7 @@
|
|||||||
|
|
||||||
"midtrans-client": ["midtrans-client@1.4.2", "", { "dependencies": { "axios": "^0.26.0", "lodash": "^4.17.21" } }, "sha512-hGT6UDF6WsmOprJYdgxReT5qxOPj+9VGVbJTe6txYICkadI01yC1ApBlkf+5AH/2v4fWNo03421VVpNfJDFAyg=="],
|
"midtrans-client": ["midtrans-client@1.4.2", "", { "dependencies": { "axios": "^0.26.0", "lodash": "^4.17.21" } }, "sha512-hGT6UDF6WsmOprJYdgxReT5qxOPj+9VGVbJTe6txYICkadI01yC1ApBlkf+5AH/2v4fWNo03421VVpNfJDFAyg=="],
|
||||||
|
|
||||||
"mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="],
|
"mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],
|
||||||
|
|
||||||
"mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
"mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
||||||
|
|
||||||
@@ -2657,6 +2770,8 @@
|
|||||||
|
|
||||||
"prosemirror-view": ["prosemirror-view@1.38.0", "", { "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0" } }, "sha512-O45kxXQTaP9wPdXhp8TKqCR+/unS/gnfg9Q93svQcB3j0mlp2XSPAmsPefxHADwzC+fbNS404jqRxm3UQaGvgw=="],
|
"prosemirror-view": ["prosemirror-view@1.38.0", "", { "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", "prosemirror-transform": "^1.1.0" } }, "sha512-O45kxXQTaP9wPdXhp8TKqCR+/unS/gnfg9Q93svQcB3j0mlp2XSPAmsPefxHADwzC+fbNS404jqRxm3UQaGvgw=="],
|
||||||
|
|
||||||
|
"proto3-json-serializer": ["proto3-json-serializer@2.0.2", "", { "dependencies": { "protobufjs": "^7.2.5" } }, "sha512-SAzp/O4Yh02jGdRc+uIrGoe87dkN/XtwxfZ4ZyafJHymd79ozp5VG5nyZ7ygqPM5+cpLDjjGnYFUkngonyDPOQ=="],
|
||||||
|
|
||||||
"protobufjs": ["protobufjs@7.4.0", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw=="],
|
"protobufjs": ["protobufjs@7.4.0", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw=="],
|
||||||
|
|
||||||
"protocol-buffers-schema": ["protocol-buffers-schema@3.6.0", "", {}, "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="],
|
"protocol-buffers-schema": ["protocol-buffers-schema@3.6.0", "", {}, "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="],
|
||||||
@@ -2815,6 +2930,10 @@
|
|||||||
|
|
||||||
"retimer": ["retimer@3.0.0", "", {}, "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA=="],
|
"retimer": ["retimer@3.0.0", "", {}, "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA=="],
|
||||||
|
|
||||||
|
"retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="],
|
||||||
|
|
||||||
|
"retry-request": ["retry-request@7.0.2", "", { "dependencies": { "@types/request": "^2.48.8", "extend": "^3.0.2", "teeny-request": "^9.0.0" } }, "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w=="],
|
||||||
|
|
||||||
"reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],
|
"reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],
|
||||||
|
|
||||||
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
|
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
|
||||||
@@ -2951,6 +3070,10 @@
|
|||||||
|
|
||||||
"stream-buffers": ["stream-buffers@2.2.0", "", {}, "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="],
|
"stream-buffers": ["stream-buffers@2.2.0", "", {}, "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="],
|
||||||
|
|
||||||
|
"stream-events": ["stream-events@1.0.5", "", { "dependencies": { "stubs": "^3.0.0" } }, "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg=="],
|
||||||
|
|
||||||
|
"stream-shift": ["stream-shift@1.0.3", "", {}, "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ=="],
|
||||||
|
|
||||||
"streamsearch": ["streamsearch@1.1.0", "", {}, "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="],
|
"streamsearch": ["streamsearch@1.1.0", "", {}, "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="],
|
||||||
|
|
||||||
"string-at": ["string-at@1.1.0", "", { "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" } }, "sha512-jCpPowWKBn0NFdvtmK2qxK40Ol4jPcgCt8qYnKpPx6B5eDwHMDhRvq9MCsDEgsOTNtbXY6beAMHMRT2qPJXllA=="],
|
"string-at": ["string-at@1.1.0", "", { "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" } }, "sha512-jCpPowWKBn0NFdvtmK2qxK40Ol4jPcgCt8qYnKpPx6B5eDwHMDhRvq9MCsDEgsOTNtbXY6beAMHMRT2qPJXllA=="],
|
||||||
@@ -2991,8 +3114,12 @@
|
|||||||
|
|
||||||
"strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="],
|
"strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="],
|
||||||
|
|
||||||
|
"strnum": ["strnum@1.1.2", "", {}, "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA=="],
|
||||||
|
|
||||||
"structured-headers": ["structured-headers@0.4.1", "", {}, "sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg=="],
|
"structured-headers": ["structured-headers@0.4.1", "", {}, "sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg=="],
|
||||||
|
|
||||||
|
"stubs": ["stubs@3.0.0", "", {}, "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw=="],
|
||||||
|
|
||||||
"style-to-js": ["style-to-js@1.1.0", "", { "dependencies": { "style-to-object": "0.3.0" } }, "sha512-1OqefPDxGrlMwcbfpsTVRyzwdhr4W0uxYQzeA2F1CBc8WG04udg2+ybRnvh3XYL4TdHQrCahLtax2jc8xaE6rA=="],
|
"style-to-js": ["style-to-js@1.1.0", "", { "dependencies": { "style-to-object": "0.3.0" } }, "sha512-1OqefPDxGrlMwcbfpsTVRyzwdhr4W0uxYQzeA2F1CBc8WG04udg2+ybRnvh3XYL4TdHQrCahLtax2jc8xaE6rA=="],
|
||||||
|
|
||||||
"style-to-object": ["style-to-object@0.3.0", "", { "dependencies": { "inline-style-parser": "0.1.1" } }, "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA=="],
|
"style-to-object": ["style-to-object@0.3.0", "", { "dependencies": { "inline-style-parser": "0.1.1" } }, "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA=="],
|
||||||
@@ -3037,6 +3164,8 @@
|
|||||||
|
|
||||||
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
|
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
|
||||||
|
|
||||||
|
"teeny-request": ["teeny-request@9.0.0", "", { "dependencies": { "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "node-fetch": "^2.6.9", "stream-events": "^1.0.5", "uuid": "^9.0.0" } }, "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g=="],
|
||||||
|
|
||||||
"temp": ["temp@0.8.4", "", { "dependencies": { "rimraf": "~2.6.2" } }, "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg=="],
|
"temp": ["temp@0.8.4", "", { "dependencies": { "rimraf": "~2.6.2" } }, "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg=="],
|
||||||
|
|
||||||
"temp-dir": ["temp-dir@2.0.0", "", {}, "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg=="],
|
"temp-dir": ["temp-dir@2.0.0", "", {}, "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg=="],
|
||||||
@@ -3227,6 +3356,10 @@
|
|||||||
|
|
||||||
"webrtc-adapter": ["webrtc-adapter@9.0.1", "", { "dependencies": { "sdp": "^3.2.0" } }, "sha512-1AQO+d4ElfVSXyzNVTOewgGT/tAomwwztX/6e3totvyyzXPvXIIuUUjAmyZGbKBKbZOXauuJooZm3g6IuFuiNQ=="],
|
"webrtc-adapter": ["webrtc-adapter@9.0.1", "", { "dependencies": { "sdp": "^3.2.0" } }, "sha512-1AQO+d4ElfVSXyzNVTOewgGT/tAomwwztX/6e3totvyyzXPvXIIuUUjAmyZGbKBKbZOXauuJooZm3g6IuFuiNQ=="],
|
||||||
|
|
||||||
|
"websocket-driver": ["websocket-driver@0.7.4", "", { "dependencies": { "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg=="],
|
||||||
|
|
||||||
|
"websocket-extensions": ["websocket-extensions@0.1.4", "", {}, "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg=="],
|
||||||
|
|
||||||
"whatwg-fetch": ["whatwg-fetch@3.6.20", "", {}, "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg=="],
|
"whatwg-fetch": ["whatwg-fetch@3.6.20", "", {}, "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg=="],
|
||||||
|
|
||||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||||
@@ -3411,6 +3544,22 @@
|
|||||||
|
|
||||||
"@expo/xcpretty/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
"@expo/xcpretty/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="],
|
||||||
|
|
||||||
|
"@firebase/component/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@firebase/database/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@firebase/database-compat/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@firebase/logger/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@firebase/util/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@google-cloud/storage/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
||||||
|
|
||||||
|
"@google-cloud/storage/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||||
|
|
||||||
|
"@grpc/grpc-js/@grpc/proto-loader": ["@grpc/proto-loader@0.8.0", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.5.3", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ=="],
|
||||||
|
|
||||||
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
||||||
|
|
||||||
"@isaacs/cliui/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
"@isaacs/cliui/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
||||||
@@ -3467,6 +3616,12 @@
|
|||||||
|
|
||||||
"@swc/helpers/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"@swc/helpers/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"@types/jsonwebtoken/@types/node": ["@types/node@22.19.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ=="],
|
||||||
|
|
||||||
|
"@types/request/@types/node": ["@types/node@22.19.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ=="],
|
||||||
|
|
||||||
|
"@types/request/form-data": ["form-data@2.5.5", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.35", "safe-buffer": "^5.2.1" } }, "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||||
|
|
||||||
"aria-hidden/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"aria-hidden/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
@@ -3525,6 +3680,8 @@
|
|||||||
|
|
||||||
"duplexer2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
"duplexer2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||||
|
|
||||||
|
"duplexify/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||||
|
|
||||||
"ecdsa-sig-formatter/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
"ecdsa-sig-formatter/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
"engine.io-client/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
"engine.io-client/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
||||||
@@ -3581,12 +3738,20 @@
|
|||||||
|
|
||||||
"finalhandler/statuses": ["statuses@1.5.0", "", {}, "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="],
|
"finalhandler/statuses": ["statuses@1.5.0", "", {}, "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="],
|
||||||
|
|
||||||
|
"firebase-admin/@types/node": ["@types/node@22.19.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ=="],
|
||||||
|
|
||||||
|
"firebase-admin/uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="],
|
||||||
|
|
||||||
"fontkit/@swc/helpers": ["@swc/helpers@0.5.15", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],
|
"fontkit/@swc/helpers": ["@swc/helpers@0.5.15", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],
|
||||||
|
|
||||||
"formdata-node/web-streams-polyfill": ["web-streams-polyfill@4.0.0-beta.3", "", {}, "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug=="],
|
"formdata-node/web-streams-polyfill": ["web-streams-polyfill@4.0.0-beta.3", "", {}, "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug=="],
|
||||||
|
|
||||||
|
"gaxios/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||||
|
|
||||||
"gm/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
|
"gm/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
|
||||||
|
|
||||||
|
"google-gax/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||||
|
|
||||||
"has-ansi/ansi-regex": ["ansi-regex@2.1.1", "", {}, "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="],
|
"has-ansi/ansi-regex": ["ansi-regex@2.1.1", "", {}, "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="],
|
||||||
|
|
||||||
"html-dom-parser/htmlparser2": ["htmlparser2@7.2.0", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.2", "domutils": "^2.8.0", "entities": "^3.0.1" } }, "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog=="],
|
"html-dom-parser/htmlparser2": ["htmlparser2@7.2.0", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.2", "domutils": "^2.8.0", "entities": "^3.0.1" } }, "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog=="],
|
||||||
@@ -3595,6 +3760,8 @@
|
|||||||
|
|
||||||
"htmlparser2/domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="],
|
"htmlparser2/domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="],
|
||||||
|
|
||||||
|
"http-proxy-agent/agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
|
||||||
|
|
||||||
"hyperid/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
"hyperid/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
||||||
|
|
||||||
"hyperid/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
"hyperid/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||||
@@ -3611,6 +3778,8 @@
|
|||||||
|
|
||||||
"jwa/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
"jwa/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
|
"jwks-rsa/jose": ["jose@4.15.9", "", {}, "sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA=="],
|
||||||
|
|
||||||
"jws/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
"jws/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
"lighthouse-logger/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
"lighthouse-logger/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
||||||
@@ -3619,6 +3788,8 @@
|
|||||||
|
|
||||||
"log-symbols/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
|
"log-symbols/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
|
||||||
|
|
||||||
|
"lru-memoizer/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="],
|
||||||
|
|
||||||
"make-dir/pify": ["pify@4.0.1", "", {}, "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="],
|
"make-dir/pify": ["pify@4.0.1", "", {}, "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="],
|
||||||
|
|
||||||
"make-dir/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
"make-dir/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],
|
||||||
@@ -3697,6 +3868,8 @@
|
|||||||
|
|
||||||
"pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
|
"pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],
|
||||||
|
|
||||||
|
"proto3-json-serializer/protobufjs": ["protobufjs@7.5.4", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg=="],
|
||||||
|
|
||||||
"pvtsutils/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"pvtsutils/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
"rc/strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="],
|
"rc/strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="],
|
||||||
@@ -3739,6 +3912,8 @@
|
|||||||
|
|
||||||
"send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
"send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
||||||
|
|
||||||
|
"send/mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="],
|
||||||
|
|
||||||
"serve-static/send": ["send@0.19.0", "", { "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" } }, "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw=="],
|
"serve-static/send": ["send@0.19.0", "", { "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" } }, "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw=="],
|
||||||
|
|
||||||
"simple-plist/bplist-creator": ["bplist-creator@0.1.0", "", { "dependencies": { "stream-buffers": "2.2.x" } }, "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg=="],
|
"simple-plist/bplist-creator": ["bplist-creator@0.1.0", "", { "dependencies": { "stream-buffers": "2.2.x" } }, "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg=="],
|
||||||
@@ -3789,6 +3964,10 @@
|
|||||||
|
|
||||||
"tar-stream/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
"tar-stream/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||||
|
|
||||||
|
"teeny-request/https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],
|
||||||
|
|
||||||
|
"teeny-request/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||||
|
|
||||||
"temp/rimraf": ["rimraf@2.6.3", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "./bin.js" } }, "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA=="],
|
"temp/rimraf": ["rimraf@2.6.3", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "./bin.js" } }, "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA=="],
|
||||||
|
|
||||||
"tempy/type-fest": ["type-fest@0.16.0", "", {}, "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg=="],
|
"tempy/type-fest": ["type-fest@0.16.0", "", {}, "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg=="],
|
||||||
@@ -3813,8 +3992,12 @@
|
|||||||
|
|
||||||
"use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"web-push/jws": ["jws@4.0.0", "", { "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" } }, "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg=="],
|
||||||
|
|
||||||
"webcrypto-core/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"webcrypto-core/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"websocket-driver/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
"whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
"whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||||
|
|
||||||
"whatwg-url-without-unicode/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
"whatwg-url-without-unicode/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
||||||
@@ -3899,6 +4082,10 @@
|
|||||||
|
|
||||||
"@expo/prebuild-config/fs-extra/universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
|
"@expo/prebuild-config/fs-extra/universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
|
||||||
|
|
||||||
|
"@google-cloud/storage/p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
|
||||||
|
|
||||||
|
"@grpc/grpc-js/@grpc/proto-loader/protobufjs": ["protobufjs@7.5.4", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg=="],
|
||||||
|
|
||||||
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
|
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
|
||||||
|
|
||||||
"@isaacs/cliui/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
"@isaacs/cliui/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
|
||||||
@@ -3927,6 +4114,8 @@
|
|||||||
|
|
||||||
"@react-pdf/types/@react-pdf/stylesheet/@react-pdf/fns": ["@react-pdf/fns@3.1.1", "", {}, "sha512-fYvgOWWRxTdkCciLSla2iek8W/oDLhExPTLPw3aArGPJHgVUc86V2c3YLULNHIBuy/64QVpPLB7gwNkTEW5m/A=="],
|
"@react-pdf/types/@react-pdf/stylesheet/@react-pdf/fns": ["@react-pdf/fns@3.1.1", "", {}, "sha512-fYvgOWWRxTdkCciLSla2iek8W/oDLhExPTLPw3aArGPJHgVUc86V2c3YLULNHIBuy/64QVpPLB7gwNkTEW5m/A=="],
|
||||||
|
|
||||||
|
"@types/request/form-data/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
||||||
|
|
||||||
"blessed-contrib/chalk/ansi-styles": ["ansi-styles@2.2.1", "", {}, "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA=="],
|
"blessed-contrib/chalk/ansi-styles": ["ansi-styles@2.2.1", "", {}, "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA=="],
|
||||||
@@ -4029,12 +4218,16 @@
|
|||||||
|
|
||||||
"pkg-dir/find-up/locate-path": ["locate-path@3.0.0", "", { "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A=="],
|
"pkg-dir/find-up/locate-path": ["locate-path@3.0.0", "", { "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A=="],
|
||||||
|
|
||||||
|
"proto3-json-serializer/protobufjs/@types/node": ["@types/node@22.19.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ=="],
|
||||||
|
|
||||||
"send/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],
|
"send/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],
|
||||||
|
|
||||||
"serve-static/send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
"serve-static/send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
|
||||||
|
|
||||||
"serve-static/send/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="],
|
"serve-static/send/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="],
|
||||||
|
|
||||||
|
"serve-static/send/mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="],
|
||||||
|
|
||||||
"split-string/extend-shallow/is-extendable": ["is-extendable@1.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4" } }, "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA=="],
|
"split-string/extend-shallow/is-extendable": ["is-extendable@1.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4" } }, "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA=="],
|
||||||
|
|
||||||
"sucrase/glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
"sucrase/glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||||
@@ -4043,10 +4236,16 @@
|
|||||||
|
|
||||||
"tar/fs-minipass/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
|
"tar/fs-minipass/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
|
||||||
|
|
||||||
|
"teeny-request/https-proxy-agent/agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
|
||||||
|
|
||||||
"terminal-link/ansi-escapes/type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="],
|
"terminal-link/ansi-escapes/type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="],
|
||||||
|
|
||||||
"through2/readable-stream/string_decoder": ["string_decoder@0.10.31", "", {}, "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="],
|
"through2/readable-stream/string_decoder": ["string_decoder@0.10.31", "", {}, "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="],
|
||||||
|
|
||||||
|
"web-push/jws/jwa": ["jwa@2.0.0", "", { "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA=="],
|
||||||
|
|
||||||
|
"web-push/jws/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||||
|
|
||||||
"wibu-pkg/@mantine/core/@floating-ui/react": ["@floating-ui/react@0.26.28", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.2", "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw=="],
|
"wibu-pkg/@mantine/core/@floating-ui/react": ["@floating-ui/react@0.26.28", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.2", "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw=="],
|
||||||
|
|
||||||
"wibu-pkg/@mantine/core/react-textarea-autosize": ["react-textarea-autosize@8.5.6", "", { "dependencies": { "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", "use-latest": "^1.2.1" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-aT3ioKXMa8f6zHYGebhbdMD2L00tKeRX1zuVuDx9YQK/JLLRSaSxq3ugECEmUB9z2kvk6bFSIoRHLkkUv0RJiw=="],
|
"wibu-pkg/@mantine/core/react-textarea-autosize": ["react-textarea-autosize@8.5.6", "", { "dependencies": { "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", "use-latest": "^1.2.1" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-aT3ioKXMa8f6zHYGebhbdMD2L00tKeRX1zuVuDx9YQK/JLLRSaSxq3ugECEmUB9z2kvk6bFSIoRHLkkUv0RJiw=="],
|
||||||
@@ -4103,6 +4302,8 @@
|
|||||||
|
|
||||||
"@expo/metro-config/glob/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
"@expo/metro-config/glob/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
||||||
|
|
||||||
|
"@grpc/grpc-js/@grpc/proto-loader/protobufjs/@types/node": ["@types/node@22.19.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ=="],
|
||||||
|
|
||||||
"@istanbuljs/load-nyc-config/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
"@istanbuljs/load-nyc-config/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||||
|
|
||||||
"@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser/hermes-estree": ["hermes-estree@0.23.1", "", {}, "sha512-eT5MU3f5aVhTqsfIReZ6n41X5sYn4IdQL0nvz6yO+MMlPxw49aSARHLg/MSehQftyjnrE8X6bYregzSumqc6cg=="],
|
"@react-native/babel-plugin-codegen/@react-native/codegen/hermes-parser/hermes-estree": ["hermes-estree@0.23.1", "", {}, "sha512-eT5MU3f5aVhTqsfIReZ6n41X5sYn4IdQL0nvz6yO+MMlPxw49aSARHLg/MSehQftyjnrE8X6bYregzSumqc6cg=="],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hipmi",
|
"name": "hipmi",
|
||||||
"version": "1.5.22",
|
"version": "1.5.39",
|
||||||
"private": true,
|
"private": true,
|
||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "bun prisma/seed.ts"
|
"seed": "bun prisma/seed.ts"
|
||||||
@@ -61,6 +61,7 @@
|
|||||||
"echarts-for-react": "^3.0.2",
|
"echarts-for-react": "^3.0.2",
|
||||||
"embla-carousel-react": "^8.0.0-rc14",
|
"embla-carousel-react": "^8.0.0-rc14",
|
||||||
"eslint-config-next": "^13.5.4",
|
"eslint-config-next": "^13.5.4",
|
||||||
|
"firebase-admin": "^13.6.0",
|
||||||
"iron-session": "^6.3.1",
|
"iron-session": "^6.3.1",
|
||||||
"jose": "^5.9.2",
|
"jose": "^5.9.2",
|
||||||
"jotai": "^2.4.3",
|
"jotai": "^2.4.3",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "User" ADD COLUMN "acceptedForumTermsAt" TIMESTAMP(3),
|
||||||
|
ADD COLUMN "acceptedTermsAt" TIMESTAMP(3);
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Notifikasi" ADD COLUMN "deepLink" TEXT,
|
||||||
|
ADD COLUMN "readAt" TIMESTAMP(3);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "TokenUserDevice" (
|
||||||
|
"id" TEXT NOT NULL,
|
||||||
|
"isActive" BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||||
|
"platform" TEXT,
|
||||||
|
"deviceId" TEXT,
|
||||||
|
"model" TEXT,
|
||||||
|
"appVersion" TEXT,
|
||||||
|
"token" TEXT NOT NULL,
|
||||||
|
"userId" TEXT,
|
||||||
|
|
||||||
|
CONSTRAINT "TokenUserDevice_pkey" PRIMARY KEY ("id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "TokenUserDevice_userId_idx" ON "TokenUserDevice"("userId");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "TokenUserDevice_token_idx" ON "TokenUserDevice"("token");
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "TokenUserDevice" ADD CONSTRAINT "TokenUserDevice_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Donasi_Invoice" ALTER COLUMN "masterBankId" DROP DEFAULT;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Notifikasi" ADD COLUMN "type" TEXT;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Notifikasi" DROP CONSTRAINT "Notifikasi_userRoleId_fkey";
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Notifikasi" ADD COLUMN "recipientId" TEXT,
|
||||||
|
ADD COLUMN "senderId" TEXT,
|
||||||
|
ALTER COLUMN "userRoleId" DROP NOT NULL;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Notifikasi" ADD CONSTRAINT "Notifikasi_userRoleId_fkey" FOREIGN KEY ("userRoleId") REFERENCES "MasterUserRole"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Notifikasi" ADD CONSTRAINT "Notifikasi_recipientId_fkey" FOREIGN KEY ("recipientId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Notifikasi" ADD CONSTRAINT "Notifikasi_senderId_fkey" FOREIGN KEY ("senderId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Notifikasi" ALTER COLUMN "appId" DROP NOT NULL,
|
||||||
|
ALTER COLUMN "kategoriApp" DROP NOT NULL,
|
||||||
|
ALTER COLUMN "pesan" DROP NOT NULL;
|
||||||
@@ -55,6 +55,14 @@ model User {
|
|||||||
|
|
||||||
blockedUsers BlockedUser[] @relation("Blocking")
|
blockedUsers BlockedUser[] @relation("Blocking")
|
||||||
blockedBy BlockedUser[] @relation("BlockedBy")
|
blockedBy BlockedUser[] @relation("BlockedBy")
|
||||||
|
|
||||||
|
acceptedTermsAt DateTime?
|
||||||
|
acceptedForumTermsAt DateTime?
|
||||||
|
tokenUserDevices TokenUserDevice[]
|
||||||
|
|
||||||
|
// For Mobile App
|
||||||
|
NotificationRecipient Notifikasi[] @relation("NotificationRecipient")
|
||||||
|
NotificationSender Notifikasi[] @relation("NotificationSender")
|
||||||
}
|
}
|
||||||
|
|
||||||
model MasterUserRole {
|
model MasterUserRole {
|
||||||
@@ -583,7 +591,7 @@ model Donasi_Invoice {
|
|||||||
|
|
||||||
imageId String?
|
imageId String?
|
||||||
MasterBank MasterBank? @relation(fields: [masterBankId], references: [id])
|
MasterBank MasterBank? @relation(fields: [masterBankId], references: [id])
|
||||||
masterBankId String? @default("null")
|
masterBankId String?
|
||||||
}
|
}
|
||||||
|
|
||||||
model Donasi_Kabar {
|
model Donasi_Kabar {
|
||||||
@@ -974,20 +982,32 @@ model Notifikasi {
|
|||||||
isActive Boolean @default(true)
|
isActive Boolean @default(true)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
isRead Boolean @default(false)
|
appId String?
|
||||||
appId String
|
kategoriApp String?
|
||||||
kategoriApp String
|
pesan String?
|
||||||
pesan String
|
|
||||||
title String?
|
title String?
|
||||||
status String?
|
status String?
|
||||||
|
|
||||||
|
isRead Boolean @default(false)
|
||||||
|
readAt DateTime? // kapan user membaca notifikasi ini
|
||||||
|
deepLink String? // misal: "announcement/123", "user/profile/cmha6wb9w0001cfndwl9fcse6"
|
||||||
|
type String?
|
||||||
|
|
||||||
Role MasterUserRole? @relation(fields: [userRoleId], references: [id])
|
Role MasterUserRole? @relation(fields: [userRoleId], references: [id])
|
||||||
userRoleId String
|
userRoleId String?
|
||||||
|
|
||||||
User User? @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser")
|
User User? @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser")
|
||||||
userId String?
|
userId String?
|
||||||
Admin User? @relation("AdminNotifikasi", fields: [adminId], references: [id], map: "NotifikasiAdmin")
|
Admin User? @relation("AdminNotifikasi", fields: [adminId], references: [id], map: "NotifikasiAdmin")
|
||||||
adminId String?
|
adminId String?
|
||||||
|
|
||||||
|
// Recipient (user who receives the notification)
|
||||||
|
recipient User? @relation("NotificationRecipient", fields: [recipientId], references: [id])
|
||||||
|
recipientId String?
|
||||||
|
|
||||||
|
// Sender (user who sent the notification)
|
||||||
|
sender User? @relation("NotificationSender", fields: [senderId], references: [id])
|
||||||
|
senderId String?
|
||||||
}
|
}
|
||||||
|
|
||||||
// MAPS
|
// MAPS
|
||||||
@@ -1096,3 +1116,22 @@ model BlockedUser {
|
|||||||
|
|
||||||
@@unique([blockerId, blockedId])
|
@@unique([blockerId, blockedId])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model TokenUserDevice {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
isActive Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
|
platform String? // "ios" | "android"
|
||||||
|
deviceId String? // UUID unik dari device (misal: dari expo-device)
|
||||||
|
model String? // "iPhone15,4", "Pixel 7", dll
|
||||||
|
appVersion String? // "1.5.15" — sangat berguna saat debug
|
||||||
|
|
||||||
|
token String @db.Text
|
||||||
|
user User? @relation(fields: [userId], references: [id])
|
||||||
|
userId String?
|
||||||
|
|
||||||
|
@@index([userId])
|
||||||
|
@@index([token]) // untuk pencarian cepat & deduplikasi
|
||||||
|
}
|
||||||
|
|||||||
1098
prisma/schema.prisma.backup
Normal file
1098
prisma/schema.prisma.backup
Normal file
File diff suppressed because it is too large
Load Diff
@@ -295,7 +295,7 @@
|
|||||||
<p>You have the right to request access to the personal information we collect from you, details about how we have processed it, correct inaccuracies, or delete your personal information. You may also have the right to withdraw your consent to our processing of your personal information. These rights may be limited in some circumstances by applicable law.</p>
|
<p>You have the right to request access to the personal information we collect from you, details about how we have processed it, correct inaccuracies, or delete your personal information. You may also have the right to withdraw your consent to our processing of your personal information. These rights may be limited in some circumstances by applicable law.</p>
|
||||||
<p>To make a request, please contact us at <a href="mailto:bip.baliinteraktifperkasa@gmail.com">bip.baliinteraktifperkasa@gmail.com</a>.</p>
|
<p>To make a request, please contact us at <a href="mailto:bip.baliinteraktifperkasa@gmail.com">bip.baliinteraktifperkasa@gmail.com</a>.</p>
|
||||||
<hr style="margin: 30px 0; border: 0; border-top: 1px solid #eee;">
|
<hr style="margin: 30px 0; border: 0; border-top: 1px solid #eee;">
|
||||||
<p>© 2025 Bali Interaktif Perkasa. All rights reserved.</p>
|
<p>© 2026 Bali Interaktif Perkasa. All rights reserved.</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>© 2025 Bali Interaktif Perkasa. All rights reserved.</p>
|
<p>© 2026 Bali Interaktif Perkasa. All rights reserved.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -2,12 +2,13 @@ import { prisma } from "@/lib";
|
|||||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||||
import backendLogger from "@/util/backendLogger";
|
import backendLogger from "@/util/backendLogger";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { funSendToWhatsApp } from "@/lib/code-otp-sender";
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
export async function POST(req: Request) {
|
||||||
if (req.method !== "POST") {
|
if (req.method !== "POST") {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Method Not Allowed" },
|
{ success: false, message: "Method Not Allowed" },
|
||||||
{ status: 405 }
|
{ status: 405 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,32 +27,30 @@ export async function POST(req: Request) {
|
|||||||
if (!createOtpId)
|
if (!createOtpId)
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Gagal mengirim kode OTP" },
|
{ success: false, message: "Gagal mengirim kode OTP" },
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%5Cn%5Cn%3E%3E%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
const resSendCode = await funSendToWhatsApp({
|
||||||
// const encodedMsg = encodeURIComponent(msg);
|
nomor,
|
||||||
|
codeOtp: codeOtp.toString(),
|
||||||
|
});
|
||||||
|
|
||||||
const res = await fetch(
|
if (resSendCode.status !== 200)
|
||||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${msg}`,
|
|
||||||
{ cache: "no-cache" }
|
|
||||||
);
|
|
||||||
|
|
||||||
const sendWa = await res.json();
|
|
||||||
|
|
||||||
if (sendWa.status !== "success")
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const sendWa = await resSendCode.text();
|
||||||
|
console.log("WA Response:", sendWa);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Kode verifikasi terkirim",
|
message: "Kode verifikasi terkirim",
|
||||||
kodeId: createOtpId.id,
|
kodeId: createOtpId.id,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
backendLogger.log("Error Login", error);
|
backendLogger.log("Error Login", error);
|
||||||
@@ -61,7 +60,7 @@ export async function POST(req: Request) {
|
|||||||
message: "Terjadi masalah saat login",
|
message: "Terjadi masalah saat login",
|
||||||
reason: error as Error,
|
reason: error as Error,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
54
src/app/api/auth/mobile-eula/route.tsx
Normal file
54
src/app/api/auth/mobile-eula/route.tsx
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { prisma } from "@/lib";
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function POST(req: Request) {
|
||||||
|
try {
|
||||||
|
const { nomor } = await req.json();
|
||||||
|
|
||||||
|
const user = await prisma.user.findUnique({
|
||||||
|
where: {
|
||||||
|
nomor: nomor,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!user)
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "User belum terdaftar",
|
||||||
|
status: 404,
|
||||||
|
});
|
||||||
|
|
||||||
|
const updateTerms = await prisma.user.update({
|
||||||
|
where: { nomor: nomor },
|
||||||
|
data: {
|
||||||
|
termsOfServiceAccepted: true,
|
||||||
|
acceptedTermsAt: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!updateTerms) {
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Gagal setujui syarat dan ketentuan",
|
||||||
|
status: 400,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: true,
|
||||||
|
message: "Anda telah setujui syarat dan ketentuan",
|
||||||
|
},
|
||||||
|
{ status: 200 }
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: false,
|
||||||
|
message: "Terjadi masalah saat setujui syarat dan ketentuan",
|
||||||
|
reason: error as Error,
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { funSendToWhatsApp } from "@/lib/code-otp-sender";
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
export async function POST(req: Request) {
|
||||||
try {
|
try {
|
||||||
const codeOtp = randomOTP();
|
const codeOtp = randomOTP();
|
||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
console.log("[Masuk API]", body);
|
|
||||||
const { nomor } = body;
|
const { nomor } = body;
|
||||||
|
|
||||||
const user = await prisma.user.findUnique({
|
const user = await prisma.user.findUnique({
|
||||||
@@ -15,9 +15,6 @@ export async function POST(req: Request) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(["cek user", user]);
|
|
||||||
console.log(["cek nomor", nomor]);
|
|
||||||
|
|
||||||
if (!user)
|
if (!user)
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: false,
|
success: false,
|
||||||
@@ -35,30 +32,21 @@ export async function POST(req: Request) {
|
|||||||
if (!createOtpId)
|
if (!createOtpId)
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Gagal mengirim kode OTP" },
|
{ success: false, message: "Gagal mengirim kode OTP" },
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
// const msg = `HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPAADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.\n\n\n> Kode OTP anda: ${codeOtp}.`;
|
const resSendCode = await funSendToWhatsApp({
|
||||||
// const encodedMsg = encodeURIComponent(msg);
|
nomor,
|
||||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
codeOtp: codeOtp.toString(),
|
||||||
|
});
|
||||||
|
|
||||||
const res = await fetch(
|
if (resSendCode.status !== 200)
|
||||||
`https://cld-dkr-prod-wajs-server.wibudev.com/api/wa/code?nom=${nomor}&text=${msg}`,
|
|
||||||
{
|
|
||||||
cache: "no-cache",
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${process.env.WA_SERVER_TOKEN}`,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.status !== 200)
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const sendWa = await res.text();
|
const sendWa = await resSendCode.text();
|
||||||
console.log("WA Response:", sendWa);
|
console.log("WA Response:", sendWa);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -66,8 +54,9 @@ export async function POST(req: Request) {
|
|||||||
success: true,
|
success: true,
|
||||||
message: "Kode verifikasi terkirim",
|
message: "Kode verifikasi terkirim",
|
||||||
kodeId: createOtpId.id,
|
kodeId: createOtpId.id,
|
||||||
|
isAcceptTerms: user.termsOfServiceAccepted,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -76,7 +65,7 @@ export async function POST(req: Request) {
|
|||||||
message: "Terjadi masalah saat login",
|
message: "Terjadi masalah saat login",
|
||||||
reason: error as Error,
|
reason: error as Error,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import { sessionCreate } from "@/app/(auth)/_lib/session_create";
|
|
||||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../types/type-mobile-notification";
|
||||||
|
import { funSendToWhatsApp } from "@/lib/code-otp-sender";
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
export async function POST(req: Request) {
|
||||||
if (req.method !== "POST") {
|
if (req.method !== "POST") {
|
||||||
@@ -41,6 +47,7 @@ export async function POST(req: Request) {
|
|||||||
nomor: data.nomor,
|
nomor: data.nomor,
|
||||||
active: false,
|
active: false,
|
||||||
termsOfServiceAccepted: data.termsOfServiceAccepted,
|
termsOfServiceAccepted: data.termsOfServiceAccepted,
|
||||||
|
acceptedTermsAt: new Date(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -50,12 +57,6 @@ export async function POST(req: Request) {
|
|||||||
{ status: 500 }
|
{ status: 500 }
|
||||||
);
|
);
|
||||||
|
|
||||||
// const token = await sessionCreate({
|
|
||||||
// sessionKey: process.env.NEXT_PUBLIC_BASE_SESSION_KEY!,
|
|
||||||
// encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
|
||||||
// user: createUser as any,
|
|
||||||
// });
|
|
||||||
|
|
||||||
const createOtpId = await prisma.kodeOtp.create({
|
const createOtpId = await prisma.kodeOtp.create({
|
||||||
data: {
|
data: {
|
||||||
nomor: data.nomor,
|
nomor: data.nomor,
|
||||||
@@ -69,28 +70,58 @@ export async function POST(req: Request) {
|
|||||||
{ status: 400 }
|
{ status: 400 }
|
||||||
);
|
);
|
||||||
|
|
||||||
// const msg = `HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPAADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.\n\n\n> Kode OTP anda: ${codeOtp}.`;
|
const resSendCode = await funSendToWhatsApp({
|
||||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
nomor: data.nomor,
|
||||||
// // const encodedMsg = encodeURIComponent(msg);
|
codeOtp: codeOtp.toString(),
|
||||||
|
});
|
||||||
|
|
||||||
const res = await fetch(
|
if (resSendCode.status !== 200)
|
||||||
`https://wa.wibudev.com/code?nom=${data.nomor}&text=${msg}`,
|
|
||||||
{ cache: "no-cache" }
|
|
||||||
);
|
|
||||||
|
|
||||||
const sendWa = await res.json();
|
|
||||||
|
|
||||||
if (sendWa.status !== "success")
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const sendWa = await resSendCode.text();
|
||||||
|
console.log("WA Response:", sendWa);
|
||||||
|
|
||||||
|
|
||||||
|
// =========== START SEND NOTIFICATION =========== //
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("Users to notify:", adminUsers);
|
||||||
|
|
||||||
|
const dataNotification = {
|
||||||
|
title: "Pendaftaran Baru",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "OTHER",
|
||||||
|
createdAt: new Date(),
|
||||||
|
pesan: "User baru telah melakukan registrasi. Ayo cek dan verifikasi!",
|
||||||
|
deepLink: `/admin/user-access/${createUser.id}`,
|
||||||
|
senderId: createUser.id,
|
||||||
|
};
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pendaftaran User Baru" as NotificationMobileTitleType,
|
||||||
|
body: "User baru telah melakukan registrasi. Ayo cek dan verifikasi!" as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.userAccess({ id: createUser.id }),
|
||||||
|
kategoriApp: "OTHER",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// =========== END SEND NOTIFICATION =========== //
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Registrasi Berhasil",
|
message: "Registrasi Berhasil",
|
||||||
// token: token,
|
|
||||||
kodeId: createOtpId.id,
|
kodeId: createOtpId.id,
|
||||||
},
|
},
|
||||||
{ status: 201 }
|
{ status: 201 }
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import { prisma } from "@/lib";
|
|||||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||||
import backendLogger from "@/util/backendLogger";
|
import backendLogger from "@/util/backendLogger";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { funSendToWhatsApp } from "@/lib/code-otp-sender";
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
export async function POST(req: Request) {
|
||||||
if (req.method !== "POST") {
|
if (req.method !== "POST") {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ success: false, message: "Method Not Allowed" },
|
{ success: false, message: "Method Not Allowed" },
|
||||||
{ status: 405 }
|
{ status: 405 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,24 +17,20 @@ export async function POST(req: Request) {
|
|||||||
const body = await req.json();
|
const body = await req.json();
|
||||||
const { nomor } = body;
|
const { nomor } = body;
|
||||||
|
|
||||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%5Cn%5Cn%3E%3E%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
const resSendCode = await funSendToWhatsApp({
|
||||||
|
nomor,
|
||||||
|
codeOtp: codeOtp.toString(),
|
||||||
|
});
|
||||||
|
|
||||||
const res = await fetch(
|
if (resSendCode.status !== 200)
|
||||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${msg}`,
|
|
||||||
{ cache: "no-cache" }
|
|
||||||
);
|
|
||||||
|
|
||||||
const sendWa = await res.json();
|
|
||||||
|
|
||||||
if (sendWa.status !== "success")
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{ success: false, message: "Nomor Whatsapp Tidak Aktif" },
|
||||||
success: false,
|
{ status: 400 },
|
||||||
message: "Nomor Whatsapp Tidak Aktif",
|
|
||||||
},
|
|
||||||
{ status: 400 }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const sendWa = await resSendCode.text();
|
||||||
|
console.log("WA Response:", sendWa);
|
||||||
|
|
||||||
const createOtpId = await prisma.kodeOtp.create({
|
const createOtpId = await prisma.kodeOtp.create({
|
||||||
data: {
|
data: {
|
||||||
nomor: nomor,
|
nomor: nomor,
|
||||||
@@ -47,7 +44,7 @@ export async function POST(req: Request) {
|
|||||||
success: false,
|
success: false,
|
||||||
message: "Gagal Membuat Kode OTP",
|
message: "Gagal Membuat Kode OTP",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -56,7 +53,7 @@ export async function POST(req: Request) {
|
|||||||
message: "Kode Verifikasi Dikirim",
|
message: "Kode Verifikasi Dikirim",
|
||||||
kodeId: createOtpId.id,
|
kodeId: createOtpId.id,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
backendLogger.error(" Error Resend OTP", error);
|
backendLogger.error(" Error Resend OTP", error);
|
||||||
@@ -65,7 +62,7 @@ export async function POST(req: Request) {
|
|||||||
success: false,
|
success: false,
|
||||||
message: "Server Whatsapp Error !!",
|
message: "Server Whatsapp Error !!",
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
await prisma.$disconnect();
|
await prisma.$disconnect();
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
select: {
|
select: {
|
||||||
User: {
|
User: {
|
||||||
select: {
|
select: {
|
||||||
|
nomor: true,
|
||||||
username: true,
|
username: true,
|
||||||
id: true,
|
id: true,
|
||||||
Profile: {
|
Profile: {
|
||||||
|
|||||||
@@ -1,11 +1,22 @@
|
|||||||
|
import { funFindDonaturList } from "@/lib/mobile/donation/find-donatur-list";
|
||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET };
|
export { POST, GET };
|
||||||
|
|
||||||
async function POST(request: Request, { params }: { params: { id: string } }) {
|
async function POST(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { title, nominalCair, deskripsi, imageId, authorId } = data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const dataDonasi = await prisma.donasi.findUnique({
|
const dataDonasi = await prisma.donasi.findUnique({
|
||||||
@@ -22,19 +33,19 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: false,
|
success: false,
|
||||||
message: "Pencarian Donasi Gagal",
|
message: "DataPencarian Donasi Gagal",
|
||||||
reason: "Pencarian Donasi Gagal",
|
reason: "Data Pencarian Donasi Gagal",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const createPencairan = await prisma.donasi_PencairanDana.create({
|
const createPencairan = await prisma.donasi_PencairanDana.create({
|
||||||
data: {
|
data: {
|
||||||
donasiId: id,
|
donasiId: id,
|
||||||
nominalCair: +data.nominalCair,
|
nominalCair: +nominalCair,
|
||||||
deskripsi: data.deskripsi,
|
deskripsi: deskripsi,
|
||||||
title: data.title,
|
title: title,
|
||||||
imageId: data.imageId,
|
imageId: imageId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -45,11 +56,11 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Pencairan Dana Gagal",
|
message: "Pencairan Dana Gagal",
|
||||||
reason: "Pencairan Dana Gagal",
|
reason: "Pencairan Dana Gagal",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasilTotalPencairan =
|
const hasilTotalPencairan =
|
||||||
Number(dataDonasi.totalPencairan) + Number(data.nominalCair);
|
Number(dataDonasi.totalPencairan) + Number(nominalCair);
|
||||||
// const hasilAkumulasiPencairan = Number(dataDonasi.akumulasiPencairan) + 1;
|
// const hasilAkumulasiPencairan = Number(dataDonasi.akumulasiPencairan) + 1;
|
||||||
|
|
||||||
const countPencairan = await prisma.donasi_PencairanDana.count({
|
const countPencairan = await prisma.donasi_PencairanDana.count({
|
||||||
@@ -66,8 +77,47 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
akumulasiPencairan: countPencairan,
|
akumulasiPencairan: countPencairan,
|
||||||
totalPencairan: hasilTotalPencairan,
|
totalPencairan: hasilTotalPencairan,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
title: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ================= START SEND NOTIFICATION =================
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateDonasi?.authorId!,
|
||||||
|
senderId: authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pencairan Dana Berhasil" as NotificationMobileTitleType,
|
||||||
|
body: `Telah dilaksanakan pencairan dana untuk ${updateDonasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationDetailPublish({
|
||||||
|
id: id,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const recipientIds = await funFindDonaturList(id);
|
||||||
|
|
||||||
|
if (recipientIds.length > 0) {
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds,
|
||||||
|
senderId: authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pencarian Dana" as NotificationMobileTitleType,
|
||||||
|
body: `Update pencarian dana pada ${updateDonasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationDetailPublish({
|
||||||
|
id: id,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ================= END SEND NOTIFICATION =================
|
||||||
|
|
||||||
if (!updateDonasi)
|
if (!updateDonasi)
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
@@ -75,7 +125,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Update Donasi Gagal",
|
message: "Update Donasi Gagal",
|
||||||
reason: "Update Donasi Gagal",
|
reason: "Update Donasi Gagal",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -84,7 +134,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Pencairan Dana Berhasil",
|
message: "Pencairan Dana Berhasil",
|
||||||
// data: data,
|
// data: data,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[ERROR]", error);
|
console.error("[ERROR]", error);
|
||||||
@@ -94,7 +144,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Pencairan Dana Gagal",
|
message: "Pencairan Dana Gagal",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,7 +160,6 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
console.log("[CATEGORY]", category);
|
console.log("[CATEGORY]", category);
|
||||||
let fixData;
|
let fixData;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (category === "get-all") {
|
if (category === "get-all") {
|
||||||
fixData = await prisma.donasi_PencairanDana.findMany({
|
fixData = await prisma.donasi_PencairanDana.findMany({
|
||||||
take: page ? takeData : undefined,
|
take: page ? takeData : undefined,
|
||||||
@@ -140,7 +189,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Category tidak ditemukan",
|
message: "Category tidak ditemukan",
|
||||||
reason: "Category tidak ditemukan",
|
reason: "Category tidak ditemukan",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +199,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Success get data disbursement",
|
message: "Success get data disbursement",
|
||||||
data: fixData,
|
data: fixData,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[ERROR]", error);
|
console.error("[ERROR]", error);
|
||||||
@@ -160,7 +209,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Gagal mendapatkan data disbursement",
|
message: "Gagal mendapatkan data disbursement",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { NotificationMobileBodyType, NotificationMobileTitleType } from "../../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -50,6 +53,7 @@ async function GET(req: Request, { params }: { params: { id: string } }) {
|
|||||||
interface DataType {
|
interface DataType {
|
||||||
donationId: string;
|
donationId: string;
|
||||||
nominal: number;
|
nominal: number;
|
||||||
|
senderId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function PUT(req: Request, { params }: { params: { id: string } }) {
|
async function PUT(req: Request, { params }: { params: { id: string } }) {
|
||||||
@@ -111,6 +115,9 @@ async function PUT(req: Request, { params }: { params: { id: string } }) {
|
|||||||
data: {
|
data: {
|
||||||
donasiMaster_StatusInvoiceId: checkStatusTransaksi.id,
|
donasiMaster_StatusInvoiceId: checkStatusTransaksi.id,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!updateInvoice) {
|
if (!updateInvoice) {
|
||||||
@@ -154,6 +161,38 @@ async function PUT(req: Request, { params }: { params: { id: string } }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SEND NOTIFICATION: to donatur
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateInvoice?.authorId as string,
|
||||||
|
senderId: data?.senderId || "",
|
||||||
|
payload: {
|
||||||
|
title: "Transaksi Berhasil" as NotificationMobileTitleType,
|
||||||
|
body: `Selamat anda menjadi donatur pada ${updateDonasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationTransaction,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION: to creator
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateDonasi?.authorId as any,
|
||||||
|
senderId: data?.senderId || "",
|
||||||
|
payload: {
|
||||||
|
title: "Ada Donatur Baru !" as NotificationMobileTitleType,
|
||||||
|
body: `Cek daftar donatur pada ${updateDonasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationDetailPublish({
|
||||||
|
id: updateDonasi?.id as string,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -48,7 +57,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
DonasiMaster_StatusInvoice: {
|
DonasiMaster_StatusInvoice: {
|
||||||
name: "Berhasil",
|
name: "Berhasil",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -60,7 +69,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
donatur: successInvoice,
|
donatur: successInvoice,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -69,7 +78,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Error get detail Investasi",
|
message: "Error get detail Investasi",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,6 +86,10 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { catatan, senderId } = data;
|
||||||
|
console.log("[PUT CATATAN]", catatan);
|
||||||
|
console.log("[PUT SENDER ID]", senderId);
|
||||||
|
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const status = searchParams.get("status");
|
const status = searchParams.get("status");
|
||||||
const fixStatus = _.startCase(status as string);
|
const fixStatus = _.startCase(status as string);
|
||||||
@@ -102,7 +115,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Error update data event",
|
message: "Error update data event",
|
||||||
reason: "Status not found",
|
reason: "Status not found",
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
|
|
||||||
if (fixStatus === "Reject") {
|
if (fixStatus === "Reject") {
|
||||||
@@ -111,11 +124,24 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
catatan: data,
|
catatan: catatan,
|
||||||
donasiMaster_StatusDonasiId: checkStatus.id,
|
donasiMaster_StatusDonasiId: checkStatus.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Ditolak",
|
||||||
|
body: "Mohon perbaiki data sesuai catatan penolakan !",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationByStatus({ status: "reject" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateData;
|
fixData = updateData;
|
||||||
} else if (fixStatus === "Publish") {
|
} else if (fixStatus === "Publish") {
|
||||||
const updateData = await prisma.donasi.update({
|
const updateData = await prisma.donasi.update({
|
||||||
@@ -128,6 +154,39 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICAtION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Review Selesai",
|
||||||
|
body: `Donasi kamu telah dipublikasikan ! ${updateData.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationByStatus({ status: "publish" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const allUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
NOT: { id: updateData.authorId as any },
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: allUsers.map((user) => user.id),
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Ayo Cek Donasi Terbaru" as NotificationMobileTitleType,
|
||||||
|
body: `${updateData.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationDetailPublish({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateData;
|
fixData = updateData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +196,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Data Donasi Berhasil Diambil",
|
message: "Data Donasi Berhasil Diambil",
|
||||||
data: data,
|
data: data,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -146,7 +205,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Error get detail Investasi",
|
message: "Error get detail Investasi",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import prisma from "@/lib/prisma";
|
||||||
|
|
||||||
export { GET };
|
export { GET };
|
||||||
|
|
||||||
@@ -12,7 +13,6 @@ async function GET(request: Request) {
|
|||||||
const skipData = Number(page) * takeData - takeData;
|
const skipData = Number(page) * takeData - takeData;
|
||||||
console.log("[CATEGORY]", category);
|
console.log("[CATEGORY]", category);
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (category === "dashboard") {
|
if (category === "dashboard") {
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Event: {
|
||||||
|
select: {
|
||||||
|
tanggal: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -57,6 +66,8 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { catatan, senderId } = data;
|
||||||
|
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const status = searchParams.get("status");
|
const status = searchParams.get("status");
|
||||||
const fixStatus = _.startCase(status as string);
|
const fixStatus = _.startCase(status as string);
|
||||||
@@ -89,11 +100,23 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
catatan: data,
|
catatan: catatan,
|
||||||
eventMaster_StatusId: checkStatus.id,
|
eventMaster_StatusId: checkStatus.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Ditolak",
|
||||||
|
body: "Mohon perbaiki data sesuai catatan penolakan !",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "EVENT",
|
||||||
|
deepLink: routeUserMobile.eventByStatus({status: "reject"}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateData;
|
fixData = updateData;
|
||||||
} else if (fixStatus === "Publish") {
|
} else if (fixStatus === "Publish") {
|
||||||
const updateData = await prisma.event.update({
|
const updateData = await prisma.event.update({
|
||||||
@@ -105,6 +128,38 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Review Selesai",
|
||||||
|
body: "Event kamu telah dipublikasikan !" as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "EVENT",
|
||||||
|
deepLink: routeUserMobile.eventByStatus({status: "publish"}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "1",
|
||||||
|
NOT: { id: updateData.authorId as any },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Event Baru" as NotificationMobileTitleType,
|
||||||
|
body: `${updateData.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "EVENT",
|
||||||
|
deepLink: routeUserMobile.eventDetailPublised({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateData;
|
fixData = updateData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ async function GET(request: Request) {
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
title: true,
|
title: true,
|
||||||
|
tanggal: true,
|
||||||
Author: {
|
Author: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -82,21 +88,43 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
const data = await request.json();
|
||||||
|
|
||||||
|
console.log("SENDER Comment", data);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const deleteData = await prisma.forum_Komentar.update({
|
const deactiveComment = await prisma.forum_Komentar.update({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
isActive: false,
|
isActive: false,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
komentar: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: deactiveComment?.authorId as string,
|
||||||
|
senderId: data?.senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Penghapusan Komentar" as NotificationMobileTitleType,
|
||||||
|
body: `Komentar anda telah dilaporkan: ${deactiveComment?.komentar}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeUserMobile.forumPreviewReportComment({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[DEACTIVATE COMMENT]");
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success deactivate comment",
|
message: "Success deactivate comment",
|
||||||
data: deleteData,
|
// data: deactiveComment,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -78,14 +84,23 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
const data = await request.json();
|
||||||
|
const { senderId } = data;
|
||||||
|
|
||||||
|
console.log("SENDER POSTING", data);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await prisma.forum_Posting.update({
|
const deactivePosting = await prisma.forum_Posting.update({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
isActive: false,
|
isActive: false,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
diskusi: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const deactivateComment = await prisma.forum_Komentar.updateMany({
|
const deactivateComment = await prisma.forum_Komentar.updateMany({
|
||||||
@@ -97,12 +112,25 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[DEACTIVATE COMMENT]", deactivateComment);
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: deactivePosting?.authorId as string,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Penghapusan Postingan" as NotificationMobileTitleType,
|
||||||
|
body: `Postingan anda telah dilaporkan: ${deactivePosting?.diskusi}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeUserMobile.forumPreviewReportPosting({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[DEACTIVATE POSTINGAN & COMMENT]", deactivateComment);
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success deactivate posting",
|
message: "Success deactivate posting",
|
||||||
data: data,
|
data: deactivePosting,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
export { GET };
|
export { GET };
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ async function GET(request: Request, { params }: { params: { name: string } }) {
|
|||||||
reportComment,
|
reportComment,
|
||||||
};
|
};
|
||||||
} else if (category === "posting") {
|
} else if (category === "posting") {
|
||||||
fixData = await prisma.forum_Posting.findMany({
|
const data = await prisma.forum_Posting.findMany({
|
||||||
take: page ? takeData : undefined,
|
take: page ? takeData : undefined,
|
||||||
skip: page ? skipData : undefined,
|
skip: page ? skipData : undefined,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -75,10 +76,24 @@ async function GET(request: Request, { params }: { params: { name: string } }) {
|
|||||||
Profile: true,
|
Profile: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
_count: {
|
||||||
|
select: {
|
||||||
|
Forum_ReportPosting: true,
|
||||||
|
Forum_Komentar: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fixData = data.map((item) => ({
|
||||||
|
..._.omit(item, "_count"),
|
||||||
|
reportPosting: item._count.Forum_ReportPosting,
|
||||||
|
komentar: item._count.Forum_Komentar,
|
||||||
|
}));
|
||||||
|
|
||||||
|
console.log("fixData >>", fixData);
|
||||||
} else if (category === "report_posting") {
|
} else if (category === "report_posting") {
|
||||||
fixData = await prisma.forum_ReportPosting.findMany({
|
const data = await prisma.forum_ReportPosting.findMany({
|
||||||
take: page ? takeData : undefined,
|
take: page ? takeData : undefined,
|
||||||
skip: page ? skipData : undefined,
|
skip: page ? skipData : undefined,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -123,8 +138,25 @@ async function GET(request: Request, { params }: { params: { name: string } }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const filterLatest = (data: any) =>
|
||||||
|
Object.values(
|
||||||
|
data.reduce((acc: any, item: any) => {
|
||||||
|
const key = item.Forum_Posting?.id;
|
||||||
|
if (!key) return acc;
|
||||||
|
if (
|
||||||
|
!acc[key] ||
|
||||||
|
new Date(item.createdAt) > new Date(acc[key].createdAt)
|
||||||
|
) {
|
||||||
|
acc[key] = item;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
|
);
|
||||||
|
|
||||||
|
fixData = filterLatest(data);
|
||||||
} else if (category === "report_comment") {
|
} else if (category === "report_comment") {
|
||||||
fixData = await prisma.forum_ReportKomentar.findMany({
|
const data = await prisma.forum_ReportKomentar.findMany({
|
||||||
take: page ? takeData : undefined,
|
take: page ? takeData : undefined,
|
||||||
skip: page ? skipData : undefined,
|
skip: page ? skipData : undefined,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -160,6 +192,23 @@ async function GET(request: Request, { params }: { params: { name: string } }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const filterLatest = (data: any) =>
|
||||||
|
Object.values(
|
||||||
|
data.reduce((acc: any, item: any) => {
|
||||||
|
const key = item.Forum_Komentar?.id;
|
||||||
|
if (!key) return acc;
|
||||||
|
if (
|
||||||
|
!acc[key] ||
|
||||||
|
new Date(item.createdAt) > new Date(acc[key].createdAt)
|
||||||
|
) {
|
||||||
|
acc[key] = item;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
|
);
|
||||||
|
|
||||||
|
fixData = filterLatest(data);
|
||||||
} else {
|
} else {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
@@ -171,7 +220,6 @@ async function GET(request: Request, { params }: { params: { name: string } }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -65,19 +71,39 @@ async function PUT(req: Request, { params }: { params: { id: string } }) {
|
|||||||
data: {
|
data: {
|
||||||
statusInvoiceId: "4",
|
statusInvoiceId: "4",
|
||||||
},
|
},
|
||||||
// select: {
|
select: {
|
||||||
// StatusInvoice: true,
|
Investasi: {
|
||||||
// authorId: true,
|
select: {
|
||||||
// },
|
title: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICAtION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updt?.authorId as string,
|
||||||
|
senderId: data?.senderId || "",
|
||||||
|
payload: {
|
||||||
|
title: "Transaksi Tertolak" as NotificationMobileTitleType,
|
||||||
|
body: `Maaf transaksi kamu telah ditolak ! ${updt?.Investasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentTransaction,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
fixData = updt;
|
fixData = updt;
|
||||||
} else if (category === "accept") {
|
} else if (category === "accept") {
|
||||||
const dataInvestasi: any = await prisma.investasi.findFirst({
|
const findInvestasi = await prisma.investasi.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: data.investasiId,
|
id: data.investasiId,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
|
id: true,
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
totalLembar: true,
|
totalLembar: true,
|
||||||
sisaLembar: true,
|
sisaLembar: true,
|
||||||
lembarTerbeli: true,
|
lembarTerbeli: true,
|
||||||
@@ -85,30 +111,33 @@ async function PUT(req: Request, { params }: { params: { id: string } }) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Hitung TOTAL SISA LEMBAR
|
// Hitung TOTAL SISA LEMBAR
|
||||||
const investasi_sisaLembar = Number(dataInvestasi?.sisaLembar);
|
const investasi_sisaLembar = Number(findInvestasi?.sisaLembar);
|
||||||
const invoice_lembarTerbeli = Number(data.lembarTerbeli);
|
const invoice_lembarTerbeli = Number(data.lembarTerbeli);
|
||||||
const resultSisaLembar = investasi_sisaLembar - invoice_lembarTerbeli;
|
const resultSisaLembar = investasi_sisaLembar - invoice_lembarTerbeli;
|
||||||
|
|
||||||
// TAMBAH LEMBAR TERBELI
|
// TAMBAH LEMBAR TERBELI
|
||||||
const investasi_lembarTerbeli = Number(dataInvestasi?.lembarTerbeli);
|
const investasi_lembarTerbeli = Number(findInvestasi?.lembarTerbeli);
|
||||||
const resultLembarTerbeli =
|
const resultLembarTerbeli =
|
||||||
investasi_lembarTerbeli + invoice_lembarTerbeli;
|
investasi_lembarTerbeli + invoice_lembarTerbeli;
|
||||||
|
|
||||||
// Progress
|
// Progress
|
||||||
const investasi_totalLembar = Number(dataInvestasi?.totalLembar);
|
const investasi_totalLembar = Number(findInvestasi?.totalLembar);
|
||||||
const progress = (resultLembarTerbeli / investasi_totalLembar) * 100;
|
const progress = (resultLembarTerbeli / investasi_totalLembar) * 100;
|
||||||
const resultProgres = Number(progress).toFixed(2);
|
const resultProgres = Number(progress).toFixed(2);
|
||||||
|
|
||||||
const updt = await prisma.investasi_Invoice.update({
|
const updateInvoice = await prisma.investasi_Invoice.update({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
statusInvoiceId: "1",
|
statusInvoiceId: "1",
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!updt) {
|
if (!updateInvoice) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: false,
|
success: false,
|
||||||
@@ -144,7 +173,35 @@ async function PUT(req: Request, { params }: { params: { id: string } }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fixData = updt;
|
// SEND NOTIFICATION: to investor
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateInvoice?.authorId as string,
|
||||||
|
senderId: data?.senderId || "",
|
||||||
|
payload: {
|
||||||
|
title: "Transaksi Berhasil" as NotificationMobileTitleType,
|
||||||
|
body: `Selamat anda menjadi investor pada investasi ${findInvestasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentTransaction,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION: to creator
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: findInvestasi?.authorId as any,
|
||||||
|
senderId: data?.senderId || "",
|
||||||
|
payload: {
|
||||||
|
title: "Ada Investor Baru !" as NotificationMobileTitleType,
|
||||||
|
body: `Cek daftar investor pada ${findInvestasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentDetailPublish({
|
||||||
|
id: findInvestasi?.id as string,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = updateInvoice;
|
||||||
} else {
|
} else {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await prisma.investasi.findUnique({
|
const data = await prisma.investasi.findUnique({
|
||||||
where: {
|
where: {
|
||||||
@@ -78,14 +87,19 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { catatan, senderId } = data;
|
||||||
|
|
||||||
|
console.log("[DATA]", data);
|
||||||
|
console.log("[CATATAN]", catatan);
|
||||||
|
console.log("[SENDER ID]", senderId);
|
||||||
|
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const status = searchParams.get("status");
|
const status = searchParams.get("status");
|
||||||
|
|
||||||
console.log("[=======Start Investment console=======]");
|
// console.log("[=======Start Investment console=======]");
|
||||||
console.log("[ID]", id);
|
// console.log("[ID]", id);
|
||||||
console.log("[DATA]", data);
|
// console.log("[STATUS]", status);
|
||||||
console.log("[STATUS]", status);
|
// console.log("[=======End Investment console=======]");
|
||||||
console.log("[=======End Investment console=======]");
|
|
||||||
|
|
||||||
const publishTime = new Date();
|
const publishTime = new Date();
|
||||||
|
|
||||||
@@ -96,9 +110,26 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
catatan: data,
|
catatan: catatan,
|
||||||
masterStatusInvestasiId: "4",
|
masterStatusInvestasiId: "4",
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
title: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updatedData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Ditolak",
|
||||||
|
body: "Mohon perbaiki data sesuai catatan penolakan !",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentPortofolioByStatus({ status: "reject" }),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[UPDATE REJECT]", updatedData);
|
console.log("[UPDATE REJECT]", updatedData);
|
||||||
@@ -114,6 +145,39 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICAtION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updatedData.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Review Selesai",
|
||||||
|
body: `Investasi kamu telah dipublikasikan ! ${updatedData.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentPortofolioByStatus({ status: "publish" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const allUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
NOT: { id: updatedData.authorId as any },
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: allUsers.map((user) => user.id),
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Ayo Cek Investasi Terbaru" as NotificationMobileTitleType,
|
||||||
|
body: `${updatedData.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentDetailPublish({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
console.log("[UPDATE PUBLISH]", updatedData);
|
console.log("[UPDATE PUBLISH]", updatedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import { NotificationMobileBodyType, NotificationMobileTitleType } from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -54,6 +60,9 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
|
||||||
|
const { catatan, senderId } = data;
|
||||||
|
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const status = searchParams.get("status");
|
const status = searchParams.get("status");
|
||||||
const fixStatus = _.startCase(status as string);
|
const fixStatus = _.startCase(status as string);
|
||||||
@@ -83,7 +92,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
masterStatusId: checkStatus.id,
|
masterStatusId: checkStatus.id,
|
||||||
catatan: data,
|
catatan: catatan,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
@@ -97,6 +106,18 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updt.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Ditolak",
|
||||||
|
body: "Mohon perbaiki data sesuai catatan penolakan !",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "JOB",
|
||||||
|
deepLink: routeUserMobile.jobByStatus({ status: "reject" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updt;
|
fixData = updt;
|
||||||
} else if (fixStatus === "Publish") {
|
} else if (fixStatus === "Publish") {
|
||||||
const updt = await prisma.job.update({
|
const updt = await prisma.job.update({
|
||||||
@@ -118,6 +139,35 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updt.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Review Selesai",
|
||||||
|
body: "Selamat data anda telah terpublikasi",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "JOB",
|
||||||
|
deepLink: routeUserMobile.jobByStatus({ status: "publish" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "1", NOT: { id: updt.authorId as any } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Ada Lowongan Kerja Baru" as NotificationMobileTitleType,
|
||||||
|
body: `${updt.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeUserMobile.jobDetailPublised({ id: id }),
|
||||||
|
kategoriApp: "JOB",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updt;
|
fixData = updt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,19 +4,55 @@ import { prisma } from "@/lib";
|
|||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
|
let fixData;
|
||||||
try {
|
try {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const data = await prisma.masterBidangBisnis.findUnique({
|
const { searchParams } = new URL(request.url);
|
||||||
where: {
|
const category = searchParams.get("category");
|
||||||
id: id,
|
const subBidangId = searchParams.get("subBidangId");
|
||||||
},
|
|
||||||
});
|
if (category === "all") {
|
||||||
|
const bidang = await prisma.masterBidangBisnis.findUnique({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const subBidang = await prisma.masterSubBidangBisnis.findMany({
|
||||||
|
orderBy: {
|
||||||
|
updatedAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
masterBidangBisnisId: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = {
|
||||||
|
bidang,
|
||||||
|
subBidang,
|
||||||
|
};
|
||||||
|
} else if (category === "bidang") {
|
||||||
|
const bidang = await prisma.masterBidangBisnis.findUnique({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = bidang;
|
||||||
|
} else if (category === "sub-bidang") {
|
||||||
|
const subBidang = await prisma.masterSubBidangBisnis.findUnique({
|
||||||
|
where: {
|
||||||
|
id: subBidangId as any,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = subBidang;
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil mendapatkan data",
|
message: "Berhasil mendapatkan data",
|
||||||
data: data,
|
data: fixData,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error Get Master Bank >>", error);
|
console.error("Error Get Master Bank >>", error);
|
||||||
@@ -32,17 +68,34 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const category = searchParams.get("category");
|
||||||
|
|
||||||
|
console.log("category", category);
|
||||||
|
console.log("data", data);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const updateData = await prisma.masterBidangBisnis.update({
|
if (category === "bidang") {
|
||||||
where: {
|
const updateData = await prisma.masterBidangBisnis.update({
|
||||||
id: id,
|
where: {
|
||||||
},
|
id: id,
|
||||||
data: {
|
},
|
||||||
name: data.name,
|
data: {
|
||||||
active: data.active,
|
name: data.name,
|
||||||
},
|
active: data.active,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
} else if (category === "sub-bidang") {
|
||||||
|
const updateData = await prisma.masterSubBidangBisnis.update({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
name: data.name,
|
||||||
|
isActive: data.isActive,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { Prisma } from "@prisma/client";
|
||||||
|
|
||||||
export { GET, POST };
|
export { GET, POST };
|
||||||
|
|
||||||
@@ -31,35 +33,186 @@ async function GET(request: Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type BidangInput = {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SubBidangInput = {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type RequestBody = {
|
||||||
|
data: {
|
||||||
|
bidang: BidangInput;
|
||||||
|
subBidang: SubBidangInput[];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ---------------------------
|
||||||
|
POST handler
|
||||||
|
- body: { bidang: { name }, subBidang: [{ name }, ...] }
|
||||||
|
- buat masterBidangBisnis (id incremental dari count + 1)
|
||||||
|
- generate id untuk tiap subBidang, cek unik, dan createMany via transaction
|
||||||
|
--------------------------- */
|
||||||
async function POST(request: Request) {
|
async function POST(request: Request) {
|
||||||
const { data } = await request.json();
|
|
||||||
try {
|
try {
|
||||||
const count = await prisma.masterBidangBisnis.count();
|
const { data } = (await request.json()) as RequestBody;
|
||||||
const createNewId = count + 1;
|
|
||||||
|
|
||||||
const slugName = data.name.toLowerCase().replace(/\s+/g, "_");
|
if (!data.bidang.name || !Array.isArray(data.subBidang)) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
status: 400,
|
||||||
|
success: false,
|
||||||
|
message:
|
||||||
|
"Invalid payload. Expect { bidang: { name }, subBidang: [] }",
|
||||||
|
},
|
||||||
|
{ status: 400 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const create = await prisma.masterBidangBisnis.create({
|
// run in transaction to avoid race conditions
|
||||||
data: {
|
const result = await prisma.$transaction(async (tx) => {
|
||||||
id: createNewId.toString(),
|
// ambil last id numerik dengan cast (Postgres)
|
||||||
name: data.name,
|
const rows = await tx.$queryRaw<{ id: string }[]>`
|
||||||
slug: slugName,
|
SELECT id FROM "MasterBidangBisnis" ORDER BY (id::int) DESC LIMIT 1;
|
||||||
},
|
`;
|
||||||
|
const lastId = rows[0]?.id ?? null;
|
||||||
|
const bidangId = lastId ? String(Number(lastId) + 1) : "1";
|
||||||
|
|
||||||
|
const slugName = data.bidang.name.toLowerCase().replace(/\s+/g, "_");
|
||||||
|
|
||||||
|
const createdBidang = await tx.masterBidangBisnis.create({
|
||||||
|
data: {
|
||||||
|
id: bidangId,
|
||||||
|
name: data.bidang.name,
|
||||||
|
slug: slugName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2) hitung existing sub bidang untuk bidang ini
|
||||||
|
const existingSubCount = await tx.masterSubBidangBisnis.count({
|
||||||
|
where: { masterBidangBisnisId: createdBidang.id },
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3) generate unique ids satu-per-satu (cek ke DB via tx)
|
||||||
|
const subBidangToCreate: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
masterBidangBisnisId: string;
|
||||||
|
}[] = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < data.subBidang.length; i++) {
|
||||||
|
const seqNumber = existingSubCount + i + 1; // 1-based
|
||||||
|
const uniqueId = await generateUniqueSubBidangId(
|
||||||
|
data.bidang.name,
|
||||||
|
seqNumber,
|
||||||
|
tx
|
||||||
|
);
|
||||||
|
|
||||||
|
// push object to array
|
||||||
|
subBidangToCreate.push({
|
||||||
|
id: uniqueId,
|
||||||
|
name: data.subBidang[i].name,
|
||||||
|
masterBidangBisnisId: createdBidang.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4) createMany (batched) -- note: createMany doesn't return created rows
|
||||||
|
if (subBidangToCreate.length > 0) {
|
||||||
|
await tx.masterSubBidangBisnis.createMany({
|
||||||
|
data: subBidangToCreate,
|
||||||
|
skipDuplicates: false, // kita sudah memastikan unik, so false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return { createdBidang, subBidang: subBidangToCreate };
|
||||||
});
|
});
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil menambahkan data",
|
message: "Berhasil menambahkan bidang dan sub bidang",
|
||||||
data: create,
|
data: result,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error Post Master Business Field >>", error);
|
console.error("Error Post Master Business Field >>", error);
|
||||||
return NextResponse.json({
|
const msg = error instanceof Error ? error.message : String(error);
|
||||||
status: 500,
|
return NextResponse.json(
|
||||||
success: false,
|
{
|
||||||
message: "API Error Post Data",
|
status: 500,
|
||||||
reason: (error as Error).message,
|
success: false,
|
||||||
});
|
message: "API Error Post Data",
|
||||||
|
reason: msg,
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------------------------
|
||||||
|
Helper: generate base code
|
||||||
|
- mengabaikan stop words: 'dan', 'atau', '&'
|
||||||
|
- ambil dua kata pertama yang tersisa
|
||||||
|
- ambil 3 huruf pertama tiap kata (jika ada)
|
||||||
|
--------------------------- */
|
||||||
|
function generateBaseCode(name: string) {
|
||||||
|
const stopWords = new Set(["dan", "atau", "&"]);
|
||||||
|
// keep only letters and spaces, normalize spaces
|
||||||
|
const cleaned = name
|
||||||
|
.normalize("NFD")
|
||||||
|
.replace(/[\u0300-\u036f]/g, "") // remove diacritics
|
||||||
|
.replace(/[^a-zA-Z\s&]/g, " ")
|
||||||
|
.replace(/\s+/g, " ")
|
||||||
|
.trim()
|
||||||
|
.toLowerCase();
|
||||||
|
|
||||||
|
const words = cleaned
|
||||||
|
.split(" ")
|
||||||
|
.filter((w) => w.length > 0 && !stopWords.has(w));
|
||||||
|
|
||||||
|
const primary = (words[0] ?? "xxx").substring(0, 3).toUpperCase();
|
||||||
|
const secondary = words[1] ? words[1].substring(0, 3).toUpperCase() : "";
|
||||||
|
|
||||||
|
return { primary, secondary };
|
||||||
|
}
|
||||||
|
|
||||||
|
function padNumber(n: number) {
|
||||||
|
return String(n).padStart(2, "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------
|
||||||
|
generateUniqueSubBidangId
|
||||||
|
- cek urutan strategi:
|
||||||
|
1) PRIMARY-<NN>
|
||||||
|
2) PRIMARY-SECONDARY-<NN> (jika secondary ada)
|
||||||
|
3) PRIMARYSECONDARY-<NN> (jika secondary ada)
|
||||||
|
4) fallback: PRIMARY + last4Timestamp -<NN>
|
||||||
|
- menggunakan tx (Prisma.TransactionClient) untuk cek di DB
|
||||||
|
--------------------------- */
|
||||||
|
async function generateUniqueSubBidangId(
|
||||||
|
bidangName: string,
|
||||||
|
number: number,
|
||||||
|
tx: Prisma.TransactionClient
|
||||||
|
): Promise<string> {
|
||||||
|
const { primary, secondary } = generateBaseCode(bidangName);
|
||||||
|
const num = padNumber(number);
|
||||||
|
|
||||||
|
const candidates: string[] = [];
|
||||||
|
candidates.push(`${primary}-${num}`);
|
||||||
|
if (secondary) candidates.push(`${primary}-${secondary}-${num}`);
|
||||||
|
if (secondary) candidates.push(`${primary}${secondary}-${num}`);
|
||||||
|
// final fallback
|
||||||
|
candidates.push(`${primary}${String(Date.now()).slice(-4)}-${num}`);
|
||||||
|
|
||||||
|
for (const id of candidates) {
|
||||||
|
// findUnique requires unique field; assuming `id` is the PK/unique
|
||||||
|
const found = await tx.masterSubBidangBisnis.findUnique({
|
||||||
|
where: { id },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
if (!found) return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// theoretically unreachable, but return a final deterministic fallback
|
||||||
|
return `${primary}-${String(Math.floor(Math.random() * 9000) + 1000)}-${num}`;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import { funSendToWhatsApp } from "@/lib/code-otp-sender";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
@@ -34,9 +35,15 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const category = searchParams.get("category");
|
||||||
|
|
||||||
|
console.log("Received data:", data);
|
||||||
|
console.log("User ID:", id);
|
||||||
|
console.log("Category:", category);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data.active) {
|
if (category === "access") {
|
||||||
const updateData = await prisma.user.update({
|
const updateData = await prisma.user.update({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
@@ -44,10 +51,27 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
data: {
|
data: {
|
||||||
active: data.active,
|
active: data.active,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
nomor: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (data.active) {
|
||||||
|
const resSendCode = await funSendToWhatsApp({
|
||||||
|
nomor: updateData.nomor,
|
||||||
|
newMessage:
|
||||||
|
"Halo sahabat HIConnect, \nSelamat akun anda telah aktif ! \n\n*Pesan ini di kirim secara otomatis, tidak perlu di balas.",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const resSendCode = await funSendToWhatsApp({
|
||||||
|
nomor: updateData.nomor,
|
||||||
|
newMessage:
|
||||||
|
"Halo sahabat HIConnect, \nMohon maaf akun anda telah dinonaktifkan ! Hubungi admin untuk informasi lebih lanjut. \n\n*Pesan ini di kirim secara otomatis, tidak perlu di balas.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
console.log("[Update Active Berhasil]", updateData);
|
console.log("[Update Active Berhasil]", updateData);
|
||||||
} else if (data.role) {
|
} else if (category === "role") {
|
||||||
const fixName = _.startCase(data.role.replace(/_/g, " "));
|
const fixName = _.startCase(data.role.replace(/_/g, " "));
|
||||||
|
|
||||||
const checkRole = await prisma.masterUserRole.findFirst({
|
const checkRole = await prisma.masterUserRole.findFirst({
|
||||||
@@ -68,6 +92,12 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log("[Update Role Berhasil]", updateData);
|
console.log("[Update Role Berhasil]", updateData);
|
||||||
|
} else {
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 400,
|
||||||
|
success: false,
|
||||||
|
message: "Invalid category",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import {
|
||||||
|
sendNotificationMobileToManyUser,
|
||||||
|
sendNotificationMobileToOneUser,
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { GET , PUT};
|
export { GET, PUT };
|
||||||
|
|
||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
@@ -41,12 +50,16 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
async function PUT(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { catatan, senderId } = data;
|
||||||
|
|
||||||
|
console.log("catatan", catatan);
|
||||||
|
console.log("senderId", senderId);
|
||||||
|
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const status = searchParams.get("status");
|
const status = searchParams.get("status");
|
||||||
const fixStatus = _.startCase(status as string);
|
const fixStatus = _.startCase(status as string);
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const checkStatus = await prisma.voting_Status.findFirst({
|
const checkStatus = await prisma.voting_Status.findFirst({
|
||||||
where: {
|
where: {
|
||||||
@@ -71,9 +84,23 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
voting_StatusId: checkStatus.id,
|
voting_StatusId: checkStatus.id,
|
||||||
catatan: data,
|
catatan: catatan,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateStatus.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Ditolak",
|
||||||
|
body: "Mohon perbaiki data sesuai catatan penolakan !",
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "VOTING",
|
||||||
|
deepLink: routeUserMobile.votingByStatus({ status: "reject" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateStatus;
|
fixData = updateStatus;
|
||||||
} else if (fixStatus === "Publish") {
|
} else if (fixStatus === "Publish") {
|
||||||
const updateStatus = await prisma.voting.update({
|
const updateStatus = await prisma.voting.update({
|
||||||
@@ -84,6 +111,39 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
voting_StatusId: checkStatus.id,
|
voting_StatusId: checkStatus.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: updateStatus.authorId as any,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Review Selesai",
|
||||||
|
body: "Voting kamu telah dipublikasikan !" as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "VOTING",
|
||||||
|
deepLink: routeUserMobile.votingByStatus({ status: "publish" }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "1",
|
||||||
|
NOT: { id: updateStatus.authorId as any },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Cek Voting Baru Terpublikasi" as NotificationMobileTitleType,
|
||||||
|
body: `${updateStatus.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "VOTING",
|
||||||
|
deepLink: routeUserMobile.votingDetailPublised({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fixData = updateStatus;
|
fixData = updateStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
51
src/app/api/mobile/auth/device-tokens/[id]/route.ts
Normal file
51
src/app/api/mobile/auth/device-tokens/[id]/route.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
import { prisma } from "@/lib";
|
||||||
|
|
||||||
|
export { DELETE };
|
||||||
|
|
||||||
|
async function DELETE(
|
||||||
|
request: NextRequest,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const deviceId = searchParams.get("deviceId");
|
||||||
|
|
||||||
|
console.log("ID", id);
|
||||||
|
console.log("DEVICE ID", deviceId);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const findFirst = await prisma.tokenUserDevice.findFirst({
|
||||||
|
where: {
|
||||||
|
userId: id,
|
||||||
|
deviceId: deviceId as any,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!findFirst) {
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "User tidak ditemukan !",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const deleted = await prisma.tokenUserDevice.delete({
|
||||||
|
where: {
|
||||||
|
id: findFirst.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("DEL", deleted);
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
success: true,
|
||||||
|
message: "Berhasil menghapus device token user",
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log("ERROR", error);
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: (error as Error).message, message: "Terjadi error pada API" },
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
86
src/app/api/mobile/auth/device-tokens/route.ts
Normal file
86
src/app/api/mobile/auth/device-tokens/route.ts
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
import { prisma } from "@/lib";
|
||||||
|
|
||||||
|
export { POST, GET };
|
||||||
|
|
||||||
|
async function POST(request: NextRequest) {
|
||||||
|
const { data } = await request.json();
|
||||||
|
try {
|
||||||
|
|
||||||
|
const { userId, platform, deviceId, model, appVersion, fcmToken } = data;
|
||||||
|
|
||||||
|
if (!fcmToken) {
|
||||||
|
return NextResponse.json({ error: "Missing Token" }, { status: 400 });
|
||||||
|
}
|
||||||
|
|
||||||
|
const existing = await prisma.tokenUserDevice.findFirst({
|
||||||
|
where: {
|
||||||
|
token: fcmToken,
|
||||||
|
userId: userId,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log("✅ EX", existing);
|
||||||
|
|
||||||
|
let deviceToken;
|
||||||
|
|
||||||
|
if (existing) {
|
||||||
|
deviceToken = await prisma.tokenUserDevice.update({
|
||||||
|
where: {
|
||||||
|
id: existing?.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
platform,
|
||||||
|
deviceId,
|
||||||
|
model,
|
||||||
|
appVersion,
|
||||||
|
isActive: true,
|
||||||
|
updatedAt: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Buat baru jika belum ada
|
||||||
|
deviceToken = await prisma.tokenUserDevice.create({
|
||||||
|
data: {
|
||||||
|
token: fcmToken,
|
||||||
|
userId: userId,
|
||||||
|
platform,
|
||||||
|
deviceId,
|
||||||
|
model,
|
||||||
|
appVersion,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json({ success: true, data: deviceToken });
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: (error as Error).message },
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function GET(request: NextRequest) {
|
||||||
|
try {
|
||||||
|
const data = await prisma.tokenUserDevice.findMany({
|
||||||
|
where: {
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return NextResponse.json({ success: true, data });
|
||||||
|
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: (error as Error).message },
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -113,6 +113,7 @@ async function GET(request: Request) {
|
|||||||
Author: {
|
Author: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
username: true,
|
||||||
Profile: true,
|
Profile: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -141,6 +142,7 @@ async function GET(request: Request) {
|
|||||||
Author: {
|
Author: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
username: true,
|
||||||
Profile: true,
|
Profile: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET, PUT };
|
export { POST, GET, PUT };
|
||||||
|
|
||||||
@@ -33,6 +39,14 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!create) {
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 500,
|
||||||
|
success: false,
|
||||||
|
message: "Gagal membuat invoice",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 201,
|
status: 201,
|
||||||
success: true,
|
success: true,
|
||||||
@@ -48,7 +62,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
try {
|
try {
|
||||||
@@ -65,7 +79,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
createdAt: true,
|
createdAt: true,
|
||||||
donasiMaster_BankId: true,
|
donasiMaster_BankId: true,
|
||||||
donasiMaster_StatusInvoiceId: true,
|
donasiMaster_StatusInvoiceId: true,
|
||||||
MasterBank: true,
|
MasterBank: true,
|
||||||
Donasi: {
|
Donasi: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
@@ -139,7 +153,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const update = await prisma.donasi_Invoice.update({
|
const updated = await prisma.donasi_Invoice.update({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
@@ -164,7 +178,40 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[UPDATE INVOICE]", update);
|
if (!updated) {
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 500,
|
||||||
|
success: false,
|
||||||
|
message: "Gagal memperbarui data",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const findUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "2",
|
||||||
|
active: true,
|
||||||
|
NOT: { id: updated?.Donasi?.authorId as string },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: findUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Ada Donasi Baru !" as NotificationMobileTitleType,
|
||||||
|
body: `Cek data investor pada ${updated?.Donasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeAdminMobile.donationDetailPublish({
|
||||||
|
id: updated?.Donasi?.id as string,
|
||||||
|
status: "publish",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[UPDATE INVOICE]", updated);
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
|
|||||||
@@ -1,25 +1,39 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import { funFindDonaturList } from "@/lib/mobile/donation/find-donatur-list";
|
||||||
|
|
||||||
export { POST, GET, PUT, DELETE };
|
export { POST, GET, PUT, DELETE };
|
||||||
|
|
||||||
async function POST(
|
async function POST(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: { id: string } },
|
||||||
) {
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { title, deskripsi, imageId } = data;
|
||||||
|
|
||||||
|
const senderId = await prisma.donasi.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data && data?.imageId) {
|
if (data && data?.imageId) {
|
||||||
const createWithFile = await prisma.donasi_Kabar.create({
|
const createWithFile = await prisma.donasi_Kabar.create({
|
||||||
data: {
|
data: {
|
||||||
title: data.title,
|
title: title,
|
||||||
deskripsi: data.deskripsi,
|
deskripsi: deskripsi,
|
||||||
donasiId: id,
|
donasiId: id,
|
||||||
imageId: data.imageId,
|
imageId: imageId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -28,8 +42,8 @@ async function POST(
|
|||||||
} else {
|
} else {
|
||||||
const create = await prisma.donasi_Kabar.create({
|
const create = await prisma.donasi_Kabar.create({
|
||||||
data: {
|
data: {
|
||||||
title: data.title,
|
title: title,
|
||||||
deskripsi: data.deskripsi,
|
deskripsi: deskripsi,
|
||||||
donasiId: id,
|
donasiId: id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -38,6 +52,25 @@ async function POST(
|
|||||||
return NextResponse.json({ status: 400, message: "Gagal disimpan" });
|
return NextResponse.json({ status: 400, message: "Gagal disimpan" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const recipientIds = await funFindDonaturList(id);
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
if (recipientIds.length > 0) {
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds,
|
||||||
|
senderId: senderId?.authorId!,
|
||||||
|
payload: {
|
||||||
|
title: "Berita terbaru" as NotificationMobileTitleType,
|
||||||
|
body: `Ada berita terupdate pada ${title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
deepLink: routeUserMobile.donationDetailPublish({
|
||||||
|
id: id,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
success: true,
|
success: true,
|
||||||
@@ -56,7 +89,7 @@ async function POST(
|
|||||||
|
|
||||||
async function GET(
|
async function GET(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: { id: string } },
|
||||||
) {
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
@@ -178,7 +211,7 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function DELETE(
|
async function DELETE(
|
||||||
request: Request,
|
request: Request,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: { id: string } },
|
||||||
) {
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
try {
|
try {
|
||||||
@@ -198,7 +231,7 @@ async function DELETE(
|
|||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${process.env.WS_APIKEY}`,
|
Authorization: `Bearer ${process.env.WS_APIKEY}`,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!deleteImage) {
|
if (!deleteImage) {
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { NotificationMobileBodyType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST };
|
export { POST, GET };
|
||||||
|
|
||||||
async function POST(request: Request) {
|
async function POST(request: Request) {
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
@@ -49,6 +52,26 @@ async function POST(request: Request) {
|
|||||||
|
|
||||||
console.log("[DATA DONASI]", dataDonasi);
|
console.log("[DATA DONASI]", dataDonasi);
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Baru",
|
||||||
|
body: data.title as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.donationByStatus({ status: "review" }),
|
||||||
|
kategoriApp: "DONASI",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!dataDonasi)
|
if (!dataDonasi)
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 400,
|
status: 400,
|
||||||
@@ -98,7 +121,7 @@ async function POST(request: Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET ALL DATA DONASI
|
// GET ALL DATA DONASI
|
||||||
export async function GET(request: Request) {
|
async function GET(request: Request) {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const category = searchParams.get("category");
|
const category = searchParams.get("category");
|
||||||
const authorId = searchParams.get("authorId");
|
const authorId = searchParams.get("authorId");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -12,6 +13,11 @@ async function GET(
|
|||||||
const { id, status } = params;
|
const { id, status } = params;
|
||||||
const fixStatusName = _.startCase(status);
|
const fixStatusName = _.startCase(status);
|
||||||
|
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = Number(searchParams.get("page")) || 1;
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
const data = await prisma.event.findMany({
|
const data = await prisma.event.findMany({
|
||||||
orderBy: {
|
orderBy: {
|
||||||
updatedAt: "desc",
|
updatedAt: "desc",
|
||||||
@@ -37,13 +43,35 @@ async function GET(
|
|||||||
},
|
},
|
||||||
authorId: true,
|
authorId: true,
|
||||||
},
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Get total count for pagination info
|
||||||
|
const totalCount = await prisma.event.count({
|
||||||
|
where: {
|
||||||
|
active: true,
|
||||||
|
authorId: id,
|
||||||
|
isArsip: false,
|
||||||
|
EventMaster_Status: {
|
||||||
|
name: fixStatusName,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const totalPages = Math.ceil(totalCount / takeData);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success get event",
|
message: "Success get event",
|
||||||
data: data,
|
data: data,
|
||||||
|
pagination: {
|
||||||
|
currentPage: page,
|
||||||
|
totalPages: totalPages,
|
||||||
|
totalData: totalCount,
|
||||||
|
dataPerPage: takeData,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { GET, POST };
|
export { GET, POST };
|
||||||
|
|
||||||
@@ -13,25 +20,35 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
eventId: id,
|
eventId: id,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
},
|
},
|
||||||
|
|
||||||
// select: {
|
|
||||||
// Event: {
|
|
||||||
// select: {
|
|
||||||
// id: true,
|
|
||||||
// title: true,
|
|
||||||
// authorId: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const findEvent = await prisma.event.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: { authorId: true, title: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
if (userId !== findEvent?.authorId) {
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: findEvent?.authorId as string,
|
||||||
|
senderId: userId,
|
||||||
|
payload: {
|
||||||
|
title: "Peserta Baru Join" as NotificationMobileTitleType,
|
||||||
|
body: `Ada peserta baru dalam event: ${findEvent?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeUserMobile.eventDetailPublised({ id: id }),
|
||||||
|
kategoriApp: "EVENT",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success join event",
|
message: "Success join event",
|
||||||
data: createJoin,
|
data: createJoin,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -40,7 +57,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Error join event",
|
message: "Error join event",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,12 +65,17 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
try {
|
try {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = Number(searchParams.get("page")) || 1;
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
const data = await prisma.event_Peserta.findMany({
|
const data = await prisma.event_Peserta.findMany({
|
||||||
where: {
|
where: {
|
||||||
eventId: id,
|
eventId: id,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
|
id: true,
|
||||||
eventId: true,
|
eventId: true,
|
||||||
userId: true,
|
userId: true,
|
||||||
isPresent: true,
|
isPresent: true,
|
||||||
@@ -71,6 +93,8 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
});
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -78,8 +102,14 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
success: true,
|
success: true,
|
||||||
message: "Success get participants",
|
message: "Success get participants",
|
||||||
data: data,
|
data: data,
|
||||||
|
meta: {
|
||||||
|
page,
|
||||||
|
take: takeData,
|
||||||
|
total: await prisma.event_Peserta.count({ where: { eventId: id } }),
|
||||||
|
totalPages: Math.ceil(await prisma.event_Peserta.count({ where: { eventId: id } }) / takeData),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -88,7 +118,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Error get participants",
|
message: "Error get participants",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { NotificationMobileBodyType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { GET, POST };
|
export { GET, POST };
|
||||||
|
|
||||||
@@ -30,6 +34,24 @@ async function POST(request: Request) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Baru",
|
||||||
|
body: create.title as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.eventByStatus({ status: "review" }),
|
||||||
|
kategoriApp: "EVENT",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
@@ -55,11 +77,15 @@ async function GET(request: Request) {
|
|||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const category = searchParams.get("category");
|
const category = searchParams.get("category");
|
||||||
const userId = searchParams.get("userId");
|
const userId = searchParams.get("userId");
|
||||||
|
const page = Number(searchParams.get("page")) || 1;
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
console.log("[CAT]", category);
|
console.log("[CAT]", category);
|
||||||
console.log("[USER]", userId);
|
console.log("[USER]", userId);
|
||||||
|
|
||||||
let fixData;
|
let fixData;
|
||||||
|
let totalCount = 0;
|
||||||
|
|
||||||
if (category === "beranda") {
|
if (category === "beranda") {
|
||||||
const allData = await prisma.event.findMany({
|
const allData = await prisma.event.findMany({
|
||||||
@@ -87,84 +113,96 @@ async function GET(request: Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// const takeData = 10;
|
const [data, count] = await Promise.all([
|
||||||
// const skipData = page * takeData - takeData;
|
prisma.event.findMany({
|
||||||
|
take: takeData,
|
||||||
const data = await prisma.event.findMany({
|
skip: skipData,
|
||||||
// take: takeData,
|
orderBy: [
|
||||||
// skip: skipData,
|
{
|
||||||
orderBy: [
|
tanggal: "asc",
|
||||||
{
|
},
|
||||||
tanggal: "asc",
|
],
|
||||||
|
where: {
|
||||||
|
active: true,
|
||||||
|
eventMaster_StatusId: "1",
|
||||||
|
isArsip: false,
|
||||||
},
|
},
|
||||||
],
|
select: {
|
||||||
where: {
|
id: true,
|
||||||
active: true,
|
title: true,
|
||||||
eventMaster_StatusId: "1",
|
deskripsi: true,
|
||||||
isArsip: false,
|
tanggal: true,
|
||||||
},
|
tanggalSelesai: true,
|
||||||
select: {
|
EventMaster_Status: {
|
||||||
id: true,
|
select: {
|
||||||
title: true,
|
name: true,
|
||||||
deskripsi: true,
|
},
|
||||||
tanggal: true,
|
},
|
||||||
tanggalSelesai: true,
|
authorId: true,
|
||||||
EventMaster_Status: {
|
Author: {
|
||||||
select: {
|
include: {
|
||||||
name: true,
|
Profile: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
authorId: true,
|
}),
|
||||||
Author: {
|
prisma.event.count({
|
||||||
include: {
|
where: {
|
||||||
Profile: true,
|
active: true,
|
||||||
},
|
eventMaster_StatusId: "1",
|
||||||
|
isArsip: false,
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
});
|
]);
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
|
totalCount = count;
|
||||||
} else if (category === "contribution") {
|
} else if (category === "contribution") {
|
||||||
const data = await prisma.event_Peserta.findMany({
|
const [data, count] = await Promise.all([
|
||||||
where: {
|
prisma.event_Peserta.findMany({
|
||||||
userId: userId,
|
take: takeData,
|
||||||
},
|
skip: skipData,
|
||||||
select: {
|
where: {
|
||||||
eventId: true,
|
userId: userId,
|
||||||
userId: true,
|
},
|
||||||
Event: {
|
select: {
|
||||||
select: {
|
id: true,
|
||||||
id: true,
|
eventId: true,
|
||||||
title: true,
|
userId: true,
|
||||||
tanggal: true,
|
Event: {
|
||||||
Author: {
|
select: {
|
||||||
select: {
|
id: true,
|
||||||
id: true,
|
title: true,
|
||||||
username: true,
|
tanggal: true,
|
||||||
Profile: {
|
Author: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
name: true,
|
username: true,
|
||||||
imageId: true,
|
Profile: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
imageId: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
Event_Peserta: {
|
||||||
Event_Peserta: {
|
take: 4,
|
||||||
take: 4,
|
orderBy: {
|
||||||
orderBy: {
|
createdAt: "desc",
|
||||||
createdAt: "desc",
|
},
|
||||||
},
|
select: {
|
||||||
select: {
|
id: true,
|
||||||
id: true,
|
userId: true,
|
||||||
userId: true,
|
User: {
|
||||||
User: {
|
select: {
|
||||||
select: {
|
Profile: {
|
||||||
Profile: {
|
select: {
|
||||||
select: {
|
id: true,
|
||||||
id: true,
|
name: true,
|
||||||
name: true,
|
imageId: true,
|
||||||
imageId: true,
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -173,86 +211,109 @@ async function GET(request: Request) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}),
|
||||||
// User: {
|
prisma.event_Peserta.count({
|
||||||
// select: {
|
where: {
|
||||||
// id: true,
|
userId: userId,
|
||||||
// username: true,
|
},
|
||||||
// Profile: {
|
})
|
||||||
// select: {
|
]);
|
||||||
// id: true,
|
|
||||||
// name: true,
|
|
||||||
// imageId: true,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
|
totalCount = count;
|
||||||
} else if (category === "all-history") {
|
} else if (category === "all-history") {
|
||||||
const data = await prisma.event.findMany({
|
const [data, count] = await Promise.all([
|
||||||
orderBy: {
|
prisma.event.findMany({
|
||||||
tanggal: "desc",
|
take: takeData,
|
||||||
},
|
skip: skipData,
|
||||||
where: {
|
orderBy: {
|
||||||
eventMaster_StatusId: "1",
|
tanggal: "desc",
|
||||||
isArsip: true,
|
},
|
||||||
},
|
where: {
|
||||||
select: {
|
eventMaster_StatusId: "1",
|
||||||
id: true,
|
isArsip: true,
|
||||||
title: true,
|
},
|
||||||
tanggal: true,
|
select: {
|
||||||
deskripsi: true,
|
id: true,
|
||||||
active: true,
|
title: true,
|
||||||
authorId: true,
|
tanggal: true,
|
||||||
Author: {
|
deskripsi: true,
|
||||||
select: {
|
active: true,
|
||||||
id: true,
|
authorId: true,
|
||||||
username: true,
|
Author: {
|
||||||
Profile: true,
|
select: {
|
||||||
|
id: true,
|
||||||
|
username: true,
|
||||||
|
Profile: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
});
|
prisma.event.count({
|
||||||
|
where: {
|
||||||
|
eventMaster_StatusId: "1",
|
||||||
|
isArsip: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
|
totalCount = count;
|
||||||
} else if (category === "my-history") {
|
} else if (category === "my-history") {
|
||||||
const data = await prisma.event.findMany({
|
const [data, count] = await Promise.all([
|
||||||
orderBy: {
|
prisma.event.findMany({
|
||||||
tanggal: "desc",
|
take: takeData,
|
||||||
},
|
skip: skipData,
|
||||||
where: {
|
orderBy: {
|
||||||
authorId: userId,
|
tanggal: "desc",
|
||||||
eventMaster_StatusId: "1",
|
},
|
||||||
isArsip: true,
|
where: {
|
||||||
},
|
authorId: userId,
|
||||||
select: {
|
eventMaster_StatusId: "1",
|
||||||
id: true,
|
isArsip: true,
|
||||||
title: true,
|
},
|
||||||
tanggal: true,
|
select: {
|
||||||
deskripsi: true,
|
id: true,
|
||||||
active: true,
|
title: true,
|
||||||
authorId: true,
|
tanggal: true,
|
||||||
Author: {
|
deskripsi: true,
|
||||||
select: {
|
active: true,
|
||||||
id: true,
|
authorId: true,
|
||||||
username: true,
|
Author: {
|
||||||
Profile: true,
|
select: {
|
||||||
|
id: true,
|
||||||
|
username: true,
|
||||||
|
Profile: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
});
|
prisma.event.count({
|
||||||
|
where: {
|
||||||
|
authorId: userId,
|
||||||
|
eventMaster_StatusId: "1",
|
||||||
|
isArsip: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
|
totalCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const totalPages = Math.ceil(totalCount / takeData);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success get event",
|
message: "Success get event",
|
||||||
data: fixData,
|
data: fixData,
|
||||||
|
pagination: {
|
||||||
|
currentPage: page,
|
||||||
|
totalPages: totalPages,
|
||||||
|
totalData: totalCount,
|
||||||
|
dataPerPage: takeData,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET, DELETE };
|
export { POST, GET, DELETE };
|
||||||
|
|
||||||
async function POST(request: Request, { params }: { params: { id: string } }) {
|
async function POST(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { comment, authorId } = data;
|
||||||
|
|
||||||
console.log("[ID COMMENT]", id);
|
console.log("[ID COMMENT]", id);
|
||||||
console.log("[DATA COMMENT]", data);
|
console.log("[DATA COMMENT]", data);
|
||||||
@@ -14,8 +21,8 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
const createComment = await prisma.forum_Komentar.create({
|
const createComment = await prisma.forum_Komentar.create({
|
||||||
data: {
|
data: {
|
||||||
forum_PostingId: id,
|
forum_PostingId: id,
|
||||||
komentar: data.comment,
|
komentar: comment,
|
||||||
authorId: data.authorId,
|
authorId: authorId,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
@@ -38,6 +45,24 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const findForum = await prisma.forum_Posting.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: { authorId: true, diskusi: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: findForum?.authorId as string,
|
||||||
|
senderId: authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Komentar Baru" as NotificationMobileTitleType,
|
||||||
|
body: `Ayo cek komentar pada postingan: ${findForum?.diskusi}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeUserMobile.forumDetail({ id: id }),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (!createComment) {
|
if (!createComment) {
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 400,
|
status: 400,
|
||||||
@@ -52,7 +77,6 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Berhasil update data",
|
message: "Berhasil update data",
|
||||||
data: createComment,
|
data: createComment,
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR COMMENT]", error);
|
console.log("[ERROR COMMENT]", error);
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
@@ -66,9 +90,15 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function GET(request: Request, { params }: { params: { id: string } }) {
|
async function GET(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
|
const takeData = 5
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await prisma.forum_Komentar.findMany({
|
const data = await prisma.forum_Komentar.findMany({
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: "desc",
|
createdAt: "desc",
|
||||||
},
|
},
|
||||||
@@ -114,7 +144,10 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function DELETE(request: Request, { params }: { params: { id: string } }) {
|
async function DELETE(
|
||||||
|
request: Request,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -146,4 +179,4 @@ async function DELETE(request: Request, { params }: { params: { id: string } })
|
|||||||
reason: (error as Error).message || error,
|
reason: (error as Error).message || error,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
request: Request,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await prisma.forum_Komentar.findUnique({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
komentar: true,
|
||||||
|
isActive: true,
|
||||||
|
createdAt: true,
|
||||||
|
Forum_ReportKomentar: {
|
||||||
|
select: {
|
||||||
|
deskripsi: true,
|
||||||
|
ForumMaster_KategoriReport: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 200,
|
||||||
|
success: true,
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 500,
|
||||||
|
success: false,
|
||||||
|
message: "Gagal mendapatkan data posting",
|
||||||
|
reason: (error as Error).message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import { NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
request: Request,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await prisma.forum_Posting.findUnique({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
diskusi: true,
|
||||||
|
isActive: true,
|
||||||
|
createdAt: true,
|
||||||
|
authorId: true,
|
||||||
|
Author: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
username: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Forum_ReportPosting: {
|
||||||
|
select: {
|
||||||
|
deskripsi: true,
|
||||||
|
ForumMaster_KategoriReport: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 200,
|
||||||
|
success: true,
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 500,
|
||||||
|
success: false,
|
||||||
|
message: "Gagal mendapatkan data posting",
|
||||||
|
reason: (error as Error).message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { POST };
|
export { POST };
|
||||||
|
|
||||||
@@ -7,26 +13,70 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
let fixData;
|
let fixData;
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
console.log("[DATA]", data);
|
const { authorId: reportedUserId, categoryId, description } = data;
|
||||||
console.log("[ID]", id);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data.categoryId) {
|
// Komentar yang di report
|
||||||
fixData = await prisma.forum_ReportKomentar.create({
|
const findComment = await prisma.forum_Komentar.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: { authorId: true, komentar: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// List admin untuk dikirim notifikasi
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "2",
|
||||||
|
NOT: { id: findComment?.authorId as any },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
if (categoryId) {
|
||||||
|
const createdReport = await prisma.forum_ReportKomentar.create({
|
||||||
data: {
|
data: {
|
||||||
forum_KomentarId: id,
|
forum_KomentarId: id,
|
||||||
userId: data.authorId,
|
userId: reportedUserId,
|
||||||
forumMaster_KategoriReportId: data.categoryId as any,
|
forumMaster_KategoriReportId: categoryId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: reportedUserId,
|
||||||
|
payload: {
|
||||||
|
title: "Laporan Dari User" as NotificationMobileTitleType,
|
||||||
|
body: `Report terhadap komentar, ${findComment?.komentar}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeAdminMobile.forumPreviewReportComment,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = createdReport;
|
||||||
} else {
|
} else {
|
||||||
fixData = await prisma.forum_ReportKomentar.create({
|
const createdReport = await prisma.forum_ReportKomentar.create({
|
||||||
data: {
|
data: {
|
||||||
forum_KomentarId: id,
|
forum_KomentarId: id,
|
||||||
userId: data.authorId,
|
userId: reportedUserId,
|
||||||
deskripsi: data.description,
|
deskripsi: description,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: reportedUserId,
|
||||||
|
payload: {
|
||||||
|
title: "Laporan Dari User" as NotificationMobileTitleType,
|
||||||
|
body: `Report terhadap komentar, ${findComment?.komentar}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeAdminMobile.forumPreviewReportComment,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = createdReport;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fixData) {
|
if (!fixData) {
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
import { NextResponse } from "next/server";
|
import {
|
||||||
|
sendNotificationMobileToManyUser
|
||||||
|
} from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
routeAdminMobile
|
||||||
|
} from "@/lib/mobile/route-page-mobile";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { POST };
|
export { POST };
|
||||||
|
|
||||||
@@ -7,26 +17,70 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
let fixData;
|
let fixData;
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
console.log("[DATA]", data);
|
const { authorId: reportedUserId, categoryId, description } = data;
|
||||||
console.log("[ID]", id);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data.categoryId) {
|
// Postingan yang akan di report
|
||||||
fixData = await prisma.forum_ReportPosting.create({
|
const findPosting = await prisma.forum_Posting.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: { authorId: true, diskusi: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// List admin untuk dikirim notifikasi
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "2",
|
||||||
|
NOT: { id: findPosting?.authorId as any },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
if (categoryId) {
|
||||||
|
const createReported = await prisma.forum_ReportPosting.create({
|
||||||
data: {
|
data: {
|
||||||
forum_PostingId: id,
|
forum_PostingId: id,
|
||||||
userId: data.authorId,
|
userId: reportedUserId,
|
||||||
forumMaster_KategoriReportId: data.categoryId,
|
forumMaster_KategoriReportId: categoryId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: reportedUserId,
|
||||||
|
payload: {
|
||||||
|
title: "Laporan Dari User" as NotificationMobileTitleType,
|
||||||
|
body: `Report terhadap postingan, ${findPosting?.diskusi}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeAdminMobile.forumPreviewReportPosting,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = createReported;
|
||||||
} else {
|
} else {
|
||||||
fixData = await prisma.forum_ReportPosting.create({
|
const createReported = await prisma.forum_ReportPosting.create({
|
||||||
data: {
|
data: {
|
||||||
forum_PostingId: id,
|
forum_PostingId: id,
|
||||||
userId: data.authorId,
|
userId: reportedUserId,
|
||||||
deskripsi: data.description,
|
deskripsi: description,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: reportedUserId,
|
||||||
|
payload: {
|
||||||
|
title: "Laporan Dari User" as NotificationMobileTitleType,
|
||||||
|
body: `Report terhadap postingan, ${findPosting?.diskusi}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeAdminMobile.forumPreviewReportPosting,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
fixData = createReported;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fixData) {
|
if (!fixData) {
|
||||||
@@ -51,4 +105,4 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,54 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { NotificationMobileBodyType, NotificationMobileTitleType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET };
|
export { POST, GET };
|
||||||
|
|
||||||
async function POST(request: Request) {
|
async function POST(request: Request) {
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
console.log("[DATA]", data);
|
console.log("[DATA]", data);
|
||||||
|
const { diskusi, authorId } = data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const create = await prisma.forum_Posting.create({
|
const create = await prisma.forum_Posting.create({
|
||||||
data: {
|
data: {
|
||||||
diskusi: data.diskusi,
|
diskusi: diskusi,
|
||||||
authorId: data.authorId,
|
authorId: authorId,
|
||||||
forumMaster_StatusPostingId: 1,
|
forumMaster_StatusPostingId: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!create) {
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Gagal memposting",
|
||||||
|
status: 400,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const allUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
id: { not: authorId },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: allUsers.map((user) => user.id),
|
||||||
|
senderId: authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Ada Diskusi Baru" as NotificationMobileTitleType,
|
||||||
|
body: `${diskusi}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "FORUM",
|
||||||
|
deepLink: routeUserMobile.forumBeranda,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil membuat postingan",
|
message: "Berhasil membuat postingan",
|
||||||
@@ -43,7 +75,6 @@ async function GET(request: Request) {
|
|||||||
const takeData = 5;
|
const takeData = 5;
|
||||||
const skipData = (Number(page) - 1) * takeData;
|
const skipData = (Number(page) - 1) * takeData;
|
||||||
|
|
||||||
|
|
||||||
// console.log("authorId", authorId);
|
// console.log("authorId", authorId);
|
||||||
// console.log("userLoginId", userLoginId);
|
// console.log("userLoginId", userLoginId);
|
||||||
// console.log("search", search);
|
// console.log("search", search);
|
||||||
@@ -83,7 +114,7 @@ async function GET(request: Request) {
|
|||||||
notIn: blockUserId,
|
notIn: blockUserId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
diskusi: true,
|
diskusi: true,
|
||||||
@@ -128,13 +159,12 @@ async function GET(request: Request) {
|
|||||||
|
|
||||||
fixData = newData;
|
fixData = newData;
|
||||||
} else if (category === "forumku") {
|
} else if (category === "forumku") {
|
||||||
|
|
||||||
const count = await prisma.forum_Posting.count({
|
const count = await prisma.forum_Posting.count({
|
||||||
where: {
|
where: {
|
||||||
isActive: true,
|
isActive: true,
|
||||||
authorId: authorId,
|
authorId: authorId,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
const data = await prisma.forum_Posting.findMany({
|
const data = await prisma.forum_Posting.findMany({
|
||||||
take: page ? takeData : undefined,
|
take: page ? takeData : undefined,
|
||||||
@@ -191,7 +221,7 @@ async function GET(request: Request) {
|
|||||||
const dataFix = {
|
const dataFix = {
|
||||||
data: newData,
|
data: newData,
|
||||||
count,
|
count,
|
||||||
}
|
};
|
||||||
|
|
||||||
fixData = dataFix;
|
fixData = dataFix;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeAdminMobile, routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET, DELETE };
|
export { POST, GET, DELETE };
|
||||||
|
|
||||||
@@ -10,7 +16,7 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
console.log("[POST DOCUMENT DATA]", data);
|
console.log("[POST DOCUMENT DATA]", data);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const create = await prisma.dokumenInvestasi.upsert({
|
const createdDocs = await prisma.dokumenInvestasi.upsert({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: id,
|
||||||
},
|
},
|
||||||
@@ -23,9 +29,49 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
title: data.title,
|
title: data.title,
|
||||||
fileId: data.fileId,
|
fileId: data.fileId,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
investasiId: true,
|
||||||
|
investasi: {
|
||||||
|
select: {
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!create)
|
console.log("[CREATED DOCS]", createdDocs);
|
||||||
|
|
||||||
|
const findInvestor = await prisma.investasi_Invoice.findMany({
|
||||||
|
where: {
|
||||||
|
investasiId: id,
|
||||||
|
StatusInvoice: {
|
||||||
|
name: "Berhasil",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[FIND INVESTOR]", findInvestor);
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: findInvestor.map((e) => e.authorId!),
|
||||||
|
senderId: createdDocs.investasi?.authorId as string,
|
||||||
|
payload: {
|
||||||
|
title: "Cek Dokumen" as NotificationMobileTitleType,
|
||||||
|
body: `Ada dokumen terupdate pada ${createdDocs.investasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentDetailPublish({
|
||||||
|
id: createdDocs.investasiId as string,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!createdDocs)
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 201,
|
status: 201,
|
||||||
success: true,
|
success: true,
|
||||||
@@ -93,7 +139,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function DELETE(
|
async function DELETE(
|
||||||
request: Request,
|
request: Request,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: { id: string } },
|
||||||
) {
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
|
|
||||||
@@ -111,9 +157,9 @@ async function DELETE(
|
|||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${process.env.WS_APIKEY}`,
|
Authorization: `Bearer ${process.env.WS_APIKEY}`,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 200,
|
status: 200,
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import {
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
} from "../../../../../../../types/type-mobile-notification";
|
||||||
|
|
||||||
export { POST, GET, PUT };
|
export { POST, GET, PUT };
|
||||||
|
|
||||||
@@ -49,7 +55,6 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
const authorId = searchParams.get("authorId");
|
const authorId = searchParams.get("authorId");
|
||||||
|
|
||||||
console.log("[ID INVOICE]", id);
|
console.log("[ID INVOICE]", id);
|
||||||
|
|
||||||
|
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
@@ -198,8 +203,49 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
statusInvoiceId: checkStatus.id,
|
statusInvoiceId: checkStatus.id,
|
||||||
imageId: data.imageId,
|
imageId: data.imageId,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
investasiId: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (fixStatus === "Proses") {
|
||||||
|
// kirim notif ke author investasi
|
||||||
|
const findInvestasi = await prisma.investasi.findUnique({
|
||||||
|
where: {
|
||||||
|
id: update.investasiId as any,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const findUsers = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: "2",
|
||||||
|
active: true,
|
||||||
|
NOT: { id: findInvestasi?.authorId as any },
|
||||||
|
},
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: findUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Ada Investor Baru !" as NotificationMobileTitleType,
|
||||||
|
body: `Cek data investor pada ${findInvestasi?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeAdminMobile.investmentDetailPublish({
|
||||||
|
id: update.investasiId as string,
|
||||||
|
status: "publish",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
console.log("[UPDATE]", update);
|
console.log("[UPDATE]", update);
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { prisma } from "@/lib";
|
import { prisma } from "@/lib";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { sendNotificationInvestmentAddNews } from "@/lib/mobile/notification/notification-add-news-investment";
|
||||||
|
|
||||||
export { POST, GET, DELETE };
|
export { POST, GET, DELETE };
|
||||||
|
|
||||||
@@ -21,6 +22,21 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
deskripsi: data.deskripsi,
|
deskripsi: data.deskripsi,
|
||||||
imageId: data.imageId,
|
imageId: data.imageId,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
investasiId: true,
|
||||||
|
investasi: {
|
||||||
|
select: {
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationInvestmentAddNews({
|
||||||
|
invesmentId: createWithFile.investasiId,
|
||||||
|
senderId: createWithFile.investasi.authorId as string,
|
||||||
|
title: createWithFile.investasi.title,
|
||||||
});
|
});
|
||||||
|
|
||||||
fixData = createWithFile;
|
fixData = createWithFile;
|
||||||
@@ -31,6 +47,21 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
title: _.startCase(data.title),
|
title: _.startCase(data.title),
|
||||||
deskripsi: data.deskripsi,
|
deskripsi: data.deskripsi,
|
||||||
},
|
},
|
||||||
|
select: {
|
||||||
|
investasiId: true,
|
||||||
|
investasi: {
|
||||||
|
select: {
|
||||||
|
title: true,
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationInvestmentAddNews({
|
||||||
|
invesmentId: createWitOutFile.investasiId,
|
||||||
|
senderId: createWitOutFile.investasi.authorId as string,
|
||||||
|
title: createWitOutFile.investasi.title,
|
||||||
});
|
});
|
||||||
|
|
||||||
fixData = createWitOutFile;
|
fixData = createWitOutFile;
|
||||||
@@ -111,7 +142,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
|
|
||||||
async function DELETE(
|
async function DELETE(
|
||||||
request: Request,
|
request: Request,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: { id: string } },
|
||||||
) {
|
) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
console.log("id", id);
|
console.log("id", id);
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import _ from "lodash";
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { NotificationMobileBodyType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { POST, GET };
|
export { POST, GET };
|
||||||
|
|
||||||
@@ -9,12 +12,14 @@ async function POST(request: Request) {
|
|||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
console.log(["DATA INVESTASI"], data);
|
console.log(["DATA INVESTASI"], data);
|
||||||
|
|
||||||
|
const fixTitle = _.startCase(data.title)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const create = await prisma.investasi.create({
|
const create = await prisma.investasi.create({
|
||||||
data: {
|
data: {
|
||||||
masterStatusInvestasiId: "2",
|
masterStatusInvestasiId: "2",
|
||||||
authorId: data.authorId,
|
authorId: data.authorId,
|
||||||
title: _.startCase(data.title),
|
title: fixTitle,
|
||||||
targetDana: data.targetDana,
|
targetDana: data.targetDana,
|
||||||
hargaLembar: data.hargaLembar,
|
hargaLembar: data.hargaLembar,
|
||||||
totalLembar: data.totalLembar,
|
totalLembar: data.totalLembar,
|
||||||
@@ -30,6 +35,24 @@ async function POST(request: Request) {
|
|||||||
|
|
||||||
console.log("[CREATE INVESTASI]", create);
|
console.log("[CREATE INVESTASI]", create);
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Baru",
|
||||||
|
body: fixTitle as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.investmentByStatus({ status: "review" }),
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
status: 201,
|
status: 201,
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
@@ -12,6 +13,11 @@ async function GET(
|
|||||||
const { id, status } = params;
|
const { id, status } = params;
|
||||||
const fixStatusName = _.startCase(status);
|
const fixStatusName = _.startCase(status);
|
||||||
|
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE;
|
||||||
|
const skipData = page ? page * takeData - takeData : 0;
|
||||||
|
|
||||||
const data = await prisma.job.findMany({
|
const data = await prisma.job.findMany({
|
||||||
orderBy: {
|
orderBy: {
|
||||||
updatedAt: "desc",
|
updatedAt: "desc",
|
||||||
@@ -28,13 +34,20 @@ async function GET(
|
|||||||
id: true,
|
id: true,
|
||||||
title: true,
|
title: true,
|
||||||
},
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success get job",
|
message: "Success get job",
|
||||||
data: data,
|
data: data,
|
||||||
|
pagination: {
|
||||||
|
currentPage: page,
|
||||||
|
dataPerPage: takeData,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
include: {
|
include: {
|
||||||
Author: {
|
Author: {
|
||||||
select: {
|
select: {
|
||||||
|
id: true,
|
||||||
username: true,
|
username: true,
|
||||||
nomor: true,
|
nomor: true,
|
||||||
Profile: {
|
Profile: {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
import { NotificationMobileBodyType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { POST, GET };
|
export { POST, GET };
|
||||||
|
|
||||||
@@ -17,13 +21,32 @@ async function POST(request: Request) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// kirim notifikasi ke semua admin untuk mengetahui ada job baru yang harus di review
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Baru",
|
||||||
|
body: `${create.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.jobByStatus({ status: "review" }),
|
||||||
|
kategoriApp: "JOB",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil disimpan",
|
message: "Berhasil disimpan",
|
||||||
data: create,
|
data: create,
|
||||||
},
|
},
|
||||||
{ status: 201 }
|
{ status: 201 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -32,7 +55,7 @@ async function POST(request: Request) {
|
|||||||
message: "Error create job",
|
message: "Error create job",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,94 +65,129 @@ async function GET(request: Request) {
|
|||||||
const search = searchParams.get("search");
|
const search = searchParams.get("search");
|
||||||
const category = searchParams.get("category");
|
const category = searchParams.get("category");
|
||||||
const authorId = searchParams.get("authorId");
|
const authorId = searchParams.get("authorId");
|
||||||
|
|
||||||
|
const page = Number(searchParams.get("page")) || 1;
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (category === "archive") {
|
if (category === "archive") {
|
||||||
const data = await prisma.job.findMany({
|
const [data, count] = await Promise.all([
|
||||||
where: {
|
prisma.job.findMany({
|
||||||
authorId: authorId,
|
where: {
|
||||||
isActive: true,
|
authorId: authorId,
|
||||||
isArsip: true,
|
isActive: true,
|
||||||
MasterStatus: {
|
isArsip: true,
|
||||||
name: "Publish",
|
MasterStatus: {
|
||||||
},
|
name: "Publish",
|
||||||
// title: {
|
|
||||||
// contains: search || "",
|
|
||||||
// mode: "insensitive",
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
orderBy: {
|
|
||||||
createdAt: "desc",
|
|
||||||
},
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
title: true,
|
|
||||||
deskripsi: true,
|
|
||||||
authorId: true,
|
|
||||||
MasterStatus: {
|
|
||||||
select: {
|
|
||||||
name: true,
|
|
||||||
},
|
},
|
||||||
|
// title: {
|
||||||
|
// contains: search || "",
|
||||||
|
// mode: "insensitive",
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
Author: {
|
orderBy: {
|
||||||
select: {
|
createdAt: "desc",
|
||||||
id: true,
|
},
|
||||||
username: true,
|
select: {
|
||||||
Profile: {
|
id: true,
|
||||||
select: {
|
title: true,
|
||||||
id: true,
|
deskripsi: true,
|
||||||
name: true,
|
authorId: true,
|
||||||
imageId: true,
|
MasterStatus: {
|
||||||
|
select: {
|
||||||
|
name: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Author: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
username: true,
|
||||||
|
Profile: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
imageId: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
take: takeData,
|
||||||
});
|
skip: skipData,
|
||||||
|
}),
|
||||||
|
prisma.job.count({
|
||||||
|
where: {
|
||||||
|
authorId: authorId,
|
||||||
|
isActive: true,
|
||||||
|
isArsip: true,
|
||||||
|
MasterStatus: {
|
||||||
|
name: "Publish",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
} else if (category === "beranda") {
|
} else if (category === "beranda") {
|
||||||
const data = await prisma.job.findMany({
|
const [data, count] = await Promise.all([
|
||||||
where: {
|
prisma.job.findMany({
|
||||||
isActive: true,
|
where: {
|
||||||
isArsip: false,
|
isActive: true,
|
||||||
MasterStatus: {
|
isArsip: false,
|
||||||
name: "Publish",
|
MasterStatus: {
|
||||||
},
|
name: "Publish",
|
||||||
title: {
|
},
|
||||||
contains: search || "",
|
title: {
|
||||||
mode: "insensitive",
|
contains: search || "",
|
||||||
},
|
mode: "insensitive",
|
||||||
},
|
},
|
||||||
orderBy: {
|
},
|
||||||
createdAt: "desc",
|
orderBy: {
|
||||||
},
|
createdAt: "desc",
|
||||||
select: {
|
},
|
||||||
id: true,
|
select: {
|
||||||
title: true,
|
id: true,
|
||||||
deskripsi: true,
|
title: true,
|
||||||
authorId: true,
|
deskripsi: true,
|
||||||
MasterStatus: {
|
authorId: true,
|
||||||
select: {
|
MasterStatus: {
|
||||||
name: true,
|
select: {
|
||||||
},
|
name: true,
|
||||||
},
|
},
|
||||||
Author: {
|
},
|
||||||
select: {
|
Author: {
|
||||||
id: true,
|
select: {
|
||||||
username: true,
|
id: true,
|
||||||
Profile: {
|
username: true,
|
||||||
select: {
|
Profile: {
|
||||||
id: true,
|
select: {
|
||||||
name: true,
|
id: true,
|
||||||
imageId: true,
|
name: true,
|
||||||
},
|
imageId: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
}),
|
||||||
|
prisma.job.count({
|
||||||
|
where: {
|
||||||
|
isActive: true,
|
||||||
|
isArsip: false,
|
||||||
|
MasterStatus: {
|
||||||
|
name: "Publish",
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
contains: search || "",
|
||||||
|
mode: "insensitive",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
fixData = data;
|
fixData = data;
|
||||||
}
|
}
|
||||||
@@ -139,8 +197,12 @@ async function GET(request: Request) {
|
|||||||
success: true,
|
success: true,
|
||||||
message: "Success get data job-vacancy",
|
message: "Success get data job-vacancy",
|
||||||
data: fixData,
|
data: fixData,
|
||||||
|
pagination: {
|
||||||
|
currentPage: page,
|
||||||
|
dataPerPage: takeData,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -149,7 +211,7 @@ async function GET(request: Request) {
|
|||||||
message: "Error get data job-vacancy",
|
message: "Error get data job-vacancy",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
248
src/app/api/mobile/notification/[id]/route.ts
Normal file
248
src/app/api/mobile/notification/[id]/route.ts
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
import { prisma } from "@/lib";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
import { NotificationProp } from "../route";
|
||||||
|
import { adminMessaging } from "@/lib/firebase-admin";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
request: NextRequest,
|
||||||
|
{ params }: { params: { id: string } },
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
console.log("ID", id);
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const category = searchParams.get("category");
|
||||||
|
const fixCategory = _.upperCase(category || "");
|
||||||
|
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
|
console.log("page", page);
|
||||||
|
const takeData = 10;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
|
let fixData;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await prisma.notifikasi.findMany({
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
|
orderBy: {
|
||||||
|
createdAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
recipientId: id,
|
||||||
|
kategoriApp: fixCategory,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Jika pagination digunakan, ambil juga total count untuk informasi
|
||||||
|
let totalCount;
|
||||||
|
let totalPages;
|
||||||
|
if (page) {
|
||||||
|
totalCount = await prisma.notifikasi.count({
|
||||||
|
where: {
|
||||||
|
recipientId: id,
|
||||||
|
kategoriApp: fixCategory,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
totalPages = Math.ceil(totalCount / takeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
fixData = data;
|
||||||
|
|
||||||
|
const response = {
|
||||||
|
success: true,
|
||||||
|
data: fixData,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tambahkan metadata pagination jika parameter page disertakan
|
||||||
|
if (page) {
|
||||||
|
Object.assign(response, {
|
||||||
|
meta: {
|
||||||
|
page,
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
total: totalCount,
|
||||||
|
totalPages,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json(response);
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: (error as Error).message },
|
||||||
|
{ status: 500 },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function PUT(
|
||||||
|
request: NextRequest,
|
||||||
|
{ params }: { params: { id: string } },
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const category = searchParams.get("category");
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (category === "one") {
|
||||||
|
await prisma.notifikasi.update({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
isRead: true,
|
||||||
|
readAt: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (category === "all") {
|
||||||
|
await prisma.notifikasi.updateMany({
|
||||||
|
where: {
|
||||||
|
recipientId: id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
isRead: true,
|
||||||
|
readAt: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
success: true,
|
||||||
|
message: "Notifications marked as read",
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error marking notifications as read:", error);
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: (error as Error).message },
|
||||||
|
{ status: 500 },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// export async function POST(
|
||||||
|
// request: NextRequest,
|
||||||
|
// { params }: { params: { id: string } }
|
||||||
|
// ) {
|
||||||
|
// const { id } = params;
|
||||||
|
|
||||||
|
// const { data } = await request.json();
|
||||||
|
|
||||||
|
// const {
|
||||||
|
// title,
|
||||||
|
// body: notificationBody,
|
||||||
|
// userLoginId,
|
||||||
|
// type,
|
||||||
|
// kategoriApp,
|
||||||
|
// appId,
|
||||||
|
// status,
|
||||||
|
// deepLink,
|
||||||
|
// } = data as NotificationProp;
|
||||||
|
|
||||||
|
// console.log("Notification Send >>", data);
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// // Cari user yang login
|
||||||
|
// const findUserLogin = await prisma.user.findUnique({
|
||||||
|
// where: {
|
||||||
|
// id: userLoginId,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (!findUserLogin) {
|
||||||
|
// return NextResponse.json({ error: "User not found" }, { status: 404 });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Cari token fcm user yang login
|
||||||
|
// const checkFcmToken = await prisma.tokenUserDevice.findFirst({
|
||||||
|
// where: {
|
||||||
|
// userId: findUserLogin.id,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (!checkFcmToken) {
|
||||||
|
// return NextResponse.json(
|
||||||
|
// { error: "FCM Token not found" },
|
||||||
|
// { status: 404 }
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const created = await prisma.notifikasi.create({
|
||||||
|
// data: {
|
||||||
|
// title,
|
||||||
|
// type,
|
||||||
|
// createdAt: new Date(),
|
||||||
|
// appId,
|
||||||
|
// kategoriApp,
|
||||||
|
// pesan: notificationBody || "",
|
||||||
|
// userRoleId: findUserLogin.masterUserRoleId,
|
||||||
|
// status,
|
||||||
|
// deepLink,
|
||||||
|
// senderId: findUserLogin.id,
|
||||||
|
// recipientId: id,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (created) {
|
||||||
|
// const deviceToken = await prisma.tokenUserDevice.findMany({
|
||||||
|
// where: {
|
||||||
|
// userId: id,
|
||||||
|
// isActive: true,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// for (let i of deviceToken) {
|
||||||
|
// const message = {
|
||||||
|
// token: i.token,
|
||||||
|
// notification: {
|
||||||
|
// title,
|
||||||
|
// body: notificationBody || "",
|
||||||
|
// },
|
||||||
|
// data: {
|
||||||
|
// sentAt: new Date().toISOString(), // ✅ Simpan metadata di data
|
||||||
|
// id: created.id,
|
||||||
|
// deepLink: deepLink || "",
|
||||||
|
// },
|
||||||
|
// // Konfigurasi Android untuk prioritas tinggi
|
||||||
|
// android: {
|
||||||
|
// priority: "high" as const, // Kirim secepatnya, bahkan di doze mode untuk notifikasi penting
|
||||||
|
// notification: {
|
||||||
|
// channelId: "default", // Sesuaikan dengan channel yang kamu buat di Android
|
||||||
|
// },
|
||||||
|
|
||||||
|
// ttl: 0 as const, // Kirim secepatnya, jangan tunda
|
||||||
|
// },
|
||||||
|
// // Opsional: tambahkan untuk iOS juga
|
||||||
|
// apns: {
|
||||||
|
// payload: {
|
||||||
|
// aps: {
|
||||||
|
// sound: "default" as const,
|
||||||
|
// // 'content-available': 1 as const, // jika butuh silent push
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// };
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// const response = await adminMessaging.send(message);
|
||||||
|
// console.log("✅ FCM sent successfully", "Response:", response);
|
||||||
|
// } catch (error: any) {
|
||||||
|
// console.error("❌ FCM send failed:", error);
|
||||||
|
// // Lanjutkan ke token berikutnya meski satu gagal
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return NextResponse.json({
|
||||||
|
// success: true,
|
||||||
|
// message: "Notification sent successfully",
|
||||||
|
// });
|
||||||
|
// } catch (error) {
|
||||||
|
// console.error("❌ FCM error:", error);
|
||||||
|
|
||||||
|
// return NextResponse.json(
|
||||||
|
// { error: (error as Error).message },
|
||||||
|
// { status: 500 }
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
31
src/app/api/mobile/notification/[id]/unread-count/route.ts
Normal file
31
src/app/api/mobile/notification/[id]/unread-count/route.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import { prisma } from "@/lib";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
request: NextRequest,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const { id } = params;
|
||||||
|
console.log("User ID:", id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await prisma.notifikasi.count({
|
||||||
|
where: {
|
||||||
|
recipientId: id,
|
||||||
|
isRead: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("List Notification >>", data);
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
success: true,
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Failed to get unread count",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
210
src/app/api/mobile/notification/route.ts
Normal file
210
src/app/api/mobile/notification/route.ts
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
// app/api/test/notifications/route.ts
|
||||||
|
import { prisma } from "@/lib";
|
||||||
|
import { adminMessaging } from "@/lib/firebase-admin";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export type NotificationProp = {
|
||||||
|
title: string;
|
||||||
|
body: string;
|
||||||
|
userLoginId: string;
|
||||||
|
appId?: string;
|
||||||
|
status?: string;
|
||||||
|
kategoriApp?: string;
|
||||||
|
type?: string;
|
||||||
|
deepLink?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function POST(request: NextRequest) {
|
||||||
|
try {
|
||||||
|
const { data } = await request.json();
|
||||||
|
|
||||||
|
const {
|
||||||
|
title,
|
||||||
|
body: notificationBody,
|
||||||
|
userLoginId,
|
||||||
|
type,
|
||||||
|
kategoriApp,
|
||||||
|
appId,
|
||||||
|
status,
|
||||||
|
deepLink,
|
||||||
|
} = data as NotificationProp;
|
||||||
|
|
||||||
|
console.log("Notification Send >>", data);
|
||||||
|
|
||||||
|
// Cari user yang login
|
||||||
|
const findUserLogin = await prisma.user.findUnique({
|
||||||
|
where: {
|
||||||
|
id: userLoginId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!findUserLogin) {
|
||||||
|
return NextResponse.json({ error: "User not found" }, { status: 404 });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cari token fcm user yang login
|
||||||
|
const checkFcmToken = await prisma.tokenUserDevice.findFirst({
|
||||||
|
where: {
|
||||||
|
userId: findUserLogin.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!checkFcmToken) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: "FCM Token not found" },
|
||||||
|
{ status: 404 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jika user yang masuk maka notifikasik akan dikirim ke semua admin , begitu sebaliknya !
|
||||||
|
const filterByCurrentLoginId =
|
||||||
|
findUserLogin.masterUserRoleId === "1" ? "2" : "1";
|
||||||
|
|
||||||
|
// Cari user yang akan menerima notifikasi
|
||||||
|
const findAllUserBySendTo = await prisma.user.findMany({
|
||||||
|
where: {
|
||||||
|
masterUserRoleId: filterByCurrentLoginId,
|
||||||
|
NOT: {
|
||||||
|
id: findUserLogin.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("Find All User By Send To >>", findAllUserBySendTo);
|
||||||
|
|
||||||
|
for (let a of findAllUserBySendTo) {
|
||||||
|
const responseCreatedNotifications = await createNotification({
|
||||||
|
title,
|
||||||
|
type: type as string,
|
||||||
|
createdAt: new Date(),
|
||||||
|
pesan: notificationBody || "",
|
||||||
|
appId: appId as string,
|
||||||
|
kategoriApp: kategoriApp as string,
|
||||||
|
userRoleId: findUserLogin.masterUserRoleId,
|
||||||
|
status: status,
|
||||||
|
deepLink: deepLink,
|
||||||
|
senderId: findUserLogin.id,
|
||||||
|
recipientId: a.id,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (responseCreatedNotifications) {
|
||||||
|
const deviceToken = await prisma.tokenUserDevice.findMany({
|
||||||
|
where: {
|
||||||
|
userId: a.id,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
for (let i of deviceToken) {
|
||||||
|
const message = {
|
||||||
|
token: i.token,
|
||||||
|
notification: {
|
||||||
|
title,
|
||||||
|
body: notificationBody || "",
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
sentAt: new Date().toISOString(), // ✅ Simpan metadata di data
|
||||||
|
id: responseCreatedNotifications.id,
|
||||||
|
deepLink: deepLink || "",
|
||||||
|
// contoh: senderId, type, etc.
|
||||||
|
},
|
||||||
|
// Konfigurasi Android untuk prioritas tinggi
|
||||||
|
android: {
|
||||||
|
priority: "high" as const, // Kirim secepatnya, bahkan di doze mode untuk notifikasi penting
|
||||||
|
notification: {
|
||||||
|
channelId: "default", // Sesuaikan dengan channel yang kamu buat di Android
|
||||||
|
// Opsional: sesuaikan icon & warna
|
||||||
|
// icon: 'ic_notification',
|
||||||
|
// color: '#FFD700',
|
||||||
|
},
|
||||||
|
// FCM akan bangunkan app jika perlu
|
||||||
|
ttl: 0 as const, // Kirim secepatnya, jangan tunda
|
||||||
|
},
|
||||||
|
// Opsional: tambahkan untuk iOS juga
|
||||||
|
apns: {
|
||||||
|
payload: {
|
||||||
|
aps: {
|
||||||
|
sound: "default" as const,
|
||||||
|
// 'content-available': 1 as const, // jika butuh silent push
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await adminMessaging.send(message);
|
||||||
|
console.log(
|
||||||
|
"✅ FCM sent to token:",
|
||||||
|
"Response:",
|
||||||
|
response
|
||||||
|
);
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error("❌ FCM send failed for token:", i.token, error);
|
||||||
|
// Lanjutkan ke token berikutnya meski satu gagal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return NextResponse.json({
|
||||||
|
success: false,
|
||||||
|
message: "Failed to create notification",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NextResponse.json({
|
||||||
|
success: true,
|
||||||
|
message: "Notification sent successfully",
|
||||||
|
});
|
||||||
|
} catch (error: any) {
|
||||||
|
console.error("❌ FCM error:", error);
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: error.message || "Failed to send FCM" },
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function createNotification({
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
createdAt,
|
||||||
|
appId,
|
||||||
|
kategoriApp,
|
||||||
|
pesan,
|
||||||
|
userRoleId,
|
||||||
|
status,
|
||||||
|
deepLink,
|
||||||
|
senderId,
|
||||||
|
recipientId,
|
||||||
|
}: {
|
||||||
|
title: string;
|
||||||
|
type: string;
|
||||||
|
createdAt: Date;
|
||||||
|
appId: string;
|
||||||
|
kategoriApp: string;
|
||||||
|
userRoleId: string;
|
||||||
|
status?: string;
|
||||||
|
deepLink?: string;
|
||||||
|
pesan: string;
|
||||||
|
|
||||||
|
senderId: string;
|
||||||
|
recipientId: string;
|
||||||
|
}) {
|
||||||
|
const createNotification = await prisma.notifikasi.create({
|
||||||
|
data: {
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
createdAt,
|
||||||
|
appId,
|
||||||
|
kategoriApp,
|
||||||
|
pesan,
|
||||||
|
userRoleId,
|
||||||
|
status,
|
||||||
|
deepLink,
|
||||||
|
senderId,
|
||||||
|
recipientId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return createNotification;
|
||||||
|
}
|
||||||
@@ -7,8 +7,13 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
try {
|
try {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const id = searchParams.get("id");
|
const id = searchParams.get("id");
|
||||||
|
const page = parseInt(searchParams.get("page") || "1");
|
||||||
|
const take = 10; // Default 10 data
|
||||||
|
const skip = page * take - take;
|
||||||
|
|
||||||
const data = await prisma.portofolio.findMany({
|
const data = await prisma.portofolio.findMany({
|
||||||
|
skip,
|
||||||
|
take,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: "desc",
|
createdAt: "desc",
|
||||||
},
|
},
|
||||||
@@ -18,22 +23,30 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!data)
|
// Hitung total data untuk informasi pagination
|
||||||
return NextResponse.json(
|
const total = await prisma.portofolio.count({
|
||||||
{
|
where: {
|
||||||
success: false,
|
profileId: id,
|
||||||
message: "Data tidak ditemukan",
|
active: true,
|
||||||
},
|
},
|
||||||
{ status: 404 }
|
});
|
||||||
);
|
|
||||||
|
const totalPages = Math.ceil(total / take);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil mendapatkan data",
|
message: "Berhasil mendapatkan data",
|
||||||
data: data,
|
data: data,
|
||||||
|
meta: {
|
||||||
|
page,
|
||||||
|
take,
|
||||||
|
skip,
|
||||||
|
total,
|
||||||
|
totalPages,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -42,7 +55,7 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "API Error Get Data Potofolio",
|
message: "API Error Get Data Potofolio",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +79,10 @@ async function POST(request: Request) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.subBidang.length > 0 || data.subBidang.map((item: any) => item.id !== "")) {
|
if (
|
||||||
|
data.subBidang.length > 0 ||
|
||||||
|
data.subBidang.map((item: any) => item.id !== "")
|
||||||
|
) {
|
||||||
for (let i of data.subBidang) {
|
for (let i of data.subBidang) {
|
||||||
const createSubBidang =
|
const createSubBidang =
|
||||||
await prisma.portofolio_BidangDanSubBidangBisnis.create({
|
await prisma.portofolio_BidangDanSubBidangBisnis.create({
|
||||||
@@ -84,7 +100,7 @@ async function POST(request: Request) {
|
|||||||
success: false,
|
success: false,
|
||||||
message: "Gagal membuat sub bidang bisnis",
|
message: "Gagal membuat sub bidang bisnis",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +111,7 @@ async function POST(request: Request) {
|
|||||||
success: false,
|
success: false,
|
||||||
message: "Gagal membuat portofolio",
|
message: "Gagal membuat portofolio",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
const createMedsos = await prisma.portofolio_MediaSosial.create({
|
const createMedsos = await prisma.portofolio_MediaSosial.create({
|
||||||
@@ -115,7 +131,7 @@ async function POST(request: Request) {
|
|||||||
success: false,
|
success: false,
|
||||||
message: "Gagal menambahkan medsos",
|
message: "Gagal menambahkan medsos",
|
||||||
},
|
},
|
||||||
{ status: 400 }
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -124,7 +140,7 @@ async function POST(request: Request) {
|
|||||||
message: "Berhasil mendapatkan data",
|
message: "Berhasil mendapatkan data",
|
||||||
data: createPortofolio,
|
data: createPortofolio,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 },
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -133,7 +149,7 @@ async function POST(request: Request) {
|
|||||||
message: "API Error Post Data",
|
message: "API Error Post Data",
|
||||||
reason: (error as Error).message,
|
reason: (error as Error).message,
|
||||||
},
|
},
|
||||||
{ status: 500 }
|
{ status: 500 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
68
src/app/api/mobile/user/[id]/terms-of-app/route.ts
Normal file
68
src/app/api/mobile/user/[id]/terms-of-app/route.ts
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
import { NextResponse } from "next/server";
|
||||||
|
import { prisma } from "@/lib";
|
||||||
|
|
||||||
|
export { POST };
|
||||||
|
|
||||||
|
async function POST(request: Request, { params }: { params: { id: string } }) {
|
||||||
|
const { id } = params;
|
||||||
|
const { searchParams } = new URL(request.url);
|
||||||
|
const category = searchParams.get("category");
|
||||||
|
|
||||||
|
console.log("[ID USER", id);
|
||||||
|
console.log("[SEARCH PARAMS", category);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const user = await prisma.user.findUnique({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: false,
|
||||||
|
message: "User not found",
|
||||||
|
},
|
||||||
|
{ status: 404 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateUser = await prisma.user.update({
|
||||||
|
where: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
acceptedForumTermsAt: new Date(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!updateUser) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: false,
|
||||||
|
message: "Gagal mengupdate data",
|
||||||
|
},
|
||||||
|
{ status: 400 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: true,
|
||||||
|
message: "Syarat dan Ketentuan berhasil diterima",
|
||||||
|
},
|
||||||
|
{ status: 200 }
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
success: false,
|
||||||
|
message: "Error update data from API ",
|
||||||
|
reason: (error as Error).message,
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,8 +5,16 @@ export async function GET(request: Request) {
|
|||||||
try {
|
try {
|
||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const search = searchParams.get("search");
|
const search = searchParams.get("search");
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
|
const takeData = 10;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
|
console.log("SEARCH", search);
|
||||||
|
console.log("PAGE", page);
|
||||||
|
|
||||||
const data = await prisma.user.findMany({
|
const data = await prisma.user.findMany({
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
username: "asc",
|
username: "asc",
|
||||||
},
|
},
|
||||||
@@ -43,16 +51,12 @@ export async function GET(request: Request) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json({
|
||||||
{
|
status: 200,
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil mendapatkan data",
|
message: "Berhasil mendapatkan data",
|
||||||
data: data,
|
data: data,
|
||||||
},
|
});
|
||||||
{
|
|
||||||
status: 200,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
@@ -62,7 +66,7 @@ export async function GET(request: Request) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: 500,
|
status: 500,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { GET, PUT };
|
export { GET, PUT };
|
||||||
|
|
||||||
@@ -10,14 +11,33 @@ async function GET(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const { id, status } = params;
|
const { id, status } = params;
|
||||||
console.log("[ID]", id);
|
|
||||||
const fixStatusName = _.startCase(status);
|
const fixStatusName = _.startCase(status);
|
||||||
console.log("[STATUS]", fixStatusName);
|
|
||||||
|
|
||||||
let fixData;
|
const { searchParams } = new URL(request.url);
|
||||||
|
const page = Number(searchParams.get("page")) || 1;
|
||||||
|
const takeData = PAGINATION_DEFAULT_TAKE
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
|
let data;
|
||||||
|
let totalCount;
|
||||||
|
|
||||||
if (fixStatusName === "Publish") {
|
if (fixStatusName === "Publish") {
|
||||||
fixData = await prisma.voting.findMany({
|
data = await prisma.voting.findMany({
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
isActive: true,
|
||||||
|
akhirVote: {
|
||||||
|
gte: new Date(),
|
||||||
|
},
|
||||||
|
Voting_Status: {
|
||||||
|
name: fixStatusName,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
});
|
||||||
|
|
||||||
|
totalCount = await prisma.voting.count({
|
||||||
where: {
|
where: {
|
||||||
authorId: id,
|
authorId: id,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
@@ -30,7 +50,18 @@ async function GET(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
fixData = await prisma.voting.findMany({
|
data = await prisma.voting.findMany({
|
||||||
|
where: {
|
||||||
|
authorId: id,
|
||||||
|
Voting_Status: {
|
||||||
|
name: fixStatusName,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
});
|
||||||
|
|
||||||
|
totalCount = await prisma.voting.count({
|
||||||
where: {
|
where: {
|
||||||
authorId: id,
|
authorId: id,
|
||||||
Voting_Status: {
|
Voting_Status: {
|
||||||
@@ -40,10 +71,18 @@ async function GET(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const totalPages = Math.ceil(totalCount / takeData);
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success get voting",
|
message: "Success get voting",
|
||||||
data: fixData,
|
data: data,
|
||||||
|
pagination: {
|
||||||
|
currentPage: page,
|
||||||
|
totalPages: totalPages,
|
||||||
|
totalData: totalCount,
|
||||||
|
dataPerPage: takeData,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR]", error);
|
console.log("[ERROR]", error);
|
||||||
@@ -61,9 +100,7 @@ async function PUT(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const { id, status } = params;
|
const { id, status } = params;
|
||||||
console.log("[ID]", id);
|
|
||||||
const fixStatusName = _.startCase(status);
|
const fixStatusName = _.startCase(status);
|
||||||
console.log("[STATUS]", fixStatusName);
|
|
||||||
|
|
||||||
const checkData = await prisma.voting.findFirst({
|
const checkData = await prisma.voting.findFirst({
|
||||||
where: {
|
where: {
|
||||||
@@ -79,8 +116,6 @@ async function PUT(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[CHECKDATA]", checkData);
|
|
||||||
|
|
||||||
if (!checkData)
|
if (!checkData)
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: false,
|
success: false,
|
||||||
@@ -115,8 +150,6 @@ async function PUT(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[UPDATE]", updateData);
|
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "Success update voting",
|
message: "Success update voting",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { GET };
|
export { GET };
|
||||||
|
|
||||||
@@ -8,10 +9,9 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
const { searchParams } = new URL(request.url);
|
const { searchParams } = new URL(request.url);
|
||||||
const authorId = searchParams.get("authorId");
|
const authorId = searchParams.get("authorId");
|
||||||
const category = searchParams.get("category");
|
const category = searchParams.get("category");
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
console.log("[ID]", id);
|
const takeData = PAGINATION_DEFAULT_TAKE;
|
||||||
console.log("[AUTHOR ID]", authorId);
|
const skipData = page ? page * takeData - takeData : 0;
|
||||||
console.log("[CATEGORY]", category);
|
|
||||||
|
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
@@ -53,7 +53,10 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
where: {
|
where: {
|
||||||
votingId: id,
|
votingId: id,
|
||||||
},
|
},
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
select: {
|
select: {
|
||||||
|
id: true,
|
||||||
Voting_DaftarNamaVote: {
|
Voting_DaftarNamaVote: {
|
||||||
select: {
|
select: {
|
||||||
value: true,
|
value: true,
|
||||||
@@ -75,8 +78,6 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[LIST KONTRIBUTOR]", listKontributor);
|
|
||||||
|
|
||||||
fixData = listKontributor;
|
fixData = listKontributor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { sendNotificationMobileToOneUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../../../types/type-mobile-notification";
|
||||||
|
import { routeUserMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
|
||||||
export { GET, DELETE, PUT, POST };
|
export { GET, DELETE, PUT, POST };
|
||||||
|
|
||||||
@@ -39,7 +45,6 @@ async function GET(request: Request, { params }: { params: { id: string } }) {
|
|||||||
const listNamaVote = data?.Voting_DaftarNamaVote || [];
|
const listNamaVote = data?.Voting_DaftarNamaVote || [];
|
||||||
|
|
||||||
for (let v of listNamaVote) {
|
for (let v of listNamaVote) {
|
||||||
|
|
||||||
const kontributor = await prisma.voting_Kontributor.findMany({
|
const kontributor = await prisma.voting_Kontributor.findMany({
|
||||||
where: {
|
where: {
|
||||||
voting_DaftarNamaVoteId: v.id,
|
voting_DaftarNamaVoteId: v.id,
|
||||||
@@ -90,7 +95,6 @@ async function DELETE(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil menghapus data",
|
message: "Berhasil menghapus data",
|
||||||
@@ -171,7 +175,6 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (!updateVoting)
|
if (!updateVoting)
|
||||||
return NextResponse.json({ status: 400, message: "Gagal Update" });
|
return NextResponse.json({ status: 400, message: "Gagal Update" });
|
||||||
}
|
}
|
||||||
@@ -193,11 +196,12 @@ async function PUT(request: Request, { params }: { params: { id: string } }) {
|
|||||||
async function POST(request: Request, { params }: { params: { id: string } }) {
|
async function POST(request: Request, { params }: { params: { id: string } }) {
|
||||||
const { id } = params;
|
const { id } = params;
|
||||||
const { data } = await request.json();
|
const { data } = await request.json();
|
||||||
|
const { chooseId, userId } = data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const findData = await prisma.voting_DaftarNamaVote.findFirst({
|
const findDatapilihan = await prisma.voting_DaftarNamaVote.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: data.chooseId,
|
id: chooseId,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
jumlah: true,
|
jumlah: true,
|
||||||
@@ -205,28 +209,32 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!findData)
|
if (!findDatapilihan)
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: false,
|
success: false,
|
||||||
message: "Data tidak ditemukan",
|
message: "Data tidak ditemukan",
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateData = await prisma.voting_DaftarNamaVote.update({
|
const updateDataPilihan = await prisma.voting_DaftarNamaVote.update({
|
||||||
where: {
|
where: {
|
||||||
id: data.chooseId,
|
id: data.chooseId,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
jumlah: findData.jumlah + 1,
|
jumlah: findDatapilihan.jumlah + 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!updateDataPilihan)
|
||||||
if (!updateData)
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: false,
|
success: false,
|
||||||
message: "Gagal Update Data",
|
message: "Gagal Update Data",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const findVotingData = await prisma.voting.findUnique({
|
||||||
|
where: { id: id },
|
||||||
|
select: { authorId: true, title: true },
|
||||||
|
});
|
||||||
|
|
||||||
const createKontributor = await prisma.voting_Kontributor.create({
|
const createKontributor = await prisma.voting_Kontributor.create({
|
||||||
data: {
|
data: {
|
||||||
votingId: id,
|
votingId: id,
|
||||||
@@ -250,6 +258,21 @@ async function POST(request: Request, { params }: { params: { id: string } }) {
|
|||||||
message: "Gagal Menjadi Kontributor",
|
message: "Gagal Menjadi Kontributor",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
if (userId !== findVotingData?.authorId) {
|
||||||
|
await sendNotificationMobileToOneUser({
|
||||||
|
recipientId: findVotingData?.authorId as string,
|
||||||
|
senderId: userId,
|
||||||
|
payload: {
|
||||||
|
title: "User Melakukan Vote" as NotificationMobileTitleType,
|
||||||
|
body: `Salah satu user telah melakukan voting pada: ${findVotingData?.title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeUserMobile.votingDetailPublised({ id: id }),
|
||||||
|
kategoriApp: "VOTING",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "Berhasil Voting",
|
message: "Berhasil Voting",
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { sendNotificationMobileToManyUser } from "@/lib/mobile/notification/send-notification";
|
||||||
|
import { NotificationMobileBodyType } from "../../../../../types/type-mobile-notification";
|
||||||
|
import { routeAdminMobile } from "@/lib/mobile/route-page-mobile";
|
||||||
|
import { PAGINATION_DEFAULT_TAKE } from "@/lib/constans-value/constansValue";
|
||||||
|
|
||||||
export { POST, GET };
|
export { POST, GET };
|
||||||
|
|
||||||
@@ -41,6 +45,24 @@ async function POST(request: Request) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const adminUsers = await prisma.user.findMany({
|
||||||
|
where: { masterUserRoleId: "2", NOT: { id: data.authorId } },
|
||||||
|
select: { id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: adminUsers.map((user) => user.id),
|
||||||
|
senderId: data.authorId,
|
||||||
|
payload: {
|
||||||
|
title: "Pengajuan Review Baru",
|
||||||
|
body: create.title as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
deepLink: routeAdminMobile.votingByStatus({ status: "review" }),
|
||||||
|
kategoriApp: "VOTING",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{
|
{
|
||||||
success: true,
|
success: true,
|
||||||
@@ -66,8 +88,9 @@ async function GET(request: Request) {
|
|||||||
const category = searchParams.get("category");
|
const category = searchParams.get("category");
|
||||||
const authorId = searchParams.get("authorId");
|
const authorId = searchParams.get("authorId");
|
||||||
const userLoginId = searchParams.get("userLoginId");
|
const userLoginId = searchParams.get("userLoginId");
|
||||||
|
const page = Number(searchParams.get("page"));
|
||||||
console.log("userLoginId >>", userLoginId);
|
const takeData = PAGINATION_DEFAULT_TAKE;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
let fixData;
|
let fixData;
|
||||||
|
|
||||||
@@ -102,6 +125,8 @@ async function GET(request: Request) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
include: {
|
include: {
|
||||||
Voting_DaftarNamaVote: {
|
Voting_DaftarNamaVote: {
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -123,6 +148,8 @@ async function GET(request: Request) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fixData = data;
|
||||||
} else if (category === "contribution") {
|
} else if (category === "contribution") {
|
||||||
const data = await prisma.voting_Kontributor.findMany({
|
const data = await prisma.voting_Kontributor.findMany({
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -131,6 +158,8 @@ async function GET(request: Request) {
|
|||||||
where: {
|
where: {
|
||||||
authorId: authorId,
|
authorId: authorId,
|
||||||
},
|
},
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
include: {
|
include: {
|
||||||
Voting: {
|
Voting: {
|
||||||
select: {
|
select: {
|
||||||
@@ -188,6 +217,8 @@ async function GET(request: Request) {
|
|||||||
mode: "insensitive",
|
mode: "insensitive",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
include: {
|
include: {
|
||||||
Voting_DaftarNamaVote: {
|
Voting_DaftarNamaVote: {
|
||||||
orderBy: {
|
orderBy: {
|
||||||
@@ -226,6 +257,8 @@ async function GET(request: Request) {
|
|||||||
mode: "insensitive",
|
mode: "insensitive",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
take: page ? takeData : undefined,
|
||||||
|
skip: page ? skipData : undefined,
|
||||||
include: {
|
include: {
|
||||||
Voting_DaftarNamaVote: {
|
Voting_DaftarNamaVote: {
|
||||||
orderBy: {
|
orderBy: {
|
||||||
|
|||||||
@@ -21,17 +21,24 @@ import { apiFetchLogin } from "../_lib/api_fetch_auth";
|
|||||||
|
|
||||||
export default function Login({ version }: { version: string }) {
|
export default function Login({ version }: { version: string }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [phone, setPhone] = useState("");
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [isError, setError] = useState(false);
|
const [isError, setError] = useState(false);
|
||||||
|
|
||||||
|
const [phone, setPhone] = useState("");
|
||||||
|
const [countryCode, setCountryCode] = useState<string>("62"); // default ke Indonesia
|
||||||
|
|
||||||
async function onLogin() {
|
async function onLogin() {
|
||||||
const nomor = phone.substring(1);
|
console.log("phone >>", phone);
|
||||||
|
|
||||||
|
const nomor = phone;
|
||||||
if (nomor.length <= 4) return setError(true);
|
if (nomor.length <= 4) return setError(true);
|
||||||
|
|
||||||
|
const fixPhone = `${countryCode}${nomor}`;
|
||||||
|
console.log("fixPhone >>", fixPhone);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const respone = await apiFetchLogin({ nomor: nomor });
|
const respone = await apiFetchLogin({ nomor: fixPhone });
|
||||||
|
|
||||||
if (respone && respone.success) {
|
if (respone && respone.success) {
|
||||||
localStorage.setItem("hipmi_auth_code_id", respone.kodeId);
|
localStorage.setItem("hipmi_auth_code_id", respone.kodeId);
|
||||||
@@ -72,16 +79,38 @@ export default function Login({ version }: { version: string }) {
|
|||||||
<Center>
|
<Center>
|
||||||
<Text c={MainColor.white}>Nomor telepon</Text>
|
<Text c={MainColor.white}>Nomor telepon</Text>
|
||||||
</Center>
|
</Center>
|
||||||
|
|
||||||
<PhoneInput
|
<PhoneInput
|
||||||
countrySelectorStyleProps={{
|
countrySelectorStyleProps={{
|
||||||
buttonStyle: {
|
buttonStyle: {
|
||||||
backgroundColor: MainColor.login,
|
backgroundColor: MainColor.login,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
inputStyle={{ width: "100%", backgroundColor: MainColor.login }}
|
|
||||||
defaultCountry="id"
|
defaultCountry="id"
|
||||||
onChange={(val) => {
|
inputStyle={{ width: "100%", backgroundColor: MainColor.login }}
|
||||||
setPhone(val);
|
onChange={(fullPhone, meta) => {
|
||||||
|
const dialCode = meta.country.dialCode; // string, misal: "62"
|
||||||
|
let localNumber = fullPhone;
|
||||||
|
|
||||||
|
// Hapus kode negara dari awal string
|
||||||
|
if (fullPhone.startsWith(`+${dialCode}`)) {
|
||||||
|
localNumber = fullPhone.slice(`+${dialCode}`.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bersihkan semua non-digit
|
||||||
|
localNumber = localNumber.replace(/\D/g, "");
|
||||||
|
|
||||||
|
// ✅ Filter khusus: untuk Indonesia (+62), hapus leading zero
|
||||||
|
if (dialCode === "62" && localNumber.startsWith("0")) {
|
||||||
|
localNumber = localNumber.replace(/^0+/, ""); // hapus semua 0 di awal
|
||||||
|
}
|
||||||
|
|
||||||
|
// Simpan hasil akhir
|
||||||
|
setCountryCode(dialCode);
|
||||||
|
setPhone(localNumber);
|
||||||
|
|
||||||
|
// console.log("Country Code:", dialCode);
|
||||||
|
// console.log("Clean Local Number:", localNumber);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "default_user",
|
"name": "demo_user",
|
||||||
"nomor": "6282340374412",
|
"nomor": "6282340374412",
|
||||||
"masterUserRoleId": "1",
|
"masterUserRoleId": "1",
|
||||||
"active": true,
|
"active": true,
|
||||||
"termsOfServiceAccepted": false
|
"termsOfServiceAccepted": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin_911",
|
"name": "demo_admin",
|
||||||
"nomor": "6281339158911",
|
"nomor": "6281339158911",
|
||||||
"masterUserRoleId": "3",
|
"masterUserRoleId": "3",
|
||||||
"active": true,
|
"active": true,
|
||||||
|
|||||||
31
src/lib/code-otp-sender.ts
Normal file
31
src/lib/code-otp-sender.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
const sendCodeOtp = async ({
|
||||||
|
nomor,
|
||||||
|
codeOtp,
|
||||||
|
newMessage,
|
||||||
|
}: {
|
||||||
|
nomor: string;
|
||||||
|
codeOtp?: string;
|
||||||
|
newMessage?: string;
|
||||||
|
}) => {
|
||||||
|
const msg = newMessage || `HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.\n\n>> Kode OTP anda: ${codeOtp}.`;
|
||||||
|
const enCode = encodeURIComponent(msg);
|
||||||
|
const res = await fetch(
|
||||||
|
`https://cld-dkr-prod-wajs-server.wibudev.com/api/wa/code?nom=${nomor}&text=${enCode}`,
|
||||||
|
{
|
||||||
|
cache: "no-cache",
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${process.env.WA_SERVER_TOKEN}`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
// const res = await fetch(
|
||||||
|
// `https://wa.wibudev.com/code?nom=${nomor}&text=HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.
|
||||||
|
// \n
|
||||||
|
// >> Kode OTP anda: ${codeOtp}.
|
||||||
|
// `,
|
||||||
|
// );
|
||||||
|
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { sendCodeOtp as funSendToWhatsApp };
|
||||||
1
src/lib/constans-value/constansValue.ts
Normal file
1
src/lib/constans-value/constansValue.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const PAGINATION_DEFAULT_TAKE = 10;
|
||||||
24
src/lib/firebase-admin.ts
Normal file
24
src/lib/firebase-admin.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// lib/firebase-admin.ts
|
||||||
|
import { cert, getApp, getApps, initializeApp } from 'firebase-admin/app';
|
||||||
|
import { getMessaging } from 'firebase-admin/messaging';
|
||||||
|
|
||||||
|
// Ambil dari environment
|
||||||
|
const serviceAccount = {
|
||||||
|
projectId: process.env.FIREBASE_ADMIN_PROJECT_ID,
|
||||||
|
clientEmail: process.env.FIREBASE_ADMIN_CLIENT_EMAIL,
|
||||||
|
privateKey: process.env.FIREBASE_ADMIN_PRIVATE_KEY?.replace(/\\n/g, '\n'),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!serviceAccount.projectId || !serviceAccount.clientEmail || !serviceAccount.privateKey) {
|
||||||
|
throw new Error('Firebase Admin credentials are missing in environment variables');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inisialisasi hanya sekali
|
||||||
|
const app = !getApps().length
|
||||||
|
? initializeApp({
|
||||||
|
credential: cert(serviceAccount),
|
||||||
|
projectId: serviceAccount.projectId,
|
||||||
|
})
|
||||||
|
: getApp();
|
||||||
|
|
||||||
|
export const adminMessaging = getMessaging(app);
|
||||||
25
src/lib/mobile/donation/find-donatur-list.tsx
Normal file
25
src/lib/mobile/donation/find-donatur-list.tsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import prisma from "@/lib/prisma";
|
||||||
|
|
||||||
|
export const funFindDonaturList = async (donasiId: string) => {
|
||||||
|
const finDonatur = await prisma.donasi_Invoice.findMany({
|
||||||
|
where: {
|
||||||
|
donasiId: donasiId,
|
||||||
|
DonasiMaster_StatusInvoice: {
|
||||||
|
name: "Berhasil",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
distinct: ["authorId"], // Ambil hanya authorId unik dari DB
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filter null safety (jika diperlukan)
|
||||||
|
const recipientIds = finDonatur
|
||||||
|
.map((e) => e.authorId)
|
||||||
|
.filter((id): id is string => id !== null && id !== undefined);
|
||||||
|
|
||||||
|
console.log("[FIND DONATUR UNIK]", recipientIds);
|
||||||
|
|
||||||
|
return recipientIds;
|
||||||
|
};
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import {
|
||||||
|
NotificationMobileBodyType,
|
||||||
|
NotificationMobileTitleType,
|
||||||
|
} from "../../../../types/type-mobile-notification";
|
||||||
|
import { sendNotificationMobileToManyUser } from "./send-notification";
|
||||||
|
import { routeUserMobile } from "../route-page-mobile";
|
||||||
|
import prisma from "@/lib/prisma";
|
||||||
|
|
||||||
|
export const sendNotificationInvestmentAddNews = async ({
|
||||||
|
invesmentId,
|
||||||
|
senderId,
|
||||||
|
title,
|
||||||
|
}: {
|
||||||
|
invesmentId: string;
|
||||||
|
senderId: string;
|
||||||
|
title: string;
|
||||||
|
}) => {
|
||||||
|
const findInvestor = await prisma.investasi_Invoice.findMany({
|
||||||
|
where: {
|
||||||
|
investasiId: invesmentId,
|
||||||
|
StatusInvoice: {
|
||||||
|
name: "Berhasil",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
authorId: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[FIND INVESTOR]", findInvestor);
|
||||||
|
|
||||||
|
// SEND NOTIFICATION
|
||||||
|
await sendNotificationMobileToManyUser({
|
||||||
|
recipientIds: findInvestor.map((e) => e.authorId!),
|
||||||
|
senderId: senderId,
|
||||||
|
payload: {
|
||||||
|
title: "Berita terbaru" as NotificationMobileTitleType,
|
||||||
|
body: `Ada berita yang terupdate pada ${title}` as NotificationMobileBodyType,
|
||||||
|
type: "announcement",
|
||||||
|
kategoriApp: "INVESTASI",
|
||||||
|
deepLink: routeUserMobile.investmentDetailPublish({
|
||||||
|
id: invesmentId,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
119
src/lib/mobile/notification/send-notification.ts
Normal file
119
src/lib/mobile/notification/send-notification.ts
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
// lib/notifications/send-notification.ts
|
||||||
|
import { adminMessaging } from "@/lib/firebase-admin";
|
||||||
|
import prisma from "@/lib/prisma";
|
||||||
|
import { NotificationMobilePayload } from "../../../../types/type-mobile-notification";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kirim notifikasi ke satu user (semua device aktifnya)
|
||||||
|
* @param recipientId - ID penerima
|
||||||
|
* @param senderId - ID pengirim
|
||||||
|
* @param payload - Data notifikasi
|
||||||
|
*/
|
||||||
|
|
||||||
|
export async function sendNotificationMobileToOneUser({
|
||||||
|
recipientId,
|
||||||
|
senderId,
|
||||||
|
payload,
|
||||||
|
}: {
|
||||||
|
recipientId: string;
|
||||||
|
senderId: string;
|
||||||
|
payload: NotificationMobilePayload;
|
||||||
|
}) {
|
||||||
|
try {
|
||||||
|
const kategoriToNormalCase = _.lowerCase(payload.kategoriApp);
|
||||||
|
const titleFix =
|
||||||
|
kategoriToNormalCase === "other"
|
||||||
|
? payload.title
|
||||||
|
: `${_.startCase(kategoriToNormalCase)}: ${payload.title}`;
|
||||||
|
console.log("titleFix", titleFix);
|
||||||
|
|
||||||
|
// 1. Simpan notifikasi ke DB
|
||||||
|
const notification = await prisma.notifikasi.create({
|
||||||
|
data: {
|
||||||
|
title: titleFix,
|
||||||
|
pesan: payload.body,
|
||||||
|
deepLink: payload.deepLink,
|
||||||
|
kategoriApp: payload.kategoriApp,
|
||||||
|
recipientId: recipientId,
|
||||||
|
senderId: senderId,
|
||||||
|
type: payload.type.trim(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. Ambil semua token aktif milik penerima
|
||||||
|
const tokens = await prisma.tokenUserDevice.findMany({
|
||||||
|
where: { userId: recipientId },
|
||||||
|
select: { token: true, id: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
if (tokens.length === 0) {
|
||||||
|
console.warn(`No active tokens found for user ${recipientId}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Kirim FCM ke semua token
|
||||||
|
await Promise.allSettled(
|
||||||
|
tokens.map(async ({ token, id }) => {
|
||||||
|
try {
|
||||||
|
await adminMessaging.send({
|
||||||
|
token,
|
||||||
|
notification: {
|
||||||
|
title: titleFix,
|
||||||
|
body: payload.body,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
sentAt: new Date().toISOString(), // ✅ Simpan metadata di data
|
||||||
|
id: notification.id,
|
||||||
|
deepLink: payload.deepLink,
|
||||||
|
recipientId: recipientId,
|
||||||
|
},
|
||||||
|
android: {
|
||||||
|
priority: "high" as const,
|
||||||
|
notification: { channelId: "default" },
|
||||||
|
ttl: 0 as const,
|
||||||
|
},
|
||||||
|
apns: {
|
||||||
|
payload: { aps: { sound: "default" as const } },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} catch (fcmError: any) {
|
||||||
|
// Hapus token jika invalid
|
||||||
|
if (fcmError.code === "messaging/registration-token-not-registered") {
|
||||||
|
// Hapus token dari DB
|
||||||
|
await prisma.tokenUserDevice.delete({ where: { id } });
|
||||||
|
console.log(`🗑️ Invalid token removed: ${id}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(`✅ Notification sent to user ${recipientId}`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Failed to send notification:", error);
|
||||||
|
throw error; // biarkan caller handle error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Kirim notifikasi ke banyak user
|
||||||
|
*/
|
||||||
|
export async function sendNotificationMobileToManyUser({
|
||||||
|
recipientIds,
|
||||||
|
senderId,
|
||||||
|
payload,
|
||||||
|
}: {
|
||||||
|
recipientIds: string[];
|
||||||
|
senderId: string;
|
||||||
|
payload: NotificationMobilePayload;
|
||||||
|
}) {
|
||||||
|
await Promise.allSettled(
|
||||||
|
recipientIds.map((id) =>
|
||||||
|
sendNotificationMobileToOneUser({
|
||||||
|
recipientId: id,
|
||||||
|
senderId: senderId,
|
||||||
|
payload: payload,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
81
src/lib/mobile/route-page-mobile.ts
Normal file
81
src/lib/mobile/route-page-mobile.ts
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
export { routeAdminMobile, routeUserMobile };
|
||||||
|
|
||||||
|
type StatusApp = "review" | "draft" | "reject" | "publish";
|
||||||
|
|
||||||
|
const routeAdminMobile = {
|
||||||
|
userAccess: ({ id }: { id: string }) => `/admin/user-access/${id}`,
|
||||||
|
// JOB
|
||||||
|
jobByStatus: ({ status }: { status: StatusApp }) =>
|
||||||
|
`/admin/job/${status}/status`,
|
||||||
|
|
||||||
|
// EVENT
|
||||||
|
eventByStatus: ({ status }: { status: StatusApp }) =>
|
||||||
|
`/admin/event/${status}/status`,
|
||||||
|
|
||||||
|
// VOTING
|
||||||
|
votingByStatus: ({ status }: { status: StatusApp }) =>
|
||||||
|
`/admin/voting/${status}/status`,
|
||||||
|
|
||||||
|
// FORUM
|
||||||
|
forumPreviewReportPosting: `/admin/forum/report-posting`,
|
||||||
|
forumPreviewReportComment: `/admin/forum/report-comment`,
|
||||||
|
|
||||||
|
// INVESTMENT
|
||||||
|
investmentByStatus: ({ status }: { status: StatusApp }) => `/admin/investment/${status}/status`,
|
||||||
|
investmentDetailPublish: ({
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
}: {
|
||||||
|
id: string;
|
||||||
|
status: StatusApp;
|
||||||
|
}) => `/admin/investment/${id}/${status}`,
|
||||||
|
|
||||||
|
// DONATION
|
||||||
|
donationByStatus: ({ status }: { status: StatusApp }) => `/admin/donation/${status}/status`,
|
||||||
|
donationDetailPublish: ({
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
}: {
|
||||||
|
id: string;
|
||||||
|
status: StatusApp;
|
||||||
|
}) => `/admin/donation/${id}/${status}`,
|
||||||
|
};
|
||||||
|
|
||||||
|
// ================ ROUTER USER =================
|
||||||
|
const routeUserMobile = {
|
||||||
|
home: `/(user)/home`,
|
||||||
|
// JOB
|
||||||
|
jobByStatus: ({ status }: { status?: StatusApp }) =>
|
||||||
|
`/job/(tabs)/status?status=${status}`,
|
||||||
|
jobDetailPublised: ({ id }: { id: string }) => `/job/${id}`,
|
||||||
|
|
||||||
|
// EVENT
|
||||||
|
eventByStatus: ({ status }: { status?: StatusApp }) =>
|
||||||
|
`/event/(tabs)/status?status=${status}`,
|
||||||
|
eventDetailPublised: ({ id }: { id: string }) => `/event/${id}/publish`,
|
||||||
|
|
||||||
|
// VOTING
|
||||||
|
votingByStatus: ({ status }: { status?: StatusApp }) =>
|
||||||
|
`/voting/(tabs)/status?status=${status}`,
|
||||||
|
votingDetailPublised: ({ id }: { id: string }) => `/voting/${id}`,
|
||||||
|
|
||||||
|
// FORUM
|
||||||
|
forumBeranda: `/forum`,
|
||||||
|
forumDetail: ({ id }: { id: string }) => `/forum/${id}`,
|
||||||
|
forumPreviewReportPosting: ({ id }: { id: string }) =>
|
||||||
|
`/forum/${id}/preview-report-posting`,
|
||||||
|
forumPreviewReportComment: ({ id }: { id: string }) =>
|
||||||
|
`/forum/${id}/preview-report-comment`,
|
||||||
|
|
||||||
|
// INVESTMENT
|
||||||
|
investmentPortofolioByStatus: ({ status }: { status?: StatusApp }) =>
|
||||||
|
`/investment/(tabs)/portofolio?status=${status}`,
|
||||||
|
investmentDetailPublish: ({ id }: { id: string }) => `/investment/${id}`,
|
||||||
|
investmentTransaction: `/investment/(tabs)/transaction`,
|
||||||
|
|
||||||
|
// DONATION
|
||||||
|
donationByStatus: ({ status }: { status?: StatusApp }) =>
|
||||||
|
`/donation/(tabs)/status?status=${status}`,
|
||||||
|
donationDetailPublish: ({ id }: { id: string }) => `/donation/${id}`,
|
||||||
|
donationTransaction: `/donation/(tabs)/my-donation`,
|
||||||
|
};
|
||||||
@@ -23,6 +23,6 @@
|
|||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/app_modules/investasi/proses_transaksi/view.jsx", "src/app/api/investasi/midtrans/[id]/route.ts", "src/app_modules/job/create/TextEdit.tsx", "src/app/api/mobile/forum/[id]/report-comment-del-soon/route.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
40
types/type-mobile-notification.ts
Normal file
40
types/type-mobile-notification.ts
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
// Jika semua custom type diawali "custom_"
|
||||||
|
|
||||||
|
export type NotificationMobilePayload = {
|
||||||
|
title: NotificationMobileTitleType;
|
||||||
|
body: NotificationMobileBodyType;
|
||||||
|
userLoginId?: string;
|
||||||
|
appId?: string;
|
||||||
|
status?: string;
|
||||||
|
type: "announcement" | "trigger";
|
||||||
|
deepLink: string;
|
||||||
|
kategoriApp: TypeNotificationCategoryApp;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type NotificationMobileTitleType =
|
||||||
|
| (string & { __type: "NotificationMobileTitleType" })
|
||||||
|
// Admin
|
||||||
|
| "Pengajuan Review Baru"
|
||||||
|
// USER
|
||||||
|
| "Pengajuan Review Ditolak"
|
||||||
|
| "Review Selesai"
|
||||||
|
// to ALL user
|
||||||
|
|
||||||
|
export type NotificationMobileBodyType =
|
||||||
|
// USER
|
||||||
|
| (string & { __type: "NotificationMobileBodyType" })
|
||||||
|
| "Ada pengajuan review" // tambah title
|
||||||
|
|
||||||
|
// ADMIN
|
||||||
|
| "Mohon perbaiki data sesuai catatan penolakan !"
|
||||||
|
| "Selamat data anda telah terpublikasi"
|
||||||
|
|
||||||
|
export type TypeNotificationCategoryApp =
|
||||||
|
| "EVENT"
|
||||||
|
| "JOB"
|
||||||
|
| "VOTING"
|
||||||
|
| "DONASI"
|
||||||
|
| "INVESTASI"
|
||||||
|
| "COLLABORATION"
|
||||||
|
| "FORUM"
|
||||||
|
| "OTHER";
|
||||||
18
x.sh
18
x.sh
@@ -1,7 +1,15 @@
|
|||||||
TOKEN="eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7ImlkIjoiY202MGc3eDR2MDAwODEyNHVsbmg0MDR6bSIsIm5vbW9yIjoiNjI4MTMzOTE1ODkxMSIsInVzZXJuYW1lIjoiQmFnYXNfYmFudW5hIiwiYWN0aXZlIjp0cnVlLCJtYXN0ZXJVc2VyUm9sZUlkIjoiMSJ9LCJpYXQiOjE3NDQwOTQyMjQsImV4cCI6MTk2NDk5NzQyNH0.ByTKFPpcL6oljeizWkUM4Z0jaWzc9oPrkpCCImQY3KE"
|
# TOKEN="eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7ImlkIjoiY202MGc3eDR2MDAwODEyNHVsbmg0MDR6bSIsIm5vbW9yIjoiNjI4MTMzOTE1ODkxMSIsInVzZXJuYW1lIjoiQmFnYXNfYmFudW5hIiwiYWN0aXZlIjp0cnVlLCJtYXN0ZXJVc2VyUm9sZUlkIjoiMSJ9LCJpYXQiOjE3NDQwOTQyMjQsImV4cCI6MTk2NDk5NzQyNH0.ByTKFPpcL6oljeizWkUM4Z0jaWzc9oPrkpCCImQY3KE"
|
||||||
URL="https://stg-hipmi.wibudev.com"
|
URL="http://localhost:3000"
|
||||||
# curl -X GET -H "Authorization: Bearer $TOKEN" ${URL}/api/middleware
|
# curl -X GET -H "Authorization: Bearer $TOKEN" ${URL}/api/middleware
|
||||||
|
# curl -X GET -H "Cookie: hipmi-key=$TOKEN; user_id=789" ${URL}/dev/home | tee test.html
|
||||||
|
|
||||||
|
curl -X POST ${URL}/api/mobile/notification \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
curl -X GET -H "Cookie: hipmi-key=$TOKEN; user_id=789" ${URL}/dev/home | tee test.html
|
-d '{
|
||||||
|
"fcmToken": "cVmHm-3P4E-1vjt6AA9kSF:APA91bHTkHjGTLxrFsb6Le6bZmzboZhwMGYXU4p0FP9yEeXixLDXNKS4F5vLuZV3sRgSnjjQsPpLOgstVLHJB8VJTObctKLdN-CxAp4dnP7Jbc_mH53jWvs",
|
||||||
|
"title": "Test dari Backend (App Router)!",
|
||||||
|
"body": "Berhasil di App Router!",
|
||||||
|
"userLoginId": "cmha7p6yc0000cfoe5w2e7gdr",
|
||||||
|
"type": "NOTIFICATION",
|
||||||
|
"kategoriApp": "PERCOBAAN"
|
||||||
|
}'
|
||||||
48
zCoba.js
48
zCoba.js
@@ -1,28 +1,26 @@
|
|||||||
// const data = [
|
const { PrismaClient } = require('@prisma/client')
|
||||||
// {
|
|
||||||
// authorId: "clx8pl7r90005su4mldioo0v1",
|
|
||||||
// Donasi: {
|
|
||||||
// id: "clyr304q0000410ljvzms3mag",
|
|
||||||
// title: "Donasi Bencana Alam Aceh",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// authorId: "clx8pl7r90005su4mldioo0v1",
|
|
||||||
// Donasi: {
|
|
||||||
// id: "clyr304q0000410ljvzms3mag",
|
|
||||||
// title: "Donasi Bencana Alam Aceh",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// authorId: "clycka5eu0001ina3i1ssgze9",
|
|
||||||
// Donasi: {
|
|
||||||
// id: "clyr304q0000410ljvzms3mag",
|
|
||||||
// title: "Donasi Bencana Alam Aceh",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// ];
|
|
||||||
|
|
||||||
|
const prisma = new PrismaClient()
|
||||||
|
|
||||||
console.error("errornya disini klik aja",import.meta.url);
|
async function main() {
|
||||||
console.log(new Set(data.map((d) => d.authorId)));
|
const result = await prisma.notifikasi.updateMany({
|
||||||
|
where: {
|
||||||
|
recipientId: 'cmha7p6yc0000cfoe5w2e7gdr',
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
isRead: false,
|
||||||
|
readAt: null,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(`✅ Rows affected: ${result.count}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('❌ Error:', err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
await prisma.$disconnect()
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user