NaughtBot API
Published external API contracts and generated clients for NaughtBot core
services.
This repository is generated from NaughtBot/core release tags matching
api/vX.Y.Z. Versioned snapshots are available through this repository's git
tags as vX.Y.Z.
OpenAPI specs
openapi/auth.yaml
openapi/mailbox.yaml
openapi/blob.yaml
openapi/push.yaml
openapi/verify.yaml
openapi/shared.yaml
Only public external API contracts are published here. Internal
service-to-service specs, service code, and infrastructure files remain in
NaughtBot/core. openapi/shared.yaml publishes cross-client protocol schemas
such as the v1 mailbox envelope and captcha approval binding.
Swift
Add the package to SwiftPM:
.package(url: "https://github.com/NaughtBot/api", exact: "0.21.0")
Products:
NaughtBotAuthClient
NaughtBotMailboxClient
NaughtBotBlobClient
NaughtBotPushClient
NaughtBotVerifyClient
NaughtBotProtocolTypes
The Swift products use Apple's Swift OpenAPI Generator build plugin; generated
Swift sources are produced during swift build.
Go
go get github.com/naughtbot/api@v0.21.0
Import paths:
github.com/naughtbot/api/auth
github.com/naughtbot/api/mailbox
github.com/naughtbot/api/blob
github.com/naughtbot/api/push
github.com/naughtbot/api/verify
github.com/naughtbot/api/protocol
TypeScript
npm install @naughtbot/auth-client @naughtbot/mailbox-client @naughtbot/blob-client @naughtbot/push-client @naughtbot/verify-client @naughtbot/protocol-types
Packages:
@naughtbot/auth-client
@naughtbot/mailbox-client
@naughtbot/blob-client
@naughtbot/push-client
@naughtbot/verify-client
@naughtbot/protocol-types
The *-client packages expose generated OpenAPI types and a typed
openapi-fetch client factory. @naughtbot/protocol-types exposes generated
shared schema types for mailbox envelopes and approval bindings.
npm trusted publishing
Configure trusted publishing on npmjs.com for each package with owner
NaughtBot, repository api, and workflow .github/workflows/publish-npm.yml,
then set the GitHub repository variable NPM_TRUSTED_PUBLISHING_ENABLED=true.
Publish releases from tagged commits through GitHub Actions: push an
api/vX.Y.Z source tag in NaughtBot/core so the API snapshot is generated,
then let this repository's vX.Y.Z tag run publish-npm. For the first version
of a new package, npm may require a one-time human publish before trusted
publishing can be configured for that package name.
License
The OpenAPI specifications and generated clients in this repository are
licensed under the Apache License, Version 2.0. See LICENSE.