@lunch-money/developer-docs 2.11.0-preview.17 → 2.11.0-preview.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunch-money/developer-docs",
3
- "version": "2.11.0-preview.17",
3
+ "version": "2.11.0-preview.18",
4
4
  "description": "Developer documentation content for Lunch Money APIs",
5
5
  "exports": {
6
6
  ".": "./package.json",
@@ -0,0 +1,48 @@
1
+ # V2 documentation instructions
2
+
3
+ Follow these rules when editing files under `v2/docs` or documenting changes to `v2/spec/lunch-money-api-v2.yaml`.
4
+
5
+ ## Version history
6
+
7
+ For every consumer-visible spec change, update `v2/docs/version-history.md` under the version being prepared.
8
+
9
+ Keep entries brief and high level. The version history records what changed; the OpenAPI endpoint documentation describes how to use it.
10
+
11
+ Include:
12
+
13
+ - New, renamed, deprecated, or removed endpoints
14
+ - Changes to path or query parameters
15
+ - Changes to request-body properties
16
+ - Changes to response-body properties or shapes
17
+ - Changed status codes, accepted values, defaults, limits, or validation behavior
18
+ - Breaking changes
19
+
20
+ Do not include:
21
+
22
+ - Product or implementation rationale
23
+ - Internal implementation details
24
+ - Detailed usage instructions or examples
25
+ - Full schema descriptions
26
+ - Testing, rollout, or cross-repository implementation details
27
+ - Editorial changes that do not alter the documented API contract
28
+
29
+ ### Style
30
+
31
+ - Name endpoints using the HTTP method and path, such as `GET /balance_history`.
32
+ - Format endpoints, parameter names, property names, schema names, and literal values with backticks.
33
+ - Start bullets with a present-tense verb such as `Add`, `Change`, `Remove`, `Rename`, or `Deprecate`.
34
+ - Prefer one concise bullet for each logical change.
35
+ - Use nested bullets only to list endpoints or closely related property changes.
36
+ - Do not explain why the change was made or provide instructions for adapting to it.
37
+ - Keep unreleased versions marked `TBD`; do not assign a release date without confirmation.
38
+ - Clearly label breaking changes.
39
+
40
+ ## Other documentation
41
+
42
+ - Do not routinely update `v2/docs/migration-guide.md` or `v2/docs/intro-to-v2.md` for individual spec changes.
43
+ - Determine whether a spec change makes an existing guide factually incorrect, including guides in the shared `docs` directory.
44
+ - Correct an existing guide when it would otherwise contradict the spec.
45
+ - Consider broader documentation only for a reusable cross-endpoint concept that cannot be documented adequately on the affected endpoints.
46
+ - If broader documentation might be useful but is not required for correctness, identify the candidate page and ask the user before expanding it or adding a page.
47
+ - Prefer endpoint descriptions over general guides for endpoint-specific behavior.
48
+ - Do not add detail to the migration guide merely because V2 differs from V1.
@@ -17,6 +17,8 @@ The Lunch Money API spec uses a modified version of SEMVER for its versioning me
17
17
  - Add `PUT /balance_history/deleted/{account_id}/details`
18
18
  - Remove `rollover_pool` from the category object returned in the summary response. It is in the main summary response.
19
19
  - It is now possible to set an external_id on any transaction, including those that belong to a Plaid account.
20
+ - Manual-account and manually managed crypto create requests now accept `null` for their optional display, institution, and subtype fields, treating `null` the same as omission.
21
+ - Transaction split requests now accept `null` for `category_id` and `notes`. Omission inherits the parent value, while `null` explicitly clears it for the child.
20
22
 
21
23
  ## v2.10.0 - TBD
22
24
  - Add v2 crypto endpoints which support:
@@ -0,0 +1,75 @@
1
+ # Repository instructions
2
+
3
+ ## V2 OpenAPI conventions
4
+
5
+ Follow these rules whenever editing `v2/spec/lunch-money-api-v2.yaml`:
6
+
7
+ ### Component schemas
8
+
9
+ - Define request and response object payloads as named schemas under `components.schemas`.
10
+ - Reference those component schemas from path operations with `$ref`; do not define object payload schemas inline under `paths`.
11
+ - Give every property in a referenced component schema a description, including wrapper properties, nested objects, array properties, and properties whose shape is supplied by `$ref`.
12
+ - Use a property's description to explain its role in the containing object; do not assume the referenced schema's description provides that context.
13
+ - Give every schema displayed in Scalar's Models section a top-level description.
14
+ - A schema hidden from the Models section does not require a top-level description when its purpose is already clear at every reference site. Add one when it defines reusable semantics or constraints not explained by the referencing property, request body, or response.
15
+ - Remove unreferenced component schemas unless they are intentionally retained for a documented reason.
16
+
17
+ ### Scalar model visibility
18
+
19
+ `x-internal: true` hides a component schema from Scalar's Models section. It does not mean the endpoint, payload, or data is private.
20
+
21
+ - Keep primary response-body schemas public by omitting `x-internal` or setting it to `false`.
22
+ - Set `x-internal: true` on request-only schemas and supporting schemas that are not useful as independently browsable models.
23
+ - Keep a shared schema public when it is a useful response model, even if requests or other schemas also reference it.
24
+ - Decide visibility from how the schema is used, not from its name.
25
+
26
+ ### Endpoint documentation
27
+
28
+ - Give every operation a concise `summary` and a `description`.
29
+ - Give every path, query, and header parameter a description.
30
+ - Give every response entry a meaningful description.
31
+ - Document endpoint-specific behavior, defaults, side effects, and request or response semantics on the operation or relevant field rather than in a general guide.
32
+
33
+ ### Description style
34
+
35
+ - Use direct, neutral, present-tense language from the API consumer's perspective.
36
+ - Use a sentence fragment for a short label or noun phrase, without a terminal period.
37
+ - Use complete sentences for behavior or semantics, with terminal punctuation.
38
+ - When a description contains multiple sentences, punctuate every sentence.
39
+ - Use backticks for property names, parameter names, enum values, and literal values such as `true`, `false`, and `null`.
40
+ - Do not repeat type information unless it clarifies a format, unit, constraint, or semantic detail.
41
+ - Add links when they materially help consumers discover a related endpoint or relevant guide.
42
+ - Do not add links that merely restate obvious navigation.
43
+
44
+ ### Examples
45
+
46
+ Examples are selective documentation aids, not a required artifact for every spec change.
47
+
48
+ - Audit affected examples whenever an endpoint, schema, or behavior changes, but edit them only when they become invalid, inaccurate, or misleading.
49
+ - Add an example when it illustrates a new endpoint, a materially different payload shape, or behavior not already clear from the schema and descriptions.
50
+ - Do not add examples mechanically for changes that widen accepted values, such as allowing an optional property to be `null`, when existing examples remain valid and the schema and description explain the behavior.
51
+ - Changes to a type, format, enum, requiredness, default, or representation require examining every affected example. Edit only examples that use or imply the old contract.
52
+ - A new endpoint should normally include a minimal valid request example when it accepts a JSON body and a representative success example when it returns a JSON body. Ask the user before omitting examples when the reason is unclear.
53
+ - When uncertain whether a change benefits from a new example, ask the user rather than adding one speculatively.
54
+ - Put request examples under the request media type, response examples under the applicable status code and media type, and parameter examples on the parameter.
55
+ - Use schema-property examples sparingly for unusual formats or values that are difficult to infer.
56
+ - Use `example` for one representative scenario and `examples` for materially different scenarios.
57
+ - Keep examples concise, fictional, internally consistent, and valid against the applicable schema.
58
+ - Include required properties. Include optional properties only when they help explain the scenario.
59
+ - Give named examples concise, accurate scenario keys. Add a `summary` or `description` only when it contributes information beyond the key and payload.
60
+ - Add endpoint-specific error examples only when the error shape or behavior differs meaningfully from shared standard errors.
61
+
62
+ #### Paired request and response examples
63
+
64
+ Pair request and response examples when seeing the result helps explain a synchronous create or update operation.
65
+
66
+ - Use the same scenario key under the request and corresponding response.
67
+ - Carry submitted values through consistently; use the response to show generated IDs, timestamps, defaults, conversions, inherited values, or other returned fields.
68
+ - Pair invalid request examples with the applicable error response using the same scenario key.
69
+ - Do not pair every request scenario. Add a pair only when the response teaches something useful.
70
+ - Treat singular request and response `example` blocks as an implicit pair and keep shared values consistent.
71
+ - Do not pair examples when the response has no body, processing is asynchronous, or the result does not directly correspond to the submitted payload.
72
+
73
+ When planning or reviewing a spec change, identify the affected schemas, verify their Scalar visibility and descriptions, and audit related request, response, parameter, and error examples. Record example changes only when existing examples become inaccurate or a new scenario materially improves the documentation. When in doubt, ask the user.
74
+
75
+ Before finishing a consumer-visible spec change, follow `../docs/AGENTS.md` to add a concise version-history entry and check whether an existing guide has become factually incorrect.
@@ -14,11 +14,11 @@ info:
14
14
  These docs are interactive — use **Test request** on any endpoint to call the API from this page.
15
15
  Choose a LIVE or MOCK service from the Server dropdown.
16
16
  Requests sent to `https://api.lunchmoney.dev/v2` can <span class="red-text"><strong>change or delete</strong></span> your data and are <span class="red-text"><strong>permanent</strong></span>.
17
- See the [Getting Started Guide](https://lunchmoney.dev/v2/getting-started) before using the live API.
17
+ See the [Getting Started Guide](http://localhost:3000/v2/getting-started) before using the live API.
18
18
 
19
19
  **Static mock server**
20
20
 
21
- Explore without risk to real data. Select `http://mock.lunchmoney.dev/v2` in the Server dropdown to work with static mock data.
21
+ Explore without risk to real data. Select `http://localhost:3000/v2` in the Server dropdown to work with static mock data.
22
22
  POST, PUT, and DELETE requests will return realistic responses, but do not change the mock data.
23
23
 
24
24
 
@@ -28,14 +28,14 @@ info:
28
28
 
29
29
  **Migrating from v1**
30
30
 
31
- The v2 API is not backwards compatible with v1. See the [Migration Guide](https://lunchmoney.dev/v2/migration-guide) for details.
31
+ The v2 API is not backwards compatible with v1. See the [Migration Guide](http://localhost:3000/v2/migration-guide) for details.
32
32
 
33
33
  **Useful links**
34
- - [Getting Started Guide](https://lunchmoney.dev/v2/getting-started)
35
- - [v2 API Overview](https://lunchmoney.dev/v2/overview)
36
- - [Version History](https://lunchmoney.dev/v2/version-history)
37
- - [Migration Guide](https://lunchmoney.dev/v2/migration-guide)
38
- - [Rate Limits](https://lunchmoney.dev/v2/rate-limits)
34
+ - [Getting Started Guide](http://localhost:3000/v2/getting-started)
35
+ - [v2 API Overview](http://localhost:3000/v2/overview)
36
+ - [Version History](http://localhost:3000/v2/version-history)
37
+ - [Migration Guide](http://localhost:3000/v2/migration-guide)
38
+ - [Rate Limits](http://localhost:3000/v2/rate-limits)
39
39
  termsOfService: https://lunchmoney.dev/#current-status
40
40
  contact:
41
41
  email: devsupport@lunchmoney.app
@@ -47,7 +47,7 @@ info:
47
47
  servers:
48
48
  - url: https://api.lunchmoney.dev/v2
49
49
  description: ⚠ LIVE — changes real Lunch Money data
50
- - url: http://mock.lunchmoney.dev/v2
50
+ - url: http://localhost:3000/v2
51
51
  description: MOCK — static demo data, no API key required
52
52
 
53
53
  tags:
@@ -991,16 +991,19 @@ components:
991
991
  example: Cold Wallet BTC
992
992
  display_name:
993
993
  type: string
994
+ nullable: true
994
995
  minLength: 1
995
996
  maxLength: 45
996
- description: Optional display name for the manual crypto asset. If
997
- omitted, clients may derive one from `institution_name` + `name`.
997
+ description: Display name for the manual crypto asset. If omitted or
998
+ `null`, clients may derive one from `institution_name` + `name`.
998
999
  example: Cold Storage
999
1000
  institution_name:
1000
1001
  type: string
1002
+ nullable: true
1001
1003
  minLength: 1
1002
1004
  maxLength: 50
1003
- description: Optional institution or wallet provider display name
1005
+ description: Institution or wallet provider display name. If omitted
1006
+ or `null`, no institution name is set.
1004
1007
  example: Ledger
1005
1008
  balance:
1006
1009
  oneOf:
@@ -1256,15 +1259,19 @@ components:
1256
1259
  example: My Savings Account
1257
1260
  institution_name:
1258
1261
  type: string
1262
+ nullable: true
1259
1263
  example: Bank of the West
1260
- description: Name of institution holding the manual account
1264
+ description: Name of the institution holding the manual account. If
1265
+ omitted or `null`, no institution name is set.
1261
1266
  minLength: 1
1262
1267
  maxLength: 50
1263
1268
  display_name:
1264
1269
  type: string
1265
- description: Display name of the manual account as set by user or
1266
- derived from the `institution_name` and `name` if not explicitly
1267
- set.<br> This must be unique for the budgeting account.
1270
+ nullable: true
1271
+ description: Display name of the manual account. If omitted or
1272
+ `null`, it is derived from `institution_name` and `name`. An
1273
+ explicitly set display name must be unique for the budgeting
1274
+ account.
1268
1275
  example: Savings
1269
1276
  type:
1270
1277
  description: The type of manual account
@@ -1272,8 +1279,10 @@ components:
1272
1279
  - $ref: "#/components/schemas/accountTypeEnum"
1273
1280
  subtype:
1274
1281
  type: string
1275
- description: An optional manual account subtype. Examples include<br>
1276
- - retirement - checking - savings - prepaid credit card
1282
+ nullable: true
1283
+ description: Manual account subtype. If omitted or `null`, no subtype
1284
+ is set. Examples include retirement, checking, savings, and prepaid
1285
+ credit card.
1277
1286
  minLength: 1
1278
1287
  maxLength: 100
1279
1288
  example: prepaid credit card
@@ -3038,7 +3047,7 @@ components:
3038
3047
  currency:
3039
3048
  description: Three-letter lowercase currency code of the transaction
3040
3049
  in ISO 4217 format. Must match one of the [supported
3041
- currencies](https://lunchmoney.dev/v2/currencies). If not set
3050
+ currencies](http://localhost:3000/v2/currencies). If not set
3042
3051
  defaults to the user account's primary currency.
3043
3052
  allOf:
3044
3053
  - $ref: "#/components/schemas/currencyEnum"
@@ -3394,9 +3403,10 @@ components:
3394
3403
  category_id:
3395
3404
  type: integer
3396
3405
  format: int32
3397
- description: Unique identifier for associated category_id. Category
3398
- must already exist for the account. Will inherit category from the
3399
- parent if not defined.
3406
+ nullable: true
3407
+ description: Category ID for the child transaction. The category must
3408
+ already exist for the account. If omitted, the child inherits the
3409
+ parent category. If `null`, the child has no category.
3400
3410
  tag_ids:
3401
3411
  type: array
3402
3412
  description: The IDs of any tags to apply to this split child
@@ -3406,7 +3416,10 @@ components:
3406
3416
  format: int32
3407
3417
  notes:
3408
3418
  type: string
3409
- description: Will inherit notes from parent if not defined.
3419
+ nullable: true
3420
+ description: Notes for the child transaction. If omitted, the child
3421
+ inherits the parent notes. If `null` or an empty string, the child
3422
+ has no notes.
3410
3423
  required:
3411
3424
  - amount
3412
3425
 
@@ -8662,19 +8675,19 @@ paths:
8662
8675
  description: Sets the maximum number of transactions to return. If
8663
8676
  more match the filter criteria, the response will include a
8664
8677
  `has_more` attribute set to `true`. See
8665
- [Pagination](https://lunchmoney.dev/v2/pagination)
8678
+ [Pagination](http://localhost:3000/v2/pagination)
8666
8679
  - name: offset
8667
8680
  in: query
8668
8681
  schema:
8669
8682
  type: integer
8670
8683
  description: Sets the offset for the records returned. This is
8671
8684
  typically set automatically in the header. See
8672
- [Pagination](https://lunchmoney.dev/v2/pagination)
8685
+ [Pagination](http://localhost:3000/v2/pagination)
8673
8686
  responses:
8674
8687
  "200":
8675
8688
  description: Returns an array of transactions. <br><br>The `has_more`
8676
8689
  property is set to `true` if more transactions are available. See
8677
- [Pagination](https://lunchmoney.dev/v2/pagination)
8690
+ [Pagination](http://localhost:3000/v2/pagination)
8678
8691
  content:
8679
8692
  application/json:
8680
8693
  schema: