@greensecurity/javascript-sdk 0.18.0 → 0.18.2
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/README.md +3 -0
- package/bin/mcp-server.js +253 -38
- package/bin/mcp-server.js.map +17 -13
- package/funcs/supportArticlesListOrSearchSupportArticles.js +2 -0
- package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/funcs/vendorsGetVendorInvoiceDetails.d.ts +23 -0
- package/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
- package/funcs/vendorsGetVendorInvoiceDetails.js +130 -0
- package/funcs/vendorsGetVendorInvoiceDetails.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/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts +8 -0
- package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
- package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +69 -0
- package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js.map +1 -0
- package/models/components/expand.d.ts +3 -0
- package/models/components/expand.d.ts.map +1 -1
- package/models/components/expand.js +1 -0
- package/models/components/expand.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/invoice.d.ts +13 -2
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +19 -2
- package/models/components/invoice.js.map +1 -1
- package/models/components/invoiceitem.d.ts +8 -0
- package/models/components/invoiceitem.d.ts.map +1 -1
- package/models/components/invoiceitem.js +12 -0
- package/models/components/invoiceitem.js.map +1 -1
- package/models/components/invoicetransaction.d.ts +44 -0
- package/models/components/invoicetransaction.d.ts.map +1 -0
- package/models/components/invoicetransaction.js +96 -0
- package/models/components/invoicetransaction.js.map +1 -0
- package/models/operations/getvendorinvoicedetails.d.ts +38 -0
- package/models/operations/getvendorinvoicedetails.d.ts.map +1 -0
- package/models/operations/getvendorinvoicedetails.js +72 -0
- package/models/operations/getvendorinvoicedetails.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listorsearchsupportarticles.d.ts +10 -0
- package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
- package/models/operations/listorsearchsupportarticles.js +4 -0
- package/models/operations/listorsearchsupportarticles.js.map +1 -1
- package/package.json +1 -1
- package/react-query/index.d.ts +1 -0
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +1 -0
- package/react-query/index.js.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +6 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.js +4 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/react-query/vendorsGetVendorInvoiceDetails.d.ts +53 -0
- package/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
- package/react-query/vendorsGetVendorInvoiceDetails.js +109 -0
- package/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -0
- package/sdk/vendors.d.ts +13 -0
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +15 -0
- package/sdk/vendors.js.map +1 -1
- package/src/__tests__/vendors.test.ts +23 -0
- package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +2 -0
- package/src/funcs/vendorsGetVendorInvoiceDetails.ts +180 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +43 -0
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoice.ts +36 -4
- package/src/models/components/invoiceitem.ts +20 -0
- package/src/models/components/invoicetransaction.ts +108 -0
- package/src/models/operations/getvendorinvoicedetails.ts +79 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listorsearchsupportarticles.ts +14 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +10 -0
- package/src/react-query/vendorsGetVendorInvoiceDetails.ts +187 -0
- package/src/sdk/vendors.ts +24 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsGetVendorInvoiceDetails.d.ts","sourceRoot":"","sources":["../src/react-query/vendorsGetVendorInvoiceDetails.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,QAAQ,EAER,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAAC,OAAO,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,gBAAgB,CAAC,uCAAuC,CAAC,GAClE,cAAc,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAUhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,wBAAwB,CAAC,u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ED,wBAAgB,sCAAsC,CACpD,EAAE,EAAE,MAAM,EACV,UAAU,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CAAE,GAC5D,QAAQ,CAQV"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useVendorsGetVendorInvoiceDetails = useVendorsGetVendorInvoiceDetails;
|
|
7
|
+
exports.useVendorsGetVendorInvoiceDetailsSuspense = useVendorsGetVendorInvoiceDetailsSuspense;
|
|
8
|
+
exports.prefetchVendorsGetVendorInvoiceDetails = prefetchVendorsGetVendorInvoiceDetails;
|
|
9
|
+
exports.setVendorsGetVendorInvoiceDetailsData = setVendorsGetVendorInvoiceDetailsData;
|
|
10
|
+
exports.invalidateVendorsGetVendorInvoiceDetails = invalidateVendorsGetVendorInvoiceDetails;
|
|
11
|
+
exports.invalidateAllVendorsGetVendorInvoiceDetails = invalidateAllVendorsGetVendorInvoiceDetails;
|
|
12
|
+
exports.buildVendorsGetVendorInvoiceDetailsQuery = buildVendorsGetVendorInvoiceDetailsQuery;
|
|
13
|
+
exports.queryKeyVendorsGetVendorInvoiceDetails = queryKeyVendorsGetVendorInvoiceDetails;
|
|
14
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
15
|
+
const vendorsGetVendorInvoiceDetails_js_1 = require("../funcs/vendorsGetVendorInvoiceDetails.js");
|
|
16
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
17
|
+
const fp_js_1 = require("../types/fp.js");
|
|
18
|
+
const _context_js_1 = require("./_context.js");
|
|
19
|
+
/**
|
|
20
|
+
* Get vendor invoice details
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Retrieve an individual vendor invoice detais.
|
|
24
|
+
*
|
|
25
|
+
* Available `expand` scopes are:
|
|
26
|
+
*
|
|
27
|
+
* invoice.line_items
|
|
28
|
+
* invoice.invoice_transactions
|
|
29
|
+
*/
|
|
30
|
+
function useVendorsGetVendorInvoiceDetails(request, options) {
|
|
31
|
+
const client = (0, _context_js_1.useGreenSecurityContext)();
|
|
32
|
+
return (0, react_query_1.useQuery)({
|
|
33
|
+
...buildVendorsGetVendorInvoiceDetailsQuery(client, request, options),
|
|
34
|
+
...options,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get vendor invoice details
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Retrieve an individual vendor invoice detais.
|
|
42
|
+
*
|
|
43
|
+
* Available `expand` scopes are:
|
|
44
|
+
*
|
|
45
|
+
* invoice.line_items
|
|
46
|
+
* invoice.invoice_transactions
|
|
47
|
+
*/
|
|
48
|
+
function useVendorsGetVendorInvoiceDetailsSuspense(request, options) {
|
|
49
|
+
const client = (0, _context_js_1.useGreenSecurityContext)();
|
|
50
|
+
return (0, react_query_1.useSuspenseQuery)({
|
|
51
|
+
...buildVendorsGetVendorInvoiceDetailsQuery(client, request, options),
|
|
52
|
+
...options,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function prefetchVendorsGetVendorInvoiceDetails(queryClient, client$, request) {
|
|
56
|
+
return queryClient.prefetchQuery({
|
|
57
|
+
...buildVendorsGetVendorInvoiceDetailsQuery(client$, request),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function setVendorsGetVendorInvoiceDetailsData(client, queryKeyBase, data) {
|
|
61
|
+
const key = queryKeyVendorsGetVendorInvoiceDetails(...queryKeyBase);
|
|
62
|
+
return client.setQueryData(key, data);
|
|
63
|
+
}
|
|
64
|
+
function invalidateVendorsGetVendorInvoiceDetails(client, queryKeyBase, filters) {
|
|
65
|
+
return client.invalidateQueries({
|
|
66
|
+
...filters,
|
|
67
|
+
queryKey: [
|
|
68
|
+
"@greensecurity/javascript-sdk",
|
|
69
|
+
"vendors",
|
|
70
|
+
"getVendorInvoiceDetails",
|
|
71
|
+
...queryKeyBase,
|
|
72
|
+
],
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function invalidateAllVendorsGetVendorInvoiceDetails(client, filters) {
|
|
76
|
+
return client.invalidateQueries({
|
|
77
|
+
...filters,
|
|
78
|
+
queryKey: [
|
|
79
|
+
"@greensecurity/javascript-sdk",
|
|
80
|
+
"vendors",
|
|
81
|
+
"getVendorInvoiceDetails",
|
|
82
|
+
],
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function buildVendorsGetVendorInvoiceDetailsQuery(client$, request, options) {
|
|
86
|
+
return {
|
|
87
|
+
queryKey: queryKeyVendorsGetVendorInvoiceDetails(request.id, {
|
|
88
|
+
expand: request.expand,
|
|
89
|
+
}),
|
|
90
|
+
queryFn: async function vendorsGetVendorInvoiceDetailsQueryFn(ctx) {
|
|
91
|
+
const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.fetchOptions?.signal);
|
|
92
|
+
const mergedOptions = {
|
|
93
|
+
...options,
|
|
94
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
95
|
+
};
|
|
96
|
+
return (0, fp_js_1.unwrapAsync)((0, vendorsGetVendorInvoiceDetails_js_1.vendorsGetVendorInvoiceDetails)(client$, request, mergedOptions));
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function queryKeyVendorsGetVendorInvoiceDetails(id, parameters) {
|
|
101
|
+
return [
|
|
102
|
+
"@greensecurity/javascript-sdk",
|
|
103
|
+
"vendors",
|
|
104
|
+
"getVendorInvoiceDetails",
|
|
105
|
+
id,
|
|
106
|
+
parameters,
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=vendorsGetVendorInvoiceDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorsGetVendorInvoiceDetails.js","sourceRoot":"","sources":["../src/react-query/vendorsGetVendorInvoiceDetails.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuCH,8EAaC;AAaD,8FAaC;AAED,wFAWC;AAED,sFAcC;AAED,4FAgBC;AAED,kGAYC;AAED,4FA8BC;AAED,wFAWC;AAtLD,uDAS+B;AAE/B,kGAA4F;AAC5F,wDAAsD;AAItD,0CAA6C;AAC7C,+CAAwD;AASxD;;;;;;;;;;GAUG;AACH,SAAgB,iCAAiC,CAC/C,OAAkD,EAClD,OAAmE;IAEnE,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,wCAAwC,CACzC,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,yCAAyC,CACvD,OAAkD,EAClD,OAA2E;IAE3E,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,wCAAwC,CACzC,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,sCAAsC,CACpD,WAAwB,EACxB,OAA0B,EAC1B,OAAkD;IAElD,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,wCAAwC,CACzC,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,qCAAqC,CACnD,MAAmB,EACnB,YAGC,EACD,IAA6C;IAE7C,MAAM,GAAG,GAAG,sCAAsC,CAAC,GAAG,YAAY,CAAC,CAAC;IAEpE,OAAO,MAAM,CAAC,YAAY,CACxB,GAAG,EACH,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CACtD,MAAmB,EACnB,YAEC,EACD,OAA0E;IA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"../models/components/index.js";
|
|
2
3
|
import * as operations from "../models/operations/index.js";
|
|
3
4
|
import { PageIterator } from "../types/operations.js";
|
|
4
5
|
export declare class Vendors extends ClientSDK {
|
|
@@ -45,5 +46,17 @@ export declare class Vendors extends ClientSDK {
|
|
|
45
46
|
listVendorInvoices(request: operations.ListVendorInvoicesRequest, options?: RequestOptions): Promise<PageIterator<operations.ListVendorInvoicesResponse, {
|
|
46
47
|
page: number;
|
|
47
48
|
}>>;
|
|
49
|
+
/**
|
|
50
|
+
* Get vendor invoice details
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Retrieve an individual vendor invoice detais.
|
|
54
|
+
*
|
|
55
|
+
* Available `expand` scopes are:
|
|
56
|
+
*
|
|
57
|
+
* invoice.line_items
|
|
58
|
+
* invoice.invoice_transactions
|
|
59
|
+
*/
|
|
60
|
+
getVendorInvoiceDetails(request: operations.GetVendorInvoiceDetailsRequest, options?: RequestOptions): Promise<components.Invoice>;
|
|
48
61
|
}
|
|
49
62
|
//# sourceMappingURL=vendors.d.ts.map
|
package/sdk/vendors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendors.d.ts","sourceRoot":"","sources":["../src/sdk/vendors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vendors.d.ts","sourceRoot":"","sources":["../src/sdk/vendors.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAE5E,qBAAa,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACG,wBAAwB,CAC5B,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,UAAU,CAAC,uDAAuD,CACnE;IAQD;;;;;OAKG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,2BAA2B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CACvE;IAQD;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAQxD;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAQxD;;;;;;;;;OASG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,0BAA0B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CACtE;IAQD;;;;;;;;;;OAUG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;CAO/B"}
|
package/sdk/vendors.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Vendors = void 0;
|
|
7
7
|
const vendorsCreateVendorRegistration_js_1 = require("../funcs/vendorsCreateVendorRegistration.js");
|
|
8
8
|
const vendorsExpediteTimeRemaining_js_1 = require("../funcs/vendorsExpediteTimeRemaining.js");
|
|
9
|
+
const vendorsGetVendorInvoiceDetails_js_1 = require("../funcs/vendorsGetVendorInvoiceDetails.js");
|
|
9
10
|
const vendorsListVendorCredentials_js_1 = require("../funcs/vendorsListVendorCredentials.js");
|
|
10
11
|
const vendorsListVendorInvoices_js_1 = require("../funcs/vendorsListVendorInvoices.js");
|
|
11
12
|
const vendorsListVendorJobTitles_js_1 = require("../funcs/vendorsListVendorJobTitles.js");
|
|
@@ -62,6 +63,20 @@ class Vendors extends sdks_js_1.ClientSDK {
|
|
|
62
63
|
async listVendorInvoices(request, options) {
|
|
63
64
|
return (0, operations_js_1.unwrapResultIterator)((0, vendorsListVendorInvoices_js_1.vendorsListVendorInvoices)(this, request, options));
|
|
64
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Get vendor invoice details
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Retrieve an individual vendor invoice detais.
|
|
71
|
+
*
|
|
72
|
+
* Available `expand` scopes are:
|
|
73
|
+
*
|
|
74
|
+
* invoice.line_items
|
|
75
|
+
* invoice.invoice_transactions
|
|
76
|
+
*/
|
|
77
|
+
async getVendorInvoiceDetails(request, options) {
|
|
78
|
+
return (0, fp_js_1.unwrapAsync)((0, vendorsGetVendorInvoiceDetails_js_1.vendorsGetVendorInvoiceDetails)(this, request, options));
|
|
79
|
+
}
|
|
65
80
|
}
|
|
66
81
|
exports.Vendors = Vendors;
|
|
67
82
|
//# sourceMappingURL=vendors.js.map
|
package/sdk/vendors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendors.js","sourceRoot":"","sources":["../src/sdk/vendors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oGAA8F;AAC9F,8FAAwF;AACxF,8FAAwF;AACxF,wFAAkF;AAClF,0FAAoF;AACpF,4CAA2D;
|
|
1
|
+
{"version":3,"file":"vendors.js","sourceRoot":"","sources":["../src/sdk/vendors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oGAA8F;AAC9F,8FAAwF;AACxF,kGAA4F;AAC5F,8FAAwF;AACxF,wFAAkF;AAClF,0FAAoF;AACpF,4CAA2D;AAG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|
131
131
|
});
|
|
132
132
|
});
|
|
133
|
+
|
|
134
|
+
test("Vendors Get Vendor Invoice Details", async () => {
|
|
135
|
+
const testHttpClient = createTestHTTPClient("getVendorInvoiceDetails");
|
|
136
|
+
|
|
137
|
+
const greenSecurity = new GreenSecurity({
|
|
138
|
+
serverURL: "https://dev.repconnex.com:3000/api",
|
|
139
|
+
security: {
|
|
140
|
+
bearerJwt: "",
|
|
141
|
+
},
|
|
142
|
+
httpClient: testHttpClient,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const result = await greenSecurity.vendors.getVendorInvoiceDetails({
|
|
146
|
+
id: 117116,
|
|
147
|
+
expand: [
|
|
148
|
+
"facility.system",
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
expect(result).toBeDefined();
|
|
152
|
+
expect(result).toEqual({
|
|
153
|
+
id: 693303,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -99,9 +99,11 @@ async function $do(
|
|
|
99
99
|
const path = pathToFunc("/support_articles")();
|
|
100
100
|
|
|
101
101
|
const query = encodeFormQuery({
|
|
102
|
+
"category": payload.category,
|
|
102
103
|
"desc": payload.desc,
|
|
103
104
|
"items_per_page": payload.items_per_page,
|
|
104
105
|
"page": payload.page,
|
|
106
|
+
"search": payload.search,
|
|
105
107
|
"sort": payload.sort,
|
|
106
108
|
});
|
|
107
109
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get vendor invoice details
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Retrieve an individual vendor invoice detais.
|
|
33
|
+
*
|
|
34
|
+
* Available `expand` scopes are:
|
|
35
|
+
*
|
|
36
|
+
* invoice.line_items
|
|
37
|
+
* invoice.invoice_transactions
|
|
38
|
+
*/
|
|
39
|
+
export function vendorsGetVendorInvoiceDetails(
|
|
40
|
+
client: GreenSecurityCore,
|
|
41
|
+
request: operations.GetVendorInvoiceDetailsRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
components.Invoice,
|
|
46
|
+
| errors.ApiErrorResponse
|
|
47
|
+
| APIError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| ConnectionError
|
|
54
|
+
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: GreenSecurityCore,
|
|
65
|
+
request: operations.GetVendorInvoiceDetailsRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
components.Invoice,
|
|
71
|
+
| errors.ApiErrorResponse
|
|
72
|
+
| APIError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) =>
|
|
86
|
+
operations.GetVendorInvoiceDetailsRequest$outboundSchema.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const pathParams = {
|
|
96
|
+
id: encodeSimple("id", payload.id, {
|
|
97
|
+
explode: false,
|
|
98
|
+
charEncoding: "percent",
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/vendors/invoices/{id}")(pathParams);
|
|
103
|
+
|
|
104
|
+
const query = encodeFormQuery({
|
|
105
|
+
"expand": payload.expand,
|
|
106
|
+
}, { explode: false });
|
|
107
|
+
|
|
108
|
+
const headers = new Headers(compactMap({
|
|
109
|
+
Accept: "application/json",
|
|
110
|
+
}));
|
|
111
|
+
|
|
112
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
113
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
114
|
+
|
|
115
|
+
const context = {
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "getVendorInvoiceDetails",
|
|
118
|
+
oAuth2Scopes: [],
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.security,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "GET",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
query: query,
|
|
136
|
+
body: body,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
errorCodes: ["401", "404", "4XX", "5XX"],
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
|
+
}
|
|
153
|
+
const response = doResult.value;
|
|
154
|
+
|
|
155
|
+
const responseFields = {
|
|
156
|
+
HttpMeta: { Response: response, Request: req },
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const [result] = await M.match<
|
|
160
|
+
components.Invoice,
|
|
161
|
+
| errors.ApiErrorResponse
|
|
162
|
+
| APIError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
| UnexpectedClientError
|
|
165
|
+
| InvalidRequestError
|
|
166
|
+
| RequestAbortedError
|
|
167
|
+
| RequestTimeoutError
|
|
168
|
+
| ConnectionError
|
|
169
|
+
>(
|
|
170
|
+
M.json(200, components.Invoice$inboundSchema),
|
|
171
|
+
M.jsonErr([401, 404], errors.ApiErrorResponse$inboundSchema),
|
|
172
|
+
M.fail("4XX"),
|
|
173
|
+
M.fail("5XX"),
|
|
174
|
+
)(response, { extraFields: responseFields });
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -72,8 +72,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
72
72
|
export const SDK_METADATA = {
|
|
73
73
|
language: "typescript",
|
|
74
74
|
openapiDocVersion: "0.0.3",
|
|
75
|
-
sdkVersion: "0.18.
|
|
76
|
-
genVersion: "2.
|
|
75
|
+
sdkVersion: "0.18.2",
|
|
76
|
+
genVersion: "2.546.0",
|
|
77
77
|
userAgent:
|
|
78
|
-
"speakeasy-sdk/typescript 0.18.
|
|
78
|
+
"speakeasy-sdk/typescript 0.18.2 2.546.0 0.0.3 @greensecurity/javascript-sdk",
|
|
79
79
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { tool$usersPassword } from "./tools/usersPassword.js";
|
|
|
24
24
|
import { tool$usersPasswordResetRequest } from "./tools/usersPasswordResetRequest.js";
|
|
25
25
|
import { tool$vendorsCreateVendorRegistration } from "./tools/vendorsCreateVendorRegistration.js";
|
|
26
26
|
import { tool$vendorsExpediteTimeRemaining } from "./tools/vendorsExpediteTimeRemaining.js";
|
|
27
|
+
import { tool$vendorsGetVendorInvoiceDetails } from "./tools/vendorsGetVendorInvoiceDetails.js";
|
|
27
28
|
import { tool$vendorsListVendorCredentials } from "./tools/vendorsListVendorCredentials.js";
|
|
28
29
|
import { tool$vendorsListVendorInvoices } from "./tools/vendorsListVendorInvoices.js";
|
|
29
30
|
import { tool$vendorsListVendorJobTitles } from "./tools/vendorsListVendorJobTitles.js";
|
|
@@ -38,7 +39,7 @@ export function createMCPServer(deps: {
|
|
|
38
39
|
}) {
|
|
39
40
|
const server = new McpServer({
|
|
40
41
|
name: "GreenSecurity",
|
|
41
|
-
version: "0.18.
|
|
42
|
+
version: "0.18.2",
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
const client = new GreenSecurityCore({
|
|
@@ -72,6 +73,7 @@ export function createMCPServer(deps: {
|
|
|
72
73
|
tool(tool$vendorsListVendorCredentials);
|
|
73
74
|
tool(tool$vendorsExpediteTimeRemaining);
|
|
74
75
|
tool(tool$vendorsListVendorInvoices);
|
|
76
|
+
tool(tool$vendorsGetVendorInvoiceDetails);
|
|
75
77
|
tool(tool$usersGetCurrentUser);
|
|
76
78
|
tool(tool$usersGetUserById);
|
|
77
79
|
tool(tool$usersLogsUserIntoTheSystem);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsGetVendorInvoiceDetails } from "../../funcs/vendorsGetVendorInvoiceDetails.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetVendorInvoiceDetailsRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsGetVendorInvoiceDetails: ToolDefinition<typeof args> =
|
|
14
|
+
{
|
|
15
|
+
name: "vendors_get-vendor-invoice-details",
|
|
16
|
+
description: `Get vendor invoice details
|
|
17
|
+
|
|
18
|
+
Retrieve an individual vendor invoice detais.
|
|
19
|
+
|
|
20
|
+
Available \`expand\` scopes are:
|
|
21
|
+
|
|
22
|
+
invoice.line_items
|
|
23
|
+
invoice.invoice_transactions`,
|
|
24
|
+
args,
|
|
25
|
+
tool: async (client, args, ctx) => {
|
|
26
|
+
const [result, apiCall] = await vendorsGetVendorInvoiceDetails(
|
|
27
|
+
client,
|
|
28
|
+
args.request,
|
|
29
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
30
|
+
).$inspect();
|
|
31
|
+
|
|
32
|
+
if (!result.ok) {
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: "text", text: result.error.message }],
|
|
35
|
+
isError: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const value = result.value;
|
|
40
|
+
|
|
41
|
+
return formatResult(value, apiCall);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -31,6 +31,7 @@ export const Expand = {
|
|
|
31
31
|
SupportArticleNotes: "support_article.notes",
|
|
32
32
|
SupportArticleSupportCategory: "support_article.support_category",
|
|
33
33
|
InvoiceLineItems: "invoice.line_items",
|
|
34
|
+
InvoiceInvoiceTransactions: "invoice.invoice_transactions",
|
|
34
35
|
} as const;
|
|
35
36
|
/**
|
|
36
37
|
* An expansion scope that is valid for the object being requested.
|
|
@@ -14,6 +14,7 @@ export * from "./facilitysummary.js";
|
|
|
14
14
|
export * from "./imageset.js";
|
|
15
15
|
export * from "./invoice.js";
|
|
16
16
|
export * from "./invoiceitem.js";
|
|
17
|
+
export * from "./invoicetransaction.js";
|
|
17
18
|
export * from "./loginemailandpassword.js";
|
|
18
19
|
export * from "./loginrequirementsfromemail.js";
|
|
19
20
|
export * from "./mfarequiredresponse.js";
|
|
@@ -13,6 +13,12 @@ import {
|
|
|
13
13
|
InvoiceItem$Outbound,
|
|
14
14
|
InvoiceItem$outboundSchema,
|
|
15
15
|
} from "./invoiceitem.js";
|
|
16
|
+
import {
|
|
17
|
+
InvoiceTransaction,
|
|
18
|
+
InvoiceTransaction$inboundSchema,
|
|
19
|
+
InvoiceTransaction$Outbound,
|
|
20
|
+
InvoiceTransaction$outboundSchema,
|
|
21
|
+
} from "./invoicetransaction.js";
|
|
16
22
|
|
|
17
23
|
/**
|
|
18
24
|
* A simplified representation of an Invoice
|
|
@@ -23,7 +29,12 @@ export type Invoice = {
|
|
|
23
29
|
amount?: number | null | undefined;
|
|
24
30
|
status?: string | null | undefined;
|
|
25
31
|
financialStatus?: string | null | undefined;
|
|
26
|
-
|
|
32
|
+
amountNotPaid?: number | null | undefined;
|
|
33
|
+
tax?: number | null | undefined;
|
|
34
|
+
convenienceFee?: number | null | undefined;
|
|
35
|
+
shipping?: number | null | undefined;
|
|
36
|
+
items?: Array<InvoiceItem> | null | undefined;
|
|
37
|
+
transactions?: Array<InvoiceTransaction> | null | undefined;
|
|
27
38
|
};
|
|
28
39
|
|
|
29
40
|
/** @internal */
|
|
@@ -34,11 +45,19 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
34
45
|
amount: z.nullable(z.number().int()).optional(),
|
|
35
46
|
status: z.nullable(z.string()).optional(),
|
|
36
47
|
financial_status: z.nullable(z.string()).optional(),
|
|
37
|
-
|
|
48
|
+
amount_not_paid: z.nullable(z.number().int()).optional(),
|
|
49
|
+
tax: z.nullable(z.number().int()).optional(),
|
|
50
|
+
convenience_fee: z.nullable(z.number()).optional(),
|
|
51
|
+
shipping: z.nullable(z.number().int()).optional(),
|
|
52
|
+
items: z.nullable(z.array(InvoiceItem$inboundSchema)).optional(),
|
|
53
|
+
transactions: z.nullable(z.array(InvoiceTransaction$inboundSchema))
|
|
54
|
+
.optional(),
|
|
38
55
|
}).transform((v) => {
|
|
39
56
|
return remap$(v, {
|
|
40
57
|
"invoice_number": "invoiceNumber",
|
|
41
58
|
"financial_status": "financialStatus",
|
|
59
|
+
"amount_not_paid": "amountNotPaid",
|
|
60
|
+
"convenience_fee": "convenienceFee",
|
|
42
61
|
});
|
|
43
62
|
});
|
|
44
63
|
|
|
@@ -49,7 +68,12 @@ export type Invoice$Outbound = {
|
|
|
49
68
|
amount?: number | null | undefined;
|
|
50
69
|
status?: string | null | undefined;
|
|
51
70
|
financial_status?: string | null | undefined;
|
|
52
|
-
|
|
71
|
+
amount_not_paid?: number | null | undefined;
|
|
72
|
+
tax?: number | null | undefined;
|
|
73
|
+
convenience_fee?: number | null | undefined;
|
|
74
|
+
shipping?: number | null | undefined;
|
|
75
|
+
items?: Array<InvoiceItem$Outbound> | null | undefined;
|
|
76
|
+
transactions?: Array<InvoiceTransaction$Outbound> | null | undefined;
|
|
53
77
|
};
|
|
54
78
|
|
|
55
79
|
/** @internal */
|
|
@@ -63,11 +87,19 @@ export const Invoice$outboundSchema: z.ZodType<
|
|
|
63
87
|
amount: z.nullable(z.number().int()).optional(),
|
|
64
88
|
status: z.nullable(z.string()).optional(),
|
|
65
89
|
financialStatus: z.nullable(z.string()).optional(),
|
|
66
|
-
|
|
90
|
+
amountNotPaid: z.nullable(z.number().int()).optional(),
|
|
91
|
+
tax: z.nullable(z.number().int()).optional(),
|
|
92
|
+
convenienceFee: z.nullable(z.number()).optional(),
|
|
93
|
+
shipping: z.nullable(z.number().int()).optional(),
|
|
94
|
+
items: z.nullable(z.array(InvoiceItem$outboundSchema)).optional(),
|
|
95
|
+
transactions: z.nullable(z.array(InvoiceTransaction$outboundSchema))
|
|
96
|
+
.optional(),
|
|
67
97
|
}).transform((v) => {
|
|
68
98
|
return remap$(v, {
|
|
69
99
|
invoiceNumber: "invoice_number",
|
|
70
100
|
financialStatus: "financial_status",
|
|
101
|
+
amountNotPaid: "amount_not_paid",
|
|
102
|
+
convenienceFee: "convenience_fee",
|
|
71
103
|
});
|
|
72
104
|
});
|
|
73
105
|
|
|
@@ -17,6 +17,10 @@ export type InvoiceItem = {
|
|
|
17
17
|
dateEnds?: string | null | undefined;
|
|
18
18
|
isSubscription?: boolean | null | undefined;
|
|
19
19
|
productTitle?: string | null | undefined;
|
|
20
|
+
itemTitle?: string | null | undefined;
|
|
21
|
+
quantity?: number | null | undefined;
|
|
22
|
+
unitPrice?: number | null | undefined;
|
|
23
|
+
subtotal?: number | null | undefined;
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
/** @internal */
|
|
@@ -30,6 +34,10 @@ export const InvoiceItem$inboundSchema: z.ZodType<
|
|
|
30
34
|
date_ends: z.nullable(z.string()).optional(),
|
|
31
35
|
is_subscription: z.nullable(z.boolean()).optional(),
|
|
32
36
|
product_title: z.nullable(z.string()).optional(),
|
|
37
|
+
item_title: z.nullable(z.string()).optional(),
|
|
38
|
+
quantity: z.nullable(z.number()).optional(),
|
|
39
|
+
unit_price: z.nullable(z.number().int()).optional(),
|
|
40
|
+
subtotal: z.nullable(z.number().int()).optional(),
|
|
33
41
|
}).transform((v) => {
|
|
34
42
|
return remap$(v, {
|
|
35
43
|
"item_id": "itemId",
|
|
@@ -37,6 +45,8 @@ export const InvoiceItem$inboundSchema: z.ZodType<
|
|
|
37
45
|
"date_ends": "dateEnds",
|
|
38
46
|
"is_subscription": "isSubscription",
|
|
39
47
|
"product_title": "productTitle",
|
|
48
|
+
"item_title": "itemTitle",
|
|
49
|
+
"unit_price": "unitPrice",
|
|
40
50
|
});
|
|
41
51
|
});
|
|
42
52
|
|
|
@@ -47,6 +57,10 @@ export type InvoiceItem$Outbound = {
|
|
|
47
57
|
date_ends?: string | null | undefined;
|
|
48
58
|
is_subscription?: boolean | null | undefined;
|
|
49
59
|
product_title?: string | null | undefined;
|
|
60
|
+
item_title?: string | null | undefined;
|
|
61
|
+
quantity?: number | null | undefined;
|
|
62
|
+
unit_price?: number | null | undefined;
|
|
63
|
+
subtotal?: number | null | undefined;
|
|
50
64
|
};
|
|
51
65
|
|
|
52
66
|
/** @internal */
|
|
@@ -60,6 +74,10 @@ export const InvoiceItem$outboundSchema: z.ZodType<
|
|
|
60
74
|
dateEnds: z.nullable(z.string()).optional(),
|
|
61
75
|
isSubscription: z.nullable(z.boolean()).optional(),
|
|
62
76
|
productTitle: z.nullable(z.string()).optional(),
|
|
77
|
+
itemTitle: z.nullable(z.string()).optional(),
|
|
78
|
+
quantity: z.nullable(z.number()).optional(),
|
|
79
|
+
unitPrice: z.nullable(z.number().int()).optional(),
|
|
80
|
+
subtotal: z.nullable(z.number().int()).optional(),
|
|
63
81
|
}).transform((v) => {
|
|
64
82
|
return remap$(v, {
|
|
65
83
|
itemId: "item_id",
|
|
@@ -67,6 +85,8 @@ export const InvoiceItem$outboundSchema: z.ZodType<
|
|
|
67
85
|
dateEnds: "date_ends",
|
|
68
86
|
isSubscription: "is_subscription",
|
|
69
87
|
productTitle: "product_title",
|
|
88
|
+
itemTitle: "item_title",
|
|
89
|
+
unitPrice: "unit_price",
|
|
70
90
|
});
|
|
71
91
|
});
|
|
72
92
|
|