bkper 4.6.0 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +210 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[bkper.yaml reference]:
|
|
1
|
+
[bkper.yaml reference]: #bkperyaml-reference
|
|
2
2
|
[Developer Docs]: https://bkper.com/docs
|
|
3
3
|
[App Template]: https://github.com/bkper/bkper-app-template
|
|
4
4
|
[Skills Repository]: https://github.com/bkper/skills
|
|
@@ -32,6 +32,19 @@ yarn global add bkper
|
|
|
32
32
|
bkper auth login
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
### Access Token
|
|
36
|
+
|
|
37
|
+
Use the access token for direct API calls from any tool:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Print the current access token
|
|
41
|
+
TOKEN=$(bkper auth token)
|
|
42
|
+
|
|
43
|
+
# Use it with curl, httpie, or any HTTP client
|
|
44
|
+
curl -s -H "Authorization: Bearer $TOKEN" \
|
|
45
|
+
https://api.bkper.app/v5/books | jq '.items[].name'
|
|
46
|
+
```
|
|
47
|
+
|
|
35
48
|
### Try It
|
|
36
49
|
|
|
37
50
|
```bash
|
|
@@ -523,7 +536,201 @@ bkper app secrets delete API_KEY
|
|
|
523
536
|
|
|
524
537
|
### Configuration
|
|
525
538
|
|
|
526
|
-
Apps are configured via a `bkper.yaml` file in the project root. See the complete
|
|
539
|
+
Apps are configured via a `bkper.yaml` file in the project root. See the complete **[bkper.yaml reference]** below.
|
|
540
|
+
|
|
541
|
+
<details>
|
|
542
|
+
<summary>bkper.yaml reference</summary>
|
|
543
|
+
|
|
544
|
+
```yaml
|
|
545
|
+
# =============================================================================
|
|
546
|
+
# bkper.yaml Reference
|
|
547
|
+
# =============================================================================
|
|
548
|
+
# This file documents all available configuration options for Bkper Apps.
|
|
549
|
+
# Copy the fields you need to your app's bkper.yaml file.
|
|
550
|
+
#
|
|
551
|
+
# For a minimal working template, see:
|
|
552
|
+
# https://github.com/bkper/bkper-app-template
|
|
553
|
+
# =============================================================================
|
|
554
|
+
|
|
555
|
+
# -----------------------------------------------------------------------------
|
|
556
|
+
# APP IDENTITY
|
|
557
|
+
# -----------------------------------------------------------------------------
|
|
558
|
+
# The app id is permanent and cannot be changed after creation.
|
|
559
|
+
# Use lowercase letters, numbers, and hyphens only.
|
|
560
|
+
id: my-app
|
|
561
|
+
|
|
562
|
+
# Display name shown in the Bkper UI
|
|
563
|
+
name: My App
|
|
564
|
+
|
|
565
|
+
# Brief description of what the app does
|
|
566
|
+
description: A Bkper app that does something useful
|
|
567
|
+
|
|
568
|
+
# -----------------------------------------------------------------------------
|
|
569
|
+
# BRANDING
|
|
570
|
+
# -----------------------------------------------------------------------------
|
|
571
|
+
# App logo for light mode (SVG recommended, PNG/JPG supported)
|
|
572
|
+
logoUrl: https://example.com/logo.svg
|
|
573
|
+
|
|
574
|
+
# App logo for dark mode (required for proper theming)
|
|
575
|
+
logoUrlDark: https://example.com/logo-dark.svg
|
|
576
|
+
|
|
577
|
+
# App website or documentation URL
|
|
578
|
+
website: https://example.com
|
|
579
|
+
|
|
580
|
+
# -----------------------------------------------------------------------------
|
|
581
|
+
# OWNERSHIP
|
|
582
|
+
# -----------------------------------------------------------------------------
|
|
583
|
+
# Developer/company name
|
|
584
|
+
ownerName: Your Name
|
|
585
|
+
|
|
586
|
+
# Owner's logo/avatar URL
|
|
587
|
+
ownerLogoUrl: https://example.com/owner-logo.png
|
|
588
|
+
|
|
589
|
+
# Owner's website
|
|
590
|
+
ownerWebsite: https://yoursite.com
|
|
591
|
+
|
|
592
|
+
# Source code repository URL
|
|
593
|
+
repoUrl: https://github.com/you/my-app
|
|
594
|
+
|
|
595
|
+
# Whether the repository is private
|
|
596
|
+
repoPrivate: true
|
|
597
|
+
|
|
598
|
+
# Mark as deprecated (hides from app listings, existing installs continue working)
|
|
599
|
+
deprecated: false
|
|
600
|
+
|
|
601
|
+
# -----------------------------------------------------------------------------
|
|
602
|
+
# ACCESS CONTROL
|
|
603
|
+
# -----------------------------------------------------------------------------
|
|
604
|
+
# Who can update the app configuration and deploy new versions.
|
|
605
|
+
# Comma-separated list of Bkper usernames (not emails).
|
|
606
|
+
# Supports domain wildcards for registered custom domains: *@yourdomain.com
|
|
607
|
+
developers: victor, aldo, *@bkper.com
|
|
608
|
+
|
|
609
|
+
# Who can install and use the app.
|
|
610
|
+
# Same format as developers. Leave empty for public apps.
|
|
611
|
+
users: maria, *@acme.com
|
|
612
|
+
|
|
613
|
+
# -----------------------------------------------------------------------------
|
|
614
|
+
# MENU INTEGRATION (optional)
|
|
615
|
+
# -----------------------------------------------------------------------------
|
|
616
|
+
# When configured, adds a menu item to Bkper's "More" menu.
|
|
617
|
+
# Clicking opens a popup with the specified URL.
|
|
618
|
+
|
|
619
|
+
# Production menu URL (supports variable substitution)
|
|
620
|
+
menuUrl: https://${id}.bkper.app?bookId=${book.id}
|
|
621
|
+
|
|
622
|
+
# Development menu URL (used when developer runs the app)
|
|
623
|
+
menuUrlDev: http://localhost:8787?bookId=${book.id}
|
|
624
|
+
|
|
625
|
+
# Custom menu text (defaults to app name if not specified)
|
|
626
|
+
menuText: Open My App
|
|
627
|
+
|
|
628
|
+
# Popup dimensions in pixels
|
|
629
|
+
menuPopupWidth: 500
|
|
630
|
+
menuPopupHeight: 300
|
|
631
|
+
|
|
632
|
+
# -----------------------------------------------------------------------------
|
|
633
|
+
# Menu URL Variables
|
|
634
|
+
# -----------------------------------------------------------------------------
|
|
635
|
+
# The following variables can be used in menuUrl and menuUrlDev:
|
|
636
|
+
#
|
|
637
|
+
# ${book.id} - Current book ID
|
|
638
|
+
# ${book.properties.xxx} - Book property value (replace xxx with property key)
|
|
639
|
+
# ${account.id} - Selected account ID (in account context)
|
|
640
|
+
# ${account.properties.xxx} - Account property value
|
|
641
|
+
# ${group.id} - Selected group ID (in group context)
|
|
642
|
+
# ${group.properties.xxx} - Group property value
|
|
643
|
+
# ${transactions.ids} - Comma-separated selected transaction IDs
|
|
644
|
+
# ${transactions.query} - Current search query
|
|
645
|
+
# -----------------------------------------------------------------------------
|
|
646
|
+
|
|
647
|
+
# -----------------------------------------------------------------------------
|
|
648
|
+
# EVENT HANDLING (optional)
|
|
649
|
+
# -----------------------------------------------------------------------------
|
|
650
|
+
# When configured, Bkper calls your webhook URL when subscribed events occur.
|
|
651
|
+
|
|
652
|
+
# Production webhook URL
|
|
653
|
+
webhookUrl: https://${id}.bkper.app/events
|
|
654
|
+
|
|
655
|
+
# Development webhook URL (auto-updated by bkper app dev)
|
|
656
|
+
webhookUrlDev: https://<random>.trycloudflare.com/events
|
|
657
|
+
|
|
658
|
+
# API version for event payloads
|
|
659
|
+
apiVersion: v5
|
|
660
|
+
|
|
661
|
+
# Events to subscribe to (remove events you don't need)
|
|
662
|
+
events:
|
|
663
|
+
- TRANSACTION_POSTED
|
|
664
|
+
- TRANSACTION_CHECKED
|
|
665
|
+
- TRANSACTION_UNCHECKED
|
|
666
|
+
- TRANSACTION_UPDATED
|
|
667
|
+
- TRANSACTION_DELETED
|
|
668
|
+
- TRANSACTION_RESTORED
|
|
669
|
+
- ACCOUNT_CREATED
|
|
670
|
+
- ACCOUNT_UPDATED
|
|
671
|
+
- ACCOUNT_DELETED
|
|
672
|
+
- GROUP_CREATED
|
|
673
|
+
- GROUP_UPDATED
|
|
674
|
+
- GROUP_DELETED
|
|
675
|
+
- FILE_CREATED
|
|
676
|
+
- BOOK_UPDATED
|
|
677
|
+
|
|
678
|
+
# -----------------------------------------------------------------------------
|
|
679
|
+
# FILE PATTERNS (optional)
|
|
680
|
+
# -----------------------------------------------------------------------------
|
|
681
|
+
# For file processing apps. When a file matching these patterns is uploaded,
|
|
682
|
+
# a FILE_CREATED event is triggered with the file content.
|
|
683
|
+
filePatterns:
|
|
684
|
+
- '*.ofx'
|
|
685
|
+
- '*.csv'
|
|
686
|
+
|
|
687
|
+
# -----------------------------------------------------------------------------
|
|
688
|
+
# PROPERTIES SCHEMA (optional)
|
|
689
|
+
# -----------------------------------------------------------------------------
|
|
690
|
+
# Defines autocomplete suggestions for custom properties in the Bkper UI.
|
|
691
|
+
# Helps users discover and use the correct property keys/values for your app.
|
|
692
|
+
propertiesSchema:
|
|
693
|
+
book:
|
|
694
|
+
keys:
|
|
695
|
+
- my_app_enabled
|
|
696
|
+
- my_app_config
|
|
697
|
+
values:
|
|
698
|
+
- 'true'
|
|
699
|
+
- 'false'
|
|
700
|
+
group:
|
|
701
|
+
keys:
|
|
702
|
+
- my_app_category
|
|
703
|
+
values:
|
|
704
|
+
- category_a
|
|
705
|
+
- category_b
|
|
706
|
+
account:
|
|
707
|
+
keys:
|
|
708
|
+
- my_app_sync_id
|
|
709
|
+
transaction:
|
|
710
|
+
keys:
|
|
711
|
+
- my_app_reference
|
|
712
|
+
|
|
713
|
+
# -----------------------------------------------------------------------------
|
|
714
|
+
# DEPLOYMENT CONFIGURATION (optional)
|
|
715
|
+
# -----------------------------------------------------------------------------
|
|
716
|
+
# For apps deployed to Bkper's Workers for Platforms infrastructure.
|
|
717
|
+
deployment:
|
|
718
|
+
# Web handler (serves UI and API)
|
|
719
|
+
web:
|
|
720
|
+
bundle: packages/web/server/dist
|
|
721
|
+
# assets: packages/web/client/dist # Static assets (when supported)
|
|
722
|
+
|
|
723
|
+
# Events handler (processes webhooks)
|
|
724
|
+
events:
|
|
725
|
+
bundle: packages/events/dist
|
|
726
|
+
|
|
727
|
+
# Platform services available to your app (one per type, auto-provisioned)
|
|
728
|
+
# See: https://developers.cloudflare.com/kv/
|
|
729
|
+
services:
|
|
730
|
+
- KV # Key-value storage
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
</details>
|
|
527
734
|
|
|
528
735
|
**Environment variables:**
|
|
529
736
|
|
|
@@ -542,7 +749,7 @@ Apps are configured via a `bkper.yaml` file in the project root. See the complet
|
|
|
542
749
|
|
|
543
750
|
- `app init <name>` - Scaffold a new app from the template
|
|
544
751
|
- `app list` - List all apps you have access to
|
|
545
|
-
- `app sync` - Sync [bkper.yaml reference] configuration (URLs, description) to Bkper API
|
|
752
|
+
- `app sync` - Sync [bkper.yaml][bkper.yaml reference] configuration (URLs, description) to Bkper API
|
|
546
753
|
- `app build` - Build app artifacts
|
|
547
754
|
- `app deploy` - Deploy built artifacts to Cloudflare Workers for Platforms
|
|
548
755
|
- `-p, --preview` - Deploy to preview environment
|