@hookdeck/outpost-sdk 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +5 -22
- package/README.md +50 -109
- package/bin/mcp-server.js +516 -182
- package/bin/mcp-server.js.map +59 -53
- package/dist/commonjs/funcs/destinationsCreate.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsCreate.js +3 -1
- package/dist/commonjs/funcs/destinationsCreate.js.map +1 -1
- package/dist/commonjs/funcs/destinationsDelete.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsDelete.js +3 -1
- package/dist/commonjs/funcs/destinationsDelete.js.map +1 -1
- package/dist/commonjs/funcs/destinationsDisable.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsDisable.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsDisable.js +3 -1
- package/dist/commonjs/funcs/destinationsDisable.js.map +1 -1
- package/dist/commonjs/funcs/destinationsEnable.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsEnable.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsEnable.js +3 -1
- package/dist/commonjs/funcs/destinationsEnable.js.map +1 -1
- package/dist/commonjs/funcs/destinationsGet.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsGet.js +3 -1
- package/dist/commonjs/funcs/destinationsGet.js.map +1 -1
- package/dist/commonjs/funcs/destinationsList.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsList.js +3 -1
- package/dist/commonjs/funcs/destinationsList.js.map +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.d.ts +3 -2
- package/dist/commonjs/funcs/destinationsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.js +3 -1
- package/dist/commonjs/funcs/destinationsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/eventsGet.d.ts +3 -2
- package/dist/commonjs/funcs/eventsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsGet.js +3 -1
- package/dist/commonjs/funcs/eventsGet.js.map +1 -1
- package/dist/commonjs/funcs/eventsGetByDestination.d.ts +3 -2
- package/dist/commonjs/funcs/eventsGetByDestination.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsGetByDestination.js +3 -1
- package/dist/commonjs/funcs/eventsGetByDestination.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.d.ts +3 -2
- package/dist/commonjs/funcs/eventsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +3 -1
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/eventsListByDestination.d.ts +3 -2
- package/dist/commonjs/funcs/eventsListByDestination.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsListByDestination.js +3 -1
- package/dist/commonjs/funcs/eventsListByDestination.js.map +1 -1
- package/dist/commonjs/funcs/eventsListDeliveries.d.ts +3 -2
- package/dist/commonjs/funcs/eventsListDeliveries.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsListDeliveries.js +3 -1
- package/dist/commonjs/funcs/eventsListDeliveries.js.map +1 -1
- package/dist/commonjs/funcs/eventsRetry.d.ts +3 -2
- package/dist/commonjs/funcs/eventsRetry.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsRetry.js +3 -1
- package/dist/commonjs/funcs/eventsRetry.js.map +1 -1
- package/dist/commonjs/funcs/healthCheck.d.ts +3 -2
- package/dist/commonjs/funcs/healthCheck.d.ts.map +1 -1
- package/dist/commonjs/funcs/healthCheck.js +3 -1
- package/dist/commonjs/funcs/healthCheck.js.map +1 -1
- package/dist/commonjs/funcs/publishEvent.d.ts +3 -2
- package/dist/commonjs/funcs/publishEvent.d.ts.map +1 -1
- package/dist/commonjs/funcs/publishEvent.js +4 -2
- package/dist/commonjs/funcs/publishEvent.js.map +1 -1
- package/dist/commonjs/funcs/schemasGet.d.ts +3 -2
- package/dist/commonjs/funcs/schemasGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/schemasGet.js +3 -1
- package/dist/commonjs/funcs/schemasGet.js.map +1 -1
- package/dist/commonjs/funcs/schemasGetDestinationTypeJwt.d.ts +3 -2
- package/dist/commonjs/funcs/schemasGetDestinationTypeJwt.d.ts.map +1 -1
- package/dist/commonjs/funcs/schemasGetDestinationTypeJwt.js +3 -1
- package/dist/commonjs/funcs/schemasGetDestinationTypeJwt.js.map +1 -1
- package/dist/commonjs/funcs/schemasListDestinationTypesJwt.d.ts +3 -2
- package/dist/commonjs/funcs/schemasListDestinationTypesJwt.d.ts.map +1 -1
- package/dist/commonjs/funcs/schemasListDestinationTypesJwt.js +3 -1
- package/dist/commonjs/funcs/schemasListDestinationTypesJwt.js.map +1 -1
- package/dist/commonjs/funcs/schemasListTenantDestinationTypes.d.ts +3 -2
- package/dist/commonjs/funcs/schemasListTenantDestinationTypes.d.ts.map +1 -1
- package/dist/commonjs/funcs/schemasListTenantDestinationTypes.js +3 -1
- package/dist/commonjs/funcs/schemasListTenantDestinationTypes.js.map +1 -1
- package/dist/commonjs/funcs/tenantsDelete.d.ts +3 -2
- package/dist/commonjs/funcs/tenantsDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsDelete.js +3 -1
- package/dist/commonjs/funcs/tenantsDelete.js.map +1 -1
- package/dist/commonjs/funcs/tenantsGet.d.ts +3 -2
- package/dist/commonjs/funcs/tenantsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsGet.js +3 -1
- package/dist/commonjs/funcs/tenantsGet.js.map +1 -1
- package/dist/commonjs/funcs/tenantsGetPortalUrl.d.ts +3 -2
- package/dist/commonjs/funcs/tenantsGetPortalUrl.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsGetPortalUrl.js +3 -1
- package/dist/commonjs/funcs/tenantsGetPortalUrl.js.map +1 -1
- package/dist/commonjs/funcs/tenantsGetToken.d.ts +3 -2
- package/dist/commonjs/funcs/tenantsGetToken.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsGetToken.js +3 -1
- package/dist/commonjs/funcs/tenantsGetToken.js.map +1 -1
- package/dist/commonjs/funcs/tenantsUpsert.d.ts +3 -2
- package/dist/commonjs/funcs/tenantsUpsert.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsUpsert.js +3 -1
- package/dist/commonjs/funcs/tenantsUpsert.js.map +1 -1
- package/dist/commonjs/funcs/topicsList.d.ts +3 -2
- package/dist/commonjs/funcs/topicsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/topicsList.js +3 -1
- package/dist/commonjs/funcs/topicsList.js.map +1 -1
- package/dist/commonjs/funcs/topicsListJwt.d.ts +3 -2
- package/dist/commonjs/funcs/topicsListJwt.d.ts.map +1 -1
- package/dist/commonjs/funcs/topicsListJwt.js +3 -1
- package/dist/commonjs/funcs/topicsListJwt.js.map +1 -1
- package/dist/commonjs/hooks/types.d.ts +2 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -1
- package/dist/commonjs/index.d.ts +2 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +3 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +7 -3
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/files.d.ts +5 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -1
- package/dist/commonjs/lib/files.js +41 -0
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/matchers.d.ts +3 -10
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +33 -31
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts +1 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +3 -3
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +2 -2
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +0 -12
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -2
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +4 -6
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/publishEvent.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/publishEvent.js +2 -1
- package/dist/commonjs/mcp-server/tools/publishEvent.js.map +1 -1
- package/dist/commonjs/models/components/azureservicebusconfig.d.ts +32 -0
- package/dist/commonjs/models/components/azureservicebusconfig.d.ts.map +1 -0
- package/dist/commonjs/models/components/azureservicebusconfig.js +69 -0
- package/dist/commonjs/models/components/azureservicebusconfig.js.map +1 -0
- package/dist/commonjs/models/components/azureservicebuscredentials.d.ts +32 -0
- package/dist/commonjs/models/components/azureservicebuscredentials.d.ts.map +1 -0
- package/dist/commonjs/models/components/azureservicebuscredentials.js +78 -0
- package/dist/commonjs/models/components/azureservicebuscredentials.js.map +1 -0
- package/dist/commonjs/models/components/destination.d.ts +9 -4
- package/dist/commonjs/models/components/destination.d.ts.map +1 -1
- package/dist/commonjs/models/components/destination.js +11 -4
- package/dist/commonjs/models/components/destination.js.map +1 -1
- package/dist/commonjs/models/components/destinationazureservicebus.d.ts +98 -0
- package/dist/commonjs/models/components/destinationazureservicebus.d.ts.map +1 -0
- package/dist/commonjs/models/components/destinationazureservicebus.js +122 -0
- package/dist/commonjs/models/components/destinationazureservicebus.js.map +1 -0
- package/dist/commonjs/models/components/destinationcreate.d.ts +15 -10
- package/dist/commonjs/models/components/destinationcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/destinationcreate.js +17 -10
- package/dist/commonjs/models/components/destinationcreate.js.map +1 -1
- package/dist/commonjs/models/components/destinationcreateazureservicebus.d.ts +78 -0
- package/dist/commonjs/models/components/destinationcreateazureservicebus.d.ts.map +1 -0
- package/dist/commonjs/models/components/destinationcreateazureservicebus.js +101 -0
- package/dist/commonjs/models/components/destinationcreateazureservicebus.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +5 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +5 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/publishrequest.d.ts +12 -7
- package/dist/commonjs/models/components/publishrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/publishrequest.js +8 -6
- package/dist/commonjs/models/components/publishrequest.js.map +1 -1
- package/dist/commonjs/models/components/publishresponse.d.ts +32 -0
- package/dist/commonjs/models/components/publishresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/publishresponse.js +69 -0
- package/dist/commonjs/models/components/publishresponse.js.map +1 -0
- package/dist/commonjs/models/errors/apierror.d.ts +8 -6
- package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/apierror.js +23 -10
- package/dist/commonjs/models/errors/apierror.js.map +1 -1
- package/dist/commonjs/models/errors/badrequesterror.d.ts +7 -2
- package/dist/commonjs/models/errors/badrequesterror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/badrequesterror.js +13 -7
- package/dist/commonjs/models/errors/badrequesterror.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/internalservererror.d.ts +7 -2
- package/dist/commonjs/models/errors/internalservererror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/internalservererror.js +13 -7
- package/dist/commonjs/models/errors/internalservererror.js.map +1 -1
- package/dist/commonjs/models/errors/notfounderror.d.ts +7 -2
- package/dist/commonjs/models/errors/notfounderror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/notfounderror.js +13 -7
- package/dist/commonjs/models/errors/notfounderror.js.map +1 -1
- package/dist/commonjs/models/errors/outposterror.d.ts +19 -0
- package/dist/commonjs/models/errors/outposterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/outposterror.js +20 -0
- package/dist/commonjs/models/errors/outposterror.js.map +1 -0
- package/dist/commonjs/models/errors/ratelimitederror.d.ts +7 -2
- package/dist/commonjs/models/errors/ratelimitederror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/ratelimitederror.js +13 -7
- package/dist/commonjs/models/errors/ratelimitederror.js.map +1 -1
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js +66 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.js +14 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/commonjs/models/errors/timeouterror.d.ts +7 -2
- package/dist/commonjs/models/errors/timeouterror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/timeouterror.js +13 -7
- package/dist/commonjs/models/errors/timeouterror.js.map +1 -1
- package/dist/commonjs/models/errors/unauthorizederror.d.ts +7 -2
- package/dist/commonjs/models/errors/unauthorizederror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/unauthorizederror.js +13 -7
- package/dist/commonjs/models/errors/unauthorizederror.js.map +1 -1
- package/dist/commonjs/sdk/publish.d.ts +1 -1
- package/dist/commonjs/sdk/publish.d.ts.map +1 -1
- package/dist/commonjs/types/constdatetime.js +1 -1
- package/dist/esm/funcs/destinationsCreate.d.ts +3 -2
- package/dist/esm/funcs/destinationsCreate.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsCreate.js +3 -1
- package/dist/esm/funcs/destinationsCreate.js.map +1 -1
- package/dist/esm/funcs/destinationsDelete.d.ts +3 -2
- package/dist/esm/funcs/destinationsDelete.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsDelete.js +3 -1
- package/dist/esm/funcs/destinationsDelete.js.map +1 -1
- package/dist/esm/funcs/destinationsDisable.d.ts +3 -2
- package/dist/esm/funcs/destinationsDisable.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsDisable.js +3 -1
- package/dist/esm/funcs/destinationsDisable.js.map +1 -1
- package/dist/esm/funcs/destinationsEnable.d.ts +3 -2
- package/dist/esm/funcs/destinationsEnable.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsEnable.js +3 -1
- package/dist/esm/funcs/destinationsEnable.js.map +1 -1
- package/dist/esm/funcs/destinationsGet.d.ts +3 -2
- package/dist/esm/funcs/destinationsGet.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsGet.js +3 -1
- package/dist/esm/funcs/destinationsGet.js.map +1 -1
- package/dist/esm/funcs/destinationsList.d.ts +3 -2
- package/dist/esm/funcs/destinationsList.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsList.js +3 -1
- package/dist/esm/funcs/destinationsList.js.map +1 -1
- package/dist/esm/funcs/destinationsUpdate.d.ts +3 -2
- package/dist/esm/funcs/destinationsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsUpdate.js +3 -1
- package/dist/esm/funcs/destinationsUpdate.js.map +1 -1
- package/dist/esm/funcs/eventsGet.d.ts +3 -2
- package/dist/esm/funcs/eventsGet.d.ts.map +1 -1
- package/dist/esm/funcs/eventsGet.js +3 -1
- package/dist/esm/funcs/eventsGet.js.map +1 -1
- package/dist/esm/funcs/eventsGetByDestination.d.ts +3 -2
- package/dist/esm/funcs/eventsGetByDestination.d.ts.map +1 -1
- package/dist/esm/funcs/eventsGetByDestination.js +3 -1
- package/dist/esm/funcs/eventsGetByDestination.js.map +1 -1
- package/dist/esm/funcs/eventsList.d.ts +3 -2
- package/dist/esm/funcs/eventsList.d.ts.map +1 -1
- package/dist/esm/funcs/eventsList.js +3 -1
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/eventsListByDestination.d.ts +3 -2
- package/dist/esm/funcs/eventsListByDestination.d.ts.map +1 -1
- package/dist/esm/funcs/eventsListByDestination.js +3 -1
- package/dist/esm/funcs/eventsListByDestination.js.map +1 -1
- package/dist/esm/funcs/eventsListDeliveries.d.ts +3 -2
- package/dist/esm/funcs/eventsListDeliveries.d.ts.map +1 -1
- package/dist/esm/funcs/eventsListDeliveries.js +3 -1
- package/dist/esm/funcs/eventsListDeliveries.js.map +1 -1
- package/dist/esm/funcs/eventsRetry.d.ts +3 -2
- package/dist/esm/funcs/eventsRetry.d.ts.map +1 -1
- package/dist/esm/funcs/eventsRetry.js +3 -1
- package/dist/esm/funcs/eventsRetry.js.map +1 -1
- package/dist/esm/funcs/healthCheck.d.ts +3 -2
- package/dist/esm/funcs/healthCheck.d.ts.map +1 -1
- package/dist/esm/funcs/healthCheck.js +3 -1
- package/dist/esm/funcs/healthCheck.js.map +1 -1
- package/dist/esm/funcs/publishEvent.d.ts +3 -2
- package/dist/esm/funcs/publishEvent.d.ts.map +1 -1
- package/dist/esm/funcs/publishEvent.js +4 -2
- package/dist/esm/funcs/publishEvent.js.map +1 -1
- package/dist/esm/funcs/schemasGet.d.ts +3 -2
- package/dist/esm/funcs/schemasGet.d.ts.map +1 -1
- package/dist/esm/funcs/schemasGet.js +3 -1
- package/dist/esm/funcs/schemasGet.js.map +1 -1
- package/dist/esm/funcs/schemasGetDestinationTypeJwt.d.ts +3 -2
- package/dist/esm/funcs/schemasGetDestinationTypeJwt.d.ts.map +1 -1
- package/dist/esm/funcs/schemasGetDestinationTypeJwt.js +3 -1
- package/dist/esm/funcs/schemasGetDestinationTypeJwt.js.map +1 -1
- package/dist/esm/funcs/schemasListDestinationTypesJwt.d.ts +3 -2
- package/dist/esm/funcs/schemasListDestinationTypesJwt.d.ts.map +1 -1
- package/dist/esm/funcs/schemasListDestinationTypesJwt.js +3 -1
- package/dist/esm/funcs/schemasListDestinationTypesJwt.js.map +1 -1
- package/dist/esm/funcs/schemasListTenantDestinationTypes.d.ts +3 -2
- package/dist/esm/funcs/schemasListTenantDestinationTypes.d.ts.map +1 -1
- package/dist/esm/funcs/schemasListTenantDestinationTypes.js +3 -1
- package/dist/esm/funcs/schemasListTenantDestinationTypes.js.map +1 -1
- package/dist/esm/funcs/tenantsDelete.d.ts +3 -2
- package/dist/esm/funcs/tenantsDelete.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsDelete.js +3 -1
- package/dist/esm/funcs/tenantsDelete.js.map +1 -1
- package/dist/esm/funcs/tenantsGet.d.ts +3 -2
- package/dist/esm/funcs/tenantsGet.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsGet.js +3 -1
- package/dist/esm/funcs/tenantsGet.js.map +1 -1
- package/dist/esm/funcs/tenantsGetPortalUrl.d.ts +3 -2
- package/dist/esm/funcs/tenantsGetPortalUrl.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsGetPortalUrl.js +3 -1
- package/dist/esm/funcs/tenantsGetPortalUrl.js.map +1 -1
- package/dist/esm/funcs/tenantsGetToken.d.ts +3 -2
- package/dist/esm/funcs/tenantsGetToken.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsGetToken.js +3 -1
- package/dist/esm/funcs/tenantsGetToken.js.map +1 -1
- package/dist/esm/funcs/tenantsUpsert.d.ts +3 -2
- package/dist/esm/funcs/tenantsUpsert.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsUpsert.js +3 -1
- package/dist/esm/funcs/tenantsUpsert.js.map +1 -1
- package/dist/esm/funcs/topicsList.d.ts +3 -2
- package/dist/esm/funcs/topicsList.d.ts.map +1 -1
- package/dist/esm/funcs/topicsList.js +3 -1
- package/dist/esm/funcs/topicsList.js.map +1 -1
- package/dist/esm/funcs/topicsListJwt.d.ts +3 -2
- package/dist/esm/funcs/topicsListJwt.d.ts.map +1 -1
- package/dist/esm/funcs/topicsListJwt.js +3 -1
- package/dist/esm/funcs/topicsListJwt.js.map +1 -1
- package/dist/esm/hooks/types.d.ts +2 -0
- package/dist/esm/hooks/types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/config.d.ts +7 -3
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/files.d.ts +5 -0
- package/dist/esm/lib/files.d.ts.map +1 -1
- package/dist/esm/lib/files.js +40 -0
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/matchers.d.ts +3 -10
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +33 -30
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts +1 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +3 -3
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts +2 -2
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +0 -12
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -2
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +4 -6
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/publishEvent.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/publishEvent.js +2 -1
- package/dist/esm/mcp-server/tools/publishEvent.js.map +1 -1
- package/dist/esm/models/components/azureservicebusconfig.d.ts +32 -0
- package/dist/esm/models/components/azureservicebusconfig.d.ts.map +1 -0
- package/dist/esm/models/components/azureservicebusconfig.js +31 -0
- package/dist/esm/models/components/azureservicebusconfig.js.map +1 -0
- package/dist/esm/models/components/azureservicebuscredentials.d.ts +32 -0
- package/dist/esm/models/components/azureservicebuscredentials.d.ts.map +1 -0
- package/dist/esm/models/components/azureservicebuscredentials.js +40 -0
- package/dist/esm/models/components/azureservicebuscredentials.js.map +1 -0
- package/dist/esm/models/components/destination.d.ts +9 -4
- package/dist/esm/models/components/destination.d.ts.map +1 -1
- package/dist/esm/models/components/destination.js +11 -4
- package/dist/esm/models/components/destination.js.map +1 -1
- package/dist/esm/models/components/destinationazureservicebus.d.ts +98 -0
- package/dist/esm/models/components/destinationazureservicebus.d.ts.map +1 -0
- package/dist/esm/models/components/destinationazureservicebus.js +84 -0
- package/dist/esm/models/components/destinationazureservicebus.js.map +1 -0
- package/dist/esm/models/components/destinationcreate.d.ts +15 -10
- package/dist/esm/models/components/destinationcreate.d.ts.map +1 -1
- package/dist/esm/models/components/destinationcreate.js +17 -10
- package/dist/esm/models/components/destinationcreate.js.map +1 -1
- package/dist/esm/models/components/destinationcreateazureservicebus.d.ts +78 -0
- package/dist/esm/models/components/destinationcreateazureservicebus.d.ts.map +1 -0
- package/dist/esm/models/components/destinationcreateazureservicebus.js +63 -0
- package/dist/esm/models/components/destinationcreateazureservicebus.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +5 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +5 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/publishrequest.d.ts +12 -7
- package/dist/esm/models/components/publishrequest.d.ts.map +1 -1
- package/dist/esm/models/components/publishrequest.js +8 -6
- package/dist/esm/models/components/publishrequest.js.map +1 -1
- package/dist/esm/models/components/publishresponse.d.ts +32 -0
- package/dist/esm/models/components/publishresponse.d.ts.map +1 -0
- package/dist/esm/models/components/publishresponse.js +31 -0
- package/dist/esm/models/components/publishresponse.js.map +1 -0
- package/dist/esm/models/errors/apierror.d.ts +8 -6
- package/dist/esm/models/errors/apierror.d.ts.map +1 -1
- package/dist/esm/models/errors/apierror.js +23 -10
- package/dist/esm/models/errors/apierror.js.map +1 -1
- package/dist/esm/models/errors/badrequesterror.d.ts +7 -2
- package/dist/esm/models/errors/badrequesterror.d.ts.map +1 -1
- package/dist/esm/models/errors/badrequesterror.js +13 -7
- package/dist/esm/models/errors/badrequesterror.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/internalservererror.d.ts +7 -2
- package/dist/esm/models/errors/internalservererror.d.ts.map +1 -1
- package/dist/esm/models/errors/internalservererror.js +13 -7
- package/dist/esm/models/errors/internalservererror.js.map +1 -1
- package/dist/esm/models/errors/notfounderror.d.ts +7 -2
- package/dist/esm/models/errors/notfounderror.d.ts.map +1 -1
- package/dist/esm/models/errors/notfounderror.js +13 -7
- package/dist/esm/models/errors/notfounderror.js.map +1 -1
- package/dist/esm/models/errors/outposterror.d.ts +19 -0
- package/dist/esm/models/errors/outposterror.d.ts.map +1 -0
- package/dist/esm/models/errors/outposterror.js +16 -0
- package/dist/esm/models/errors/outposterror.js.map +1 -0
- package/dist/esm/models/errors/ratelimitederror.d.ts +7 -2
- package/dist/esm/models/errors/ratelimitederror.d.ts.map +1 -1
- package/dist/esm/models/errors/ratelimitederror.js +13 -7
- package/dist/esm/models/errors/ratelimitederror.js.map +1 -1
- package/dist/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.js +29 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.js +14 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/esm/models/errors/timeouterror.d.ts +7 -2
- package/dist/esm/models/errors/timeouterror.d.ts.map +1 -1
- package/dist/esm/models/errors/timeouterror.js +13 -7
- package/dist/esm/models/errors/timeouterror.js.map +1 -1
- package/dist/esm/models/errors/unauthorizederror.d.ts +7 -2
- package/dist/esm/models/errors/unauthorizederror.d.ts.map +1 -1
- package/dist/esm/models/errors/unauthorizederror.js +13 -7
- package/dist/esm/models/errors/unauthorizederror.js.map +1 -1
- package/dist/esm/sdk/publish.d.ts +1 -1
- package/dist/esm/sdk/publish.d.ts.map +1 -1
- package/dist/esm/types/constdatetime.js +1 -1
- package/docs/sdks/destinations/README.md +68 -95
- package/docs/sdks/events/README.md +50 -68
- package/docs/sdks/health/README.md +6 -9
- package/docs/sdks/publish/README.md +11 -12
- package/docs/sdks/schemas/README.md +32 -46
- package/docs/sdks/tenants/README.md +50 -75
- package/docs/sdks/topics/README.md +16 -24
- package/examples/README.md +31 -0
- package/examples/healthCheck.example.ts +24 -0
- package/examples/package-lock.json +628 -0
- package/examples/package.json +18 -0
- package/jsr.json +1 -1
- package/package.json +13 -8
- package/src/funcs/destinationsCreate.ts +23 -26
- package/src/funcs/destinationsDelete.ts +23 -26
- package/src/funcs/destinationsDisable.ts +23 -26
- package/src/funcs/destinationsEnable.ts +23 -26
- package/src/funcs/destinationsGet.ts +23 -26
- package/src/funcs/destinationsList.ts +23 -26
- package/src/funcs/destinationsUpdate.ts +23 -26
- package/src/funcs/eventsGet.ts +23 -26
- package/src/funcs/eventsGetByDestination.ts +23 -26
- package/src/funcs/eventsList.ts +23 -26
- package/src/funcs/eventsListByDestination.ts +23 -26
- package/src/funcs/eventsListDeliveries.ts +23 -26
- package/src/funcs/eventsRetry.ts +23 -26
- package/src/funcs/healthCheck.ts +23 -29
- package/src/funcs/publishEvent.ts +29 -35
- package/src/funcs/schemasGet.ts +23 -26
- package/src/funcs/schemasGetDestinationTypeJwt.ts +23 -26
- package/src/funcs/schemasListDestinationTypesJwt.ts +23 -29
- package/src/funcs/schemasListTenantDestinationTypes.ts +23 -26
- package/src/funcs/tenantsDelete.ts +23 -26
- package/src/funcs/tenantsGet.ts +23 -26
- package/src/funcs/tenantsGetPortalUrl.ts +23 -26
- package/src/funcs/tenantsGetToken.ts +23 -26
- package/src/funcs/tenantsUpsert.ts +24 -30
- package/src/funcs/topicsList.ts +23 -26
- package/src/funcs/topicsListJwt.ts +23 -29
- package/src/hooks/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/files.ts +42 -0
- package/src/lib/matchers.ts +44 -41
- package/src/lib/sdks.ts +10 -4
- package/src/lib/security.ts +2 -2
- package/src/mcp-server/cli/start/command.ts +0 -13
- package/src/mcp-server/cli/start/impl.ts +4 -8
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/publishEvent.ts +3 -1
- package/src/models/components/azureservicebusconfig.ts +69 -0
- package/src/models/components/azureservicebuscredentials.ts +78 -0
- package/src/models/components/destination.ts +30 -12
- package/src/models/components/destinationazureservicebus.ts +187 -0
- package/src/models/components/destinationcreate.ts +42 -24
- package/src/models/components/destinationcreateazureservicebus.ts +149 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/components/publishrequest.ts +20 -13
- package/src/models/components/publishresponse.ts +67 -0
- package/src/models/errors/apierror.ts +29 -16
- package/src/models/errors/badrequesterror.ts +16 -8
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/internalservererror.ts +16 -8
- package/src/models/errors/notfounderror.ts +16 -8
- package/src/models/errors/outposterror.ts +35 -0
- package/src/models/errors/ratelimitederror.ts +16 -8
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +12 -0
- package/src/models/errors/timeouterror.ts +16 -8
- package/src/models/errors/unauthorizederror.ts +16 -8
- package/src/sdk/publish.ts +1 -1
- package/src/types/constdatetime.ts +1 -1
package/src/lib/matchers.ts
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { APIError } from "../models/errors/apierror.js";
|
|
6
|
-
import {
|
|
7
|
-
import { Result } from "../types/fp.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { ERR, OK, Result } from "../types/fp.js";
|
|
8
8
|
import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js";
|
|
9
9
|
import { isPlainObject } from "./is-plain-object.js";
|
|
10
|
-
import { safeParse } from "./schemas.js";
|
|
11
10
|
|
|
12
11
|
export type Encoding =
|
|
13
12
|
| "jsonl"
|
|
@@ -176,17 +175,19 @@ export type MatchedError<Matchers> = Matchers extends Matcher<any, infer E>[]
|
|
|
176
175
|
: never;
|
|
177
176
|
export type MatchFunc<T, E> = (
|
|
178
177
|
response: Response,
|
|
178
|
+
request: Request,
|
|
179
179
|
options?: { resultKey?: string; extraFields?: Record<string, unknown> },
|
|
180
180
|
) => Promise<[result: Result<T, E>, raw: unknown]>;
|
|
181
181
|
|
|
182
182
|
export function match<T, E>(
|
|
183
183
|
...matchers: Array<Matcher<T, E>>
|
|
184
|
-
): MatchFunc<T, E | APIError |
|
|
184
|
+
): MatchFunc<T, E | APIError | ResponseValidationError> {
|
|
185
185
|
return async function matchFunc(
|
|
186
186
|
response: Response,
|
|
187
|
+
request: Request,
|
|
187
188
|
options?: { resultKey?: string; extraFields?: Record<string, unknown> },
|
|
188
189
|
): Promise<
|
|
189
|
-
[result: Result<T, E | APIError |
|
|
190
|
+
[result: Result<T, E | APIError | ResponseValidationError>, raw: unknown]
|
|
190
191
|
> {
|
|
191
192
|
let raw: unknown;
|
|
192
193
|
let matcher: Matcher<T, E> | undefined;
|
|
@@ -205,21 +206,22 @@ export function match<T, E>(
|
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
if (!matcher) {
|
|
208
|
-
const responseBody = await response.text();
|
|
209
209
|
return [{
|
|
210
210
|
ok: false,
|
|
211
|
-
error: new APIError(
|
|
212
|
-
"Unexpected API response status or content-type",
|
|
211
|
+
error: new APIError("Unexpected Status or Content-Type", {
|
|
213
212
|
response,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
request,
|
|
214
|
+
body: await response.text().catch(() => ""),
|
|
215
|
+
}),
|
|
216
|
+
}, raw];
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
const encoding = matcher.enc;
|
|
220
|
+
let body = "";
|
|
220
221
|
switch (encoding) {
|
|
221
222
|
case "json":
|
|
222
|
-
|
|
223
|
+
body = await response.text();
|
|
224
|
+
raw = JSON.parse(body);
|
|
223
225
|
break;
|
|
224
226
|
case "jsonl":
|
|
225
227
|
raw = response.body;
|
|
@@ -231,16 +233,19 @@ export function match<T, E>(
|
|
|
231
233
|
raw = response.body;
|
|
232
234
|
break;
|
|
233
235
|
case "text":
|
|
234
|
-
|
|
236
|
+
body = await response.text();
|
|
237
|
+
raw = body;
|
|
235
238
|
break;
|
|
236
239
|
case "sse":
|
|
237
240
|
raw = response.body;
|
|
238
241
|
break;
|
|
239
242
|
case "nil":
|
|
240
|
-
|
|
243
|
+
body = await response.text();
|
|
244
|
+
raw = undefined;
|
|
241
245
|
break;
|
|
242
246
|
case "fail":
|
|
243
|
-
|
|
247
|
+
body = await response.text();
|
|
248
|
+
raw = body;
|
|
244
249
|
break;
|
|
245
250
|
default:
|
|
246
251
|
encoding satisfies never;
|
|
@@ -250,11 +255,7 @@ export function match<T, E>(
|
|
|
250
255
|
if (matcher.enc === "fail") {
|
|
251
256
|
return [{
|
|
252
257
|
ok: false,
|
|
253
|
-
error: new APIError(
|
|
254
|
-
"API error occurred",
|
|
255
|
-
response,
|
|
256
|
-
typeof raw === "string" ? raw : "",
|
|
257
|
-
),
|
|
258
|
+
error: new APIError("API error occurred", { request, response, body }),
|
|
258
259
|
}, raw];
|
|
259
260
|
}
|
|
260
261
|
|
|
@@ -266,6 +267,9 @@ export function match<T, E>(
|
|
|
266
267
|
...options?.extraFields,
|
|
267
268
|
...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null),
|
|
268
269
|
...(isPlainObject(raw) ? raw : null),
|
|
270
|
+
request$: request,
|
|
271
|
+
response$: response,
|
|
272
|
+
body$: body,
|
|
269
273
|
};
|
|
270
274
|
} else if (resultKey) {
|
|
271
275
|
data = {
|
|
@@ -284,18 +288,20 @@ export function match<T, E>(
|
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
if ("err" in matcher) {
|
|
287
|
-
const result =
|
|
291
|
+
const result = safeParseResponse(
|
|
288
292
|
data,
|
|
289
293
|
(v: unknown) => matcher.schema.parse(v),
|
|
290
294
|
"Response validation failed",
|
|
295
|
+
{ request, response, body },
|
|
291
296
|
);
|
|
292
297
|
return [result.ok ? { ok: false, error: result.value } : result, raw];
|
|
293
298
|
} else {
|
|
294
299
|
return [
|
|
295
|
-
|
|
300
|
+
safeParseResponse(
|
|
296
301
|
data,
|
|
297
302
|
(v: unknown) => matcher.schema.parse(v),
|
|
298
303
|
"Response validation failed",
|
|
304
|
+
{ request, response, body },
|
|
299
305
|
),
|
|
300
306
|
raw,
|
|
301
307
|
];
|
|
@@ -318,25 +324,22 @@ export function unpackHeaders(headers: Headers): Record<string, string[]> {
|
|
|
318
324
|
return out;
|
|
319
325
|
}
|
|
320
326
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
export async function discardResponseBody(res: Response) {
|
|
328
|
-
const reader = res.body?.getReader();
|
|
329
|
-
if (reader == null) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
|
|
327
|
+
function safeParseResponse<Inp, Out>(
|
|
328
|
+
rawValue: Inp,
|
|
329
|
+
fn: (value: Inp) => Out,
|
|
330
|
+
errorMessage: string,
|
|
331
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
332
|
+
): Result<Out, ResponseValidationError> {
|
|
333
333
|
try {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
return OK(fn(rawValue));
|
|
335
|
+
} catch (err) {
|
|
336
|
+
return ERR(
|
|
337
|
+
new ResponseValidationError(errorMessage, {
|
|
338
|
+
cause: err,
|
|
339
|
+
rawValue,
|
|
340
|
+
rawMessage: errorMessage,
|
|
341
|
+
...httpMeta,
|
|
342
|
+
}),
|
|
343
|
+
);
|
|
341
344
|
}
|
|
342
345
|
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -64,6 +64,7 @@ type RequestConfig = {
|
|
|
64
64
|
headers?: HeadersInit;
|
|
65
65
|
security?: SecurityState | null;
|
|
66
66
|
uaHeader?: string;
|
|
67
|
+
userAgent?: string | undefined;
|
|
67
68
|
timeoutMs?: number;
|
|
68
69
|
};
|
|
69
70
|
|
|
@@ -95,19 +96,21 @@ export class ClientSDK {
|
|
|
95
96
|
} else {
|
|
96
97
|
this.#hooks = new SDKHooks();
|
|
97
98
|
}
|
|
98
|
-
this._options = { ...options, hooks: this.#hooks };
|
|
99
|
-
|
|
100
99
|
const url = serverURLFromOptions(options);
|
|
101
100
|
if (url) {
|
|
102
101
|
url.pathname = url.pathname.replace(/\/+$/, "") + "/";
|
|
103
102
|
}
|
|
103
|
+
|
|
104
104
|
const { baseURL, client } = this.#hooks.sdkInit({
|
|
105
105
|
baseURL: url,
|
|
106
106
|
client: options.httpClient || new HTTPClient(),
|
|
107
107
|
});
|
|
108
108
|
this._baseURL = baseURL;
|
|
109
109
|
this.#httpClient = client;
|
|
110
|
-
|
|
110
|
+
|
|
111
|
+
this._options = { ...options, hooks: this.#hooks };
|
|
112
|
+
|
|
113
|
+
this.#logger = this._options.debugLogger;
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
public _createRequest(
|
|
@@ -180,7 +183,10 @@ export class ClientSDK {
|
|
|
180
183
|
// Only set user agent header in non-browser-like environments since CORS
|
|
181
184
|
// policy disallows setting it in browsers e.g. Chrome throws an error.
|
|
182
185
|
if (!isBrowserLike) {
|
|
183
|
-
headers.set(
|
|
186
|
+
headers.set(
|
|
187
|
+
conf.uaHeader ?? "user-agent",
|
|
188
|
+
conf.userAgent ?? SDK_METADATA.userAgent,
|
|
189
|
+
);
|
|
184
190
|
}
|
|
185
191
|
|
|
186
192
|
const fetchOptions: Omit<RequestInit, "method" | "body"> = {
|
package/src/lib/security.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as components from "../models/components/index.js";
|
|
|
6
6
|
|
|
7
7
|
type OAuth2PasswordFlow = {
|
|
8
8
|
username: string;
|
|
9
|
-
password
|
|
10
|
-
clientID
|
|
9
|
+
password: string;
|
|
10
|
+
clientID?: string | undefined;
|
|
11
11
|
clientSecret?: string | undefined;
|
|
12
12
|
tokenURL: string;
|
|
13
13
|
};
|
|
@@ -6,7 +6,6 @@ import { buildCommand } from "@stricli/core";
|
|
|
6
6
|
import { numberParser } from "@stricli/core";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import { consoleLoggerLevels } from "../../console-logger.js";
|
|
9
|
-
import { mcpScopes } from "../../scopes.js";
|
|
10
9
|
|
|
11
10
|
export const startCommand = buildCommand({
|
|
12
11
|
loader: async () => {
|
|
@@ -37,18 +36,6 @@ export const startCommand = buildCommand({
|
|
|
37
36
|
return z.string().parse(value);
|
|
38
37
|
},
|
|
39
38
|
},
|
|
40
|
-
...(mcpScopes.length
|
|
41
|
-
? {
|
|
42
|
-
scope: {
|
|
43
|
-
kind: "enum",
|
|
44
|
-
brief:
|
|
45
|
-
"Mount tools/resources that match given scope (repeatable flag)",
|
|
46
|
-
values: mcpScopes,
|
|
47
|
-
variadic: true,
|
|
48
|
-
optional: true,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
: {}),
|
|
52
39
|
"admin-api-key": {
|
|
53
40
|
kind: "parsed",
|
|
54
41
|
brief: "Sets the adminApiKey auth field for the API",
|
|
@@ -11,14 +11,12 @@ import {
|
|
|
11
11
|
ConsoleLoggerLevel,
|
|
12
12
|
createConsoleLogger,
|
|
13
13
|
} from "../../console-logger.js";
|
|
14
|
-
import { MCPScope } from "../../scopes.js";
|
|
15
14
|
import { createMCPServer } from "../../server.js";
|
|
16
15
|
|
|
17
16
|
interface StartCommandFlags {
|
|
18
17
|
readonly transport: "stdio" | "sse";
|
|
19
18
|
readonly port: number;
|
|
20
19
|
readonly tool?: string[];
|
|
21
|
-
readonly scope?: MCPScope[];
|
|
22
20
|
readonly "admin-api-key"?: string | undefined;
|
|
23
21
|
readonly "tenant-jwt"?: string | undefined;
|
|
24
22
|
readonly "tenant-id"?: SDKOptions["tenantId"] | undefined;
|
|
@@ -51,10 +49,9 @@ async function startStdio(flags: StartCommandFlags) {
|
|
|
51
49
|
const server = createMCPServer({
|
|
52
50
|
logger,
|
|
53
51
|
allowedTools: flags.tool,
|
|
54
|
-
scopes: flags.scope,
|
|
55
52
|
security: {
|
|
56
|
-
adminApiKey: flags["admin-api-key"],
|
|
57
|
-
tenantJwt: flags["tenant-jwt"],
|
|
53
|
+
adminApiKey: flags["admin-api-key"] ?? "",
|
|
54
|
+
tenantJwt: flags["tenant-jwt"] ?? "",
|
|
58
55
|
},
|
|
59
56
|
tenantId: flags["tenant-id"],
|
|
60
57
|
serverURL: flags["server-url"],
|
|
@@ -76,10 +73,9 @@ async function startSSE(flags: StartCommandFlags) {
|
|
|
76
73
|
const mcpServer = createMCPServer({
|
|
77
74
|
logger,
|
|
78
75
|
allowedTools: flags.tool,
|
|
79
|
-
scopes: flags.scope,
|
|
80
76
|
security: {
|
|
81
|
-
adminApiKey: flags["admin-api-key"],
|
|
82
|
-
tenantJwt: flags["tenant-jwt"],
|
|
77
|
+
adminApiKey: flags["admin-api-key"] ?? "",
|
|
78
|
+
tenantJwt: flags["tenant-jwt"] ?? "",
|
|
83
79
|
},
|
|
84
80
|
tenantId: flags["tenant-id"],
|
|
85
81
|
serverURL: flags["server-url"],
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -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 AzureServiceBusConfig = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the Azure Service Bus queue or topic to publish messages to.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const AzureServiceBusConfig$inboundSchema: z.ZodType<
|
|
19
|
+
AzureServiceBusConfig,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
name: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type AzureServiceBusConfig$Outbound = {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const AzureServiceBusConfig$outboundSchema: z.ZodType<
|
|
33
|
+
AzureServiceBusConfig$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
AzureServiceBusConfig
|
|
36
|
+
> = z.object({
|
|
37
|
+
name: 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 AzureServiceBusConfig$ {
|
|
45
|
+
/** @deprecated use `AzureServiceBusConfig$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = AzureServiceBusConfig$inboundSchema;
|
|
47
|
+
/** @deprecated use `AzureServiceBusConfig$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = AzureServiceBusConfig$outboundSchema;
|
|
49
|
+
/** @deprecated use `AzureServiceBusConfig$Outbound` instead. */
|
|
50
|
+
export type Outbound = AzureServiceBusConfig$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function azureServiceBusConfigToJSON(
|
|
54
|
+
azureServiceBusConfig: AzureServiceBusConfig,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
AzureServiceBusConfig$outboundSchema.parse(azureServiceBusConfig),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function azureServiceBusConfigFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<AzureServiceBusConfig, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => AzureServiceBusConfig$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'AzureServiceBusConfig' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
export type AzureServiceBusCredentials = {
|
|
12
|
+
/**
|
|
13
|
+
* The connection string for the Azure Service Bus namespace.
|
|
14
|
+
*/
|
|
15
|
+
connectionString: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const AzureServiceBusCredentials$inboundSchema: z.ZodType<
|
|
20
|
+
AzureServiceBusCredentials,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
connection_string: z.string(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"connection_string": "connectionString",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type AzureServiceBusCredentials$Outbound = {
|
|
33
|
+
connection_string: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const AzureServiceBusCredentials$outboundSchema: z.ZodType<
|
|
38
|
+
AzureServiceBusCredentials$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
AzureServiceBusCredentials
|
|
41
|
+
> = z.object({
|
|
42
|
+
connectionString: z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
connectionString: "connection_string",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace AzureServiceBusCredentials$ {
|
|
54
|
+
/** @deprecated use `AzureServiceBusCredentials$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = AzureServiceBusCredentials$inboundSchema;
|
|
56
|
+
/** @deprecated use `AzureServiceBusCredentials$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = AzureServiceBusCredentials$outboundSchema;
|
|
58
|
+
/** @deprecated use `AzureServiceBusCredentials$Outbound` instead. */
|
|
59
|
+
export type Outbound = AzureServiceBusCredentials$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function azureServiceBusCredentialsToJSON(
|
|
63
|
+
azureServiceBusCredentials: AzureServiceBusCredentials,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
AzureServiceBusCredentials$outboundSchema.parse(azureServiceBusCredentials),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function azureServiceBusCredentialsFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<AzureServiceBusCredentials, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => AzureServiceBusCredentials$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'AzureServiceBusCredentials' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -18,6 +18,12 @@ import {
|
|
|
18
18
|
DestinationAWSSQS$Outbound,
|
|
19
19
|
DestinationAWSSQS$outboundSchema,
|
|
20
20
|
} from "./destinationawssqs.js";
|
|
21
|
+
import {
|
|
22
|
+
DestinationAzureServiceBus,
|
|
23
|
+
DestinationAzureServiceBus$inboundSchema,
|
|
24
|
+
DestinationAzureServiceBus$Outbound,
|
|
25
|
+
DestinationAzureServiceBus$outboundSchema,
|
|
26
|
+
} from "./destinationazureservicebus.js";
|
|
21
27
|
import {
|
|
22
28
|
DestinationHookdeck,
|
|
23
29
|
DestinationHookdeck$inboundSchema,
|
|
@@ -41,8 +47,9 @@ export type Destination =
|
|
|
41
47
|
| (DestinationWebhook & { type: "webhook" })
|
|
42
48
|
| (DestinationAWSSQS & { type: "aws_sqs" })
|
|
43
49
|
| (DestinationRabbitMQ & { type: "rabbitmq" })
|
|
44
|
-
| (
|
|
45
|
-
| (
|
|
50
|
+
| (DestinationAWSKinesis & { type: "aws_kinesis" })
|
|
51
|
+
| (DestinationAzureServiceBus & { type: "azure_servicebus" })
|
|
52
|
+
| (DestinationHookdeck & { type: "hookdeck" });
|
|
46
53
|
|
|
47
54
|
/** @internal */
|
|
48
55
|
export const Destination$inboundSchema: z.ZodType<
|
|
@@ -65,13 +72,18 @@ export const Destination$inboundSchema: z.ZodType<
|
|
|
65
72
|
type: v.type,
|
|
66
73
|
})),
|
|
67
74
|
),
|
|
68
|
-
|
|
69
|
-
z.object({ type: z.literal("
|
|
75
|
+
DestinationAWSKinesis$inboundSchema.and(
|
|
76
|
+
z.object({ type: z.literal("aws_kinesis") }).transform((v) => ({
|
|
70
77
|
type: v.type,
|
|
71
78
|
})),
|
|
72
79
|
),
|
|
73
|
-
|
|
74
|
-
z.object({ type: z.literal("
|
|
80
|
+
DestinationAzureServiceBus$inboundSchema.and(
|
|
81
|
+
z.object({ type: z.literal("azure_servicebus") }).transform((v) => ({
|
|
82
|
+
type: v.type,
|
|
83
|
+
})),
|
|
84
|
+
),
|
|
85
|
+
DestinationHookdeck$inboundSchema.and(
|
|
86
|
+
z.object({ type: z.literal("hookdeck") }).transform((v) => ({
|
|
75
87
|
type: v.type,
|
|
76
88
|
})),
|
|
77
89
|
),
|
|
@@ -82,8 +94,9 @@ export type Destination$Outbound =
|
|
|
82
94
|
| (DestinationWebhook$Outbound & { type: "webhook" })
|
|
83
95
|
| (DestinationAWSSQS$Outbound & { type: "aws_sqs" })
|
|
84
96
|
| (DestinationRabbitMQ$Outbound & { type: "rabbitmq" })
|
|
85
|
-
| (
|
|
86
|
-
| (
|
|
97
|
+
| (DestinationAWSKinesis$Outbound & { type: "aws_kinesis" })
|
|
98
|
+
| (DestinationAzureServiceBus$Outbound & { type: "azure_servicebus" })
|
|
99
|
+
| (DestinationHookdeck$Outbound & { type: "hookdeck" });
|
|
87
100
|
|
|
88
101
|
/** @internal */
|
|
89
102
|
export const Destination$outboundSchema: z.ZodType<
|
|
@@ -106,13 +119,18 @@ export const Destination$outboundSchema: z.ZodType<
|
|
|
106
119
|
type: v.type,
|
|
107
120
|
})),
|
|
108
121
|
),
|
|
109
|
-
|
|
110
|
-
z.object({ type: z.literal("
|
|
122
|
+
DestinationAWSKinesis$outboundSchema.and(
|
|
123
|
+
z.object({ type: z.literal("aws_kinesis") }).transform((v) => ({
|
|
111
124
|
type: v.type,
|
|
112
125
|
})),
|
|
113
126
|
),
|
|
114
|
-
|
|
115
|
-
z.object({ type: z.literal("
|
|
127
|
+
DestinationAzureServiceBus$outboundSchema.and(
|
|
128
|
+
z.object({ type: z.literal("azure_servicebus") }).transform((v) => ({
|
|
129
|
+
type: v.type,
|
|
130
|
+
})),
|
|
131
|
+
),
|
|
132
|
+
DestinationHookdeck$outboundSchema.and(
|
|
133
|
+
z.object({ type: z.literal("hookdeck") }).transform((v) => ({
|
|
116
134
|
type: v.type,
|
|
117
135
|
})),
|
|
118
136
|
),
|