@greensecurity/javascript-sdk 0.18.2 → 0.21.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.
- package/REACT_QUERY.md +15 -15
- package/README.md +96 -9
- package/bin/mcp-server.js +1945 -233
- package/bin/mcp-server.js.map +67 -39
- package/funcs/organizationsListOrSearchFacilities.d.ts +2 -1
- package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/funcs/organizationsListOrSearchFacilities.js +3 -2
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/funcs/vendorScansVendorScanOut.d.ts +17 -0
- package/funcs/vendorScansVendorScanOut.d.ts.map +1 -0
- package/funcs/vendorScansVendorScanOut.js +120 -0
- package/funcs/vendorScansVendorScanOut.js.map +1 -0
- package/funcs/vendorsGetVendorsDetails.d.ts +32 -0
- package/funcs/vendorsGetVendorsDetails.d.ts.map +1 -0
- package/funcs/vendorsGetVendorsDetails.js +139 -0
- package/funcs/vendorsGetVendorsDetails.js.map +1 -0
- package/funcs/vendorsListVendorCredentials.d.ts +4 -1
- package/funcs/vendorsListVendorCredentials.d.ts.map +1 -1
- package/funcs/vendorsListVendorCredentials.js +46 -6
- package/funcs/vendorsListVendorCredentials.js.map +1 -1
- package/funcs/vendorsListVendorFacilityStatuses.d.ts +20 -0
- package/funcs/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
- package/funcs/vendorsListVendorFacilityStatuses.js +155 -0
- package/funcs/vendorsListVendorFacilityStatuses.js.map +1 -0
- package/funcs/vendorsListVendorJobTitles.d.ts +1 -1
- package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/funcs/vendorsListVendorJobTitles.js +21 -6
- package/funcs/vendorsListVendorJobTitles.js.map +1 -1
- package/funcs/vendorsListVendorScrubDetails.d.ts +18 -0
- package/funcs/vendorsListVendorScrubDetails.d.ts.map +1 -0
- package/funcs/vendorsListVendorScrubDetails.js +121 -0
- package/funcs/vendorsListVendorScrubDetails.js.map +1 -0
- package/funcs/vendorsListVendorScrubPurchases.d.ts +20 -0
- package/funcs/vendorsListVendorScrubPurchases.d.ts.map +1 -0
- package/funcs/vendorsListVendorScrubPurchases.js +160 -0
- package/funcs/vendorsListVendorScrubPurchases.js.map +1 -0
- package/funcs/webhooksGetWebhookEndpoint.d.ts +18 -0
- package/funcs/webhooksGetWebhookEndpoint.d.ts.map +1 -0
- package/funcs/webhooksGetWebhookEndpoint.js +121 -0
- package/funcs/webhooksGetWebhookEndpoint.js.map +1 -0
- package/funcs/webhooksListAllWebhookEndpoints.d.ts +17 -0
- package/funcs/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
- package/funcs/webhooksListAllWebhookEndpoints.js +121 -0
- package/funcs/webhooksListAllWebhookEndpoints.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +2 -8
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +4 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -1
- package/lib/security.js.map +1 -1
- package/mcp-server/extensions.d.ts +2 -0
- package/mcp-server/extensions.d.ts.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/prompts.d.ts +26 -0
- package/mcp-server/prompts.d.ts.map +1 -0
- package/mcp-server/prompts.js +47 -0
- package/mcp-server/prompts.js.map +1 -0
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +1 -0
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +18 -4
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/organizationsGetFacility.js +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
- package/mcp-server/tools/supportArticlesGetSupportArticle.js +1 -1
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
- package/mcp-server/tools/usersGetCurrentUser.js +1 -1
- package/mcp-server/tools/usersGetUserById.js +1 -1
- package/mcp-server/tools/usersLogsUserIntoTheSystem.js +1 -1
- package/mcp-server/tools/usersMagiclink.js +1 -1
- package/mcp-server/tools/usersPassword.js +1 -1
- package/mcp-server/tools/usersPasswordResetRequest.js +1 -1
- package/mcp-server/tools/vendorScansVendorScanOut.d.ts +8 -0
- package/mcp-server/tools/vendorScansVendorScanOut.d.ts.map +1 -0
- package/mcp-server/tools/{userPasswordResetRequest.js → vendorScansVendorScanOut.js} +9 -9
- package/mcp-server/tools/{userPasswordResetRequest.js.map → vendorScansVendorScanOut.js.map} +1 -1
- package/mcp-server/tools/vendorsCreateVendorRegistration.js +1 -1
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js +1 -1
- package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +1 -1
- package/mcp-server/tools/vendorsGetVendorsDetails.d.ts +8 -0
- package/mcp-server/tools/vendorsGetVendorsDetails.d.ts.map +1 -0
- package/mcp-server/tools/vendorsGetVendorsDetails.js +78 -0
- package/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorCredentials.js +2 -2
- package/mcp-server/tools/vendorsListVendorCredentials.js.map +1 -1
- package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorFacilityStatuses.js +64 -0
- package/mcp-server/tools/vendorsListVendorFacilityStatuses.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js +1 -1
- package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorScrubDetails.d.ts.map +1 -0
- package/mcp-server/tools/{userGetUserById.js → vendorsListVendorScrubDetails.js} +9 -9
- package/mcp-server/tools/vendorsListVendorScrubDetails.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorScrubPurchases.d.ts.map +1 -0
- package/mcp-server/tools/{userPassword.js → vendorsListVendorScrubPurchases.js} +10 -11
- package/mcp-server/tools/vendorsListVendorScrubPurchases.js.map +1 -0
- package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts +8 -0
- package/mcp-server/tools/webhooksGetWebhookEndpoint.d.ts.map +1 -0
- package/mcp-server/tools/{vendorsListVendorJobTitles.js → webhooksGetWebhookEndpoint.js} +10 -10
- package/mcp-server/tools/webhooksGetWebhookEndpoint.js.map +1 -0
- package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts +8 -0
- package/mcp-server/tools/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
- package/mcp-server/tools/{userMagiclink.js → webhooksListAllWebhookEndpoints.js} +9 -9
- package/mcp-server/tools/webhooksListAllWebhookEndpoints.js.map +1 -0
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.js +4 -0
- package/mcp-server/tools.js.map +1 -1
- package/models/components/company.d.ts +15 -15
- package/models/components/company.d.ts.map +1 -1
- package/models/components/company.js +19 -18
- package/models/components/company.js.map +1 -1
- package/models/components/contact.d.ts +13 -13
- package/models/components/contact.d.ts.map +1 -1
- package/models/components/contact.js +16 -16
- package/models/components/contact.js.map +1 -1
- package/models/components/department.d.ts +34 -0
- package/models/components/department.d.ts.map +1 -0
- package/models/components/department.js +71 -0
- package/models/components/department.js.map +1 -0
- package/models/components/expand.d.ts +24 -0
- package/models/components/expand.d.ts.map +1 -1
- package/models/components/expand.js +8 -0
- package/models/components/expand.js.map +1 -1
- package/models/components/facility.d.ts +17 -17
- package/models/components/facility.d.ts.map +1 -1
- package/models/components/facility.js +20 -20
- package/models/components/facility.js.map +1 -1
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/scantype.d.ts +31 -0
- package/models/components/scantype.d.ts.map +1 -0
- package/models/components/scantype.js +62 -0
- package/models/components/scantype.js.map +1 -0
- package/models/components/subscription.d.ts +42 -0
- package/models/components/subscription.d.ts.map +1 -0
- package/models/components/subscription.js +92 -0
- package/models/components/subscription.js.map +1 -0
- package/models/components/user.d.ts +8 -25
- package/models/components/user.d.ts.map +1 -1
- package/models/components/user.js +8 -31
- package/models/components/user.js.map +1 -1
- package/models/components/vendor.d.ts +374 -0
- package/models/components/vendor.d.ts.map +1 -0
- package/models/components/vendor.js +523 -0
- package/models/components/vendor.js.map +1 -0
- package/models/components/vendorfacilitystatusview.d.ts +42 -0
- package/models/components/vendorfacilitystatusview.d.ts.map +1 -0
- package/models/components/vendorfacilitystatusview.js +98 -0
- package/models/components/vendorfacilitystatusview.js.map +1 -0
- package/models/components/vendorscrubdetails.d.ts +42 -0
- package/models/components/vendorscrubdetails.d.ts.map +1 -0
- package/models/components/vendorscrubdetails.js +98 -0
- package/models/components/vendorscrubdetails.js.map +1 -0
- package/models/components/vendorscrubpurchase.d.ts +38 -0
- package/models/components/vendorscrubpurchase.d.ts.map +1 -0
- package/models/components/vendorscrubpurchase.js +84 -0
- package/models/components/vendorscrubpurchase.js.map +1 -0
- package/models/components/webhookendpoint.d.ts +135 -0
- package/models/components/webhookendpoint.d.ts.map +1 -0
- package/models/components/webhookendpoint.js +158 -0
- package/models/components/webhookendpoint.js.map +1 -0
- package/models/operations/getvendorsdetails.d.ts +38 -0
- package/models/operations/getvendorsdetails.d.ts.map +1 -0
- package/models/operations/getvendorsdetails.js +81 -0
- package/models/operations/getvendorsdetails.js.map +1 -0
- package/models/operations/getwebhookendpoint.d.ts +32 -0
- package/models/operations/getwebhookendpoint.d.ts.map +1 -0
- package/models/operations/getwebhookendpoint.js +69 -0
- package/models/operations/getwebhookendpoint.js.map +1 -0
- package/models/operations/index.d.ts +7 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +7 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listallwebhookendpoints.d.ts +81 -0
- package/models/operations/listallwebhookendpoints.d.ts.map +1 -0
- package/models/operations/listallwebhookendpoints.js +114 -0
- package/models/operations/listallwebhookendpoints.js.map +1 -0
- package/models/operations/listorsearchfacilities.d.ts +2 -2
- package/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/models/operations/listorsearchfacilities.js +2 -2
- package/models/operations/listorsearchfacilities.js.map +1 -1
- package/models/operations/listvendorcredentials.d.ts +77 -5
- package/models/operations/listvendorcredentials.d.ts.map +1 -1
- package/models/operations/listvendorcredentials.js +78 -3
- package/models/operations/listvendorcredentials.js.map +1 -1
- package/models/operations/listvendorfacilitystatuses.d.ts +111 -0
- package/models/operations/listvendorfacilitystatuses.d.ts.map +1 -0
- package/models/operations/listvendorfacilitystatuses.js +153 -0
- package/models/operations/listvendorfacilitystatuses.js.map +1 -0
- package/models/operations/listvendorjobtitles.d.ts +27 -0
- package/models/operations/listvendorjobtitles.d.ts.map +1 -1
- package/models/operations/listvendorjobtitles.js +38 -1
- package/models/operations/listvendorjobtitles.js.map +1 -1
- package/models/operations/listvendorscrubdetails.d.ts +32 -0
- package/models/operations/listvendorscrubdetails.d.ts.map +1 -0
- package/models/operations/listvendorscrubdetails.js +78 -0
- package/models/operations/listvendorscrubdetails.js.map +1 -0
- package/models/operations/listvendorscrubpurchases.d.ts +111 -0
- package/models/operations/listvendorscrubpurchases.d.ts.map +1 -0
- package/models/operations/listvendorscrubpurchases.js +153 -0
- package/models/operations/listvendorscrubpurchases.js.map +1 -0
- package/models/operations/vendorscanout.d.ts +64 -0
- package/models/operations/vendorscanout.d.ts.map +1 -0
- package/models/operations/vendorscanout.js +100 -0
- package/models/operations/vendorscanout.js.map +1 -0
- package/package.json +1 -1
- package/react-query/index.d.ts +7 -0
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +7 -0
- package/react-query/index.js.map +1 -1
- package/react-query/vendorScansVendorScanOut.d.ts +23 -0
- package/react-query/vendorScansVendorScanOut.d.ts.map +1 -0
- package/react-query/vendorScansVendorScanOut.js +47 -0
- package/react-query/vendorScansVendorScanOut.js.map +1 -0
- package/react-query/vendorsGetVendorsDetails.d.ts +71 -0
- package/react-query/vendorsGetVendorsDetails.d.ts.map +1 -0
- package/react-query/vendorsGetVendorsDetails.js +123 -0
- package/react-query/vendorsGetVendorsDetails.js.map +1 -0
- package/react-query/vendorsListVendorCredentials.d.ts +40 -3
- package/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
- package/react-query/vendorsListVendorCredentials.js +67 -0
- package/react-query/vendorsListVendorCredentials.js.map +1 -1
- package/react-query/vendorsListVendorFacilityStatuses.d.ts +78 -0
- package/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
- package/react-query/vendorsListVendorFacilityStatuses.js +161 -0
- package/react-query/vendorsListVendorFacilityStatuses.js.map +1 -0
- package/react-query/vendorsListVendorJobTitles.d.ts +7 -7
- package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/react-query/vendorsListVendorJobTitles.js +15 -15
- package/react-query/vendorsListVendorJobTitles.js.map +1 -1
- package/react-query/vendorsListVendorScrubDetails.d.ts +31 -0
- package/react-query/vendorsListVendorScrubDetails.d.ts.map +1 -0
- package/react-query/vendorsListVendorScrubDetails.js +96 -0
- package/react-query/vendorsListVendorScrubDetails.js.map +1 -0
- package/react-query/vendorsListVendorScrubPurchases.d.ts +77 -0
- package/react-query/vendorsListVendorScrubPurchases.d.ts.map +1 -0
- package/react-query/vendorsListVendorScrubPurchases.js +160 -0
- package/react-query/vendorsListVendorScrubPurchases.js.map +1 -0
- package/react-query/webhooksGetWebhookEndpoint.d.ts +31 -0
- package/react-query/webhooksGetWebhookEndpoint.d.ts.map +1 -0
- package/react-query/webhooksGetWebhookEndpoint.js +96 -0
- package/react-query/webhooksGetWebhookEndpoint.js.map +1 -0
- package/react-query/webhooksListAllWebhookEndpoints.d.ts +50 -0
- package/react-query/webhooksListAllWebhookEndpoints.d.ts.map +1 -0
- package/react-query/webhooksListAllWebhookEndpoints.js +101 -0
- package/react-query/webhooksListAllWebhookEndpoints.js.map +1 -0
- package/sdk/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +8 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/vendors.d.ts +50 -2
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +57 -3
- package/sdk/vendors.js.map +1 -1
- package/sdk/vendorscans.d.ts +12 -0
- package/sdk/vendorscans.d.ts.map +1 -0
- package/sdk/vendorscans.js +22 -0
- package/sdk/vendorscans.js.map +1 -0
- package/sdk/webhooks.d.ts +20 -0
- package/sdk/webhooks.d.ts.map +1 -0
- package/sdk/webhooks.js +32 -0
- package/sdk/webhooks.js.map +1 -0
- package/src/__tests__/vendors.test.ts +51 -118
- package/src/__tests__/vendorscans.test.ts +27 -0
- package/src/__tests__/webhooks.test.ts +45 -0
- package/src/funcs/organizationsListOrSearchFacilities.ts +12 -1
- package/src/funcs/vendorScansVendorScanOut.ts +172 -0
- package/src/funcs/vendorsGetVendorsDetails.ts +192 -0
- package/src/funcs/vendorsListVendorCredentials.ts +104 -27
- package/src/funcs/vendorsListVendorFacilityStatuses.ts +246 -0
- package/src/funcs/vendorsListVendorJobTitles.ts +25 -2
- package/src/funcs/vendorsListVendorScrubDetails.ts +172 -0
- package/src/funcs/vendorsListVendorScrubPurchases.ts +249 -0
- package/src/funcs/webhooksGetWebhookEndpoint.ts +173 -0
- package/src/funcs/webhooksListAllWebhookEndpoints.ts +174 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -7
- package/src/lib/security.ts +11 -3
- package/src/mcp-server/extensions.ts +4 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +110 -0
- package/src/mcp-server/resources.ts +1 -0
- package/src/mcp-server/server.ts +18 -4
- package/src/mcp-server/tools/organizationsGetFacility.ts +1 -1
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
- package/src/mcp-server/tools/supportArticlesGetSupportArticle.ts +1 -1
- package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
- package/src/mcp-server/tools/usersGetCurrentUser.ts +1 -1
- package/src/mcp-server/tools/usersGetUserById.ts +1 -1
- package/src/mcp-server/tools/usersLogsUserIntoTheSystem.ts +1 -1
- package/src/mcp-server/tools/usersMagiclink.ts +1 -1
- package/src/mcp-server/tools/usersPassword.ts +1 -1
- package/src/mcp-server/tools/usersPasswordResetRequest.ts +1 -1
- package/src/mcp-server/tools/vendorScansVendorScanOut.ts +37 -0
- package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +1 -1
- package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +1 -1
- package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +1 -1
- package/src/mcp-server/tools/vendorsGetVendorsDetails.ts +51 -0
- package/src/mcp-server/tools/vendorsListVendorCredentials.ts +2 -2
- package/src/mcp-server/tools/{vendorsListVendorJobTitles.ts → vendorsListVendorFacilityStatuses.ts} +9 -7
- package/src/mcp-server/tools/vendorsListVendorInvoices.ts +1 -1
- package/src/mcp-server/tools/vendorsListVendorScrubDetails.ts +37 -0
- package/src/mcp-server/tools/vendorsListVendorScrubPurchases.ts +38 -0
- package/src/mcp-server/tools/webhooksGetWebhookEndpoint.ts +37 -0
- package/src/mcp-server/tools/webhooksListAllWebhookEndpoints.ts +38 -0
- package/src/mcp-server/tools.ts +5 -0
- package/src/models/components/company.ts +27 -24
- package/src/models/components/contact.ts +24 -20
- package/src/models/components/department.ts +69 -0
- package/src/models/components/expand.ts +8 -0
- package/src/models/components/facility.ts +28 -32
- package/src/models/components/index.ts +8 -0
- package/src/models/components/scantype.ts +32 -0
- package/src/models/components/subscription.ts +98 -0
- package/src/models/components/user.ts +19 -53
- package/src/models/components/vendor.ts +925 -0
- package/src/models/components/vendorfacilitystatusview.ts +108 -0
- package/src/models/components/vendorscrubdetails.ts +108 -0
- package/src/models/components/vendorscrubpurchase.ts +90 -0
- package/src/models/components/webhookendpoint.ts +244 -0
- package/src/models/operations/getvendorsdetails.ts +86 -0
- package/src/models/operations/getwebhookendpoint.ts +69 -0
- package/src/models/operations/index.ts +7 -0
- package/src/models/operations/listallwebhookendpoints.ts +175 -0
- package/src/models/operations/listorsearchfacilities.ts +4 -4
- package/src/models/operations/listvendorcredentials.ts +160 -7
- package/src/models/operations/listvendorfacilitystatuses.ts +256 -0
- package/src/models/operations/listvendorjobtitles.ts +72 -0
- package/src/models/operations/listvendorscrubdetails.ts +80 -0
- package/src/models/operations/listvendorscrubpurchases.ts +252 -0
- package/src/models/operations/vendorscanout.ts +138 -0
- package/src/react-query/index.ts +7 -0
- package/src/react-query/vendorScansVendorScanOut.ts +89 -0
- package/src/react-query/vendorsGetVendorsDetails.ts +201 -0
- package/src/react-query/vendorsListVendorCredentials.ts +169 -1
- package/src/react-query/vendorsListVendorFacilityStatuses.ts +347 -0
- package/src/react-query/vendorsListVendorJobTitles.ts +15 -0
- package/src/react-query/vendorsListVendorScrubDetails.ts +166 -0
- package/src/react-query/vendorsListVendorScrubPurchases.ts +346 -0
- package/src/react-query/webhooksGetWebhookEndpoint.ts +163 -0
- package/src/react-query/webhooksListAllWebhookEndpoints.ts +193 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/vendors.ts +99 -2
- package/src/sdk/vendorscans.ts +27 -0
- package/src/sdk/webhooks.ts +46 -0
- package/mcp-server/tools/userGetCurrentUser.d.ts +0 -3
- package/mcp-server/tools/userGetCurrentUser.d.ts.map +0 -1
- package/mcp-server/tools/userGetCurrentUser.js +0 -26
- package/mcp-server/tools/userGetCurrentUser.js.map +0 -1
- package/mcp-server/tools/userGetUserById.d.ts +0 -8
- package/mcp-server/tools/userGetUserById.d.ts.map +0 -1
- package/mcp-server/tools/userGetUserById.js.map +0 -1
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +0 -8
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +0 -1
- package/mcp-server/tools/userLogsUserIntoTheSystem.js +0 -94
- package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +0 -1
- package/mcp-server/tools/userMagiclink.d.ts +0 -8
- package/mcp-server/tools/userMagiclink.d.ts.map +0 -1
- package/mcp-server/tools/userMagiclink.js.map +0 -1
- package/mcp-server/tools/userPassword.d.ts +0 -8
- package/mcp-server/tools/userPassword.d.ts.map +0 -1
- package/mcp-server/tools/userPassword.js.map +0 -1
- package/mcp-server/tools/userPasswordResetRequest.d.ts +0 -8
- package/mcp-server/tools/userPasswordResetRequest.d.ts.map +0 -1
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +0 -8
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +0 -1
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +0 -1
- package/src/__tests__/organizations.test.ts +0 -78
- package/src/__tests__/supportarticles.test.ts +0 -64
- package/src/__tests__/user.test.ts +0 -218
- package/vitest.config.ts +0 -8
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A representation of a vendor facility status view
|
|
13
|
+
*/
|
|
14
|
+
export type VendorFacilityStatusView = {
|
|
15
|
+
vendorId?: number | undefined;
|
|
16
|
+
facilityId?: number | undefined;
|
|
17
|
+
facilityName?: string | undefined;
|
|
18
|
+
facilityStatus?: string | null | undefined;
|
|
19
|
+
vendorScanId?: number | null | undefined;
|
|
20
|
+
vendorScanType?: number | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const VendorFacilityStatusView$inboundSchema: z.ZodType<
|
|
25
|
+
VendorFacilityStatusView,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
vendor_id: z.number().int().optional(),
|
|
30
|
+
facility_id: z.number().int().optional(),
|
|
31
|
+
facility_name: z.string().optional(),
|
|
32
|
+
facility_status: z.nullable(z.string()).optional(),
|
|
33
|
+
vendor_scan_id: z.nullable(z.number().int()).optional(),
|
|
34
|
+
vendor_scan_type: z.nullable(z.number().int()).optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"vendor_id": "vendorId",
|
|
38
|
+
"facility_id": "facilityId",
|
|
39
|
+
"facility_name": "facilityName",
|
|
40
|
+
"facility_status": "facilityStatus",
|
|
41
|
+
"vendor_scan_id": "vendorScanId",
|
|
42
|
+
"vendor_scan_type": "vendorScanType",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type VendorFacilityStatusView$Outbound = {
|
|
48
|
+
vendor_id?: number | undefined;
|
|
49
|
+
facility_id?: number | undefined;
|
|
50
|
+
facility_name?: string | undefined;
|
|
51
|
+
facility_status?: string | null | undefined;
|
|
52
|
+
vendor_scan_id?: number | null | undefined;
|
|
53
|
+
vendor_scan_type?: number | null | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const VendorFacilityStatusView$outboundSchema: z.ZodType<
|
|
58
|
+
VendorFacilityStatusView$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
VendorFacilityStatusView
|
|
61
|
+
> = z.object({
|
|
62
|
+
vendorId: z.number().int().optional(),
|
|
63
|
+
facilityId: z.number().int().optional(),
|
|
64
|
+
facilityName: z.string().optional(),
|
|
65
|
+
facilityStatus: z.nullable(z.string()).optional(),
|
|
66
|
+
vendorScanId: z.nullable(z.number().int()).optional(),
|
|
67
|
+
vendorScanType: z.nullable(z.number().int()).optional(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
vendorId: "vendor_id",
|
|
71
|
+
facilityId: "facility_id",
|
|
72
|
+
facilityName: "facility_name",
|
|
73
|
+
facilityStatus: "facility_status",
|
|
74
|
+
vendorScanId: "vendor_scan_id",
|
|
75
|
+
vendorScanType: "vendor_scan_type",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
82
|
+
*/
|
|
83
|
+
export namespace VendorFacilityStatusView$ {
|
|
84
|
+
/** @deprecated use `VendorFacilityStatusView$inboundSchema` instead. */
|
|
85
|
+
export const inboundSchema = VendorFacilityStatusView$inboundSchema;
|
|
86
|
+
/** @deprecated use `VendorFacilityStatusView$outboundSchema` instead. */
|
|
87
|
+
export const outboundSchema = VendorFacilityStatusView$outboundSchema;
|
|
88
|
+
/** @deprecated use `VendorFacilityStatusView$Outbound` instead. */
|
|
89
|
+
export type Outbound = VendorFacilityStatusView$Outbound;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function vendorFacilityStatusViewToJSON(
|
|
93
|
+
vendorFacilityStatusView: VendorFacilityStatusView,
|
|
94
|
+
): string {
|
|
95
|
+
return JSON.stringify(
|
|
96
|
+
VendorFacilityStatusView$outboundSchema.parse(vendorFacilityStatusView),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function vendorFacilityStatusViewFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<VendorFacilityStatusView, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => VendorFacilityStatusView$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'VendorFacilityStatusView' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* List of attributes of Vendor Scrub Details
|
|
13
|
+
*/
|
|
14
|
+
export type VendorScrubDetails = {
|
|
15
|
+
scrubTopSize?: string | null | undefined;
|
|
16
|
+
scrubBottomSize?: string | null | undefined;
|
|
17
|
+
scrubColor?: string | null | undefined;
|
|
18
|
+
totalCredits?: number | null | undefined;
|
|
19
|
+
totalDebits?: number | null | undefined;
|
|
20
|
+
scrubCredits?: number | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const VendorScrubDetails$inboundSchema: z.ZodType<
|
|
25
|
+
VendorScrubDetails,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
scrub_top_size: z.nullable(z.string()).optional(),
|
|
30
|
+
scrub_bottom_size: z.nullable(z.string()).optional(),
|
|
31
|
+
scrub_color: z.nullable(z.string()).optional(),
|
|
32
|
+
total_credits: z.nullable(z.number().int()).optional(),
|
|
33
|
+
total_debits: z.nullable(z.number().int()).optional(),
|
|
34
|
+
scrub_credits: z.nullable(z.number().int()).optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"scrub_top_size": "scrubTopSize",
|
|
38
|
+
"scrub_bottom_size": "scrubBottomSize",
|
|
39
|
+
"scrub_color": "scrubColor",
|
|
40
|
+
"total_credits": "totalCredits",
|
|
41
|
+
"total_debits": "totalDebits",
|
|
42
|
+
"scrub_credits": "scrubCredits",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type VendorScrubDetails$Outbound = {
|
|
48
|
+
scrub_top_size?: string | null | undefined;
|
|
49
|
+
scrub_bottom_size?: string | null | undefined;
|
|
50
|
+
scrub_color?: string | null | undefined;
|
|
51
|
+
total_credits?: number | null | undefined;
|
|
52
|
+
total_debits?: number | null | undefined;
|
|
53
|
+
scrub_credits?: number | null | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const VendorScrubDetails$outboundSchema: z.ZodType<
|
|
58
|
+
VendorScrubDetails$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
VendorScrubDetails
|
|
61
|
+
> = z.object({
|
|
62
|
+
scrubTopSize: z.nullable(z.string()).optional(),
|
|
63
|
+
scrubBottomSize: z.nullable(z.string()).optional(),
|
|
64
|
+
scrubColor: z.nullable(z.string()).optional(),
|
|
65
|
+
totalCredits: z.nullable(z.number().int()).optional(),
|
|
66
|
+
totalDebits: z.nullable(z.number().int()).optional(),
|
|
67
|
+
scrubCredits: z.nullable(z.number().int()).optional(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
scrubTopSize: "scrub_top_size",
|
|
71
|
+
scrubBottomSize: "scrub_bottom_size",
|
|
72
|
+
scrubColor: "scrub_color",
|
|
73
|
+
totalCredits: "total_credits",
|
|
74
|
+
totalDebits: "total_debits",
|
|
75
|
+
scrubCredits: "scrub_credits",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
82
|
+
*/
|
|
83
|
+
export namespace VendorScrubDetails$ {
|
|
84
|
+
/** @deprecated use `VendorScrubDetails$inboundSchema` instead. */
|
|
85
|
+
export const inboundSchema = VendorScrubDetails$inboundSchema;
|
|
86
|
+
/** @deprecated use `VendorScrubDetails$outboundSchema` instead. */
|
|
87
|
+
export const outboundSchema = VendorScrubDetails$outboundSchema;
|
|
88
|
+
/** @deprecated use `VendorScrubDetails$Outbound` instead. */
|
|
89
|
+
export type Outbound = VendorScrubDetails$Outbound;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function vendorScrubDetailsToJSON(
|
|
93
|
+
vendorScrubDetails: VendorScrubDetails,
|
|
94
|
+
): string {
|
|
95
|
+
return JSON.stringify(
|
|
96
|
+
VendorScrubDetails$outboundSchema.parse(vendorScrubDetails),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function vendorScrubDetailsFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<VendorScrubDetails, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => VendorScrubDetails$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'VendorScrubDetails' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Reduced list of attributes of Vendor ScrubPurchase record
|
|
13
|
+
*/
|
|
14
|
+
export type VendorScrubPurchase = {
|
|
15
|
+
id?: number | undefined;
|
|
16
|
+
purchaseDate?: string | null | undefined;
|
|
17
|
+
quantity?: number | null | undefined;
|
|
18
|
+
total?: number | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const VendorScrubPurchase$inboundSchema: z.ZodType<
|
|
23
|
+
VendorScrubPurchase,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
id: z.number().int().optional(),
|
|
28
|
+
purchase_date: z.nullable(z.string()).optional(),
|
|
29
|
+
quantity: z.nullable(z.number().int()).optional(),
|
|
30
|
+
total: z.nullable(z.number().int()).optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"purchase_date": "purchaseDate",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type VendorScrubPurchase$Outbound = {
|
|
39
|
+
id?: number | undefined;
|
|
40
|
+
purchase_date?: string | null | undefined;
|
|
41
|
+
quantity?: number | null | undefined;
|
|
42
|
+
total?: number | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const VendorScrubPurchase$outboundSchema: z.ZodType<
|
|
47
|
+
VendorScrubPurchase$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
VendorScrubPurchase
|
|
50
|
+
> = z.object({
|
|
51
|
+
id: z.number().int().optional(),
|
|
52
|
+
purchaseDate: z.nullable(z.string()).optional(),
|
|
53
|
+
quantity: z.nullable(z.number().int()).optional(),
|
|
54
|
+
total: z.nullable(z.number().int()).optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
purchaseDate: "purchase_date",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
|
+
*/
|
|
65
|
+
export namespace VendorScrubPurchase$ {
|
|
66
|
+
/** @deprecated use `VendorScrubPurchase$inboundSchema` instead. */
|
|
67
|
+
export const inboundSchema = VendorScrubPurchase$inboundSchema;
|
|
68
|
+
/** @deprecated use `VendorScrubPurchase$outboundSchema` instead. */
|
|
69
|
+
export const outboundSchema = VendorScrubPurchase$outboundSchema;
|
|
70
|
+
/** @deprecated use `VendorScrubPurchase$Outbound` instead. */
|
|
71
|
+
export type Outbound = VendorScrubPurchase$Outbound;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function vendorScrubPurchaseToJSON(
|
|
75
|
+
vendorScrubPurchase: VendorScrubPurchase,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
VendorScrubPurchase$outboundSchema.parse(vendorScrubPurchase),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function vendorScrubPurchaseFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<VendorScrubPurchase, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => VendorScrubPurchase$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'VendorScrubPurchase' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
|
|
14
|
+
*/
|
|
15
|
+
export const SignatureAlgo = {
|
|
16
|
+
SigHmacSha256: "sig_hmac_sha256",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
|
|
20
|
+
*/
|
|
21
|
+
export type SignatureAlgo = ClosedEnum<typeof SignatureAlgo>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Identifies which consumers will receive events for this webhook. This should be treated as a union (meaning multiple settings are considered an OR operation).
|
|
25
|
+
*/
|
|
26
|
+
export type Consumers = {
|
|
27
|
+
/**
|
|
28
|
+
* A unique identifier for a health system. If specified, this webhook will fire for all facilities within the specified health system.
|
|
29
|
+
*/
|
|
30
|
+
systemId?: number | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* A unique identifier for a hospital facility. If specified, this webhook will fire for any events matching this facility.
|
|
33
|
+
*/
|
|
34
|
+
facilityId?: number | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* A unique identifier for a company. If specified, this webhook will fire for any event related to this company.
|
|
37
|
+
*/
|
|
38
|
+
companyId?: number | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* A unique identifier for a specific user. If specified, this webhook will fire for any event for this specific user.
|
|
41
|
+
*/
|
|
42
|
+
userId?: number | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A simplified representation of a WebhookEndpoint, typically used in list views.
|
|
47
|
+
*/
|
|
48
|
+
export type WebhookEndpoint = {
|
|
49
|
+
/**
|
|
50
|
+
* Unique identifier for the object.
|
|
51
|
+
*/
|
|
52
|
+
id: number;
|
|
53
|
+
/**
|
|
54
|
+
* The URL of the webhook endpoint.
|
|
55
|
+
*/
|
|
56
|
+
webhookUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* The signature algorithm which will be used by you to verify the content of the webhook was actually sent by Green Security LLC.
|
|
59
|
+
*/
|
|
60
|
+
signatureAlgo?: SignatureAlgo | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The list of events to enable for this endpoint.
|
|
63
|
+
*/
|
|
64
|
+
subscriptions: Array<string> | null;
|
|
65
|
+
/**
|
|
66
|
+
* Identifies which consumers will receive events for this webhook. This should be treated as a union (meaning multiple settings are considered an OR operation).
|
|
67
|
+
*/
|
|
68
|
+
consumers: Consumers;
|
|
69
|
+
/**
|
|
70
|
+
* The endpoint’s secret, used to generate webhook signatures. Only returned at creation.
|
|
71
|
+
*/
|
|
72
|
+
secrets?: Array<string> | null | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const SignatureAlgo$inboundSchema: z.ZodNativeEnum<
|
|
77
|
+
typeof SignatureAlgo
|
|
78
|
+
> = z.nativeEnum(SignatureAlgo);
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const SignatureAlgo$outboundSchema: z.ZodNativeEnum<
|
|
82
|
+
typeof SignatureAlgo
|
|
83
|
+
> = SignatureAlgo$inboundSchema;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
export namespace SignatureAlgo$ {
|
|
90
|
+
/** @deprecated use `SignatureAlgo$inboundSchema` instead. */
|
|
91
|
+
export const inboundSchema = SignatureAlgo$inboundSchema;
|
|
92
|
+
/** @deprecated use `SignatureAlgo$outboundSchema` instead. */
|
|
93
|
+
export const outboundSchema = SignatureAlgo$outboundSchema;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const Consumers$inboundSchema: z.ZodType<
|
|
98
|
+
Consumers,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
system_id: z.nullable(z.number().int()).optional(),
|
|
103
|
+
facility_id: z.nullable(z.number().int()).optional(),
|
|
104
|
+
company_id: z.nullable(z.number().int()).optional(),
|
|
105
|
+
user_id: z.nullable(z.number().int()).optional(),
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"system_id": "systemId",
|
|
109
|
+
"facility_id": "facilityId",
|
|
110
|
+
"company_id": "companyId",
|
|
111
|
+
"user_id": "userId",
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export type Consumers$Outbound = {
|
|
117
|
+
system_id?: number | null | undefined;
|
|
118
|
+
facility_id?: number | null | undefined;
|
|
119
|
+
company_id?: number | null | undefined;
|
|
120
|
+
user_id?: number | null | undefined;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const Consumers$outboundSchema: z.ZodType<
|
|
125
|
+
Consumers$Outbound,
|
|
126
|
+
z.ZodTypeDef,
|
|
127
|
+
Consumers
|
|
128
|
+
> = z.object({
|
|
129
|
+
systemId: z.nullable(z.number().int()).optional(),
|
|
130
|
+
facilityId: z.nullable(z.number().int()).optional(),
|
|
131
|
+
companyId: z.nullable(z.number().int()).optional(),
|
|
132
|
+
userId: z.nullable(z.number().int()).optional(),
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
systemId: "system_id",
|
|
136
|
+
facilityId: "facility_id",
|
|
137
|
+
companyId: "company_id",
|
|
138
|
+
userId: "user_id",
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
+
*/
|
|
146
|
+
export namespace Consumers$ {
|
|
147
|
+
/** @deprecated use `Consumers$inboundSchema` instead. */
|
|
148
|
+
export const inboundSchema = Consumers$inboundSchema;
|
|
149
|
+
/** @deprecated use `Consumers$outboundSchema` instead. */
|
|
150
|
+
export const outboundSchema = Consumers$outboundSchema;
|
|
151
|
+
/** @deprecated use `Consumers$Outbound` instead. */
|
|
152
|
+
export type Outbound = Consumers$Outbound;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function consumersToJSON(consumers: Consumers): string {
|
|
156
|
+
return JSON.stringify(Consumers$outboundSchema.parse(consumers));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function consumersFromJSON(
|
|
160
|
+
jsonString: string,
|
|
161
|
+
): SafeParseResult<Consumers, SDKValidationError> {
|
|
162
|
+
return safeParse(
|
|
163
|
+
jsonString,
|
|
164
|
+
(x) => Consumers$inboundSchema.parse(JSON.parse(x)),
|
|
165
|
+
`Failed to parse 'Consumers' from JSON`,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export const WebhookEndpoint$inboundSchema: z.ZodType<
|
|
171
|
+
WebhookEndpoint,
|
|
172
|
+
z.ZodTypeDef,
|
|
173
|
+
unknown
|
|
174
|
+
> = z.object({
|
|
175
|
+
id: z.number().int(),
|
|
176
|
+
webhook_url: z.string(),
|
|
177
|
+
signature_algo: SignatureAlgo$inboundSchema.default("sig_hmac_sha256"),
|
|
178
|
+
subscriptions: z.nullable(z.array(z.string())),
|
|
179
|
+
consumers: z.lazy(() => Consumers$inboundSchema),
|
|
180
|
+
secrets: z.nullable(z.array(z.string())).optional(),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
"webhook_url": "webhookUrl",
|
|
184
|
+
"signature_algo": "signatureAlgo",
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export type WebhookEndpoint$Outbound = {
|
|
190
|
+
id: number;
|
|
191
|
+
webhook_url: string;
|
|
192
|
+
signature_algo: string;
|
|
193
|
+
subscriptions: Array<string> | null;
|
|
194
|
+
consumers: Consumers$Outbound;
|
|
195
|
+
secrets?: Array<string> | null | undefined;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const WebhookEndpoint$outboundSchema: z.ZodType<
|
|
200
|
+
WebhookEndpoint$Outbound,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
WebhookEndpoint
|
|
203
|
+
> = z.object({
|
|
204
|
+
id: z.number().int(),
|
|
205
|
+
webhookUrl: z.string(),
|
|
206
|
+
signatureAlgo: SignatureAlgo$outboundSchema.default("sig_hmac_sha256"),
|
|
207
|
+
subscriptions: z.nullable(z.array(z.string())),
|
|
208
|
+
consumers: z.lazy(() => Consumers$outboundSchema),
|
|
209
|
+
secrets: z.nullable(z.array(z.string())).optional(),
|
|
210
|
+
}).transform((v) => {
|
|
211
|
+
return remap$(v, {
|
|
212
|
+
webhookUrl: "webhook_url",
|
|
213
|
+
signatureAlgo: "signature_algo",
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @internal
|
|
219
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
220
|
+
*/
|
|
221
|
+
export namespace WebhookEndpoint$ {
|
|
222
|
+
/** @deprecated use `WebhookEndpoint$inboundSchema` instead. */
|
|
223
|
+
export const inboundSchema = WebhookEndpoint$inboundSchema;
|
|
224
|
+
/** @deprecated use `WebhookEndpoint$outboundSchema` instead. */
|
|
225
|
+
export const outboundSchema = WebhookEndpoint$outboundSchema;
|
|
226
|
+
/** @deprecated use `WebhookEndpoint$Outbound` instead. */
|
|
227
|
+
export type Outbound = WebhookEndpoint$Outbound;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function webhookEndpointToJSON(
|
|
231
|
+
webhookEndpoint: WebhookEndpoint,
|
|
232
|
+
): string {
|
|
233
|
+
return JSON.stringify(WebhookEndpoint$outboundSchema.parse(webhookEndpoint));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function webhookEndpointFromJSON(
|
|
237
|
+
jsonString: string,
|
|
238
|
+
): SafeParseResult<WebhookEndpoint, SDKValidationError> {
|
|
239
|
+
return safeParse(
|
|
240
|
+
jsonString,
|
|
241
|
+
(x) => WebhookEndpoint$inboundSchema.parse(JSON.parse(x)),
|
|
242
|
+
`Failed to parse 'WebhookEndpoint' from JSON`,
|
|
243
|
+
);
|
|
244
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetVendorsDetailsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
15
|
+
*/
|
|
16
|
+
vendorIdOrMe: string;
|
|
17
|
+
/**
|
|
18
|
+
* An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
|
|
19
|
+
*/
|
|
20
|
+
expand?: Array<components.Expand> | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const GetVendorsDetailsRequest$inboundSchema: z.ZodType<
|
|
25
|
+
GetVendorsDetailsRequest,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
vendor_id_or_me: z.string(),
|
|
30
|
+
expand: z.array(components.Expand$inboundSchema).optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type GetVendorsDetailsRequest$Outbound = {
|
|
39
|
+
vendor_id_or_me: string;
|
|
40
|
+
expand?: Array<string> | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const GetVendorsDetailsRequest$outboundSchema: z.ZodType<
|
|
45
|
+
GetVendorsDetailsRequest$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
GetVendorsDetailsRequest
|
|
48
|
+
> = z.object({
|
|
49
|
+
vendorIdOrMe: z.string(),
|
|
50
|
+
expand: z.array(components.Expand$outboundSchema).optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace GetVendorsDetailsRequest$ {
|
|
62
|
+
/** @deprecated use `GetVendorsDetailsRequest$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = GetVendorsDetailsRequest$inboundSchema;
|
|
64
|
+
/** @deprecated use `GetVendorsDetailsRequest$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = GetVendorsDetailsRequest$outboundSchema;
|
|
66
|
+
/** @deprecated use `GetVendorsDetailsRequest$Outbound` instead. */
|
|
67
|
+
export type Outbound = GetVendorsDetailsRequest$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function getVendorsDetailsRequestToJSON(
|
|
71
|
+
getVendorsDetailsRequest: GetVendorsDetailsRequest,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
GetVendorsDetailsRequest$outboundSchema.parse(getVendorsDetailsRequest),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function getVendorsDetailsRequestFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<GetVendorsDetailsRequest, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => GetVendorsDetailsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'GetVendorsDetailsRequest' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|