@metronome/sdk 2.1.0 → 3.0.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.
- package/CHANGELOG.md +109 -0
- package/LICENSE +1 -1
- package/README.md +26 -4
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +91 -8
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +91 -8
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +20 -1
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +20 -1
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +60 -8
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +60 -8
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +0 -18
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +0 -18
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/custom-fields.d.mts +6 -6
- package/resources/v1/custom-fields.d.mts.map +1 -1
- package/resources/v1/custom-fields.d.ts +6 -6
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/customers/alerts.d.mts +38 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +38 -0
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +13 -3
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +13 -3
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +77 -10
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +77 -10
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +8 -6
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +8 -6
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +28 -9
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +28 -9
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/plans.d.mts +6 -5
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts +6 -5
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/payments.d.mts +10 -0
- package/resources/v1/payments.d.mts.map +1 -1
- package/resources/v1/payments.d.ts +10 -0
- package/resources/v1/payments.d.ts.map +1 -1
- package/resources/v1/plans.d.mts +2 -2
- package/resources/v1/plans.d.ts +2 -2
- package/resources/v1/settings/billing-providers.d.mts +1 -1
- package/resources/v1/settings/billing-providers.d.mts.map +1 -1
- package/resources/v1/settings/billing-providers.d.ts +1 -1
- package/resources/v1/settings/billing-providers.d.ts.map +1 -1
- package/resources/v1/settings/settings.d.mts +6 -0
- package/resources/v1/settings/settings.d.mts.map +1 -1
- package/resources/v1/settings/settings.d.ts +6 -0
- package/resources/v1/settings/settings.d.ts.map +1 -1
- package/resources/v1/settings/settings.js +1 -0
- package/resources/v1/settings/settings.js.map +1 -1
- package/resources/v1/settings/settings.mjs +1 -0
- package/resources/v1/settings/settings.mjs.map +1 -1
- package/resources/v1/usage.d.mts +10 -9
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +10 -9
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +200 -8
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +200 -8
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +1 -1
- package/src/resources/shared.ts +110 -9
- package/src/resources/v1/alerts.ts +24 -1
- package/src/resources/v1/contracts/contracts.ts +67 -8
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +1 -1
- package/src/resources/v1/contracts/rate-cards/rates.ts +0 -21
- package/src/resources/v1/custom-fields.ts +29 -5
- package/src/resources/v1/customers/alerts.ts +44 -0
- package/src/resources/v1/customers/billing-config.ts +17 -3
- package/src/resources/v1/customers/customers.ts +97 -14
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +36 -7
- package/src/resources/v1/customers/plans.ts +7 -5
- package/src/resources/v1/index.ts +1 -0
- package/src/resources/v1/payments.ts +15 -0
- package/src/resources/v1/plans.ts +2 -2
- package/src/resources/v1/settings/billing-providers.ts +1 -1
- package/src/resources/v1/settings/settings.ts +7 -0
- package/src/resources/v1/usage.ts +10 -9
- package/src/resources/v1/v1.ts +2 -0
- package/src/resources/v2/contracts.ts +244 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0 (2026-01-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.2.0...v3.0.0](https://github.com/Metronome-Industries/metronome-node/compare/v2.2.0...v3.0.0)
|
|
6
|
+
|
|
7
|
+
### ⚠ BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* **mcp:** remove deprecated tool schemes
|
|
10
|
+
* **mcp:** **Migration:** To migrate, simply modify the command used to invoke the MCP server. Currently, the only supported tool scheme is code mode. Now, starting the server with just `node /path/to/mcp/server` or `npx package-name` will invoke code tools: changing your command to one of these is likely all you will need to do.
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* [ORCH-739] expose rev rec data in api ([08d8c01](https://github.com/Metronome-Industries/metronome-node/commit/08d8c017253e732b43a1e06ecb46b92d9ec37e7c))
|
|
15
|
+
* [ORCH-739] expose rev rec data in api ([25647cc](https://github.com/Metronome-Industries/metronome-node/commit/25647cccb2e88a5b155f09d03daf88d2b9386e0f))
|
|
16
|
+
* add recurring commit ID and subscription config to commit/credit response schema ([ed08de6](https://github.com/Metronome-Industries/metronome-node/commit/ed08de6d7ef015c1470e55f635a03c064af10d13))
|
|
17
|
+
* Add support for custom fields on package terms ([c16f6c3](https://github.com/Metronome-Industries/metronome-node/commit/c16f6c335ca0bd7204b26235b26c3680ff962d41))
|
|
18
|
+
* remove use list prices config in requests and responses ([b56153d](https://github.com/Metronome-Industries/metronome-node/commit/b56153df24c55845b9d0f1572db7c06e7fbdc5e7))
|
|
19
|
+
* Revert [ORCH-739] expose rev rec data in api ([857d544](https://github.com/Metronome-Industries/metronome-node/commit/857d5440d64b05fd1ce7d778a1fe2321795ec8f2))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **mcp:** correct code tool api output types ([94c7a2b](https://github.com/Metronome-Industries/metronome-node/commit/94c7a2b631a3954996dae6dd3c1ba007c3341418))
|
|
25
|
+
* **mcp:** fix env parsing ([347d100](https://github.com/Metronome-Industries/metronome-node/commit/347d1001cfb49fb22f8451d6cbc9f5a225810895))
|
|
26
|
+
* **mcp:** fix options parsing ([7c415fc](https://github.com/Metronome-Industries/metronome-node/commit/7c415fcc9e36d20b9eebe98caa499e449367578a))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Chores
|
|
30
|
+
|
|
31
|
+
* break long lines in snippets into multiline ([553e045](https://github.com/Metronome-Industries/metronome-node/commit/553e0455495fbf42ff3a83533067b403e6f84197))
|
|
32
|
+
* fix typo in descriptions ([955173f](https://github.com/Metronome-Industries/metronome-node/commit/955173fe565c023e5b5677d66d3a22adf2140fe8))
|
|
33
|
+
* **internal:** codegen related update ([f1bc51f](https://github.com/Metronome-Industries/metronome-node/commit/f1bc51fc3b87434b31b0631bc09e7e427e5f3432))
|
|
34
|
+
* **internal:** codegen related update ([7723521](https://github.com/Metronome-Industries/metronome-node/commit/7723521e9984d18f457b0b8db2a923e069409b06))
|
|
35
|
+
* **internal:** configure MCP Server hosting ([1d192a8](https://github.com/Metronome-Industries/metronome-node/commit/1d192a84aa31197141dc76a0a13e9c92bb2793cc))
|
|
36
|
+
* **internal:** update `actions/checkout` version ([bcc55a1](https://github.com/Metronome-Industries/metronome-node/commit/bcc55a1b569cf3e8e252bf6fd995445772359496))
|
|
37
|
+
* **internal:** upgrade babel, qs, js-yaml ([1857b28](https://github.com/Metronome-Industries/metronome-node/commit/1857b288648df430cc7d1a98c1be8a9c11c6acfe))
|
|
38
|
+
* **internal:** version bump ([4d0d6aa](https://github.com/Metronome-Industries/metronome-node/commit/4d0d6aac09b4a049e15cd795ced9ac2df58c6d98))
|
|
39
|
+
* **mcp:** add intent param to execute tool ([87ac2c8](https://github.com/Metronome-Industries/metronome-node/commit/87ac2c8a35200c6f89bed43d4c269aa067969c6d))
|
|
40
|
+
* **mcp:** pass intent param to execute handler ([edb60b3](https://github.com/Metronome-Industries/metronome-node/commit/edb60b340fcd85a138f4444807637319c32ff301))
|
|
41
|
+
* **mcp:** remove deprecated tool schemes ([a708aed](https://github.com/Metronome-Industries/metronome-node/commit/a708aed0aabb76be7b401631a1a3703fba969e8a))
|
|
42
|
+
* **mcp:** upgrade dependencies ([00d0f49](https://github.com/Metronome-Industries/metronome-node/commit/00d0f49987923b9713d671920e991d5d1036de93))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Documentation
|
|
46
|
+
|
|
47
|
+
* prominently feature MCP server setup in root SDK readmes ([b589975](https://github.com/Metronome-Industries/metronome-node/commit/b589975eb7914476ea99588f963a801b1871620a))
|
|
48
|
+
|
|
49
|
+
## 2.2.0 (2025-12-18)
|
|
50
|
+
|
|
51
|
+
Full Changelog: [v2.1.0...v2.2.0](https://github.com/Metronome-Industries/metronome-node/compare/v2.1.0...v2.2.0)
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* [ORCH-605] uses x-mint groups to enable conditional rendering of gated revenue system config apis ([5e19d47](https://github.com/Metronome-Industries/metronome-node/commit/5e19d47922164c03493c2e54b00874f81ce3d26e))
|
|
56
|
+
* [ORCH-752] Update contract creation endpoints to allow setting revenue system configuration ([b51538e](https://github.com/Metronome-Industries/metronome-node/commit/b51538ed7538852afd7832797db54de114bec625))
|
|
57
|
+
* [ORCH-757] Add route for get revenue system config resolver ([948e128](https://github.com/Metronome-Industries/metronome-node/commit/948e128a6c098364cc102d8a396604a3c525ab12))
|
|
58
|
+
* Add `commit_transactions` to the body of `/upsertAvalaraCredentials` endpoint ([9f9f354](https://github.com/Metronome-Industries/metronome-node/commit/9f9f3547a4f39ff088627454652d9bdb413db7cd))
|
|
59
|
+
* Add `seat_filter` field to creation request and response parameters of the alert object ([6481e56](https://github.com/Metronome-Industries/metronome-node/commit/6481e56dd39abb4c8e0e99074763212f6bb535bb))
|
|
60
|
+
* add quantity to plan pricing adjustment response ([a28b851](https://github.com/Metronome-Industries/metronome-node/commit/a28b851c3aa76a31e1d5241cc026b6e8259994f2))
|
|
61
|
+
* adds external_payment_id to ExternalInvoice ([4b24047](https://github.com/Metronome-Industries/metronome-node/commit/4b24047743727a1922ba5e15bfee9e5678bffcd7))
|
|
62
|
+
* everything ([eaf9ff8](https://github.com/Metronome-Industries/metronome-node/commit/eaf9ff84a17973bbd0b2dcf3699117d88c35d00c))
|
|
63
|
+
* GET-6845 get openapi specs ready for GA ([c68ea47](https://github.com/Metronome-Industries/metronome-node/commit/c68ea47d2643a7a998a687f473f07df9df02441b))
|
|
64
|
+
* include aggregation BM info from searchEvents ([6183f83](https://github.com/Metronome-Industries/metronome-node/commit/6183f831e3b5be3115514ef930c835228c88601e))
|
|
65
|
+
* **mcp:** add detail field to docs search tool ([8b55f02](https://github.com/Metronome-Industries/metronome-node/commit/8b55f02771ea52f51ab2c5fe7114ce9c52caadeb))
|
|
66
|
+
* **mcp:** add typescript check to code execution tool ([d573759](https://github.com/Metronome-Industries/metronome-node/commit/d573759f6af9900761fa48c87eff4175b8152999))
|
|
67
|
+
* **mcp:** enable optional code execution tool on http mcp servers ([8f9a3d6](https://github.com/Metronome-Industries/metronome-node/commit/8f9a3d6f93ebafd99996d745571575c1a3f3cf80))
|
|
68
|
+
* **mcp:** handle code mode calls in the Stainless API ([518a64b](https://github.com/Metronome-Industries/metronome-node/commit/518a64b5e2f124165cb73b8240417b04e90c9dbb))
|
|
69
|
+
* **mcp:** return logs on code tool errors ([40bb1da](https://github.com/Metronome-Industries/metronome-node/commit/40bb1da41899dd8997d45600250df1897cebf9e9))
|
|
70
|
+
* ORCH-833/948/946/947 - updated the API to accept aws_customer_account_id all gated behind a feature flag ([c9f28c4](https://github.com/Metronome-Industries/metronome-node/commit/c9f28c4d05f8179e596c39af920b05932d2fbb6d))
|
|
71
|
+
* remove beta language, FF, stainless skip ([e973ac4](https://github.com/Metronome-Industries/metronome-node/commit/e973ac43f0802423c303574235525adab09c3d2c))
|
|
72
|
+
* Return values for set customer billing configuration endpoint ([1fe0c51](https://github.com/Metronome-Industries/metronome-node/commit/1fe0c518c752327cfb30d01b79aa3b8c0895e686))
|
|
73
|
+
* update create alert api to allow LowRemainingSeatBalanceReached alert ([2bb6bd6](https://github.com/Metronome-Industries/metronome-node/commit/2bb6bd65be36cd330c798dda522f466a97ae955d))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Bug Fixes
|
|
77
|
+
|
|
78
|
+
* **mcp:** add client instantiation options to code tool ([4559148](https://github.com/Metronome-Industries/metronome-node/commit/45591480032eeebfcc1919ec250023b2335413fc))
|
|
79
|
+
* **mcp:** correct code tool API endpoint ([649ecde](https://github.com/Metronome-Industries/metronome-node/commit/649ecdeec840c231c17b77096bcac44bafab0af9))
|
|
80
|
+
* **mcp:** pass base url to code tool ([c3ef781](https://github.com/Metronome-Industries/metronome-node/commit/c3ef781fe3ce706c646dd1741ecd06333d2b1616))
|
|
81
|
+
* **mcp:** return correct lines on typescript errors ([87595a4](https://github.com/Metronome-Industries/metronome-node/commit/87595a4ba34a873cf2d3ccf34dd27e9e39c4ee11))
|
|
82
|
+
* **mcp:** return tool execution error on api error ([737f9b4](https://github.com/Metronome-Industries/metronome-node/commit/737f9b4c4f08227272ed1411888d75d7e9b4290d))
|
|
83
|
+
* **mcp:** return tool execution error on jq failure ([6839208](https://github.com/Metronome-Industries/metronome-node/commit/6839208fc93ac40b621c622eac59ca0bce18b251))
|
|
84
|
+
* **mcp:** use raw responses for binary content ([1902de8](https://github.com/Metronome-Industries/metronome-node/commit/1902de8d17fcbe720dc4e24c8be512defc69d732))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Chores
|
|
88
|
+
|
|
89
|
+
* **client:** fix logger property type ([3f869a0](https://github.com/Metronome-Industries/metronome-node/commit/3f869a03bd3bb48ed2d81e922bcb1db19a342f7f))
|
|
90
|
+
* **internal:** codegen related update ([93f67ab](https://github.com/Metronome-Industries/metronome-node/commit/93f67abc273f86eadd29ae694e402cf7731d2721))
|
|
91
|
+
* **internal:** codegen related update ([4cf2e06](https://github.com/Metronome-Industries/metronome-node/commit/4cf2e06a7b541c6d3afd6a62e6bf412d9e5ff97d))
|
|
92
|
+
* **internal:** codegen related update ([69a5518](https://github.com/Metronome-Industries/metronome-node/commit/69a55182beef97182c46d1eff6e13c3be2f73ffb))
|
|
93
|
+
* **internal:** codegen related update ([bcab2ec](https://github.com/Metronome-Industries/metronome-node/commit/bcab2ec5e0216180472d501264e6fdbec14598a1))
|
|
94
|
+
* **internal:** grammar fix (it's -> its) ([df4d335](https://github.com/Metronome-Industries/metronome-node/commit/df4d335e034ab20881ad861e19024538f515d7bd))
|
|
95
|
+
* **internal:** upgrade eslint ([113a234](https://github.com/Metronome-Industries/metronome-node/commit/113a2343e89e5618283288faa9766cc5f8a64f9f))
|
|
96
|
+
* mcp code tool explicit error message when missing a run function ([7282f4e](https://github.com/Metronome-Industries/metronome-node/commit/7282f4e612cac5ef53774ce2c0a8d32ebef35ebb))
|
|
97
|
+
* **mcp:** add friendlier MCP code tool errors on incorrect method invocations ([80b8d3d](https://github.com/Metronome-Industries/metronome-node/commit/80b8d3d95570106145be81d7a3f2e096b665f9ce))
|
|
98
|
+
* **mcp:** add line numbers to code tool errors ([1533915](https://github.com/Metronome-Industries/metronome-node/commit/1533915332ada4fb2485a679ec6d06629ab4aa75))
|
|
99
|
+
* **mcp:** clarify http auth error ([a8370e1](https://github.com/Metronome-Industries/metronome-node/commit/a8370e1590bb8f411f0422f5a4e7c3c3d1fd67d4))
|
|
100
|
+
* **mcp:** update lockfile ([a000fb6](https://github.com/Metronome-Industries/metronome-node/commit/a000fb6a4f10e86e6ae53b1d6c2125269aef963b))
|
|
101
|
+
* **mcp:** upgrade jq-web ([9b4a075](https://github.com/Metronome-Industries/metronome-node/commit/9b4a0756a88bc0ee3453f82a17a7fac96f0d8408))
|
|
102
|
+
* use latest @modelcontextprotocol/sdk ([b3cd983](https://github.com/Metronome-Industries/metronome-node/commit/b3cd98399ead98ed9b38f61da1aef6df972cbcf1))
|
|
103
|
+
* use structured error when code execution tool errors ([439adb8](https://github.com/Metronome-Industries/metronome-node/commit/439adb8c14a6dfcdf9273b11d01b8f9799d89b3c))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Documentation
|
|
107
|
+
|
|
108
|
+
* document missing fields for schemas related to recurring credits and commits ([09f78b2](https://github.com/Metronome-Industries/metronome-node/commit/09f78b23718f1229fc49295c005e84f53c130258))
|
|
109
|
+
* **mcp:** add a README button for one-click add to Cursor ([5676f7b](https://github.com/Metronome-Industries/metronome-node/commit/5676f7b8e537ae9ed10829f455396c85504921c2))
|
|
110
|
+
* **mcp:** add a README link to add server to VS Code or Claude Code ([4357246](https://github.com/Metronome-Industries/metronome-node/commit/4357246014d291c22e9e75baa14a83e2ecd81613))
|
|
111
|
+
|
|
3
112
|
## 2.1.0 (2025-10-31)
|
|
4
113
|
|
|
5
114
|
Full Changelog: [v2.0.0...v2.1.0](https://github.com/Metronome-Industries/metronome-node/compare/v2.0.0...v2.1.0)
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 Metronome
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -6,6 +6,15 @@ This library provides convenient access to the Metronome REST API from server-si
|
|
|
6
6
|
|
|
7
7
|
The REST API documentation can be found on [docs.metronome.com](https://docs.metronome.com). The full API of this library can be found in [api.md](api.md).
|
|
8
8
|
|
|
9
|
+
## MCP Server
|
|
10
|
+
|
|
11
|
+
Use the Metronome MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
12
|
+
|
|
13
|
+
[](https://cursor.com/en-US/install-mcp?name=%40metronome%2Fmcp&config=eyJuYW1lIjoiQG1ldHJvbm9tZS9tY3AiLCJ0cmFuc3BvcnQiOiJzc2UiLCJ1cmwiOiJodHRwczovL21ldHJvbm9tZS5zdGxtY3AuY29tL3NzZSJ9)
|
|
14
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40metronome%2Fmcp%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22https%3A%2F%2Fmetronome.stlmcp.com%2Fsse%22%7D)
|
|
15
|
+
|
|
16
|
+
> Note: You may need to set environment variables in your MCP client.
|
|
17
|
+
|
|
9
18
|
## Installation
|
|
10
19
|
|
|
11
20
|
```sh
|
|
@@ -31,7 +40,11 @@ await client.v1.usage.ingest({
|
|
|
31
40
|
customer_id: 'team@example.com',
|
|
32
41
|
event_type: 'heartbeat',
|
|
33
42
|
timestamp: '2024-01-01T00:00:00Z',
|
|
34
|
-
properties: {
|
|
43
|
+
properties: {
|
|
44
|
+
cluster_id: '42',
|
|
45
|
+
cpu_seconds: 60,
|
|
46
|
+
region: 'Europe',
|
|
47
|
+
},
|
|
35
48
|
},
|
|
36
49
|
],
|
|
37
50
|
});
|
|
@@ -67,7 +80,10 @@ a subclass of `APIError` will be thrown:
|
|
|
67
80
|
<!-- prettier-ignore -->
|
|
68
81
|
```ts
|
|
69
82
|
const contract = await client.v1.contracts
|
|
70
|
-
.create({
|
|
83
|
+
.create({
|
|
84
|
+
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
85
|
+
starting_at: '2020-01-01T00:00:00.000Z',
|
|
86
|
+
})
|
|
71
87
|
.catch(async (err) => {
|
|
72
88
|
if (err instanceof Metronome.APIError) {
|
|
73
89
|
console.log(err.status); // 400
|
|
@@ -180,13 +196,19 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
|
|
|
180
196
|
const client = new Metronome();
|
|
181
197
|
|
|
182
198
|
const response = await client.v1.contracts
|
|
183
|
-
.create({
|
|
199
|
+
.create({
|
|
200
|
+
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
201
|
+
starting_at: '2020-01-01T00:00:00.000Z',
|
|
202
|
+
})
|
|
184
203
|
.asResponse();
|
|
185
204
|
console.log(response.headers.get('X-My-Header'));
|
|
186
205
|
console.log(response.statusText); // access the underlying Response object
|
|
187
206
|
|
|
188
207
|
const { data: contract, response: raw } = await client.v1.contracts
|
|
189
|
-
.create({
|
|
208
|
+
.create({
|
|
209
|
+
customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
210
|
+
starting_at: '2020-01-01T00:00:00.000Z',
|
|
211
|
+
})
|
|
190
212
|
.withResponse();
|
|
191
213
|
console.log(raw.headers.get('X-My-Header'));
|
|
192
214
|
console.log(contract.data);
|
package/client.d.mts
CHANGED
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAEL,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,8BAA8B,EAC/B;OACM,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EAAE,EAAE,EAAE;OACN,EAAE,EAAE,EAAE;OACN,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OAEvC,EACL,KAAK,QAAQ,EACb,KAAK,MAAM,EAIZ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AAM,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACtD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,oCAAoC,GAAG,GAAG,CAAC,oCAAoC,CAAC;IAC5F,MAAM,MAAM,sCAAsC,GAAG,GAAG,CAAC,sCAAsC,CAAC;IAChG,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAChD,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IACxC,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAC5B,MAAM,MAAM,iCAAiC,GAAG,GAAG,CAAC,iCAAiC,CAAC;IACtF,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAClD,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;IACpD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,2BAA2B,GAAG,GAAG,CAAC,2BAA2B,CAAC;IAC1E,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,6BAA6B,CAAC;IAC9E,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAC5B,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,yBAAyB,CAAC;CACvE"}
|
package/package.json
CHANGED
package/resources/shared.d.mts
CHANGED
|
@@ -94,6 +94,11 @@ export interface Commit {
|
|
|
94
94
|
*/
|
|
95
95
|
priority?: number;
|
|
96
96
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
97
|
+
/**
|
|
98
|
+
* The ID of the recurring commit that this commit was generated from, if
|
|
99
|
+
* applicable.
|
|
100
|
+
*/
|
|
101
|
+
recurring_commit_id?: string;
|
|
97
102
|
rolled_over_from?: Commit.RolledOverFrom;
|
|
98
103
|
rollover_fraction?: number;
|
|
99
104
|
/**
|
|
@@ -106,6 +111,11 @@ export interface Commit {
|
|
|
106
111
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
107
112
|
*/
|
|
108
113
|
specifiers?: Array<CommitSpecifier>;
|
|
114
|
+
/**
|
|
115
|
+
* The subscription configuration for this commit, if it was generated from a
|
|
116
|
+
* recurring commit with a subscription attached.
|
|
117
|
+
*/
|
|
118
|
+
subscription_config?: Commit.SubscriptionConfig;
|
|
109
119
|
/**
|
|
110
120
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
111
121
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -225,6 +235,23 @@ export declare namespace Commit {
|
|
|
225
235
|
commit_id: string;
|
|
226
236
|
contract_id: string;
|
|
227
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* The subscription configuration for this commit, if it was generated from a
|
|
240
|
+
* recurring commit with a subscription attached.
|
|
241
|
+
*/
|
|
242
|
+
interface SubscriptionConfig {
|
|
243
|
+
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
244
|
+
apply_seat_increase_config?: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
245
|
+
subscription_id?: string;
|
|
246
|
+
}
|
|
247
|
+
namespace SubscriptionConfig {
|
|
248
|
+
interface ApplySeatIncreaseConfig {
|
|
249
|
+
/**
|
|
250
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
251
|
+
*/
|
|
252
|
+
is_prorated: boolean;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
228
255
|
}
|
|
229
256
|
export interface CommitHierarchyConfiguration {
|
|
230
257
|
child_access: CommitHierarchyConfiguration.CommitHierarchyChildAccessAll | CommitHierarchyConfiguration.CommitHierarchyChildAccessNone | CommitHierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
@@ -559,6 +586,10 @@ export declare namespace ContractV2 {
|
|
|
559
586
|
*/
|
|
560
587
|
priority?: number;
|
|
561
588
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
589
|
+
/**
|
|
590
|
+
* The ID of the recurring commit that created this commit
|
|
591
|
+
*/
|
|
592
|
+
recurring_commit_id?: string;
|
|
562
593
|
rolled_over_from?: Commit.RolledOverFrom;
|
|
563
594
|
rollover_fraction?: number;
|
|
564
595
|
/**
|
|
@@ -571,6 +602,10 @@ export declare namespace ContractV2 {
|
|
|
571
602
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
572
603
|
*/
|
|
573
604
|
specifiers?: Array<Shared.CommitSpecifier>;
|
|
605
|
+
/**
|
|
606
|
+
* Attach a subscription to the recurring commit/credit.
|
|
607
|
+
*/
|
|
608
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
574
609
|
}
|
|
575
610
|
namespace Commit {
|
|
576
611
|
interface Product {
|
|
@@ -798,6 +833,13 @@ export declare namespace ContractV2 {
|
|
|
798
833
|
*/
|
|
799
834
|
balance?: number;
|
|
800
835
|
contract?: Credit.Contract;
|
|
836
|
+
/**
|
|
837
|
+
* Timestamp of when the credit was created.
|
|
838
|
+
*
|
|
839
|
+
* - Recurring credits: latter of credit service period date and parent credit
|
|
840
|
+
* start date
|
|
841
|
+
*/
|
|
842
|
+
created_at?: string;
|
|
801
843
|
/**
|
|
802
844
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
803
845
|
*/
|
|
@@ -824,6 +866,10 @@ export declare namespace ContractV2 {
|
|
|
824
866
|
* will apply first.
|
|
825
867
|
*/
|
|
826
868
|
priority?: number;
|
|
869
|
+
/**
|
|
870
|
+
* The ID of the recurring credit that created this credit
|
|
871
|
+
*/
|
|
872
|
+
recurring_credit_id?: string;
|
|
827
873
|
/**
|
|
828
874
|
* This field's availability is dependent on your client's configuration.
|
|
829
875
|
*/
|
|
@@ -834,6 +880,10 @@ export declare namespace ContractV2 {
|
|
|
834
880
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
835
881
|
*/
|
|
836
882
|
specifiers?: Array<Shared.CommitSpecifier>;
|
|
883
|
+
/**
|
|
884
|
+
* Attach a subscription to the recurring commit/credit.
|
|
885
|
+
*/
|
|
886
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
837
887
|
}
|
|
838
888
|
namespace Credit {
|
|
839
889
|
interface Product {
|
|
@@ -1596,6 +1646,11 @@ export interface Credit {
|
|
|
1596
1646
|
*/
|
|
1597
1647
|
priority?: number;
|
|
1598
1648
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1649
|
+
/**
|
|
1650
|
+
* The ID of the recurring credit that this credit was generated from, if
|
|
1651
|
+
* applicable.
|
|
1652
|
+
*/
|
|
1653
|
+
recurring_credit_id?: string;
|
|
1599
1654
|
/**
|
|
1600
1655
|
* This field's availability is dependent on your client's configuration.
|
|
1601
1656
|
*/
|
|
@@ -1606,6 +1661,11 @@ export interface Credit {
|
|
|
1606
1661
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1607
1662
|
*/
|
|
1608
1663
|
specifiers?: Array<CommitSpecifier>;
|
|
1664
|
+
/**
|
|
1665
|
+
* The subscription configuration for this credit, if it was generated from a
|
|
1666
|
+
* recurring credit with a subscription attached.
|
|
1667
|
+
*/
|
|
1668
|
+
subscription_config?: Credit.SubscriptionConfig;
|
|
1609
1669
|
/**
|
|
1610
1670
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
1611
1671
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -1670,6 +1730,23 @@ export declare namespace Credit {
|
|
|
1670
1730
|
timestamp: string;
|
|
1671
1731
|
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1672
1732
|
}
|
|
1733
|
+
/**
|
|
1734
|
+
* The subscription configuration for this credit, if it was generated from a
|
|
1735
|
+
* recurring credit with a subscription attached.
|
|
1736
|
+
*/
|
|
1737
|
+
interface SubscriptionConfig {
|
|
1738
|
+
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
1739
|
+
apply_seat_increase_config?: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
1740
|
+
subscription_id?: string;
|
|
1741
|
+
}
|
|
1742
|
+
namespace SubscriptionConfig {
|
|
1743
|
+
interface ApplySeatIncreaseConfig {
|
|
1744
|
+
/**
|
|
1745
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
1746
|
+
*/
|
|
1747
|
+
is_prorated: boolean;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1673
1750
|
}
|
|
1674
1751
|
export interface CreditTypeData {
|
|
1675
1752
|
id: string;
|
|
@@ -2179,12 +2256,6 @@ export interface Rate {
|
|
|
2179
2256
|
* Only set for TIERED rate_type.
|
|
2180
2257
|
*/
|
|
2181
2258
|
tiers?: Array<Tier>;
|
|
2182
|
-
/**
|
|
2183
|
-
* Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
|
|
2184
|
-
* using list prices rather than the standard rates for this product on the
|
|
2185
|
-
* contract.
|
|
2186
|
-
*/
|
|
2187
|
-
use_list_prices?: boolean;
|
|
2188
2259
|
}
|
|
2189
2260
|
export interface RecurringCommitSubscriptionConfig {
|
|
2190
2261
|
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
@@ -2298,8 +2369,8 @@ export interface Subscription {
|
|
|
2298
2369
|
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2299
2370
|
* directly on the subscription. `initial_quantity` must be provided with this
|
|
2300
2371
|
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2301
|
-
* **SEAT_BASED**:
|
|
2302
|
-
*
|
|
2372
|
+
* **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
2373
|
+
* user_123) to increment and decrement a subscription quantity, rather than
|
|
2303
2374
|
* directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
2304
2375
|
* use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
2305
2376
|
* provided with this option.
|
|
@@ -2323,6 +2394,7 @@ export interface Subscription {
|
|
|
2323
2394
|
ending_before?: string;
|
|
2324
2395
|
fiat_credit_type_id?: string;
|
|
2325
2396
|
name?: string;
|
|
2397
|
+
seat_config?: Subscription.SeatConfig;
|
|
2326
2398
|
}
|
|
2327
2399
|
export declare namespace Subscription {
|
|
2328
2400
|
/**
|
|
@@ -2366,6 +2438,17 @@ export declare namespace Subscription {
|
|
|
2366
2438
|
name: string;
|
|
2367
2439
|
}
|
|
2368
2440
|
}
|
|
2441
|
+
interface SeatConfig {
|
|
2442
|
+
/**
|
|
2443
|
+
* The property name, sent on usage events, that identifies the seat ID associated
|
|
2444
|
+
* with the usage event. For example, the property name might be seat_id or
|
|
2445
|
+
* user_id. The property must be set as a group key on billable metrics and a
|
|
2446
|
+
* presentation/pricing group key on contract products. This allows linked
|
|
2447
|
+
* recurring credits with an allocation per seat to be consumed by only one seat's
|
|
2448
|
+
* usage.
|
|
2449
|
+
*/
|
|
2450
|
+
seat_group_key: string;
|
|
2451
|
+
}
|
|
2369
2452
|
}
|
|
2370
2453
|
export interface Tier {
|
|
2371
2454
|
price: number;
|