@hookdeck/outpost-sdk 0.9.1 → 0.10.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/README.md +14 -7
- package/bin/mcp-server.js +1065 -416
- package/bin/mcp-server.js.map +57 -50
- package/dist/commonjs/funcs/attemptsGet.js.map +1 -1
- package/dist/commonjs/funcs/attemptsList.d.ts +2 -0
- package/dist/commonjs/funcs/attemptsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/attemptsList.js +3 -1
- package/dist/commonjs/funcs/attemptsList.js.map +1 -1
- package/dist/commonjs/funcs/destinationsCreate.js.map +1 -1
- package/dist/commonjs/funcs/destinationsDelete.js.map +1 -1
- package/dist/commonjs/funcs/destinationsDisable.js.map +1 -1
- package/dist/commonjs/funcs/destinationsEnable.js.map +1 -1
- package/dist/commonjs/funcs/destinationsGet.js.map +1 -1
- package/dist/commonjs/funcs/destinationsGetAttempt.js.map +1 -1
- package/dist/commonjs/funcs/destinationsList.js.map +1 -1
- package/dist/commonjs/funcs/destinationsListAttempts.js.map +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/eventsGet.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.d.ts +2 -0
- package/dist/commonjs/funcs/eventsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +4 -1
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/metricsGetAttemptMetrics.d.ts +28 -0
- package/dist/commonjs/funcs/metricsGetAttemptMetrics.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsGetAttemptMetrics.js +142 -0
- package/dist/commonjs/funcs/metricsGetAttemptMetrics.js.map +1 -0
- package/dist/commonjs/funcs/metricsGetEventMetrics.d.ts +26 -0
- package/dist/commonjs/funcs/metricsGetEventMetrics.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsGetEventMetrics.js +136 -0
- package/dist/commonjs/funcs/metricsGetEventMetrics.js.map +1 -0
- package/dist/commonjs/funcs/publishEvent.d.ts +2 -0
- package/dist/commonjs/funcs/publishEvent.d.ts.map +1 -1
- package/dist/commonjs/funcs/publishEvent.js +3 -1
- package/dist/commonjs/funcs/publishEvent.js.map +1 -1
- package/dist/commonjs/funcs/schemasGetDestinationType.js.map +1 -1
- package/dist/commonjs/funcs/tenantsDelete.js.map +1 -1
- package/dist/commonjs/funcs/tenantsGet.js.map +1 -1
- package/dist/commonjs/funcs/tenantsGetPortalUrl.d.ts +2 -0
- 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 +2 -0
- 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/tenantsList.d.ts +2 -0
- package/dist/commonjs/funcs/tenantsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsList.js +3 -1
- package/dist/commonjs/funcs/tenantsList.js.map +1 -1
- package/dist/commonjs/funcs/tenantsUpsert.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts +1 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +27 -5
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -1
- package/dist/commonjs/lib/files.js +19 -0
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +8 -4
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +19 -8
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.d.ts.map +1 -1
- package/dist/commonjs/lib/url.js +4 -2
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/metricsGetAttemptMetrics.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/metricsGetAttemptMetrics.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/metricsGetAttemptMetrics.js +74 -0
- package/dist/commonjs/mcp-server/tools/metricsGetAttemptMetrics.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/metricsGetEventMetrics.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/metricsGetEventMetrics.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/metricsGetEventMetrics.js +72 -0
- package/dist/commonjs/mcp-server/tools/metricsGetEventMetrics.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/schemasGetDestinationType.d.ts +1 -0
- package/dist/commonjs/mcp-server/tools/schemasGetDestinationType.d.ts.map +1 -1
- package/dist/commonjs/models/components/attempt.d.ts +104 -6
- package/dist/commonjs/models/components/attempt.d.ts.map +1 -1
- package/dist/commonjs/models/components/attempt.js +106 -11
- package/dist/commonjs/models/components/attempt.js.map +1 -1
- package/dist/commonjs/models/components/destinationschemafield.d.ts +26 -0
- package/dist/commonjs/models/components/destinationschemafield.d.ts.map +1 -1
- package/dist/commonjs/models/components/destinationschemafield.js +25 -1
- package/dist/commonjs/models/components/destinationschemafield.js.map +1 -1
- package/dist/commonjs/models/components/event.d.ts +5 -2
- package/dist/commonjs/models/components/event.d.ts.map +1 -1
- package/dist/commonjs/models/components/event.js +4 -4
- package/dist/commonjs/models/components/event.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +3 -2
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -2
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/metricsdatapoint.d.ts +38 -0
- package/dist/commonjs/models/components/metricsdatapoint.d.ts.map +1 -0
- package/dist/commonjs/models/components/{eventsummary.js → metricsdatapoint.js} +18 -31
- package/dist/commonjs/models/components/metricsdatapoint.js.map +1 -0
- package/dist/commonjs/models/components/metricsmetadata.d.ts +40 -0
- package/dist/commonjs/models/components/metricsmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/{eventfull.js → metricsmetadata.js} +26 -33
- package/dist/commonjs/models/components/metricsmetadata.js.map +1 -0
- package/dist/commonjs/models/components/metricsresponse.d.ts +24 -0
- package/dist/commonjs/models/components/metricsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/metricsresponse.js +62 -0
- package/dist/commonjs/models/components/metricsresponse.js.map +1 -0
- package/dist/commonjs/models/operations/getattempt.d.ts +2 -0
- package/dist/commonjs/models/operations/getattempt.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getattempt.js.map +1 -1
- package/dist/commonjs/models/operations/getattemptmetrics.d.ts +273 -0
- package/dist/commonjs/models/operations/getattemptmetrics.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getattemptmetrics.js +326 -0
- package/dist/commonjs/models/operations/getattemptmetrics.js.map +1 -0
- package/dist/commonjs/models/operations/getdestinationtypeschema.d.ts +1 -0
- package/dist/commonjs/models/operations/getdestinationtypeschema.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getdestinationtypeschema.js +1 -0
- package/dist/commonjs/models/operations/getdestinationtypeschema.js.map +1 -1
- package/dist/commonjs/models/operations/geteventmetrics.d.ts +158 -0
- package/dist/commonjs/models/operations/geteventmetrics.d.ts.map +1 -0
- package/dist/commonjs/models/operations/geteventmetrics.js +208 -0
- package/dist/commonjs/models/operations/geteventmetrics.js.map +1 -0
- package/dist/commonjs/models/operations/gettenantdestinationattempt.d.ts +2 -0
- package/dist/commonjs/models/operations/gettenantdestinationattempt.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gettenantdestinationattempt.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listattempts.d.ts +8 -6
- package/dist/commonjs/models/operations/listattempts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listattempts.js +9 -9
- package/dist/commonjs/models/operations/listattempts.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +17 -0
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +17 -1
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts +2 -0
- package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listtenantdestinationattempts.js.map +1 -1
- package/dist/commonjs/sdk/metrics.d.ts +36 -0
- package/dist/commonjs/sdk/metrics.d.ts.map +1 -0
- package/dist/commonjs/sdk/metrics.js +48 -0
- package/dist/commonjs/sdk/metrics.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/attemptsGet.js.map +1 -1
- package/dist/esm/funcs/attemptsList.d.ts +2 -0
- package/dist/esm/funcs/attemptsList.d.ts.map +1 -1
- package/dist/esm/funcs/attemptsList.js +3 -1
- package/dist/esm/funcs/attemptsList.js.map +1 -1
- package/dist/esm/funcs/destinationsCreate.js.map +1 -1
- package/dist/esm/funcs/destinationsDelete.js.map +1 -1
- package/dist/esm/funcs/destinationsDisable.js.map +1 -1
- package/dist/esm/funcs/destinationsEnable.js.map +1 -1
- package/dist/esm/funcs/destinationsGet.js.map +1 -1
- package/dist/esm/funcs/destinationsGetAttempt.js.map +1 -1
- package/dist/esm/funcs/destinationsList.js.map +1 -1
- package/dist/esm/funcs/destinationsListAttempts.js.map +1 -1
- package/dist/esm/funcs/destinationsUpdate.js.map +1 -1
- package/dist/esm/funcs/eventsGet.js.map +1 -1
- package/dist/esm/funcs/eventsList.d.ts +2 -0
- package/dist/esm/funcs/eventsList.d.ts.map +1 -1
- package/dist/esm/funcs/eventsList.js +4 -1
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/metricsGetAttemptMetrics.d.ts +28 -0
- package/dist/esm/funcs/metricsGetAttemptMetrics.d.ts.map +1 -0
- package/dist/esm/funcs/metricsGetAttemptMetrics.js +106 -0
- package/dist/esm/funcs/metricsGetAttemptMetrics.js.map +1 -0
- package/dist/esm/funcs/metricsGetEventMetrics.d.ts +26 -0
- package/dist/esm/funcs/metricsGetEventMetrics.d.ts.map +1 -0
- package/dist/esm/funcs/metricsGetEventMetrics.js +100 -0
- package/dist/esm/funcs/metricsGetEventMetrics.js.map +1 -0
- package/dist/esm/funcs/publishEvent.d.ts +2 -0
- package/dist/esm/funcs/publishEvent.d.ts.map +1 -1
- package/dist/esm/funcs/publishEvent.js +3 -1
- package/dist/esm/funcs/publishEvent.js.map +1 -1
- package/dist/esm/funcs/schemasGetDestinationType.js.map +1 -1
- package/dist/esm/funcs/tenantsDelete.js.map +1 -1
- package/dist/esm/funcs/tenantsGet.js.map +1 -1
- package/dist/esm/funcs/tenantsGetPortalUrl.d.ts +2 -0
- 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 +2 -0
- 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/tenantsList.d.ts +2 -0
- package/dist/esm/funcs/tenantsList.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsList.js +3 -1
- package/dist/esm/funcs/tenantsList.js.map +1 -1
- package/dist/esm/funcs/tenantsUpsert.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts +1 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +26 -5
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -1
- package/dist/esm/lib/files.js +18 -0
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +8 -4
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +19 -8
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.d.ts.map +1 -1
- package/dist/esm/lib/url.js +4 -2
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/metricsGetAttemptMetrics.d.ts +8 -0
- package/dist/esm/mcp-server/tools/metricsGetAttemptMetrics.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/metricsGetAttemptMetrics.js +38 -0
- package/dist/esm/mcp-server/tools/metricsGetAttemptMetrics.js.map +1 -0
- package/dist/esm/mcp-server/tools/metricsGetEventMetrics.d.ts +8 -0
- package/dist/esm/mcp-server/tools/metricsGetEventMetrics.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/metricsGetEventMetrics.js +36 -0
- package/dist/esm/mcp-server/tools/metricsGetEventMetrics.js.map +1 -0
- package/dist/esm/mcp-server/tools/schemasGetDestinationType.d.ts +1 -0
- package/dist/esm/mcp-server/tools/schemasGetDestinationType.d.ts.map +1 -1
- package/dist/esm/models/components/attempt.d.ts +104 -6
- package/dist/esm/models/components/attempt.d.ts.map +1 -1
- package/dist/esm/models/components/attempt.js +101 -10
- package/dist/esm/models/components/attempt.js.map +1 -1
- package/dist/esm/models/components/destinationschemafield.d.ts +26 -0
- package/dist/esm/models/components/destinationschemafield.d.ts.map +1 -1
- package/dist/esm/models/components/destinationschemafield.js +22 -0
- package/dist/esm/models/components/destinationschemafield.js.map +1 -1
- package/dist/esm/models/components/event.d.ts +5 -2
- package/dist/esm/models/components/event.d.ts.map +1 -1
- package/dist/esm/models/components/event.js +4 -4
- package/dist/esm/models/components/event.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +3 -2
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -2
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/metricsdatapoint.d.ts +38 -0
- package/dist/esm/models/components/metricsdatapoint.d.ts.map +1 -0
- package/dist/esm/models/components/metricsdatapoint.js +33 -0
- package/dist/esm/models/components/metricsdatapoint.js.map +1 -0
- package/dist/esm/models/components/metricsmetadata.d.ts +40 -0
- package/dist/esm/models/components/metricsmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/metricsmetadata.js +41 -0
- package/dist/esm/models/components/metricsmetadata.js.map +1 -0
- package/dist/esm/models/components/metricsresponse.d.ts +24 -0
- package/dist/esm/models/components/metricsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/metricsresponse.js +24 -0
- package/dist/esm/models/components/metricsresponse.js.map +1 -0
- package/dist/esm/models/operations/getattempt.d.ts +2 -0
- package/dist/esm/models/operations/getattempt.d.ts.map +1 -1
- package/dist/esm/models/operations/getattempt.js.map +1 -1
- package/dist/esm/models/operations/getattemptmetrics.d.ts +273 -0
- package/dist/esm/models/operations/getattemptmetrics.d.ts.map +1 -0
- package/dist/esm/models/operations/getattemptmetrics.js +272 -0
- package/dist/esm/models/operations/getattemptmetrics.js.map +1 -0
- package/dist/esm/models/operations/getdestinationtypeschema.d.ts +1 -0
- package/dist/esm/models/operations/getdestinationtypeschema.d.ts.map +1 -1
- package/dist/esm/models/operations/getdestinationtypeschema.js +1 -0
- package/dist/esm/models/operations/getdestinationtypeschema.js.map +1 -1
- package/dist/esm/models/operations/geteventmetrics.d.ts +158 -0
- package/dist/esm/models/operations/geteventmetrics.d.ts.map +1 -0
- package/dist/esm/models/operations/geteventmetrics.js +160 -0
- package/dist/esm/models/operations/geteventmetrics.js.map +1 -0
- package/dist/esm/models/operations/gettenantdestinationattempt.d.ts +2 -0
- package/dist/esm/models/operations/gettenantdestinationattempt.d.ts.map +1 -1
- package/dist/esm/models/operations/gettenantdestinationattempt.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listattempts.d.ts +8 -6
- package/dist/esm/models/operations/listattempts.d.ts.map +1 -1
- package/dist/esm/models/operations/listattempts.js +6 -6
- package/dist/esm/models/operations/listattempts.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +17 -0
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +14 -0
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listtenantdestinationattempts.d.ts +2 -0
- package/dist/esm/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
- package/dist/esm/models/operations/listtenantdestinationattempts.js.map +1 -1
- package/dist/esm/sdk/metrics.d.ts +36 -0
- package/dist/esm/sdk/metrics.d.ts.map +1 -0
- package/dist/esm/sdk/metrics.js +44 -0
- package/dist/esm/sdk/metrics.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/attemptsGet.ts +0 -1
- package/src/funcs/attemptsList.ts +3 -1
- package/src/funcs/destinationsCreate.ts +0 -1
- package/src/funcs/destinationsDelete.ts +0 -1
- package/src/funcs/destinationsDisable.ts +0 -1
- package/src/funcs/destinationsEnable.ts +0 -1
- package/src/funcs/destinationsGet.ts +0 -1
- package/src/funcs/destinationsGetAttempt.ts +0 -1
- package/src/funcs/destinationsList.ts +0 -1
- package/src/funcs/destinationsListAttempts.ts +0 -1
- package/src/funcs/destinationsUpdate.ts +0 -1
- package/src/funcs/eventsGet.ts +0 -1
- package/src/funcs/eventsList.ts +4 -1
- package/src/funcs/metricsGetAttemptMetrics.ts +206 -0
- package/src/funcs/metricsGetEventMetrics.ts +200 -0
- package/src/funcs/publishEvent.ts +3 -1
- package/src/funcs/schemasGetDestinationType.ts +0 -1
- package/src/funcs/tenantsDelete.ts +0 -1
- package/src/funcs/tenantsGet.ts +0 -1
- package/src/funcs/tenantsGetPortalUrl.ts +3 -2
- package/src/funcs/tenantsGetToken.ts +3 -2
- package/src/funcs/tenantsList.ts +3 -1
- package/src/funcs/tenantsUpsert.ts +0 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +32 -4
- package/src/lib/files.ts +22 -0
- package/src/lib/sdks.ts +7 -5
- package/src/lib/security.ts +14 -2
- package/src/lib/url.ts +16 -14
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/metricsGetAttemptMetrics.ts +47 -0
- package/src/mcp-server/tools/metricsGetEventMetrics.ts +45 -0
- package/src/models/components/attempt.ts +224 -23
- package/src/models/components/destinationschemafield.ts +55 -0
- package/src/models/components/event.ts +9 -6
- package/src/models/components/index.ts +3 -2
- package/src/models/components/metricsdatapoint.ts +79 -0
- package/src/models/components/metricsmetadata.ts +93 -0
- package/src/models/components/metricsresponse.ts +68 -0
- package/src/models/operations/getattempt.ts +2 -0
- package/src/models/operations/getattemptmetrics.ts +668 -0
- package/src/models/operations/getdestinationtypeschema.ts +1 -0
- package/src/models/operations/geteventmetrics.ts +434 -0
- package/src/models/operations/gettenantdestinationattempt.ts +2 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listattempts.ts +19 -13
- package/src/models/operations/listevents.ts +47 -0
- package/src/models/operations/listtenantdestinationattempts.ts +2 -0
- package/src/sdk/metrics.ts +62 -0
- package/src/sdk/sdk.ts +6 -0
- package/dist/commonjs/models/components/eventfull.d.ts +0 -57
- package/dist/commonjs/models/components/eventfull.d.ts.map +0 -1
- package/dist/commonjs/models/components/eventfull.js.map +0 -1
- package/dist/commonjs/models/components/eventsummary.d.ts +0 -48
- package/dist/commonjs/models/components/eventsummary.d.ts.map +0 -1
- package/dist/commonjs/models/components/eventsummary.js.map +0 -1
- package/dist/esm/models/components/eventfull.d.ts +0 -57
- package/dist/esm/models/components/eventfull.d.ts.map +0 -1
- package/dist/esm/models/components/eventfull.js +0 -48
- package/dist/esm/models/components/eventfull.js.map +0 -1
- package/dist/esm/models/components/eventsummary.d.ts +0 -48
- package/dist/esm/models/components/eventsummary.d.ts.map +0 -1
- package/dist/esm/models/components/eventsummary.js +0 -46
- package/dist/esm/models/components/eventsummary.js.map +0 -1
- package/src/models/components/eventfull.ts +0 -107
- package/src/models/components/eventsummary.ts +0 -100
package/src/lib/url.ts
CHANGED
|
@@ -13,21 +13,23 @@ export function pathToFunc(
|
|
|
13
13
|
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
-
return pathPattern
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return pathPattern
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
32
34
|
};
|
|
33
35
|
}
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -28,6 +28,8 @@ import { tool$destinationsUpdate } from "./tools/destinationsUpdate.js";
|
|
|
28
28
|
import { tool$eventsGet } from "./tools/eventsGet.js";
|
|
29
29
|
import { tool$eventsList } from "./tools/eventsList.js";
|
|
30
30
|
import { tool$healthCheck } from "./tools/healthCheck.js";
|
|
31
|
+
import { tool$metricsGetAttemptMetrics } from "./tools/metricsGetAttemptMetrics.js";
|
|
32
|
+
import { tool$metricsGetEventMetrics } from "./tools/metricsGetEventMetrics.js";
|
|
31
33
|
import { tool$publishEvent } from "./tools/publishEvent.js";
|
|
32
34
|
import { tool$schemasGetDestinationType } from "./tools/schemasGetDestinationType.js";
|
|
33
35
|
import { tool$schemasListDestinationTypes } from "./tools/schemasListDestinationTypes.js";
|
|
@@ -49,7 +51,7 @@ export function createMCPServer(deps: {
|
|
|
49
51
|
}) {
|
|
50
52
|
const server = new McpServer({
|
|
51
53
|
name: "Outpost",
|
|
52
|
-
version: "0.
|
|
54
|
+
version: "0.10.0",
|
|
53
55
|
});
|
|
54
56
|
|
|
55
57
|
const client = new OutpostCore({
|
|
@@ -104,6 +106,8 @@ export function createMCPServer(deps: {
|
|
|
104
106
|
tool(tool$schemasListDestinationTypes);
|
|
105
107
|
tool(tool$schemasGetDestinationType);
|
|
106
108
|
tool(tool$topicsList);
|
|
109
|
+
tool(tool$metricsGetEventMetrics);
|
|
110
|
+
tool(tool$metricsGetAttemptMetrics);
|
|
107
111
|
|
|
108
112
|
return server;
|
|
109
113
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { metricsGetAttemptMetrics } from "../../funcs/metricsGetAttemptMetrics.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetAttemptMetricsRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$metricsGetAttemptMetrics: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "metrics-get-attempt-metrics",
|
|
15
|
+
description: `Get Attempt Metrics
|
|
16
|
+
|
|
17
|
+
Returns aggregated delivery attempt metrics. Supports time bucketing via granularity,
|
|
18
|
+
dimensional grouping, and filtering.
|
|
19
|
+
|
|
20
|
+
**Measures:** \`count\`, \`successful_count\`, \`failed_count\`, \`error_rate\`,
|
|
21
|
+
\`first_attempt_count\`, \`retry_count\`, \`manual_retry_count\`, \`avg_attempt_number\`,
|
|
22
|
+
\`rate\`, \`successful_rate\`, \`failed_rate\`
|
|
23
|
+
|
|
24
|
+
**Dimensions:** \`tenant_id\` (admin-only), \`destination_id\`, \`topic\`, \`status\`, \`code\`, \`manual\`, \`attempt_number\`
|
|
25
|
+
|
|
26
|
+
**Filters:** \`tenant_id\` (admin-only), \`destination_id\`, \`topic\`, \`status\`, \`code\`, \`manual\`, \`attempt_number\`
|
|
27
|
+
`,
|
|
28
|
+
args,
|
|
29
|
+
tool: async (client, args, ctx) => {
|
|
30
|
+
const [result, apiCall] = await metricsGetAttemptMetrics(
|
|
31
|
+
client,
|
|
32
|
+
args.request,
|
|
33
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
34
|
+
).$inspect();
|
|
35
|
+
|
|
36
|
+
if (!result.ok) {
|
|
37
|
+
return {
|
|
38
|
+
content: [{ type: "text", text: result.error.message }],
|
|
39
|
+
isError: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const value = result.value;
|
|
44
|
+
|
|
45
|
+
return formatResult(value, apiCall);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { metricsGetEventMetrics } from "../../funcs/metricsGetEventMetrics.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetEventMetricsRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$metricsGetEventMetrics: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "metrics-get-event-metrics",
|
|
15
|
+
description: `Get Event Metrics
|
|
16
|
+
|
|
17
|
+
Returns aggregated event publish metrics. Supports time bucketing via granularity,
|
|
18
|
+
dimensional grouping, and filtering.
|
|
19
|
+
|
|
20
|
+
**Measures:** \`count\`, \`rate\`
|
|
21
|
+
|
|
22
|
+
**Dimensions:** \`tenant_id\` (admin-only), \`topic\`, \`destination_id\`
|
|
23
|
+
|
|
24
|
+
**Filters:** \`tenant_id\` (admin-only), \`topic\`, \`destination_id\`
|
|
25
|
+
`,
|
|
26
|
+
args,
|
|
27
|
+
tool: async (client, args, ctx) => {
|
|
28
|
+
const [result, apiCall] = await metricsGetEventMetrics(
|
|
29
|
+
client,
|
|
30
|
+
args.request,
|
|
31
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
32
|
+
).$inspect();
|
|
33
|
+
|
|
34
|
+
if (!result.ok) {
|
|
35
|
+
return {
|
|
36
|
+
content: [{ type: "text", text: result.error.message }],
|
|
37
|
+
isError: true,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const value = result.value;
|
|
42
|
+
|
|
43
|
+
return formatResult(value, apiCall);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -9,17 +9,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
17
|
-
import {
|
|
18
|
-
EventSummary,
|
|
19
|
-
EventSummary$inboundSchema,
|
|
20
|
-
EventSummary$Outbound,
|
|
21
|
-
EventSummary$outboundSchema,
|
|
22
|
-
} from "./eventsummary.js";
|
|
12
|
+
Destination,
|
|
13
|
+
Destination$inboundSchema,
|
|
14
|
+
Destination$Outbound,
|
|
15
|
+
Destination$outboundSchema,
|
|
16
|
+
} from "./destination.js";
|
|
23
17
|
|
|
24
18
|
/**
|
|
25
19
|
* The attempt status.
|
|
@@ -33,6 +27,60 @@ export const Status = {
|
|
|
33
27
|
*/
|
|
34
28
|
export type Status = ClosedEnum<typeof Status>;
|
|
35
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Full event object with data (returned when include=event.data).
|
|
32
|
+
*/
|
|
33
|
+
export type EventFull = {
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The tenant this event belongs to.
|
|
37
|
+
*/
|
|
38
|
+
tenantId?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The destination this event was delivered to.
|
|
41
|
+
*/
|
|
42
|
+
destinationId?: string | undefined;
|
|
43
|
+
topic?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Time the event was received.
|
|
46
|
+
*/
|
|
47
|
+
time?: Date | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Whether this event can be retried.
|
|
50
|
+
*/
|
|
51
|
+
eligibleForRetry?: boolean | undefined;
|
|
52
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The event payload data.
|
|
55
|
+
*/
|
|
56
|
+
data?: { [k: string]: any } | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Event object without data (returned when include=event).
|
|
61
|
+
*/
|
|
62
|
+
export type EventSummary = {
|
|
63
|
+
id?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* The tenant this event belongs to.
|
|
66
|
+
*/
|
|
67
|
+
tenantId?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The destination this event was delivered to.
|
|
70
|
+
*/
|
|
71
|
+
destinationId?: string | undefined;
|
|
72
|
+
topic?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Time the event was received.
|
|
75
|
+
*/
|
|
76
|
+
time?: Date | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Whether this event can be retried.
|
|
79
|
+
*/
|
|
80
|
+
eligibleForRetry?: boolean | undefined;
|
|
81
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
82
|
+
};
|
|
83
|
+
|
|
36
84
|
/**
|
|
37
85
|
* The associated event object. Only present when include=event or include=event.data.
|
|
38
86
|
*/
|
|
@@ -65,7 +113,7 @@ export type Attempt = {
|
|
|
65
113
|
/**
|
|
66
114
|
* Response data from the attempt. Only included when include=response_data.
|
|
67
115
|
*/
|
|
68
|
-
responseData?: { [k: string]: any } | undefined;
|
|
116
|
+
responseData?: { [k: string]: any } | null | undefined;
|
|
69
117
|
/**
|
|
70
118
|
* The attempt number (1 for first attempt, 2+ for retries).
|
|
71
119
|
*/
|
|
@@ -85,7 +133,8 @@ export type Attempt = {
|
|
|
85
133
|
/**
|
|
86
134
|
* The associated event object. Only present when include=event or include=event.data.
|
|
87
135
|
*/
|
|
88
|
-
event?: EventSummary | EventFull | undefined;
|
|
136
|
+
event?: EventSummary | EventFull | null | undefined;
|
|
137
|
+
destination?: Destination | undefined;
|
|
89
138
|
};
|
|
90
139
|
|
|
91
140
|
/** @internal */
|
|
@@ -95,12 +144,150 @@ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
|
95
144
|
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
|
|
96
145
|
Status$inboundSchema;
|
|
97
146
|
|
|
147
|
+
/** @internal */
|
|
148
|
+
export const EventFull$inboundSchema: z.ZodType<
|
|
149
|
+
EventFull,
|
|
150
|
+
z.ZodTypeDef,
|
|
151
|
+
unknown
|
|
152
|
+
> = z.object({
|
|
153
|
+
id: z.string().optional(),
|
|
154
|
+
tenant_id: z.string().optional(),
|
|
155
|
+
destination_id: z.string().optional(),
|
|
156
|
+
topic: z.string().optional(),
|
|
157
|
+
time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
158
|
+
.optional(),
|
|
159
|
+
eligible_for_retry: z.boolean().optional(),
|
|
160
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
161
|
+
data: z.record(z.any()).optional(),
|
|
162
|
+
}).transform((v) => {
|
|
163
|
+
return remap$(v, {
|
|
164
|
+
"tenant_id": "tenantId",
|
|
165
|
+
"destination_id": "destinationId",
|
|
166
|
+
"eligible_for_retry": "eligibleForRetry",
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type EventFull$Outbound = {
|
|
171
|
+
id?: string | undefined;
|
|
172
|
+
tenant_id?: string | undefined;
|
|
173
|
+
destination_id?: string | undefined;
|
|
174
|
+
topic?: string | undefined;
|
|
175
|
+
time?: string | undefined;
|
|
176
|
+
eligible_for_retry?: boolean | undefined;
|
|
177
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
178
|
+
data?: { [k: string]: any } | undefined;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export const EventFull$outboundSchema: z.ZodType<
|
|
183
|
+
EventFull$Outbound,
|
|
184
|
+
z.ZodTypeDef,
|
|
185
|
+
EventFull
|
|
186
|
+
> = z.object({
|
|
187
|
+
id: z.string().optional(),
|
|
188
|
+
tenantId: z.string().optional(),
|
|
189
|
+
destinationId: z.string().optional(),
|
|
190
|
+
topic: z.string().optional(),
|
|
191
|
+
time: z.date().transform(v => v.toISOString()).optional(),
|
|
192
|
+
eligibleForRetry: z.boolean().optional(),
|
|
193
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
194
|
+
data: z.record(z.any()).optional(),
|
|
195
|
+
}).transform((v) => {
|
|
196
|
+
return remap$(v, {
|
|
197
|
+
tenantId: "tenant_id",
|
|
198
|
+
destinationId: "destination_id",
|
|
199
|
+
eligibleForRetry: "eligible_for_retry",
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
export function eventFullToJSON(eventFull: EventFull): string {
|
|
204
|
+
return JSON.stringify(EventFull$outboundSchema.parse(eventFull));
|
|
205
|
+
}
|
|
206
|
+
export function eventFullFromJSON(
|
|
207
|
+
jsonString: string,
|
|
208
|
+
): SafeParseResult<EventFull, SDKValidationError> {
|
|
209
|
+
return safeParse(
|
|
210
|
+
jsonString,
|
|
211
|
+
(x) => EventFull$inboundSchema.parse(JSON.parse(x)),
|
|
212
|
+
`Failed to parse 'EventFull' from JSON`,
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const EventSummary$inboundSchema: z.ZodType<
|
|
218
|
+
EventSummary,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
unknown
|
|
221
|
+
> = z.object({
|
|
222
|
+
id: z.string().optional(),
|
|
223
|
+
tenant_id: z.string().optional(),
|
|
224
|
+
destination_id: z.string().optional(),
|
|
225
|
+
topic: z.string().optional(),
|
|
226
|
+
time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
227
|
+
.optional(),
|
|
228
|
+
eligible_for_retry: z.boolean().optional(),
|
|
229
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
230
|
+
}).transform((v) => {
|
|
231
|
+
return remap$(v, {
|
|
232
|
+
"tenant_id": "tenantId",
|
|
233
|
+
"destination_id": "destinationId",
|
|
234
|
+
"eligible_for_retry": "eligibleForRetry",
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
/** @internal */
|
|
238
|
+
export type EventSummary$Outbound = {
|
|
239
|
+
id?: string | undefined;
|
|
240
|
+
tenant_id?: string | undefined;
|
|
241
|
+
destination_id?: string | undefined;
|
|
242
|
+
topic?: string | undefined;
|
|
243
|
+
time?: string | undefined;
|
|
244
|
+
eligible_for_retry?: boolean | undefined;
|
|
245
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const EventSummary$outboundSchema: z.ZodType<
|
|
250
|
+
EventSummary$Outbound,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
EventSummary
|
|
253
|
+
> = z.object({
|
|
254
|
+
id: z.string().optional(),
|
|
255
|
+
tenantId: z.string().optional(),
|
|
256
|
+
destinationId: z.string().optional(),
|
|
257
|
+
topic: z.string().optional(),
|
|
258
|
+
time: z.date().transform(v => v.toISOString()).optional(),
|
|
259
|
+
eligibleForRetry: z.boolean().optional(),
|
|
260
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
261
|
+
}).transform((v) => {
|
|
262
|
+
return remap$(v, {
|
|
263
|
+
tenantId: "tenant_id",
|
|
264
|
+
destinationId: "destination_id",
|
|
265
|
+
eligibleForRetry: "eligible_for_retry",
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
export function eventSummaryToJSON(eventSummary: EventSummary): string {
|
|
270
|
+
return JSON.stringify(EventSummary$outboundSchema.parse(eventSummary));
|
|
271
|
+
}
|
|
272
|
+
export function eventSummaryFromJSON(
|
|
273
|
+
jsonString: string,
|
|
274
|
+
): SafeParseResult<EventSummary, SDKValidationError> {
|
|
275
|
+
return safeParse(
|
|
276
|
+
jsonString,
|
|
277
|
+
(x) => EventSummary$inboundSchema.parse(JSON.parse(x)),
|
|
278
|
+
`Failed to parse 'EventSummary' from JSON`,
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
98
282
|
/** @internal */
|
|
99
283
|
export const EventUnion$inboundSchema: z.ZodType<
|
|
100
284
|
EventUnion,
|
|
101
285
|
z.ZodTypeDef,
|
|
102
286
|
unknown
|
|
103
|
-
> = z.union([
|
|
287
|
+
> = z.union([
|
|
288
|
+
z.lazy(() => EventSummary$inboundSchema),
|
|
289
|
+
z.lazy(() => EventFull$inboundSchema),
|
|
290
|
+
]);
|
|
104
291
|
/** @internal */
|
|
105
292
|
export type EventUnion$Outbound = EventSummary$Outbound | EventFull$Outbound;
|
|
106
293
|
|
|
@@ -109,7 +296,10 @@ export const EventUnion$outboundSchema: z.ZodType<
|
|
|
109
296
|
EventUnion$Outbound,
|
|
110
297
|
z.ZodTypeDef,
|
|
111
298
|
EventUnion
|
|
112
|
-
> = z.union([
|
|
299
|
+
> = z.union([
|
|
300
|
+
z.lazy(() => EventSummary$outboundSchema),
|
|
301
|
+
z.lazy(() => EventFull$outboundSchema),
|
|
302
|
+
]);
|
|
113
303
|
|
|
114
304
|
export function eventUnionToJSON(eventUnion: EventUnion): string {
|
|
115
305
|
return JSON.stringify(EventUnion$outboundSchema.parse(eventUnion));
|
|
@@ -133,13 +323,18 @@ export const Attempt$inboundSchema: z.ZodType<Attempt, z.ZodTypeDef, unknown> =
|
|
|
133
323
|
time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
134
324
|
.optional(),
|
|
135
325
|
code: z.string().optional(),
|
|
136
|
-
response_data: z.record(z.any()).optional(),
|
|
326
|
+
response_data: z.nullable(z.record(z.any())).optional(),
|
|
137
327
|
attempt_number: z.number().int().optional(),
|
|
138
328
|
manual: z.boolean().optional(),
|
|
139
329
|
event_id: z.string().optional(),
|
|
140
330
|
destination_id: z.string().optional(),
|
|
141
|
-
event: z.
|
|
142
|
-
.
|
|
331
|
+
event: z.nullable(
|
|
332
|
+
z.union([
|
|
333
|
+
z.lazy(() => EventSummary$inboundSchema),
|
|
334
|
+
z.lazy(() => EventFull$inboundSchema),
|
|
335
|
+
]),
|
|
336
|
+
).optional(),
|
|
337
|
+
destination: Destination$inboundSchema.optional(),
|
|
143
338
|
}).transform((v) => {
|
|
144
339
|
return remap$(v, {
|
|
145
340
|
"tenant_id": "tenantId",
|
|
@@ -156,12 +351,13 @@ export type Attempt$Outbound = {
|
|
|
156
351
|
status?: string | undefined;
|
|
157
352
|
time?: string | undefined;
|
|
158
353
|
code?: string | undefined;
|
|
159
|
-
response_data?: { [k: string]: any } | undefined;
|
|
354
|
+
response_data?: { [k: string]: any } | null | undefined;
|
|
160
355
|
attempt_number?: number | undefined;
|
|
161
356
|
manual?: boolean | undefined;
|
|
162
357
|
event_id?: string | undefined;
|
|
163
358
|
destination_id?: string | undefined;
|
|
164
|
-
event?: EventSummary$Outbound | EventFull$Outbound | undefined;
|
|
359
|
+
event?: EventSummary$Outbound | EventFull$Outbound | null | undefined;
|
|
360
|
+
destination?: Destination$Outbound | undefined;
|
|
165
361
|
};
|
|
166
362
|
|
|
167
363
|
/** @internal */
|
|
@@ -175,13 +371,18 @@ export const Attempt$outboundSchema: z.ZodType<
|
|
|
175
371
|
status: Status$outboundSchema.optional(),
|
|
176
372
|
time: z.date().transform(v => v.toISOString()).optional(),
|
|
177
373
|
code: z.string().optional(),
|
|
178
|
-
responseData: z.record(z.any()).optional(),
|
|
374
|
+
responseData: z.nullable(z.record(z.any())).optional(),
|
|
179
375
|
attemptNumber: z.number().int().optional(),
|
|
180
376
|
manual: z.boolean().optional(),
|
|
181
377
|
eventId: z.string().optional(),
|
|
182
378
|
destinationId: z.string().optional(),
|
|
183
|
-
event: z.
|
|
184
|
-
.
|
|
379
|
+
event: z.nullable(
|
|
380
|
+
z.union([
|
|
381
|
+
z.lazy(() => EventSummary$outboundSchema),
|
|
382
|
+
z.lazy(() => EventFull$outboundSchema),
|
|
383
|
+
]),
|
|
384
|
+
).optional(),
|
|
385
|
+
destination: Destination$outboundSchema.optional(),
|
|
185
386
|
}).transform((v) => {
|
|
186
387
|
return remap$(v, {
|
|
187
388
|
tenantId: "tenant_id",
|
|
@@ -12,10 +12,20 @@ export const TypeEnum = {
|
|
|
12
12
|
Text: "text",
|
|
13
13
|
Checkbox: "checkbox",
|
|
14
14
|
KeyValueMap: "key_value_map",
|
|
15
|
+
Select: "select",
|
|
15
16
|
} as const;
|
|
16
17
|
export type TypeEnum = ClosedEnum<typeof TypeEnum>;
|
|
17
18
|
|
|
19
|
+
export type Option = {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
18
24
|
export type DestinationSchemaField = {
|
|
25
|
+
/**
|
|
26
|
+
* The config key used to store and retrieve the field value. Matches the key in the destination's config or credentials object.
|
|
27
|
+
*/
|
|
28
|
+
key: string;
|
|
19
29
|
type: TypeEnum;
|
|
20
30
|
label?: string | undefined;
|
|
21
31
|
description?: string | undefined;
|
|
@@ -40,6 +50,10 @@ export type DestinationSchemaField = {
|
|
|
40
50
|
* Regex pattern for validation (compatible with HTML5 pattern attribute).
|
|
41
51
|
*/
|
|
42
52
|
pattern?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Available options for select fields.
|
|
55
|
+
*/
|
|
56
|
+
options?: Array<Option> | undefined;
|
|
43
57
|
};
|
|
44
58
|
|
|
45
59
|
/** @internal */
|
|
@@ -49,12 +63,48 @@ export const TypeEnum$inboundSchema: z.ZodNativeEnum<typeof TypeEnum> = z
|
|
|
49
63
|
export const TypeEnum$outboundSchema: z.ZodNativeEnum<typeof TypeEnum> =
|
|
50
64
|
TypeEnum$inboundSchema;
|
|
51
65
|
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const Option$inboundSchema: z.ZodType<Option, z.ZodTypeDef, unknown> = z
|
|
68
|
+
.object({
|
|
69
|
+
label: z.string(),
|
|
70
|
+
value: z.string(),
|
|
71
|
+
});
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type Option$Outbound = {
|
|
74
|
+
label: string;
|
|
75
|
+
value: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const Option$outboundSchema: z.ZodType<
|
|
80
|
+
Option$Outbound,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
Option
|
|
83
|
+
> = z.object({
|
|
84
|
+
label: z.string(),
|
|
85
|
+
value: z.string(),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function optionToJSON(option: Option): string {
|
|
89
|
+
return JSON.stringify(Option$outboundSchema.parse(option));
|
|
90
|
+
}
|
|
91
|
+
export function optionFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<Option, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => Option$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'Option' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
52
101
|
/** @internal */
|
|
53
102
|
export const DestinationSchemaField$inboundSchema: z.ZodType<
|
|
54
103
|
DestinationSchemaField,
|
|
55
104
|
z.ZodTypeDef,
|
|
56
105
|
unknown
|
|
57
106
|
> = z.object({
|
|
107
|
+
key: z.string(),
|
|
58
108
|
type: TypeEnum$inboundSchema,
|
|
59
109
|
label: z.string().optional(),
|
|
60
110
|
description: z.string().optional(),
|
|
@@ -64,9 +114,11 @@ export const DestinationSchemaField$inboundSchema: z.ZodType<
|
|
|
64
114
|
minlength: z.number().int().optional(),
|
|
65
115
|
maxlength: z.number().int().optional(),
|
|
66
116
|
pattern: z.string().optional(),
|
|
117
|
+
options: z.array(z.lazy(() => Option$inboundSchema)).optional(),
|
|
67
118
|
});
|
|
68
119
|
/** @internal */
|
|
69
120
|
export type DestinationSchemaField$Outbound = {
|
|
121
|
+
key: string;
|
|
70
122
|
type: string;
|
|
71
123
|
label?: string | undefined;
|
|
72
124
|
description?: string | undefined;
|
|
@@ -76,6 +128,7 @@ export type DestinationSchemaField$Outbound = {
|
|
|
76
128
|
minlength?: number | undefined;
|
|
77
129
|
maxlength?: number | undefined;
|
|
78
130
|
pattern?: string | undefined;
|
|
131
|
+
options?: Array<Option$Outbound> | undefined;
|
|
79
132
|
};
|
|
80
133
|
|
|
81
134
|
/** @internal */
|
|
@@ -84,6 +137,7 @@ export const DestinationSchemaField$outboundSchema: z.ZodType<
|
|
|
84
137
|
z.ZodTypeDef,
|
|
85
138
|
DestinationSchemaField
|
|
86
139
|
> = z.object({
|
|
140
|
+
key: z.string(),
|
|
87
141
|
type: TypeEnum$outboundSchema,
|
|
88
142
|
label: z.string().optional(),
|
|
89
143
|
description: z.string().optional(),
|
|
@@ -93,6 +147,7 @@ export const DestinationSchemaField$outboundSchema: z.ZodType<
|
|
|
93
147
|
minlength: z.number().int().optional(),
|
|
94
148
|
maxlength: z.number().int().optional(),
|
|
95
149
|
pattern: z.string().optional(),
|
|
150
|
+
options: z.array(z.lazy(() => Option$outboundSchema)).optional(),
|
|
96
151
|
});
|
|
97
152
|
|
|
98
153
|
export function destinationSchemaFieldToJSON(
|
|
@@ -14,7 +14,10 @@ export type Event = {
|
|
|
14
14
|
* The tenant this event belongs to.
|
|
15
15
|
*/
|
|
16
16
|
tenantId?: string | undefined;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The destination IDs that this event was routed to based on topic and filter matching.
|
|
19
|
+
*/
|
|
20
|
+
matchedDestinationIds?: Array<string> | undefined;
|
|
18
21
|
topic?: string | undefined;
|
|
19
22
|
/**
|
|
20
23
|
* Time the event was received/processed.
|
|
@@ -35,7 +38,7 @@ export const Event$inboundSchema: z.ZodType<Event, z.ZodTypeDef, unknown> = z
|
|
|
35
38
|
.object({
|
|
36
39
|
id: z.string().optional(),
|
|
37
40
|
tenant_id: z.string().optional(),
|
|
38
|
-
|
|
41
|
+
matched_destination_ids: z.array(z.string()).optional(),
|
|
39
42
|
topic: z.string().optional(),
|
|
40
43
|
time: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
41
44
|
.optional(),
|
|
@@ -44,14 +47,14 @@ export const Event$inboundSchema: z.ZodType<Event, z.ZodTypeDef, unknown> = z
|
|
|
44
47
|
}).transform((v) => {
|
|
45
48
|
return remap$(v, {
|
|
46
49
|
"tenant_id": "tenantId",
|
|
47
|
-
"
|
|
50
|
+
"matched_destination_ids": "matchedDestinationIds",
|
|
48
51
|
});
|
|
49
52
|
});
|
|
50
53
|
/** @internal */
|
|
51
54
|
export type Event$Outbound = {
|
|
52
55
|
id?: string | undefined;
|
|
53
56
|
tenant_id?: string | undefined;
|
|
54
|
-
|
|
57
|
+
matched_destination_ids?: Array<string> | undefined;
|
|
55
58
|
topic?: string | undefined;
|
|
56
59
|
time?: string | undefined;
|
|
57
60
|
metadata?: { [k: string]: string } | null | undefined;
|
|
@@ -66,7 +69,7 @@ export const Event$outboundSchema: z.ZodType<
|
|
|
66
69
|
> = z.object({
|
|
67
70
|
id: z.string().optional(),
|
|
68
71
|
tenantId: z.string().optional(),
|
|
69
|
-
|
|
72
|
+
matchedDestinationIds: z.array(z.string()).optional(),
|
|
70
73
|
topic: z.string().optional(),
|
|
71
74
|
time: z.date().transform(v => v.toISOString()).optional(),
|
|
72
75
|
metadata: z.nullable(z.record(z.string())).optional(),
|
|
@@ -74,7 +77,7 @@ export const Event$outboundSchema: z.ZodType<
|
|
|
74
77
|
}).transform((v) => {
|
|
75
78
|
return remap$(v, {
|
|
76
79
|
tenantId: "tenant_id",
|
|
77
|
-
|
|
80
|
+
matchedDestinationIds: "matched_destination_ids",
|
|
78
81
|
});
|
|
79
82
|
});
|
|
80
83
|
|
|
@@ -43,12 +43,13 @@ export * from "./destinationupdaterabbitmq.js";
|
|
|
43
43
|
export * from "./destinationupdatewebhook.js";
|
|
44
44
|
export * from "./destinationwebhook.js";
|
|
45
45
|
export * from "./event.js";
|
|
46
|
-
export * from "./eventfull.js";
|
|
47
46
|
export * from "./eventpaginatedresult.js";
|
|
48
|
-
export * from "./eventsummary.js";
|
|
49
47
|
export * from "./gcppubsubconfig.js";
|
|
50
48
|
export * from "./gcppubsubcredentials.js";
|
|
51
49
|
export * from "./hookdeckcredentials.js";
|
|
50
|
+
export * from "./metricsdatapoint.js";
|
|
51
|
+
export * from "./metricsmetadata.js";
|
|
52
|
+
export * from "./metricsresponse.js";
|
|
52
53
|
export * from "./portalredirect.js";
|
|
53
54
|
export * from "./publishrequest.js";
|
|
54
55
|
export * from "./publishresponse.js";
|