@moovio/sdk 0.6.1 → 0.7.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/FUNCTIONS.md +1 -0
- package/README.md +25 -0
- package/bin/mcp-server.js +814 -275
- package/bin/mcp-server.js.map +26 -14
- package/docs/sdks/accounts/README.md +2 -0
- package/docs/sdks/onboarding/README.md +2 -0
- package/docs/sdks/receipts/README.md +189 -0
- package/funcs/receiptsCreate.d.ts +18 -0
- package/funcs/receiptsCreate.d.ts.map +1 -0
- package/funcs/receiptsCreate.js +133 -0
- package/funcs/receiptsCreate.js.map +1 -0
- package/funcs/receiptsList.d.ts +16 -0
- package/funcs/receiptsList.d.ts.map +1 -0
- package/funcs/receiptsList.js +121 -0
- package/funcs/receiptsList.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/extensions.d.ts +9 -0
- package/mcp-server/extensions.d.ts.map +1 -0
- package/mcp-server/extensions.js +6 -0
- package/mcp-server/extensions.js.map +1 -0
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/resources.d.ts +9 -4
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +36 -9
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +10 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/receiptsCreate.d.ts +9 -0
- package/mcp-server/tools/receiptsCreate.d.ts.map +1 -0
- package/mcp-server/tools/receiptsCreate.js +66 -0
- package/mcp-server/tools/receiptsCreate.js.map +1 -0
- package/mcp-server/tools/receiptsList.d.ts +8 -0
- package/mcp-server/tools/receiptsList.d.ts.map +1 -0
- package/mcp-server/tools/receiptsList.js +65 -0
- package/mcp-server/tools/receiptsList.js.map +1 -0
- package/models/components/achtransactiondetails.d.ts +2 -0
- package/models/components/achtransactiondetails.d.ts.map +1 -1
- package/models/components/achtransactiondetails.js +3 -0
- package/models/components/achtransactiondetails.js.map +1 -1
- package/models/components/achtransactionstatus.d.ts +3 -0
- package/models/components/achtransactionstatus.d.ts.map +1 -1
- package/models/components/achtransactionstatus.js +1 -0
- package/models/components/achtransactionstatus.js.map +1 -1
- package/models/components/createaccount.d.ts +6 -0
- package/models/components/createaccount.d.ts.map +1 -1
- package/models/components/createaccount.js +3 -0
- package/models/components/createaccount.js.map +1 -1
- package/models/components/createterminalapplication.d.ts +4 -4
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/receiptkind.d.ts +31 -0
- package/models/components/receiptkind.d.ts.map +1 -0
- package/models/components/receiptkind.js +63 -0
- package/models/components/receiptkind.js.map +1 -0
- package/models/components/receiptrequest.d.ts +76 -0
- package/models/components/receiptrequest.d.ts.map +1 -0
- package/models/components/receiptrequest.js +80 -0
- package/models/components/receiptrequest.js.map +1 -0
- package/models/components/receiptresponse.d.ts +94 -0
- package/models/components/receiptresponse.d.ts.map +1 -0
- package/models/components/receiptresponse.js +90 -0
- package/models/components/receiptresponse.js.map +1 -0
- package/models/components/sentreceipt.d.ts +42 -0
- package/models/components/sentreceipt.d.ts.map +1 -0
- package/models/components/sentreceipt.js +73 -0
- package/models/components/sentreceipt.js.map +1 -0
- package/models/components/terminalapplication.d.ts +4 -4
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/receiptvalidationerror.d.ts +46 -0
- package/models/errors/receiptvalidationerror.d.ts.map +1 -0
- package/models/errors/receiptvalidationerror.js +98 -0
- package/models/errors/receiptvalidationerror.js.map +1 -0
- package/models/operations/createreceipts.d.ts +74 -0
- package/models/operations/createreceipts.d.ts.map +1 -0
- package/models/operations/createreceipts.js +118 -0
- package/models/operations/createreceipts.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listreceipts.d.ts +102 -0
- package/models/operations/listreceipts.d.ts.map +1 -0
- package/models/operations/listreceipts.js +145 -0
- package/models/operations/listreceipts.js.map +1 -0
- package/package.json +1 -1
- package/sdk/receipts.d.ts +20 -0
- package/sdk/receipts.d.ts.map +1 -0
- package/sdk/receipts.js +32 -0
- package/sdk/receipts.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/receiptsCreate.ts +190 -0
- package/src/funcs/receiptsList.ts +171 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/extensions.ts +13 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/resources.ts +75 -14
- package/src/mcp-server/server.ts +20 -1
- package/src/mcp-server/tools/receiptsCreate.ts +39 -0
- package/src/mcp-server/tools/receiptsList.ts +38 -0
- package/src/models/components/achtransactiondetails.ts +5 -0
- package/src/models/components/achtransactionstatus.ts +1 -0
- package/src/models/components/createaccount.ts +8 -0
- package/src/models/components/createterminalapplication.ts +4 -4
- package/src/models/components/index.ts +4 -0
- package/src/models/components/receiptkind.ts +36 -0
- package/src/models/components/receiptrequest.ts +123 -0
- package/src/models/components/receiptresponse.ts +157 -0
- package/src/models/components/sentreceipt.ts +79 -0
- package/src/models/components/terminalapplication.ts +4 -4
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/receiptvalidationerror.ts +99 -0
- package/src/models/operations/createreceipts.ts +161 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listreceipts.ts +222 -0
- package/src/sdk/receipts.ts +46 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -188,6 +188,7 @@ async function run() {
|
|
|
188
188
|
companyName: "WholeBodyFitness",
|
|
189
189
|
},
|
|
190
190
|
},
|
|
191
|
+
mode: "production",
|
|
191
192
|
});
|
|
192
193
|
|
|
193
194
|
// Handle the result
|
|
@@ -302,6 +303,7 @@ async function run() {
|
|
|
302
303
|
companyName: "WholeBodyFitness",
|
|
303
304
|
},
|
|
304
305
|
},
|
|
306
|
+
mode: "production",
|
|
305
307
|
});
|
|
306
308
|
|
|
307
309
|
if (!res.ok) {
|
|
@@ -142,6 +142,7 @@ async function run() {
|
|
|
142
142
|
companyName: "WholeBodyFitness",
|
|
143
143
|
},
|
|
144
144
|
},
|
|
145
|
+
mode: "production",
|
|
145
146
|
},
|
|
146
147
|
});
|
|
147
148
|
|
|
@@ -270,6 +271,7 @@ async function run() {
|
|
|
270
271
|
companyName: "WholeBodyFitness",
|
|
271
272
|
},
|
|
272
273
|
},
|
|
274
|
+
mode: "production",
|
|
273
275
|
},
|
|
274
276
|
});
|
|
275
277
|
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Receipts
|
|
2
|
+
(*receipts*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [create](#create) - Create receipts for transfers and scheduled transfers.
|
|
9
|
+
|
|
10
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
11
|
+
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
12
|
+
* [list](#list) - List receipts by trasnferID, scheduleID, or occurrenceID.
|
|
13
|
+
|
|
14
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
15
|
+
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
16
|
+
|
|
17
|
+
## create
|
|
18
|
+
|
|
19
|
+
Create receipts for transfers and scheduled transfers.
|
|
20
|
+
|
|
21
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
22
|
+
you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
23
|
+
|
|
24
|
+
### Example Usage
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { Moov } from "@moovio/sdk";
|
|
28
|
+
|
|
29
|
+
const moov = new Moov({
|
|
30
|
+
security: {
|
|
31
|
+
username: "",
|
|
32
|
+
password: "",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
async function run() {
|
|
37
|
+
const result = await moov.receipts.create([
|
|
38
|
+
{
|
|
39
|
+
kind: "sale.customer.v1",
|
|
40
|
+
email: "jordan.lee@classbooker.dev",
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
// Handle the result
|
|
45
|
+
console.log(result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
run();
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Standalone function
|
|
52
|
+
|
|
53
|
+
The standalone function version of this method:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { MoovCore } from "@moovio/sdk/core.js";
|
|
57
|
+
import { receiptsCreate } from "@moovio/sdk/funcs/receiptsCreate.js";
|
|
58
|
+
|
|
59
|
+
// Use `MoovCore` for best tree-shaking performance.
|
|
60
|
+
// You can create one instance of it to use across an application.
|
|
61
|
+
const moov = new MoovCore({
|
|
62
|
+
security: {
|
|
63
|
+
username: "",
|
|
64
|
+
password: "",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
async function run() {
|
|
69
|
+
const res = await receiptsCreate(moov, [
|
|
70
|
+
{
|
|
71
|
+
kind: "sale.customer.v1",
|
|
72
|
+
email: "jordan.lee@classbooker.dev",
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
|
|
76
|
+
if (!res.ok) {
|
|
77
|
+
throw res.error;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const { value: result } = res;
|
|
81
|
+
|
|
82
|
+
// Handle the result
|
|
83
|
+
console.log(result);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
run();
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
| Parameter | Type | Required | Description |
|
|
92
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
+
| `request` | [components.ReceiptRequest[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
94
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
96
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
97
|
+
|
|
98
|
+
### Response
|
|
99
|
+
|
|
100
|
+
**Promise\<[operations.CreateReceiptsResponse](../../models/operations/createreceiptsresponse.md)\>**
|
|
101
|
+
|
|
102
|
+
### Errors
|
|
103
|
+
|
|
104
|
+
| Error Type | Status Code | Content Type |
|
|
105
|
+
| ----------------------------- | ----------------------------- | ----------------------------- |
|
|
106
|
+
| errors.GenericError | 400, 409 | application/json |
|
|
107
|
+
| errors.ReceiptValidationError | 422 | application/json |
|
|
108
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
109
|
+
|
|
110
|
+
## list
|
|
111
|
+
|
|
112
|
+
List receipts by trasnferID, scheduleID, or occurrenceID.
|
|
113
|
+
|
|
114
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
115
|
+
you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
116
|
+
|
|
117
|
+
### Example Usage
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { Moov } from "@moovio/sdk";
|
|
121
|
+
|
|
122
|
+
const moov = new Moov({
|
|
123
|
+
security: {
|
|
124
|
+
username: "",
|
|
125
|
+
password: "",
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
async function run() {
|
|
130
|
+
const result = await moov.receipts.list({});
|
|
131
|
+
|
|
132
|
+
// Handle the result
|
|
133
|
+
console.log(result);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
run();
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Standalone function
|
|
140
|
+
|
|
141
|
+
The standalone function version of this method:
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { MoovCore } from "@moovio/sdk/core.js";
|
|
145
|
+
import { receiptsList } from "@moovio/sdk/funcs/receiptsList.js";
|
|
146
|
+
|
|
147
|
+
// Use `MoovCore` for best tree-shaking performance.
|
|
148
|
+
// You can create one instance of it to use across an application.
|
|
149
|
+
const moov = new MoovCore({
|
|
150
|
+
security: {
|
|
151
|
+
username: "",
|
|
152
|
+
password: "",
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
async function run() {
|
|
157
|
+
const res = await receiptsList(moov, {});
|
|
158
|
+
|
|
159
|
+
if (!res.ok) {
|
|
160
|
+
throw res.error;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const { value: result } = res;
|
|
164
|
+
|
|
165
|
+
// Handle the result
|
|
166
|
+
console.log(result);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
run();
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Parameters
|
|
173
|
+
|
|
174
|
+
| Parameter | Type | Required | Description |
|
|
175
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
176
|
+
| `request` | [operations.ListReceiptsRequest](../../models/operations/listreceiptsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
177
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
178
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
179
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
180
|
+
|
|
181
|
+
### Response
|
|
182
|
+
|
|
183
|
+
**Promise\<[operations.ListReceiptsResponse](../../models/operations/listreceiptsresponse.md)\>**
|
|
184
|
+
|
|
185
|
+
### Errors
|
|
186
|
+
|
|
187
|
+
| Error Type | Status Code | Content Type |
|
|
188
|
+
| --------------- | --------------- | --------------- |
|
|
189
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MoovCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
5
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
+
import * as errors from "../models/errors/index.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Create receipts for transfers and scheduled transfers.
|
|
13
|
+
*
|
|
14
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
15
|
+
* you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
16
|
+
*/
|
|
17
|
+
export declare function receiptsCreate(client: MoovCore, request: Array<components.ReceiptRequest>, options?: RequestOptions): APIPromise<Result<operations.CreateReceiptsResponse, errors.GenericError | errors.ReceiptValidationError | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
18
|
+
//# sourceMappingURL=receiptsCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiptsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/receiptsCreate.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,sBAAsB,GAC7B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.receiptsCreate = receiptsCreate;
|
|
40
|
+
const z = __importStar(require("zod"));
|
|
41
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
48
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
49
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
50
|
+
const async_js_1 = require("../types/async.js");
|
|
51
|
+
/**
|
|
52
|
+
* Create receipts for transfers and scheduled transfers.
|
|
53
|
+
*
|
|
54
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
55
|
+
* you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
|
|
56
|
+
*/
|
|
57
|
+
function receiptsCreate(client, request, options) {
|
|
58
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
59
|
+
}
|
|
60
|
+
async function $do(client, request, options) {
|
|
61
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => z.array(components.ReceiptRequest$outboundSchema).parse(value), "Input validation failed");
|
|
62
|
+
if (!parsed.ok) {
|
|
63
|
+
return [parsed, { status: "invalid" }];
|
|
64
|
+
}
|
|
65
|
+
const payload = parsed.value;
|
|
66
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
|
|
67
|
+
const path = (0, url_js_1.pathToFunc)("/receipts")();
|
|
68
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
69
|
+
"Content-Type": "application/json",
|
|
70
|
+
Accept: "application/json",
|
|
71
|
+
"x-moov-version": (0, encodings_js_1.encodeSimple)("x-moov-version", client._options.xMoovVersion, { explode: false, charEncoding: "none" }),
|
|
72
|
+
}));
|
|
73
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
74
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
75
|
+
const context = {
|
|
76
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
77
|
+
operationID: "createReceipts",
|
|
78
|
+
oAuth2Scopes: [],
|
|
79
|
+
resolvedSecurity: requestSecurity,
|
|
80
|
+
securitySource: client._options.security,
|
|
81
|
+
retryConfig: options?.retries
|
|
82
|
+
|| client._options.retryConfig
|
|
83
|
+
|| { strategy: "none" },
|
|
84
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
85
|
+
};
|
|
86
|
+
const requestRes = client._createRequest(context, {
|
|
87
|
+
security: requestSecurity,
|
|
88
|
+
method: "POST",
|
|
89
|
+
baseURL: options?.serverURL,
|
|
90
|
+
path: path,
|
|
91
|
+
headers: headers,
|
|
92
|
+
body: body,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return [requestRes, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
const doResult = await client._do(req, {
|
|
100
|
+
context,
|
|
101
|
+
errorCodes: [
|
|
102
|
+
"400",
|
|
103
|
+
"401",
|
|
104
|
+
"403",
|
|
105
|
+
"404",
|
|
106
|
+
"409",
|
|
107
|
+
"422",
|
|
108
|
+
"429",
|
|
109
|
+
"4XX",
|
|
110
|
+
"500",
|
|
111
|
+
"504",
|
|
112
|
+
"5XX",
|
|
113
|
+
],
|
|
114
|
+
retryConfig: context.retryConfig,
|
|
115
|
+
retryCodes: context.retryCodes,
|
|
116
|
+
});
|
|
117
|
+
if (!doResult.ok) {
|
|
118
|
+
return [doResult, { status: "request-error", request: req }];
|
|
119
|
+
}
|
|
120
|
+
const response = doResult.value;
|
|
121
|
+
const responseFields = {
|
|
122
|
+
HttpMeta: { Response: response, Request: req },
|
|
123
|
+
};
|
|
124
|
+
const [result] = await M.match(M.json(200, operations.CreateReceiptsResponse$inboundSchema, {
|
|
125
|
+
hdrs: true,
|
|
126
|
+
key: "Result",
|
|
127
|
+
}), M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }), M.jsonErr(422, errors.ReceiptValidationError$inboundSchema, { hdrs: true }), M.fail([401, 403, 404, 429]), M.fail([500, 504]), M.fail("4XX"), M.fail("5XX"))(response, { extraFields: responseFields });
|
|
128
|
+
if (!result.ok) {
|
|
129
|
+
return [result, { status: "complete", request: req, response }];
|
|
130
|
+
}
|
|
131
|
+
return [result, { status: "complete", request: req, response }];
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=receiptsCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiptsCreate.js","sourceRoot":"","sources":["../src/funcs/receiptsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,wCAuBC;AArDD,uCAAyB;AAEzB,sDAA+D;AAC/D,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAEpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,cAAc,CAC5B,MAAgB,EAChB,OAAyC,EACzC,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAgB,EAChB,OAAyC,EACzC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,C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|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { APIPromise } from "../types/async.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* List receipts by trasnferID, scheduleID, or occurrenceID.
|
|
11
|
+
*
|
|
12
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
13
|
+
* you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
14
|
+
*/
|
|
15
|
+
export declare function receiptsList(client: MoovCore, request: operations.ListReceiptsRequest, options?: RequestOptions): APIPromise<Result<operations.ListReceiptsResponse, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=receiptsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiptsList.d.ts","sourceRoot":"","sources":["../src/funcs/receiptsList.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oBAAoB,EAC7B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.receiptsList = receiptsList;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
+
const async_js_1 = require("../types/async.js");
|
|
48
|
+
/**
|
|
49
|
+
* List receipts by trasnferID, scheduleID, or occurrenceID.
|
|
50
|
+
*
|
|
51
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
52
|
+
* you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
53
|
+
*/
|
|
54
|
+
function receiptsList(client, request, options) {
|
|
55
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
56
|
+
}
|
|
57
|
+
async function $do(client, request, options) {
|
|
58
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.ListReceiptsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
59
|
+
if (!parsed.ok) {
|
|
60
|
+
return [parsed, { status: "invalid" }];
|
|
61
|
+
}
|
|
62
|
+
const payload = parsed.value;
|
|
63
|
+
const body = null;
|
|
64
|
+
const path = (0, url_js_1.pathToFunc)("/receipts")();
|
|
65
|
+
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
66
|
+
"id": payload.id,
|
|
67
|
+
}, { explode: false });
|
|
68
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
69
|
+
Accept: "application/json",
|
|
70
|
+
"x-moov-version": (0, encodings_js_1.encodeSimple)("x-moov-version", client._options.xMoovVersion, { explode: false, charEncoding: "none" }),
|
|
71
|
+
}));
|
|
72
|
+
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
73
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
74
|
+
const context = {
|
|
75
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
76
|
+
operationID: "listReceipts",
|
|
77
|
+
oAuth2Scopes: [],
|
|
78
|
+
resolvedSecurity: requestSecurity,
|
|
79
|
+
securitySource: client._options.security,
|
|
80
|
+
retryConfig: options?.retries
|
|
81
|
+
|| client._options.retryConfig
|
|
82
|
+
|| { strategy: "none" },
|
|
83
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
84
|
+
};
|
|
85
|
+
const requestRes = client._createRequest(context, {
|
|
86
|
+
security: requestSecurity,
|
|
87
|
+
method: "GET",
|
|
88
|
+
baseURL: options?.serverURL,
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
query: query,
|
|
92
|
+
body: body,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return [requestRes, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
const doResult = await client._do(req, {
|
|
100
|
+
context,
|
|
101
|
+
errorCodes: ["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
102
|
+
retryConfig: context.retryConfig,
|
|
103
|
+
retryCodes: context.retryCodes,
|
|
104
|
+
});
|
|
105
|
+
if (!doResult.ok) {
|
|
106
|
+
return [doResult, { status: "request-error", request: req }];
|
|
107
|
+
}
|
|
108
|
+
const response = doResult.value;
|
|
109
|
+
const responseFields = {
|
|
110
|
+
HttpMeta: { Response: response, Request: req },
|
|
111
|
+
};
|
|
112
|
+
const [result] = await M.match(M.json(200, operations.ListReceiptsResponse$inboundSchema, {
|
|
113
|
+
hdrs: true,
|
|
114
|
+
key: "Result",
|
|
115
|
+
}), M.fail([401, 403, 429]), M.fail([500, 504]), M.fail("4XX"), M.fail("5XX"))(response, { extraFields: responseFields });
|
|
116
|
+
if (!result.ok) {
|
|
117
|
+
return [result, { status: "complete", request: req, response }];
|
|
118
|
+
}
|
|
119
|
+
return [result, { status: "complete", request: req, response }];
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=receiptsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiptsList.js","sourceRoot":"","sources":["../src/funcs/receiptsList.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,oCAqBC;AA/CD,sDAAoE;AACpE,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,YAAY,CAC1B,MAAgB,EAChB,OAAuC,EACvC,OAAwB;IAaxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAgB,EAChB,OAAuC,EACvC,OAAwB;IAgBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAA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CAAkC,EAAE;QACzD,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,QAAQ;KACd,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EACvB,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAClB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/jsr.json
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
37
|
readonly openapiDocVersion: "latest";
|
|
38
|
-
readonly sdkVersion: "0.
|
|
39
|
-
readonly genVersion: "2.
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.
|
|
38
|
+
readonly sdkVersion: "0.7.0";
|
|
39
|
+
readonly genVersion: "2.545.2";
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.7.0 2.545.2 latest @moovio/sdk";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -31,8 +31,8 @@ function serverURLFromOptions(options) {
|
|
|
31
31
|
exports.SDK_METADATA = {
|
|
32
32
|
language: "typescript",
|
|
33
33
|
openapiDocVersion: "latest",
|
|
34
|
-
sdkVersion: "0.
|
|
35
|
-
genVersion: "2.
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
34
|
+
sdkVersion: "0.7.0",
|
|
35
|
+
genVersion: "2.545.2",
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.7.0 2.545.2 latest @moovio/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ZodRawShape } from "zod";
|
|
2
|
+
import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js";
|
|
3
|
+
import { ToolDefinition } from "./tools.js";
|
|
4
|
+
export type Register = {
|
|
5
|
+
tool: <A extends ZodRawShape | undefined>(def: ToolDefinition<A>) => void;
|
|
6
|
+
resource: (def: ResourceDefinition) => void;
|
|
7
|
+
resourceTemplate: (def: ResourceTemplateDefinition) => void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../src/mcp-server/extensions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1E,QAAQ,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAAC,GAAG,EAAE,0BAA0B,KAAK,IAAI,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/mcp-server/extensions.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/mcp-server/mcp-server.js
CHANGED
|
@@ -22,7 +22,7 @@ const routes = (0, core_1.buildRouteMap)({
|
|
|
22
22
|
exports.app = (0, core_1.buildApplication)(routes, {
|
|
23
23
|
name: "mcp",
|
|
24
24
|
versionInfo: {
|
|
25
|
-
currentVersion: "0.
|
|
25
|
+
currentVersion: "0.7.0",
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
(0, core_1.run)(exports.app, node_process_1.default.argv.slice(2), (0, cli_js_1.buildContext)(node_process_1.default));
|