@lunch-money/v2-api-spec 2.11.1-preview.1 → 2.11.1-preview.11
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 +21 -66
- package/lunch-money-api-v2.yaml +760 -405
- package/oauth-client-logo/index.d.ts +27 -0
- package/oauth-client-logo/index.js +32 -0
- package/oauth-scopes/catalog.d.ts +9 -0
- package/oauth-scopes/catalog.js +500 -0
- package/oauth-scopes/index.d.ts +2 -0
- package/oauth-scopes/index.js +12 -0
- package/oauth-scopes/types.d.ts +50 -0
- package/oauth-scopes/types.js +2 -0
- package/package.json +34 -9
- package/version-history.md +25 -19
- package/update-urls.sh +0 -135
package/package.json
CHANGED
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunch-money/v2-api-spec",
|
|
3
|
-
"version": "2.11.1-preview.
|
|
3
|
+
"version": "2.11.1-preview.11",
|
|
4
4
|
"description": "OpenAPI specification and version history for the Lunch Money v2 API",
|
|
5
5
|
"main": "lunch-money-api-v2.yaml",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./lunch-money-api-v2.yaml",
|
|
8
|
+
"./lunch-money-api-v2.yaml": "./lunch-money-api-v2.yaml",
|
|
9
|
+
"./version-history.md": "./version-history.md",
|
|
10
|
+
"./oauth-scopes": {
|
|
11
|
+
"types": "./oauth-scopes/index.d.ts",
|
|
12
|
+
"require": "./oauth-scopes/index.js",
|
|
13
|
+
"default": "./oauth-scopes/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./oauth-client-logo": {
|
|
16
|
+
"types": "./oauth-client-logo/index.d.ts",
|
|
17
|
+
"require": "./oauth-client-logo/index.js",
|
|
18
|
+
"default": "./oauth-client-logo/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
"./*": "./*"
|
|
22
|
+
},
|
|
6
23
|
"files": [
|
|
7
24
|
"lunch-money-api-v2.yaml",
|
|
8
25
|
"version-history.md",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
26
|
+
"oauth-scopes",
|
|
27
|
+
"oauth-client-logo",
|
|
28
|
+
"README.md"
|
|
11
29
|
],
|
|
12
30
|
"scripts": {
|
|
13
31
|
"prepare": "husky install",
|
|
14
|
-
"
|
|
32
|
+
"build:oauth-scopes": "tsc -p tsconfig.oauth-scopes.json",
|
|
33
|
+
"build:oauth-client-logo": "tsc -p tsconfig.oauth-client-logo.json",
|
|
34
|
+
"build:shared-contracts": "npm run build:oauth-scopes && npm run build:oauth-client-logo",
|
|
35
|
+
"test:oauth-scopes": "npm run build:oauth-scopes && node --test test/oauth-scopes/*.test.js",
|
|
36
|
+
"test:oauth-client-logo": "npm run build:oauth-client-logo && node --test test/oauth-client-logo/*.test.js",
|
|
37
|
+
"prepublishOnly": "npm run build:shared-contracts && node scripts/prep-for-publish.js",
|
|
15
38
|
"postpublish": "node scripts/restore-readme.js",
|
|
16
|
-
"publish:docs": "
|
|
17
|
-
"publish:spec": "
|
|
39
|
+
"publish:docs": "node scripts/publish-docs.js --tag preview",
|
|
40
|
+
"publish:spec": "node scripts/publish-spec.js --tag preview",
|
|
18
41
|
"publish:all": "npm run publish:docs && npm run publish:spec",
|
|
19
|
-
"publish:docs:latest": "
|
|
20
|
-
"publish:spec:latest": "
|
|
42
|
+
"publish:docs:latest": "node scripts/publish-docs.js",
|
|
43
|
+
"publish:spec:latest": "node scripts/publish-spec.js",
|
|
21
44
|
"publish:all:latest": "npm run publish:docs:latest && npm run publish:spec:latest",
|
|
22
45
|
"pack:docs": "node scripts/pack-docs.js",
|
|
23
46
|
"pack:spec": "node scripts/pack-spec.js"
|
|
@@ -31,6 +54,8 @@
|
|
|
31
54
|
"author": "",
|
|
32
55
|
"license": "ISC",
|
|
33
56
|
"devDependencies": {
|
|
34
|
-
"husky": "^8.0.3"
|
|
57
|
+
"husky": "^8.0.3",
|
|
58
|
+
"typescript": "^5.9.0",
|
|
59
|
+
"yaml": "^2.8.0"
|
|
35
60
|
}
|
|
36
61
|
}
|
package/version-history.md
CHANGED
|
@@ -6,29 +6,35 @@ The Lunch Money API spec uses a modified version of SEMVER for its versioning me
|
|
|
6
6
|
- The revision number represents the number of updates since the last endpoint was added. For example, each time changes are made to one of the existing three APIs as described above, the revision number will be bumped.
|
|
7
7
|
|
|
8
8
|
## v2.11.1 - TBD
|
|
9
|
+
- Add the OAuth scope and scope-group catalog mapped to V2 `operationId` values
|
|
9
10
|
- Add `GET /me/account/settings` and `PUT /me/account/settings` for account-level settings
|
|
10
11
|
- Add `GET /me/user/settings` and `PUT /me/user/settings` for user-level display and formatting preferences
|
|
12
|
+
- Add `GET /me/user/account/settings` and `PUT /me/user/account/settings` for settings specific to a user and budgeting account
|
|
13
|
+
from `GET /me/account/settings` and `PUT /me/account/settings` to `GET /me/user/account/settings` and `PUT /me/user/account/settings`
|
|
14
|
+
- Add `include_pending_in_totals` to `GET /me/account/settings` and `PUT /me/account/settings`
|
|
15
|
+
- Add `default_manual_account_id` to `GET /me/user/account/settings` and `PUT /me/user/account/settings`
|
|
11
16
|
- Document `GET /budgets/settings` response schema publicly; change `budget_period_quantity` to integer
|
|
12
17
|
|
|
13
|
-
## v2.11.0 -
|
|
14
|
-
- Add `
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
18
|
+
## v2.11.0 - Jul 31, 2026
|
|
19
|
+
- Add `/balance_history` endpoints:
|
|
20
|
+
- `GET /balance_history`
|
|
21
|
+
- `GET /balance_history/{account_type}/{account_id}`
|
|
22
|
+
- `GET /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
23
|
+
- `PUT /balance_history/{account_type}/{account_id}`
|
|
24
|
+
- `PUT /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
25
|
+
- `DELETE /balance_history/entries/{id}`
|
|
26
|
+
- `DELETE /balance_history/{account_type}/{account_id}`
|
|
27
|
+
- `DELETE /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
28
|
+
- `PUT /balance_history/deleted/{account_id}/details`
|
|
29
|
+
- Remove `rollover_pool` from category objects in the `GET /summary` response
|
|
30
|
+
- Allow setting `external_id` on Plaid-account transactions
|
|
31
|
+
- Allow `null` for `category_id` and `notes` on split children to clear those values instead of inheriting from the parent
|
|
32
|
+
|
|
33
|
+
## v2.10.0 - Jul 31, 2026
|
|
34
|
+
- Add crypto endpoints:
|
|
35
|
+
- `GET /cryptocurrencies`
|
|
36
|
+
- `GET /crypto/manual`, `POST /crypto/manual`, `GET /crypto/manual/{id}`, `PUT /crypto/manual/{id}`, `DELETE /crypto/manual/{id}`
|
|
37
|
+
- `GET /crypto/synced`, `GET /crypto/synced/{id}`, `GET /crypto/synced/{id}/{symbol}`, `POST /crypto/synced/{id}/refresh`
|
|
32
38
|
|
|
33
39
|
## v2.9.4 - May 23, 2026
|
|
34
40
|
- Increase allowable length for transaction `notes`.
|
package/update-urls.sh
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script to update URLs in the OpenAPI specification file
|
|
4
|
-
# This is useful for switching the docs/mock server URL between local development and production
|
|
5
|
-
# Note: All references to DOCS_DEPLOY_URL throughout the file are toggled; the API server URL remains unchanged
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
# # In git repo:
|
|
9
|
-
# ./scripts/update-urls.sh --local|--production
|
|
10
|
-
#
|
|
11
|
-
# # In npm package:
|
|
12
|
-
# ./update-urls.sh --local|--production
|
|
13
|
-
#
|
|
14
|
-
# Flags:
|
|
15
|
-
# --local Switch docs/mock server URL to local development (http://localhost:3000/v2)
|
|
16
|
-
# --production Switch docs/mock server URL to production deployment URL
|
|
17
|
-
#
|
|
18
|
-
# Environment variables (optional, with defaults):
|
|
19
|
-
# LOCAL_URL - Local development URL (default: http://localhost:3000/v2)
|
|
20
|
-
# DOCS_DEPLOY_URL - Docs/mock deployment URL (default: https://alpha.lunchmoney.dev/v2)
|
|
21
|
-
#
|
|
22
|
-
# Examples:
|
|
23
|
-
# # Switch to production URL (using defaults)
|
|
24
|
-
# ./update-urls.sh --production
|
|
25
|
-
#
|
|
26
|
-
# # Switch to production URL (with custom URL)
|
|
27
|
-
# DOCS_DEPLOY_URL=https://alpha.lunchmoney.dev/v2 ./update-urls.sh --production
|
|
28
|
-
#
|
|
29
|
-
# # Switch to local URL
|
|
30
|
-
# ./update-urls.sh --local
|
|
31
|
-
#
|
|
32
|
-
# # Switch to local URL (with custom local URL)
|
|
33
|
-
# LOCAL_URL=http://localhost:4000/v2 ./update-urls.sh --local
|
|
34
|
-
|
|
35
|
-
set -e
|
|
36
|
-
|
|
37
|
-
# Get the directory where the script is located
|
|
38
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
39
|
-
|
|
40
|
-
# Determine if we're in the git repo or npm package
|
|
41
|
-
# In git repo: script is in scripts/ subdirectory, spec is in v2/spec/
|
|
42
|
-
# In npm package: script is at root, spec is at root
|
|
43
|
-
if [ -f "$SCRIPT_DIR/../v2/spec/lunch-money-api-v2.yaml" ]; then
|
|
44
|
-
# In the git repo (script is in scripts/ subdirectory)
|
|
45
|
-
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
46
|
-
SPEC_FILE="$REPO_ROOT/v2/spec/lunch-money-api-v2.yaml"
|
|
47
|
-
elif [ -f "$SCRIPT_DIR/lunch-money-api-v2.yaml" ]; then
|
|
48
|
-
# In the npm package (script is at root, spec is in same directory)
|
|
49
|
-
REPO_ROOT="$SCRIPT_DIR"
|
|
50
|
-
SPEC_FILE="$REPO_ROOT/lunch-money-api-v2.yaml"
|
|
51
|
-
else
|
|
52
|
-
echo "Error: Could not find lunch-money-api-v2.yaml"
|
|
53
|
-
echo " Looked in: $SCRIPT_DIR/v2/spec/"
|
|
54
|
-
echo " Looked in: $SCRIPT_DIR/"
|
|
55
|
-
exit 1
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# Load environment variables from .env file if it exists and variables are not already set
|
|
59
|
-
if [ -f "$REPO_ROOT/.env" ]; then
|
|
60
|
-
export $(grep -v '^#' "$REPO_ROOT/.env" | xargs)
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Set default values for the URLs if not provided
|
|
64
|
-
LOCAL_URL=${LOCAL_URL:-"http://localhost:3000/v2"}
|
|
65
|
-
DOCS_DEPLOY_URL=${DOCS_DEPLOY_URL:-"https://alpha.lunchmoney.dev/v2"}
|
|
66
|
-
|
|
67
|
-
# Function to show help and exit
|
|
68
|
-
show_help() {
|
|
69
|
-
echo "Usage: $0 --local|--production"
|
|
70
|
-
echo ""
|
|
71
|
-
echo "Flags (required):"
|
|
72
|
-
echo " --local Switch docs/mock server URL to local development"
|
|
73
|
-
echo " --production Switch docs/mock server URL to production deployment"
|
|
74
|
-
echo ""
|
|
75
|
-
echo "Environment variables (optional, with defaults):"
|
|
76
|
-
echo " LOCAL_URL Local development URL (default: http://localhost:3000/v2)"
|
|
77
|
-
echo " DOCS_DEPLOY_URL Docs/mock deployment URL (default: https://alpha.lunchmoney.dev/v2)"
|
|
78
|
-
echo ""
|
|
79
|
-
echo "Examples:"
|
|
80
|
-
echo " # Switch to production URL (using defaults)"
|
|
81
|
-
echo " $0 --production"
|
|
82
|
-
echo ""
|
|
83
|
-
echo " # Switch to production URL (with custom URL)"
|
|
84
|
-
echo " DOCS_DEPLOY_URL=https://alpha.lunchmoney.dev/v2 $0 --production"
|
|
85
|
-
echo ""
|
|
86
|
-
echo " # Switch to local URL"
|
|
87
|
-
echo " $0 --local"
|
|
88
|
-
echo ""
|
|
89
|
-
echo " # Switch to local URL (with custom local URL)"
|
|
90
|
-
echo " LOCAL_URL=http://localhost:4000/v2 $0 --local"
|
|
91
|
-
echo ""
|
|
92
|
-
echo "Note: Environment variables can also be set in a .env file in the repository root."
|
|
93
|
-
echo "Note: All references to DOCS_DEPLOY_URL throughout the file are updated; the API server URL remains unchanged."
|
|
94
|
-
exit 1
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
# Function to replace all occurrences of the docs/mock server URL in the spec file
|
|
98
|
-
replace_docs_url() {
|
|
99
|
-
local from_url=$1
|
|
100
|
-
local to_url=$2
|
|
101
|
-
|
|
102
|
-
if [ ! -f "$SPEC_FILE" ]; then
|
|
103
|
-
echo "Error: Spec file not found at $SPEC_FILE"
|
|
104
|
-
exit 1
|
|
105
|
-
fi
|
|
106
|
-
|
|
107
|
-
echo "Updating all references to docs/mock server URL in $SPEC_FILE..."
|
|
108
|
-
echo " From: $from_url"
|
|
109
|
-
echo " To: $to_url"
|
|
110
|
-
|
|
111
|
-
# Replace all occurrences of the URL throughout the entire file
|
|
112
|
-
# Using sed with proper escaping for URLs
|
|
113
|
-
# Escape special regex characters in from_url
|
|
114
|
-
escaped_from_url=$(echo "$from_url" | sed 's/[[\.*^$()+?{|]/\\&/g')
|
|
115
|
-
# Use a temporary file for cross-platform compatibility
|
|
116
|
-
sed "s|$escaped_from_url|$to_url|g" "$SPEC_FILE" > "$SPEC_FILE.tmp" && mv "$SPEC_FILE.tmp" "$SPEC_FILE"
|
|
117
|
-
|
|
118
|
-
echo "✓ URLs updated successfully"
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
# Check for required flag
|
|
122
|
-
if [ "$1" == "--local" ]; then
|
|
123
|
-
echo "Switching docs/mock server URL to local development..."
|
|
124
|
-
echo " Using LOCAL_URL: $LOCAL_URL"
|
|
125
|
-
replace_docs_url "$DOCS_DEPLOY_URL" "$LOCAL_URL"
|
|
126
|
-
elif [ "$1" == "--production" ]; then
|
|
127
|
-
echo "Switching docs/mock server URL to production..."
|
|
128
|
-
echo " Using DOCS_DEPLOY_URL: $DOCS_DEPLOY_URL"
|
|
129
|
-
replace_docs_url "$LOCAL_URL" "$DOCS_DEPLOY_URL"
|
|
130
|
-
else
|
|
131
|
-
echo "Error: A flag is required (--local or --production)"
|
|
132
|
-
echo ""
|
|
133
|
-
show_help
|
|
134
|
-
fi
|
|
135
|
-
|