ggcheckout-mcp 0.2.1 → 0.3.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +21 -21
  3. package/README.md +619 -538
  4. package/dist/__e2e__/all.e2e.test.js +1 -1
  5. package/dist/__e2e__/all.e2e.test.js.map +1 -1
  6. package/dist/__e2e__/setup.js +2 -2
  7. package/dist/__e2e__/setup.js.map +1 -1
  8. package/dist/adapters/inbound/tools/checkout.tools.d.ts.map +1 -1
  9. package/dist/adapters/inbound/tools/checkout.tools.js +8 -6
  10. package/dist/adapters/inbound/tools/checkout.tools.js.map +1 -1
  11. package/dist/adapters/inbound/tools/discount.tools.js +1 -1
  12. package/dist/adapters/inbound/tools/discount.tools.js.map +1 -1
  13. package/dist/adapters/inbound/tools/shipping.tools.js +1 -1
  14. package/dist/adapters/inbound/tools/shipping.tools.js.map +1 -1
  15. package/dist/adapters/outbound/auth.api.d.ts +7 -0
  16. package/dist/adapters/outbound/auth.api.d.ts.map +1 -1
  17. package/dist/adapters/outbound/auth.api.js +18 -2
  18. package/dist/adapters/outbound/auth.api.js.map +1 -1
  19. package/dist/adapters/outbound/checkout.api.d.ts +4 -4
  20. package/dist/adapters/outbound/checkout.api.d.ts.map +1 -1
  21. package/dist/adapters/outbound/checkout.api.js +26 -10
  22. package/dist/adapters/outbound/checkout.api.js.map +1 -1
  23. package/dist/adapters/outbound/checkout.api.test.js +58 -11
  24. package/dist/adapters/outbound/checkout.api.test.js.map +1 -1
  25. package/dist/adapters/outbound/http-client.d.ts.map +1 -1
  26. package/dist/adapters/outbound/http-client.js +11 -1
  27. package/dist/adapters/outbound/http-client.js.map +1 -1
  28. package/dist/adapters/outbound/http-client.test.js +2 -2
  29. package/dist/adapters/outbound/http-client.test.js.map +1 -1
  30. package/dist/adapters/outbound/product.api.js +3 -3
  31. package/dist/adapters/outbound/product.api.js.map +1 -1
  32. package/dist/core/ports/checkout.port.d.ts +4 -4
  33. package/dist/core/ports/checkout.port.d.ts.map +1 -1
  34. package/dist/core/services/checkout.service.d.ts +21 -2
  35. package/dist/core/services/checkout.service.d.ts.map +1 -1
  36. package/dist/core/services/checkout.service.js +79 -7
  37. package/dist/core/services/checkout.service.js.map +1 -1
  38. package/dist/core/services/checkout.service.test.js +107 -66
  39. package/dist/core/services/checkout.service.test.js.map +1 -1
  40. package/dist/core/types/checkout.d.ts +43 -4
  41. package/dist/core/types/checkout.d.ts.map +1 -1
  42. package/dist/index.js +2 -2
  43. package/dist/index.js.map +1 -1
  44. package/dist/shared/errors.d.ts +4 -1
  45. package/dist/shared/errors.d.ts.map +1 -1
  46. package/dist/shared/errors.js +8 -2
  47. package/dist/shared/errors.js.map +1 -1
  48. package/package.json +62 -61
package/CHANGELOG.md ADDED
@@ -0,0 +1,55 @@
1
+ # Changelog
2
+
3
+ This package is published to npm and the README installs it as `npx -y ggcheckout-mcp`,
4
+ which is unpinned — a new version reaches every existing installation on its next start.
5
+ Read this file before upgrading, and pin a version if a breaking change is not convenient
6
+ right now.
7
+
8
+ ## 0.3.0
9
+
10
+ ### Breaking
11
+
12
+ - **`create_checkout` takes `productId` instead of `id`.** The value must be the uid of the
13
+ product the checkout sells — the `productId` returned by `create_product`, or a `uid` from
14
+ `list_products`. The old input was described as a free-form slug, which produced a checkout
15
+ no product claimed: the dashboard rendered it as an orphan card and opening it 404'd.
16
+ Pin `ggcheckout-mcp@0.2.4` if you need the old input name.
17
+ - **Checkout responses expose that foreign key as `productId` too.** `list_checkouts`,
18
+ `get_checkout` and `update_checkout` used to return it under the API's own name, `id`,
19
+ which collided with the checkout's own identifier. The rename is now applied in both
20
+ directions, so one value has one name. The checkout's own id is still `uid`.
21
+
22
+ ### Fixed
23
+
24
+ - Three of the four checkout paths were failing against the live API: the owner field was
25
+ misspelled `uuidOwnwer` throughout the module, so `create_checkout` returned 403 and
26
+ `list_checkouts` / `update_checkout` returned 400.
27
+ - `create_checkout` and `update_checkout` sent `price` in Reais while the API stores and
28
+ charges cents, so a checkout created for `99.90` charged R$0,99. Prices are now converted,
29
+ matching what `create_product` already did.
30
+ - `update_checkout` wiped fields it did not send. The API destructures the body with defaults
31
+ instead of merging, so a title-only edit reset the checkout URL, the buyer form
32
+ configuration, the seller name and the currency. The whole document is now re-sent.
33
+ - `orderBumps` was sent as bare product uids, but the field stores a JSON snapshot per bump;
34
+ every bump created through the MCP was silently dropped when the checkout page parsed it.
35
+ Bumps are now resolved and serialized, so an unknown uid fails the call instead.
36
+ - `create_checkout` reported every failure of its product pre-check as "product not found",
37
+ including timeouts and 5xx. During an outage that told the agent to create a duplicate
38
+ product. Only the API's own 403/404 is now treated as a bad `productId`.
39
+ - `update_checkout` on a checkout with no product pointer returned an opaque
40
+ `Missing required fields: id` from the API; it now fails with an explanation.
41
+ - Ids are URL-escaped before they are interpolated into request paths. A value containing
42
+ `/`, `#` or `?` used to change which endpoint was called — which, for the new product
43
+ pre-check, meant it could validate a different resource than the one being written.
44
+
45
+ ### Changed
46
+
47
+ - `delete_checkout` no longer reads the checkout first. The endpoint takes ownership from the
48
+ authenticated token and ignores the body, so the extra read only spent quota against the
49
+ public, IP-rate-limited route.
50
+ - The business id behind almost every tool (`GET /api/me`) is fetched once per process instead
51
+ of once per call.
52
+
53
+ ## 0.2.4 and earlier
54
+
55
+ Not recorded. See `git log`.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 GG Checkout
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GG Checkout
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.