@metronome/mcp 3.0.0 → 3.5.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 (146) hide show
  1. package/README.md +3 -3
  2. package/auth.d.mts +6 -0
  3. package/auth.d.mts.map +1 -0
  4. package/auth.d.ts +6 -0
  5. package/auth.d.ts.map +1 -0
  6. package/auth.js +37 -0
  7. package/auth.js.map +1 -0
  8. package/{headers.js → auth.mjs} +16 -6
  9. package/auth.mjs.map +1 -0
  10. package/code-tool-paths.cjs +8 -0
  11. package/code-tool-paths.cjs.map +1 -0
  12. package/code-tool-paths.d.cts +2 -0
  13. package/code-tool-paths.d.cts.map +1 -0
  14. package/code-tool-types.d.mts.map +1 -1
  15. package/code-tool-types.d.ts.map +1 -1
  16. package/code-tool-worker.d.mts +5 -0
  17. package/code-tool-worker.d.mts.map +1 -0
  18. package/code-tool-worker.d.ts +5 -0
  19. package/code-tool-worker.d.ts.map +1 -0
  20. package/code-tool-worker.js +383 -0
  21. package/code-tool-worker.js.map +1 -0
  22. package/code-tool-worker.mjs +345 -0
  23. package/code-tool-worker.mjs.map +1 -0
  24. package/code-tool.d.mts +11 -2
  25. package/code-tool.d.mts.map +1 -1
  26. package/code-tool.d.ts +11 -2
  27. package/code-tool.d.ts.map +1 -1
  28. package/code-tool.js +283 -41
  29. package/code-tool.js.map +1 -1
  30. package/code-tool.mjs +251 -42
  31. package/code-tool.mjs.map +1 -1
  32. package/docs-search-tool.d.mts +11 -3
  33. package/docs-search-tool.d.mts.map +1 -1
  34. package/docs-search-tool.d.ts +11 -3
  35. package/docs-search-tool.d.ts.map +1 -1
  36. package/docs-search-tool.js +58 -5
  37. package/docs-search-tool.js.map +1 -1
  38. package/docs-search-tool.mjs +57 -5
  39. package/docs-search-tool.mjs.map +1 -1
  40. package/http.d.mts +6 -3
  41. package/http.d.mts.map +1 -1
  42. package/http.d.ts +6 -3
  43. package/http.d.ts.map +1 -1
  44. package/http.js +130 -28
  45. package/http.js.map +1 -1
  46. package/http.mjs +130 -28
  47. package/http.mjs.map +1 -1
  48. package/index.js +17 -12
  49. package/index.js.map +1 -1
  50. package/index.mjs +17 -12
  51. package/index.mjs.map +1 -1
  52. package/instructions.d.mts +5 -0
  53. package/instructions.d.mts.map +1 -0
  54. package/instructions.d.ts +5 -0
  55. package/instructions.d.ts.map +1 -0
  56. package/instructions.js +61 -0
  57. package/instructions.js.map +1 -0
  58. package/instructions.mjs +55 -0
  59. package/instructions.mjs.map +1 -0
  60. package/local-docs-search.d.mts +28 -0
  61. package/local-docs-search.d.mts.map +1 -0
  62. package/local-docs-search.d.ts +28 -0
  63. package/local-docs-search.d.ts.map +1 -0
  64. package/local-docs-search.js +4780 -0
  65. package/local-docs-search.js.map +1 -0
  66. package/local-docs-search.mjs +4740 -0
  67. package/local-docs-search.mjs.map +1 -0
  68. package/logger.d.mts +7 -0
  69. package/logger.d.mts.map +1 -0
  70. package/logger.d.ts +7 -0
  71. package/logger.d.ts.map +1 -0
  72. package/logger.js +29 -0
  73. package/logger.js.map +1 -0
  74. package/logger.mjs +22 -0
  75. package/logger.mjs.map +1 -0
  76. package/methods.d.mts +10 -0
  77. package/methods.d.mts.map +1 -0
  78. package/methods.d.ts +10 -0
  79. package/methods.d.ts.map +1 -0
  80. package/methods.js +767 -0
  81. package/methods.js.map +1 -0
  82. package/methods.mjs +763 -0
  83. package/methods.mjs.map +1 -0
  84. package/options.d.mts +12 -0
  85. package/options.d.mts.map +1 -1
  86. package/options.d.ts +12 -0
  87. package/options.d.ts.map +1 -1
  88. package/options.js +81 -12
  89. package/options.js.map +1 -1
  90. package/options.mjs +81 -12
  91. package/options.mjs.map +1 -1
  92. package/package.json +89 -15
  93. package/server.d.mts +18 -10
  94. package/server.d.mts.map +1 -1
  95. package/server.d.ts +18 -10
  96. package/server.d.ts.map +1 -1
  97. package/server.js +89 -42
  98. package/server.js.map +1 -1
  99. package/server.mjs +88 -39
  100. package/server.mjs.map +1 -1
  101. package/src/{headers.ts → auth.ts} +18 -1
  102. package/src/code-tool-paths.cts +5 -0
  103. package/src/code-tool-types.ts +1 -0
  104. package/src/code-tool-worker.ts +396 -0
  105. package/src/code-tool.ts +337 -49
  106. package/src/docs-search-tool.ts +86 -7
  107. package/src/http.ts +154 -33
  108. package/src/index.ts +19 -13
  109. package/src/instructions.ts +83 -0
  110. package/src/local-docs-search.ts +5674 -0
  111. package/src/logger.ts +28 -0
  112. package/src/methods.ts +788 -0
  113. package/src/options.ts +105 -12
  114. package/src/server.ts +111 -50
  115. package/src/stdio.ts +9 -4
  116. package/src/types.ts +15 -4
  117. package/src/util.ts +25 -0
  118. package/stdio.d.mts +2 -1
  119. package/stdio.d.mts.map +1 -1
  120. package/stdio.d.ts +2 -1
  121. package/stdio.d.ts.map +1 -1
  122. package/stdio.js +8 -4
  123. package/stdio.js.map +1 -1
  124. package/stdio.mjs +8 -4
  125. package/stdio.mjs.map +1 -1
  126. package/types.d.mts +14 -1
  127. package/types.d.mts.map +1 -1
  128. package/types.d.ts +14 -1
  129. package/types.d.ts.map +1 -1
  130. package/types.js.map +1 -1
  131. package/types.mjs.map +1 -1
  132. package/util.d.mts +4 -0
  133. package/util.d.mts.map +1 -0
  134. package/util.d.ts +4 -0
  135. package/util.d.ts.map +1 -0
  136. package/util.js +30 -0
  137. package/util.js.map +1 -0
  138. package/util.mjs +24 -0
  139. package/util.mjs.map +1 -0
  140. package/headers.d.mts +0 -4
  141. package/headers.d.mts.map +0 -1
  142. package/headers.d.ts +0 -4
  143. package/headers.d.ts.map +0 -1
  144. package/headers.js.map +0 -1
  145. package/headers.mjs +0 -18
  146. package/headers.mjs.map +0 -1
package/methods.mjs ADDED
@@ -0,0 +1,763 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export const sdkMethods = [
3
+ {
4
+ clientCallName: 'client.v2.contracts.retrieve',
5
+ fullyQualifiedName: 'v2.contracts.retrieve',
6
+ httpMethod: 'post',
7
+ httpPath: '/v2/contracts/get',
8
+ },
9
+ {
10
+ clientCallName: 'client.v2.contracts.list',
11
+ fullyQualifiedName: 'v2.contracts.list',
12
+ httpMethod: 'post',
13
+ httpPath: '/v2/contracts/list',
14
+ },
15
+ {
16
+ clientCallName: 'client.v2.contracts.edit',
17
+ fullyQualifiedName: 'v2.contracts.edit',
18
+ httpMethod: 'post',
19
+ httpPath: '/v2/contracts/edit',
20
+ },
21
+ {
22
+ clientCallName: 'client.v2.contracts.editCommit',
23
+ fullyQualifiedName: 'v2.contracts.editCommit',
24
+ httpMethod: 'post',
25
+ httpPath: '/v2/contracts/commits/edit',
26
+ },
27
+ {
28
+ clientCallName: 'client.v2.contracts.editCredit',
29
+ fullyQualifiedName: 'v2.contracts.editCredit',
30
+ httpMethod: 'post',
31
+ httpPath: '/v2/contracts/credits/edit',
32
+ },
33
+ {
34
+ clientCallName: 'client.v2.contracts.getEditHistory',
35
+ fullyQualifiedName: 'v2.contracts.getEditHistory',
36
+ httpMethod: 'post',
37
+ httpPath: '/v2/contracts/getEditHistory',
38
+ },
39
+ {
40
+ clientCallName: 'client.v1.alerts.create',
41
+ fullyQualifiedName: 'v1.alerts.create',
42
+ httpMethod: 'post',
43
+ httpPath: '/v1/alerts/create',
44
+ },
45
+ {
46
+ clientCallName: 'client.v1.alerts.archive',
47
+ fullyQualifiedName: 'v1.alerts.archive',
48
+ httpMethod: 'post',
49
+ httpPath: '/v1/alerts/archive',
50
+ },
51
+ {
52
+ clientCallName: 'client.v1.plans.list',
53
+ fullyQualifiedName: 'v1.plans.list',
54
+ httpMethod: 'get',
55
+ httpPath: '/v1/plans',
56
+ },
57
+ {
58
+ clientCallName: 'client.v1.plans.getDetails',
59
+ fullyQualifiedName: 'v1.plans.getDetails',
60
+ httpMethod: 'get',
61
+ httpPath: '/v1/planDetails/{plan_id}',
62
+ },
63
+ {
64
+ clientCallName: 'client.v1.plans.listCharges',
65
+ fullyQualifiedName: 'v1.plans.listCharges',
66
+ httpMethod: 'get',
67
+ httpPath: '/v1/planDetails/{plan_id}/charges',
68
+ },
69
+ {
70
+ clientCallName: 'client.v1.plans.listCustomers',
71
+ fullyQualifiedName: 'v1.plans.listCustomers',
72
+ httpMethod: 'get',
73
+ httpPath: '/v1/planDetails/{plan_id}/customers',
74
+ },
75
+ {
76
+ clientCallName: 'client.v1.creditGrants.create',
77
+ fullyQualifiedName: 'v1.creditGrants.create',
78
+ httpMethod: 'post',
79
+ httpPath: '/v1/credits/createGrant',
80
+ },
81
+ {
82
+ clientCallName: 'client.v1.creditGrants.list',
83
+ fullyQualifiedName: 'v1.creditGrants.list',
84
+ httpMethod: 'post',
85
+ httpPath: '/v1/credits/listGrants',
86
+ },
87
+ {
88
+ clientCallName: 'client.v1.creditGrants.edit',
89
+ fullyQualifiedName: 'v1.creditGrants.edit',
90
+ httpMethod: 'post',
91
+ httpPath: '/v1/credits/editGrant',
92
+ },
93
+ {
94
+ clientCallName: 'client.v1.creditGrants.listEntries',
95
+ fullyQualifiedName: 'v1.creditGrants.listEntries',
96
+ httpMethod: 'post',
97
+ httpPath: '/v1/credits/listEntries',
98
+ },
99
+ {
100
+ clientCallName: 'client.v1.creditGrants.void',
101
+ fullyQualifiedName: 'v1.creditGrants.void',
102
+ httpMethod: 'post',
103
+ httpPath: '/v1/credits/voidGrant',
104
+ },
105
+ {
106
+ clientCallName: 'client.v1.pricingUnits.list',
107
+ fullyQualifiedName: 'v1.pricingUnits.list',
108
+ httpMethod: 'get',
109
+ httpPath: '/v1/credit-types/list',
110
+ },
111
+ {
112
+ clientCallName: 'client.v1.customers.create',
113
+ fullyQualifiedName: 'v1.customers.create',
114
+ httpMethod: 'post',
115
+ httpPath: '/v1/customers',
116
+ },
117
+ {
118
+ clientCallName: 'client.v1.customers.retrieve',
119
+ fullyQualifiedName: 'v1.customers.retrieve',
120
+ httpMethod: 'get',
121
+ httpPath: '/v1/customers/{customer_id}',
122
+ },
123
+ {
124
+ clientCallName: 'client.v1.customers.list',
125
+ fullyQualifiedName: 'v1.customers.list',
126
+ httpMethod: 'get',
127
+ httpPath: '/v1/customers',
128
+ },
129
+ {
130
+ clientCallName: 'client.v1.customers.archive',
131
+ fullyQualifiedName: 'v1.customers.archive',
132
+ httpMethod: 'post',
133
+ httpPath: '/v1/customers/archive',
134
+ },
135
+ {
136
+ clientCallName: 'client.v1.customers.archiveBillingConfigurations',
137
+ fullyQualifiedName: 'v1.customers.archiveBillingConfigurations',
138
+ httpMethod: 'post',
139
+ httpPath: '/v1/archiveCustomerBillingProviderConfigurations',
140
+ },
141
+ {
142
+ clientCallName: 'client.v1.customers.listBillableMetrics',
143
+ fullyQualifiedName: 'v1.customers.listBillableMetrics',
144
+ httpMethod: 'get',
145
+ httpPath: '/v1/customers/{customer_id}/billable-metrics',
146
+ },
147
+ {
148
+ clientCallName: 'client.v1.customers.listCosts',
149
+ fullyQualifiedName: 'v1.customers.listCosts',
150
+ httpMethod: 'get',
151
+ httpPath: '/v1/customers/{customer_id}/costs',
152
+ },
153
+ {
154
+ clientCallName: 'client.v1.customers.previewEvents',
155
+ fullyQualifiedName: 'v1.customers.previewEvents',
156
+ httpMethod: 'post',
157
+ httpPath: '/v1/customers/{customer_id}/previewEvents',
158
+ },
159
+ {
160
+ clientCallName: 'client.v1.customers.retrieveBillingConfigurations',
161
+ fullyQualifiedName: 'v1.customers.retrieveBillingConfigurations',
162
+ httpMethod: 'post',
163
+ httpPath: '/v1/getCustomerBillingProviderConfigurations',
164
+ },
165
+ {
166
+ clientCallName: 'client.v1.customers.setBillingConfigurations',
167
+ fullyQualifiedName: 'v1.customers.setBillingConfigurations',
168
+ httpMethod: 'post',
169
+ httpPath: '/v1/setCustomerBillingProviderConfigurations',
170
+ },
171
+ {
172
+ clientCallName: 'client.v1.customers.setIngestAliases',
173
+ fullyQualifiedName: 'v1.customers.setIngestAliases',
174
+ httpMethod: 'post',
175
+ httpPath: '/v1/customers/{customer_id}/setIngestAliases',
176
+ },
177
+ {
178
+ clientCallName: 'client.v1.customers.setName',
179
+ fullyQualifiedName: 'v1.customers.setName',
180
+ httpMethod: 'post',
181
+ httpPath: '/v1/customers/{customer_id}/setName',
182
+ },
183
+ {
184
+ clientCallName: 'client.v1.customers.updateConfig',
185
+ fullyQualifiedName: 'v1.customers.updateConfig',
186
+ httpMethod: 'post',
187
+ httpPath: '/v1/customers/{customer_id}/updateConfig',
188
+ },
189
+ {
190
+ clientCallName: 'client.v1.customers.alerts.retrieve',
191
+ fullyQualifiedName: 'v1.customers.alerts.retrieve',
192
+ httpMethod: 'post',
193
+ httpPath: '/v1/customer-alerts/get',
194
+ },
195
+ {
196
+ clientCallName: 'client.v1.customers.alerts.list',
197
+ fullyQualifiedName: 'v1.customers.alerts.list',
198
+ httpMethod: 'post',
199
+ httpPath: '/v1/customer-alerts/list',
200
+ },
201
+ {
202
+ clientCallName: 'client.v1.customers.alerts.reset',
203
+ fullyQualifiedName: 'v1.customers.alerts.reset',
204
+ httpMethod: 'post',
205
+ httpPath: '/v1/customer-alerts/reset',
206
+ },
207
+ {
208
+ clientCallName: 'client.v1.customers.plans.list',
209
+ fullyQualifiedName: 'v1.customers.plans.list',
210
+ httpMethod: 'get',
211
+ httpPath: '/v1/customers/{customer_id}/plans',
212
+ },
213
+ {
214
+ clientCallName: 'client.v1.customers.plans.add',
215
+ fullyQualifiedName: 'v1.customers.plans.add',
216
+ httpMethod: 'post',
217
+ httpPath: '/v1/customers/{customer_id}/plans/add',
218
+ },
219
+ {
220
+ clientCallName: 'client.v1.customers.plans.end',
221
+ fullyQualifiedName: 'v1.customers.plans.end',
222
+ httpMethod: 'post',
223
+ httpPath: '/v1/customers/{customer_id}/plans/{customer_plan_id}/end',
224
+ },
225
+ {
226
+ clientCallName: 'client.v1.customers.plans.listPriceAdjustments',
227
+ fullyQualifiedName: 'v1.customers.plans.listPriceAdjustments',
228
+ httpMethod: 'get',
229
+ httpPath: '/v1/customers/{customer_id}/plans/{customer_plan_id}/priceAdjustments',
230
+ },
231
+ {
232
+ clientCallName: 'client.v1.customers.invoices.retrieve',
233
+ fullyQualifiedName: 'v1.customers.invoices.retrieve',
234
+ httpMethod: 'get',
235
+ httpPath: '/v1/customers/{customer_id}/invoices/{invoice_id}',
236
+ },
237
+ {
238
+ clientCallName: 'client.v1.customers.invoices.list',
239
+ fullyQualifiedName: 'v1.customers.invoices.list',
240
+ httpMethod: 'get',
241
+ httpPath: '/v1/customers/{customer_id}/invoices',
242
+ },
243
+ {
244
+ clientCallName: 'client.v1.customers.invoices.addCharge',
245
+ fullyQualifiedName: 'v1.customers.invoices.addCharge',
246
+ httpMethod: 'post',
247
+ httpPath: '/v1/customers/{customer_id}/addCharge',
248
+ },
249
+ {
250
+ clientCallName: 'client.v1.customers.invoices.listBreakdowns',
251
+ fullyQualifiedName: 'v1.customers.invoices.listBreakdowns',
252
+ httpMethod: 'get',
253
+ httpPath: '/v1/customers/{customer_id}/invoices/breakdowns',
254
+ },
255
+ {
256
+ clientCallName: 'client.v1.customers.invoices.retrievePdf',
257
+ fullyQualifiedName: 'v1.customers.invoices.retrievePdf',
258
+ httpMethod: 'get',
259
+ httpPath: '/v1/customers/{customer_id}/invoices/{invoice_id}/pdf',
260
+ },
261
+ {
262
+ clientCallName: 'client.v1.customers.billingConfig.create',
263
+ fullyQualifiedName: 'v1.customers.billingConfig.create',
264
+ httpMethod: 'post',
265
+ httpPath: '/v1/customers/{customer_id}/billing-config/{billing_provider_type}',
266
+ },
267
+ {
268
+ clientCallName: 'client.v1.customers.billingConfig.retrieve',
269
+ fullyQualifiedName: 'v1.customers.billingConfig.retrieve',
270
+ httpMethod: 'get',
271
+ httpPath: '/v1/customers/{customer_id}/billing-config/{billing_provider_type}',
272
+ },
273
+ {
274
+ clientCallName: 'client.v1.customers.billingConfig.delete',
275
+ fullyQualifiedName: 'v1.customers.billingConfig.delete',
276
+ httpMethod: 'delete',
277
+ httpPath: '/v1/customers/{customer_id}/billing-config/{billing_provider_type}',
278
+ },
279
+ {
280
+ clientCallName: 'client.v1.customers.commits.create',
281
+ fullyQualifiedName: 'v1.customers.commits.create',
282
+ httpMethod: 'post',
283
+ httpPath: '/v1/contracts/customerCommits/create',
284
+ },
285
+ {
286
+ clientCallName: 'client.v1.customers.commits.list',
287
+ fullyQualifiedName: 'v1.customers.commits.list',
288
+ httpMethod: 'post',
289
+ httpPath: '/v1/contracts/customerCommits/list',
290
+ },
291
+ {
292
+ clientCallName: 'client.v1.customers.commits.updateEndDate',
293
+ fullyQualifiedName: 'v1.customers.commits.updateEndDate',
294
+ httpMethod: 'post',
295
+ httpPath: '/v1/contracts/customerCommits/updateEndDate',
296
+ },
297
+ {
298
+ clientCallName: 'client.v1.customers.credits.create',
299
+ fullyQualifiedName: 'v1.customers.credits.create',
300
+ httpMethod: 'post',
301
+ httpPath: '/v1/contracts/customerCredits/create',
302
+ },
303
+ {
304
+ clientCallName: 'client.v1.customers.credits.list',
305
+ fullyQualifiedName: 'v1.customers.credits.list',
306
+ httpMethod: 'post',
307
+ httpPath: '/v1/contracts/customerCredits/list',
308
+ },
309
+ {
310
+ clientCallName: 'client.v1.customers.credits.updateEndDate',
311
+ fullyQualifiedName: 'v1.customers.credits.updateEndDate',
312
+ httpMethod: 'post',
313
+ httpPath: '/v1/contracts/customerCredits/updateEndDate',
314
+ },
315
+ {
316
+ clientCallName: 'client.v1.customers.namedSchedules.retrieve',
317
+ fullyQualifiedName: 'v1.customers.namedSchedules.retrieve',
318
+ httpMethod: 'post',
319
+ httpPath: '/v1/customers/getNamedSchedule',
320
+ },
321
+ {
322
+ clientCallName: 'client.v1.customers.namedSchedules.update',
323
+ fullyQualifiedName: 'v1.customers.namedSchedules.update',
324
+ httpMethod: 'post',
325
+ httpPath: '/v1/customers/updateNamedSchedule',
326
+ },
327
+ {
328
+ clientCallName: 'client.v1.dashboards.getEmbeddableURL',
329
+ fullyQualifiedName: 'v1.dashboards.getEmbeddableURL',
330
+ httpMethod: 'post',
331
+ httpPath: '/v1/dashboards/getEmbeddableUrl',
332
+ },
333
+ {
334
+ clientCallName: 'client.v1.usage.list',
335
+ fullyQualifiedName: 'v1.usage.list',
336
+ httpMethod: 'post',
337
+ httpPath: '/v1/usage',
338
+ },
339
+ {
340
+ clientCallName: 'client.v1.usage.ingest',
341
+ fullyQualifiedName: 'v1.usage.ingest',
342
+ httpMethod: 'post',
343
+ httpPath: '/v1/ingest',
344
+ },
345
+ {
346
+ clientCallName: 'client.v1.usage.listWithGroups',
347
+ fullyQualifiedName: 'v1.usage.listWithGroups',
348
+ httpMethod: 'post',
349
+ httpPath: '/v1/usage/groups',
350
+ },
351
+ {
352
+ clientCallName: 'client.v1.usage.search',
353
+ fullyQualifiedName: 'v1.usage.search',
354
+ httpMethod: 'post',
355
+ httpPath: '/v1/events/search',
356
+ },
357
+ {
358
+ clientCallName: 'client.v1.auditLogs.list',
359
+ fullyQualifiedName: 'v1.auditLogs.list',
360
+ httpMethod: 'get',
361
+ httpPath: '/v1/auditLogs',
362
+ },
363
+ {
364
+ clientCallName: 'client.v1.customFields.addKey',
365
+ fullyQualifiedName: 'v1.customFields.addKey',
366
+ httpMethod: 'post',
367
+ httpPath: '/v1/customFields/addKey',
368
+ },
369
+ {
370
+ clientCallName: 'client.v1.customFields.deleteValues',
371
+ fullyQualifiedName: 'v1.customFields.deleteValues',
372
+ httpMethod: 'post',
373
+ httpPath: '/v1/customFields/deleteValues',
374
+ },
375
+ {
376
+ clientCallName: 'client.v1.customFields.listKeys',
377
+ fullyQualifiedName: 'v1.customFields.listKeys',
378
+ httpMethod: 'post',
379
+ httpPath: '/v1/customFields/listKeys',
380
+ },
381
+ {
382
+ clientCallName: 'client.v1.customFields.removeKey',
383
+ fullyQualifiedName: 'v1.customFields.removeKey',
384
+ httpMethod: 'post',
385
+ httpPath: '/v1/customFields/removeKey',
386
+ },
387
+ {
388
+ clientCallName: 'client.v1.customFields.setValues',
389
+ fullyQualifiedName: 'v1.customFields.setValues',
390
+ httpMethod: 'post',
391
+ httpPath: '/v1/customFields/setValues',
392
+ },
393
+ {
394
+ clientCallName: 'client.v1.billableMetrics.create',
395
+ fullyQualifiedName: 'v1.billableMetrics.create',
396
+ httpMethod: 'post',
397
+ httpPath: '/v1/billable-metrics/create',
398
+ },
399
+ {
400
+ clientCallName: 'client.v1.billableMetrics.retrieve',
401
+ fullyQualifiedName: 'v1.billableMetrics.retrieve',
402
+ httpMethod: 'get',
403
+ httpPath: '/v1/billable-metrics/{billable_metric_id}',
404
+ },
405
+ {
406
+ clientCallName: 'client.v1.billableMetrics.list',
407
+ fullyQualifiedName: 'v1.billableMetrics.list',
408
+ httpMethod: 'get',
409
+ httpPath: '/v1/billable-metrics',
410
+ },
411
+ {
412
+ clientCallName: 'client.v1.billableMetrics.archive',
413
+ fullyQualifiedName: 'v1.billableMetrics.archive',
414
+ httpMethod: 'post',
415
+ httpPath: '/v1/billable-metrics/archive',
416
+ },
417
+ {
418
+ clientCallName: 'client.v1.services.list',
419
+ fullyQualifiedName: 'v1.services.list',
420
+ httpMethod: 'get',
421
+ httpPath: '/v1/services',
422
+ },
423
+ {
424
+ clientCallName: 'client.v1.invoices.regenerate',
425
+ fullyQualifiedName: 'v1.invoices.regenerate',
426
+ httpMethod: 'post',
427
+ httpPath: '/v1/invoices/regenerate',
428
+ },
429
+ {
430
+ clientCallName: 'client.v1.invoices.void',
431
+ fullyQualifiedName: 'v1.invoices.void',
432
+ httpMethod: 'post',
433
+ httpPath: '/v1/invoices/void',
434
+ },
435
+ {
436
+ clientCallName: 'client.v1.contracts.create',
437
+ fullyQualifiedName: 'v1.contracts.create',
438
+ httpMethod: 'post',
439
+ httpPath: '/v1/contracts/create',
440
+ },
441
+ {
442
+ clientCallName: 'client.v1.contracts.retrieve',
443
+ fullyQualifiedName: 'v1.contracts.retrieve',
444
+ httpMethod: 'post',
445
+ httpPath: '/v1/contracts/get',
446
+ },
447
+ {
448
+ clientCallName: 'client.v1.contracts.list',
449
+ fullyQualifiedName: 'v1.contracts.list',
450
+ httpMethod: 'post',
451
+ httpPath: '/v1/contracts/list',
452
+ },
453
+ {
454
+ clientCallName: 'client.v1.contracts.addManualBalanceEntry',
455
+ fullyQualifiedName: 'v1.contracts.addManualBalanceEntry',
456
+ httpMethod: 'post',
457
+ httpPath: '/v1/contracts/addManualBalanceLedgerEntry',
458
+ },
459
+ {
460
+ clientCallName: 'client.v1.contracts.amend',
461
+ fullyQualifiedName: 'v1.contracts.amend',
462
+ httpMethod: 'post',
463
+ httpPath: '/v1/contracts/amend',
464
+ },
465
+ {
466
+ clientCallName: 'client.v1.contracts.archive',
467
+ fullyQualifiedName: 'v1.contracts.archive',
468
+ httpMethod: 'post',
469
+ httpPath: '/v1/contracts/archive',
470
+ },
471
+ {
472
+ clientCallName: 'client.v1.contracts.createHistoricalInvoices',
473
+ fullyQualifiedName: 'v1.contracts.createHistoricalInvoices',
474
+ httpMethod: 'post',
475
+ httpPath: '/v1/contracts/createHistoricalInvoices',
476
+ },
477
+ {
478
+ clientCallName: 'client.v1.contracts.getNetBalance',
479
+ fullyQualifiedName: 'v1.contracts.getNetBalance',
480
+ httpMethod: 'post',
481
+ httpPath: '/v1/contracts/customerBalances/getNetBalance',
482
+ },
483
+ {
484
+ clientCallName: 'client.v1.contracts.listBalances',
485
+ fullyQualifiedName: 'v1.contracts.listBalances',
486
+ httpMethod: 'post',
487
+ httpPath: '/v1/contracts/customerBalances/list',
488
+ },
489
+ {
490
+ clientCallName: 'client.v1.contracts.retrieveRateSchedule',
491
+ fullyQualifiedName: 'v1.contracts.retrieveRateSchedule',
492
+ httpMethod: 'post',
493
+ httpPath: '/v1/contracts/getContractRateSchedule',
494
+ },
495
+ {
496
+ clientCallName: 'client.v1.contracts.retrieveSubscriptionQuantityHistory',
497
+ fullyQualifiedName: 'v1.contracts.retrieveSubscriptionQuantityHistory',
498
+ httpMethod: 'post',
499
+ httpPath: '/v1/contracts/getSubscriptionQuantityHistory',
500
+ },
501
+ {
502
+ clientCallName: 'client.v1.contracts.scheduleProServicesInvoice',
503
+ fullyQualifiedName: 'v1.contracts.scheduleProServicesInvoice',
504
+ httpMethod: 'post',
505
+ httpPath: '/v1/contracts/scheduleProServicesInvoice',
506
+ },
507
+ {
508
+ clientCallName: 'client.v1.contracts.setUsageFilter',
509
+ fullyQualifiedName: 'v1.contracts.setUsageFilter',
510
+ httpMethod: 'post',
511
+ httpPath: '/v1/contracts/setUsageFilter',
512
+ },
513
+ {
514
+ clientCallName: 'client.v1.contracts.updateEndDate',
515
+ fullyQualifiedName: 'v1.contracts.updateEndDate',
516
+ httpMethod: 'post',
517
+ httpPath: '/v1/contracts/updateEndDate',
518
+ },
519
+ {
520
+ clientCallName: 'client.v1.contracts.products.create',
521
+ fullyQualifiedName: 'v1.contracts.products.create',
522
+ httpMethod: 'post',
523
+ httpPath: '/v1/contract-pricing/products/create',
524
+ },
525
+ {
526
+ clientCallName: 'client.v1.contracts.products.retrieve',
527
+ fullyQualifiedName: 'v1.contracts.products.retrieve',
528
+ httpMethod: 'post',
529
+ httpPath: '/v1/contract-pricing/products/get',
530
+ },
531
+ {
532
+ clientCallName: 'client.v1.contracts.products.update',
533
+ fullyQualifiedName: 'v1.contracts.products.update',
534
+ httpMethod: 'post',
535
+ httpPath: '/v1/contract-pricing/products/update',
536
+ },
537
+ {
538
+ clientCallName: 'client.v1.contracts.products.list',
539
+ fullyQualifiedName: 'v1.contracts.products.list',
540
+ httpMethod: 'post',
541
+ httpPath: '/v1/contract-pricing/products/list',
542
+ },
543
+ {
544
+ clientCallName: 'client.v1.contracts.products.archive',
545
+ fullyQualifiedName: 'v1.contracts.products.archive',
546
+ httpMethod: 'post',
547
+ httpPath: '/v1/contract-pricing/products/archive',
548
+ },
549
+ {
550
+ clientCallName: 'client.v1.contracts.rateCards.create',
551
+ fullyQualifiedName: 'v1.contracts.rateCards.create',
552
+ httpMethod: 'post',
553
+ httpPath: '/v1/contract-pricing/rate-cards/create',
554
+ },
555
+ {
556
+ clientCallName: 'client.v1.contracts.rateCards.retrieve',
557
+ fullyQualifiedName: 'v1.contracts.rateCards.retrieve',
558
+ httpMethod: 'post',
559
+ httpPath: '/v1/contract-pricing/rate-cards/get',
560
+ },
561
+ {
562
+ clientCallName: 'client.v1.contracts.rateCards.update',
563
+ fullyQualifiedName: 'v1.contracts.rateCards.update',
564
+ httpMethod: 'post',
565
+ httpPath: '/v1/contract-pricing/rate-cards/update',
566
+ },
567
+ {
568
+ clientCallName: 'client.v1.contracts.rateCards.list',
569
+ fullyQualifiedName: 'v1.contracts.rateCards.list',
570
+ httpMethod: 'post',
571
+ httpPath: '/v1/contract-pricing/rate-cards/list',
572
+ },
573
+ {
574
+ clientCallName: 'client.v1.contracts.rateCards.archive',
575
+ fullyQualifiedName: 'v1.contracts.rateCards.archive',
576
+ httpMethod: 'post',
577
+ httpPath: '/v1/contract-pricing/rate-cards/archive',
578
+ },
579
+ {
580
+ clientCallName: 'client.v1.contracts.rateCards.retrieveRateSchedule',
581
+ fullyQualifiedName: 'v1.contracts.rateCards.retrieveRateSchedule',
582
+ httpMethod: 'post',
583
+ httpPath: '/v1/contract-pricing/rate-cards/getRateSchedule',
584
+ },
585
+ {
586
+ clientCallName: 'client.v1.contracts.rateCards.productOrders.update',
587
+ fullyQualifiedName: 'v1.contracts.rateCards.productOrders.update',
588
+ httpMethod: 'post',
589
+ httpPath: '/v1/contract-pricing/rate-cards/moveRateCardProducts',
590
+ },
591
+ {
592
+ clientCallName: 'client.v1.contracts.rateCards.productOrders.set',
593
+ fullyQualifiedName: 'v1.contracts.rateCards.productOrders.set',
594
+ httpMethod: 'post',
595
+ httpPath: '/v1/contract-pricing/rate-cards/setRateCardProductsOrder',
596
+ },
597
+ {
598
+ clientCallName: 'client.v1.contracts.rateCards.rates.list',
599
+ fullyQualifiedName: 'v1.contracts.rateCards.rates.list',
600
+ httpMethod: 'post',
601
+ httpPath: '/v1/contract-pricing/rate-cards/getRates',
602
+ },
603
+ {
604
+ clientCallName: 'client.v1.contracts.rateCards.rates.add',
605
+ fullyQualifiedName: 'v1.contracts.rateCards.rates.add',
606
+ httpMethod: 'post',
607
+ httpPath: '/v1/contract-pricing/rate-cards/addRate',
608
+ },
609
+ {
610
+ clientCallName: 'client.v1.contracts.rateCards.rates.addMany',
611
+ fullyQualifiedName: 'v1.contracts.rateCards.rates.addMany',
612
+ httpMethod: 'post',
613
+ httpPath: '/v1/contract-pricing/rate-cards/addRates',
614
+ },
615
+ {
616
+ clientCallName: 'client.v1.contracts.rateCards.namedSchedules.retrieve',
617
+ fullyQualifiedName: 'v1.contracts.rateCards.namedSchedules.retrieve',
618
+ httpMethod: 'post',
619
+ httpPath: '/v1/contracts/getNamedSchedule',
620
+ },
621
+ {
622
+ clientCallName: 'client.v1.contracts.rateCards.namedSchedules.update',
623
+ fullyQualifiedName: 'v1.contracts.rateCards.namedSchedules.update',
624
+ httpMethod: 'post',
625
+ httpPath: '/v1/contracts/updateNamedSchedule',
626
+ },
627
+ {
628
+ clientCallName: 'client.v1.contracts.namedSchedules.retrieve',
629
+ fullyQualifiedName: 'v1.contracts.namedSchedules.retrieve',
630
+ httpMethod: 'post',
631
+ httpPath: '/v1/contract-pricing/rate-cards/getNamedSchedule',
632
+ },
633
+ {
634
+ clientCallName: 'client.v1.contracts.namedSchedules.update',
635
+ fullyQualifiedName: 'v1.contracts.namedSchedules.update',
636
+ httpMethod: 'post',
637
+ httpPath: '/v1/contract-pricing/rate-cards/updateNamedSchedule',
638
+ },
639
+ {
640
+ clientCallName: 'client.v1.packages.create',
641
+ fullyQualifiedName: 'v1.packages.create',
642
+ httpMethod: 'post',
643
+ httpPath: '/v1/packages/create',
644
+ },
645
+ {
646
+ clientCallName: 'client.v1.packages.retrieve',
647
+ fullyQualifiedName: 'v1.packages.retrieve',
648
+ httpMethod: 'post',
649
+ httpPath: '/v1/packages/get',
650
+ },
651
+ {
652
+ clientCallName: 'client.v1.packages.list',
653
+ fullyQualifiedName: 'v1.packages.list',
654
+ httpMethod: 'post',
655
+ httpPath: '/v1/packages/list',
656
+ },
657
+ {
658
+ clientCallName: 'client.v1.packages.archive',
659
+ fullyQualifiedName: 'v1.packages.archive',
660
+ httpMethod: 'post',
661
+ httpPath: '/v1/packages/archive',
662
+ },
663
+ {
664
+ clientCallName: 'client.v1.packages.listContractsOnPackage',
665
+ fullyQualifiedName: 'v1.packages.listContractsOnPackage',
666
+ httpMethod: 'post',
667
+ httpPath: '/v1/packages/listContractsOnPackage',
668
+ },
669
+ {
670
+ clientCallName: 'client.v1.payments.list',
671
+ fullyQualifiedName: 'v1.payments.list',
672
+ httpMethod: 'post',
673
+ httpPath: '/v1/payments/list',
674
+ },
675
+ {
676
+ clientCallName: 'client.v1.payments.attempt',
677
+ fullyQualifiedName: 'v1.payments.attempt',
678
+ httpMethod: 'post',
679
+ httpPath: '/v1/payments/attempt',
680
+ },
681
+ {
682
+ clientCallName: 'client.v1.payments.cancel',
683
+ fullyQualifiedName: 'v1.payments.cancel',
684
+ httpMethod: 'post',
685
+ httpPath: '/v1/payments/cancel',
686
+ },
687
+ {
688
+ clientCallName: 'client.v1.settings.upsertAvalaraCredentials',
689
+ fullyQualifiedName: 'v1.settings.upsertAvalaraCredentials',
690
+ httpMethod: 'post',
691
+ httpPath: '/v1/upsertAvalaraCredentials',
692
+ },
693
+ {
694
+ clientCallName: 'client.v1.settings.billingProviders.create',
695
+ fullyQualifiedName: 'v1.settings.billingProviders.create',
696
+ httpMethod: 'post',
697
+ httpPath: '/v1/setUpBillingProvider',
698
+ },
699
+ {
700
+ clientCallName: 'client.v1.settings.billingProviders.list',
701
+ fullyQualifiedName: 'v1.settings.billingProviders.list',
702
+ httpMethod: 'post',
703
+ httpPath: '/v1/listConfiguredBillingProviders',
704
+ },
705
+ ];
706
+ function allowedMethodsForCodeTool(options) {
707
+ if (!options) {
708
+ return undefined;
709
+ }
710
+ let allowedMethods;
711
+ if (options.codeAllowHttpGets || options.codeAllowedMethods) {
712
+ // Start with nothing allowed and then add into it from options
713
+ let allowedMethodsSet = new Set();
714
+ if (options.codeAllowHttpGets) {
715
+ // Add all methods that map to an HTTP GET
716
+ sdkMethods
717
+ .filter((method) => method.httpMethod === 'get')
718
+ .forEach((method) => allowedMethodsSet.add(method));
719
+ }
720
+ if (options.codeAllowedMethods) {
721
+ // Add all methods that match any of the allowed regexps
722
+ const allowedRegexps = options.codeAllowedMethods.map((pattern) => {
723
+ try {
724
+ return new RegExp(pattern);
725
+ }
726
+ catch (e) {
727
+ throw new Error(`Invalid regex pattern for allowed method: "${pattern}": ${e instanceof Error ? e.message : e}`);
728
+ }
729
+ });
730
+ sdkMethods
731
+ .filter((method) => allowedRegexps.some((regexp) => regexp.test(method.fullyQualifiedName)))
732
+ .forEach((method) => allowedMethodsSet.add(method));
733
+ }
734
+ allowedMethods = Array.from(allowedMethodsSet);
735
+ }
736
+ else {
737
+ // Start with everything allowed
738
+ allowedMethods = [...sdkMethods];
739
+ }
740
+ if (options.codeBlockedMethods) {
741
+ // Filter down based on blocked regexps
742
+ const blockedRegexps = options.codeBlockedMethods.map((pattern) => {
743
+ try {
744
+ return new RegExp(pattern);
745
+ }
746
+ catch (e) {
747
+ throw new Error(`Invalid regex pattern for blocked method: "${pattern}": ${e instanceof Error ? e.message : e}`);
748
+ }
749
+ });
750
+ allowedMethods = allowedMethods.filter((method) => !blockedRegexps.some((regexp) => regexp.test(method.fullyQualifiedName)));
751
+ }
752
+ return allowedMethods;
753
+ }
754
+ export function blockedMethodsForCodeTool(options) {
755
+ const allowedMethods = allowedMethodsForCodeTool(options);
756
+ if (!allowedMethods) {
757
+ return undefined;
758
+ }
759
+ const allowedSet = new Set(allowedMethods.map((method) => method.fullyQualifiedName));
760
+ // Return any methods that are not explicitly allowed
761
+ return sdkMethods.filter((method) => !allowedSet.has(method.fullyQualifiedName));
762
+ }
763
+ //# sourceMappingURL=methods.mjs.map