@metronome/mcp 3.0.0 → 3.4.1

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