@moovio/sdk 0.14.5 → 0.14.7
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/bin/mcp-server.js +46 -12
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/funcs/supportListTickets.js +1 -0
- package/funcs/supportListTickets.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/cardtransactiondetails.d.ts +5 -0
- package/models/components/cardtransactiondetails.d.ts.map +1 -1
- package/models/components/cardtransactiondetails.js +2 -0
- package/models/components/cardtransactiondetails.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/itemlistnextpage.d.ts +32 -0
- package/models/components/itemlistnextpage.d.ts.map +1 -0
- package/models/components/itemlistnextpage.js +69 -0
- package/models/components/itemlistnextpage.js.map +1 -0
- package/models/operations/listtickets.d.ts +34 -2
- package/models/operations/listtickets.d.ts.map +1 -1
- package/models/operations/listtickets.js +34 -3
- package/models/operations/listtickets.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/supportListTickets.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/cardtransactiondetails.ts +7 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/itemlistnextpage.ts +69 -0
- package/src/models/operations/listtickets.ts +73 -4
- package/test/README.md +13 -1
- package/test/package.json +2 -0
|
@@ -60,6 +60,10 @@ export type CardTransactionDetails = {
|
|
|
60
60
|
* The program assigned by the card network that determines the interchange rate for the transfer.
|
|
61
61
|
*/
|
|
62
62
|
feeProgram?: string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* An alphanumeric code generated by the card network to demonstrate approval for the transaction.
|
|
65
|
+
*/
|
|
66
|
+
authorizationCode?: string | undefined;
|
|
63
67
|
};
|
|
64
68
|
|
|
65
69
|
/** @internal */
|
|
@@ -86,6 +90,7 @@ export const CardTransactionDetails$inboundSchema: z.ZodType<
|
|
|
86
90
|
.optional(),
|
|
87
91
|
interchangeQualification: z.string().optional(),
|
|
88
92
|
feeProgram: z.string().optional(),
|
|
93
|
+
authorizationCode: z.string().optional(),
|
|
89
94
|
});
|
|
90
95
|
|
|
91
96
|
/** @internal */
|
|
@@ -102,6 +107,7 @@ export type CardTransactionDetails$Outbound = {
|
|
|
102
107
|
completedOn?: string | undefined;
|
|
103
108
|
interchangeQualification?: string | undefined;
|
|
104
109
|
feeProgram?: string | undefined;
|
|
110
|
+
authorizationCode?: string | undefined;
|
|
105
111
|
};
|
|
106
112
|
|
|
107
113
|
/** @internal */
|
|
@@ -122,6 +128,7 @@ export const CardTransactionDetails$outboundSchema: z.ZodType<
|
|
|
122
128
|
completedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
123
129
|
interchangeQualification: z.string().optional(),
|
|
124
130
|
feeProgram: z.string().optional(),
|
|
131
|
+
authorizationCode: z.string().optional(),
|
|
125
132
|
});
|
|
126
133
|
|
|
127
134
|
/**
|
|
@@ -232,6 +232,7 @@ export * from "./issuingintervallimit.js";
|
|
|
232
232
|
export * from "./issuingmerchantdata.js";
|
|
233
233
|
export * from "./issuingvelocitylimit.js";
|
|
234
234
|
export * from "./issuingvelocitylimiterror.js";
|
|
235
|
+
export * from "./itemlistnextpage.js";
|
|
235
236
|
export * from "./jsonwebkey.js";
|
|
236
237
|
export * from "./linkaccountterminalapplication.js";
|
|
237
238
|
export * from "./linkapplepay.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ItemListNextPage = {
|
|
11
|
+
/**
|
|
12
|
+
* The cursor value to use for the next page of items.
|
|
13
|
+
*/
|
|
14
|
+
cursor: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ItemListNextPage$inboundSchema: z.ZodType<
|
|
19
|
+
ItemListNextPage,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
cursor: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ItemListNextPage$Outbound = {
|
|
28
|
+
cursor: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ItemListNextPage$outboundSchema: z.ZodType<
|
|
33
|
+
ItemListNextPage$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
ItemListNextPage
|
|
36
|
+
> = z.object({
|
|
37
|
+
cursor: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace ItemListNextPage$ {
|
|
45
|
+
/** @deprecated use `ItemListNextPage$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = ItemListNextPage$inboundSchema;
|
|
47
|
+
/** @deprecated use `ItemListNextPage$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = ItemListNextPage$outboundSchema;
|
|
49
|
+
/** @deprecated use `ItemListNextPage$Outbound` instead. */
|
|
50
|
+
export type Outbound = ItemListNextPage$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function itemListNextPageToJSON(
|
|
54
|
+
itemListNextPage: ItemListNextPage,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
ItemListNextPage$outboundSchema.parse(itemListNextPage),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function itemListNextPageFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<ItemListNextPage, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => ItemListNextPage$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'ItemListNextPage' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -29,12 +29,21 @@ export type ListTicketsGlobals = {
|
|
|
29
29
|
export type ListTicketsRequest = {
|
|
30
30
|
cursor?: string | undefined;
|
|
31
31
|
count?: number | undefined;
|
|
32
|
+
status?: components.TicketStatus | undefined;
|
|
32
33
|
accountID: string;
|
|
33
34
|
};
|
|
34
35
|
|
|
36
|
+
/**
|
|
37
|
+
* A paginated list of items. The `nextPage` field is omitted if there are no more pages available.
|
|
38
|
+
*/
|
|
39
|
+
export type ListTicketsResponseBody = {
|
|
40
|
+
items: Array<components.Ticket>;
|
|
41
|
+
nextPage?: components.ItemListNextPage | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
35
44
|
export type ListTicketsResponse = {
|
|
36
45
|
headers: { [k: string]: Array<string> };
|
|
37
|
-
result:
|
|
46
|
+
result: ListTicketsResponseBody;
|
|
38
47
|
};
|
|
39
48
|
|
|
40
49
|
/** @internal */
|
|
@@ -107,6 +116,7 @@ export const ListTicketsRequest$inboundSchema: z.ZodType<
|
|
|
107
116
|
> = z.object({
|
|
108
117
|
cursor: z.string().optional(),
|
|
109
118
|
count: z.number().int().optional(),
|
|
119
|
+
status: components.TicketStatus$inboundSchema.optional(),
|
|
110
120
|
accountID: z.string(),
|
|
111
121
|
});
|
|
112
122
|
|
|
@@ -114,6 +124,7 @@ export const ListTicketsRequest$inboundSchema: z.ZodType<
|
|
|
114
124
|
export type ListTicketsRequest$Outbound = {
|
|
115
125
|
cursor?: string | undefined;
|
|
116
126
|
count?: number | undefined;
|
|
127
|
+
status?: string | undefined;
|
|
117
128
|
accountID: string;
|
|
118
129
|
};
|
|
119
130
|
|
|
@@ -125,6 +136,7 @@ export const ListTicketsRequest$outboundSchema: z.ZodType<
|
|
|
125
136
|
> = z.object({
|
|
126
137
|
cursor: z.string().optional(),
|
|
127
138
|
count: z.number().int().optional(),
|
|
139
|
+
status: components.TicketStatus$outboundSchema.optional(),
|
|
128
140
|
accountID: z.string(),
|
|
129
141
|
});
|
|
130
142
|
|
|
@@ -159,6 +171,63 @@ export function listTicketsRequestFromJSON(
|
|
|
159
171
|
);
|
|
160
172
|
}
|
|
161
173
|
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const ListTicketsResponseBody$inboundSchema: z.ZodType<
|
|
176
|
+
ListTicketsResponseBody,
|
|
177
|
+
z.ZodTypeDef,
|
|
178
|
+
unknown
|
|
179
|
+
> = z.object({
|
|
180
|
+
items: z.array(components.Ticket$inboundSchema),
|
|
181
|
+
nextPage: components.ItemListNextPage$inboundSchema.optional(),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
export type ListTicketsResponseBody$Outbound = {
|
|
186
|
+
items: Array<components.Ticket$Outbound>;
|
|
187
|
+
nextPage?: components.ItemListNextPage$Outbound | undefined;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/** @internal */
|
|
191
|
+
export const ListTicketsResponseBody$outboundSchema: z.ZodType<
|
|
192
|
+
ListTicketsResponseBody$Outbound,
|
|
193
|
+
z.ZodTypeDef,
|
|
194
|
+
ListTicketsResponseBody
|
|
195
|
+
> = z.object({
|
|
196
|
+
items: z.array(components.Ticket$outboundSchema),
|
|
197
|
+
nextPage: components.ItemListNextPage$outboundSchema.optional(),
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
203
|
+
*/
|
|
204
|
+
export namespace ListTicketsResponseBody$ {
|
|
205
|
+
/** @deprecated use `ListTicketsResponseBody$inboundSchema` instead. */
|
|
206
|
+
export const inboundSchema = ListTicketsResponseBody$inboundSchema;
|
|
207
|
+
/** @deprecated use `ListTicketsResponseBody$outboundSchema` instead. */
|
|
208
|
+
export const outboundSchema = ListTicketsResponseBody$outboundSchema;
|
|
209
|
+
/** @deprecated use `ListTicketsResponseBody$Outbound` instead. */
|
|
210
|
+
export type Outbound = ListTicketsResponseBody$Outbound;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function listTicketsResponseBodyToJSON(
|
|
214
|
+
listTicketsResponseBody: ListTicketsResponseBody,
|
|
215
|
+
): string {
|
|
216
|
+
return JSON.stringify(
|
|
217
|
+
ListTicketsResponseBody$outboundSchema.parse(listTicketsResponseBody),
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function listTicketsResponseBodyFromJSON(
|
|
222
|
+
jsonString: string,
|
|
223
|
+
): SafeParseResult<ListTicketsResponseBody, SDKValidationError> {
|
|
224
|
+
return safeParse(
|
|
225
|
+
jsonString,
|
|
226
|
+
(x) => ListTicketsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
227
|
+
`Failed to parse 'ListTicketsResponseBody' from JSON`,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
162
231
|
/** @internal */
|
|
163
232
|
export const ListTicketsResponse$inboundSchema: z.ZodType<
|
|
164
233
|
ListTicketsResponse,
|
|
@@ -166,7 +235,7 @@ export const ListTicketsResponse$inboundSchema: z.ZodType<
|
|
|
166
235
|
unknown
|
|
167
236
|
> = z.object({
|
|
168
237
|
Headers: z.record(z.array(z.string())),
|
|
169
|
-
Result: z.
|
|
238
|
+
Result: z.lazy(() => ListTicketsResponseBody$inboundSchema),
|
|
170
239
|
}).transform((v) => {
|
|
171
240
|
return remap$(v, {
|
|
172
241
|
"Headers": "headers",
|
|
@@ -177,7 +246,7 @@ export const ListTicketsResponse$inboundSchema: z.ZodType<
|
|
|
177
246
|
/** @internal */
|
|
178
247
|
export type ListTicketsResponse$Outbound = {
|
|
179
248
|
Headers: { [k: string]: Array<string> };
|
|
180
|
-
Result:
|
|
249
|
+
Result: ListTicketsResponseBody$Outbound;
|
|
181
250
|
};
|
|
182
251
|
|
|
183
252
|
/** @internal */
|
|
@@ -187,7 +256,7 @@ export const ListTicketsResponse$outboundSchema: z.ZodType<
|
|
|
187
256
|
ListTicketsResponse
|
|
188
257
|
> = z.object({
|
|
189
258
|
headers: z.record(z.array(z.string())),
|
|
190
|
-
result: z.
|
|
259
|
+
result: z.lazy(() => ListTicketsResponseBody$outboundSchema),
|
|
191
260
|
}).transform((v) => {
|
|
192
261
|
return remap$(v, {
|
|
193
262
|
headers: "Headers",
|
package/test/README.md
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
1. Make sure you have `bun` [installed](https://bun.sh/docs/installation)
|
|
2
|
-
2. Run `bun
|
|
2
|
+
2. Run `bun run setup` (this will build and link the parent package)
|
|
3
|
+
3. Run `bun run test` or `bun run test:verbose` to see all the Requests and Responses
|
|
4
|
+
4. Create a moov API Key and create the `.secrets.json` file in this folder with this format:
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"username": "publicKey",
|
|
8
|
+
"password": "privateKey",
|
|
9
|
+
"serverURL": "https://dashboard.moov-staging.io/api/"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
ℹ️️ Running `bun run test` will automatically build the parent project to make sure you're always testing the latest version
|
package/test/package.json
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"format": "prettier --write \"**/*.{ts,tsx,md,json}\"",
|
|
7
7
|
"format:check": "prettier --check \"**/*.{ts,tsx,md,json}\"",
|
|
8
|
+
"setup": "cd .. && bun i && bun link && bun run build && cd test && bun link @moovio/sdk && bun i",
|
|
9
|
+
"pretest": "cd .. && bun run build",
|
|
8
10
|
"test": "bun test --timeout 20000",
|
|
9
11
|
"test:verbose": "VERBOSE=1 bun test --timeout 20000"
|
|
10
12
|
},
|