myportal-vue3-api-client
Vue 3 compatible API client for MyPortal V2 services
2,653
| Install | |
|---|---|
npm install myportal-vue3-api-client |
|
| Latest Version: | 1.2.5 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Sep 23, 2026 |
| Links: | npm |
Maintainer: awesselburg
MyPortal Vue3 Library
Vue 3 Library für MyPortal Clients mit TypeScript Support.
🚀 Features
- TypeScript Support
- Composition API Ready
- Tree-shakeable ESM/CJS Builds
- Services:
- AuthService
- DataService
- ImageService
- S3Service
- CalendarService
- MailService
- SlackService
- ValidationService
- WebSocketService
- DockerService
- AnalytixService (First-Party Website-Tracking)
📦 Installation
npm install myportal-vue3-api-client
🔧 Usage
import { MyPortalClient } from 'myportal-vue3-api-client';
const client = new MyPortalClient({
baseURL: 'http://localhost:3000/api/v2',
apiKey: 'your-api-key'
});
// Use services
const data = await client.data.getItems({ table: 'users' });
// Website analytics (after cookie consent)
client.analytix.setConsent(true);
client.analytix.pageview();
client.analytix.track('booking_inquiry', { nights: 7 });
Analytix (Website-Tracking)
First-party Events an die MyPortal-API — Auswertung nur im CMS (JWT), Ingest per Site-API-Key:
import { useAnalytix } from 'myportal-vue3-api-client';
// Vue Router: automatische Pageviews
useAnalytix(router);
// One-Page / Hash-Navigation: manuell pageview() bei Section-Wechsel
client.analytix.setConsent(true);
client.analytix.pageview({ path: '#apartments' });
🏗️ Build
# Build Library
npm run build
# Watch Mode
npm run dev
📚 Documentation
Siehe EXAMPLES.md für detaillierte Beispiele.
🧪 Tests
npm test
📁 Struktur
src/
├── core/ # BaseClient
├── services/ # Service Classes
├── composables/ # Vue Composables
├── types/ # TypeScript Types
└── index.ts # Main Export
🔗 Related Repos
- API:
myportal-api - Admin Web:
myportal-admin-web - CMS:
myportal-cms
📝 License
MIT
Related Packages
@blax-software/networking
Plug-and-play API + WebSocket client. Framework-agnostic core with optional Vue,...
1,193
0
vue-api-kit
A powerful and flexible API client for Vue 3 applications, built with TypeScript...
4,533
3
@mrzr/api-client
A TypeScript API client built on fetch, focused on browser auth: coalesced token...
1,615
0
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.2.5 | ^3.0.0 | MIT | |
| 1.2.4 | ^3.0.0 | MIT | |
| 1.2.3 | ^3.0.0 | MIT | |
| 1.2.2 | ^3.0.0 | MIT | |
| 1.2.1 | ^3.0.0 | MIT | |
| 1.2.0 | ^3.0.0 | MIT | |
| 1.1.10 | ^3.0.0 | MIT | |
| 1.1.9 | ^3.0.0 | MIT | |
| 1.1.8 | ^3.0.0 | MIT | |
| 1.1.7 | ^3.0.0 | MIT | |
| 1.1.6 | ^3.0.0 | MIT | |
| 1.1.5 | ^3.0.0 | MIT | |
| 1.1.4 | ^3.0.0 | MIT | |
| 1.1.3 | ^3.0.0 | MIT | |
| 1.1.2 | ^3.0.0 | MIT | |
| 1.1.1 | ^3.0.0 | MIT | |
| 1.1.0 | ^3.0.0 | MIT | |
| 1.0.1 | ^3.0.0 | MIT | |
| 1.0.0 | ^3.0.0 | MIT |