express-passkit-webservice
Version:
Express.js integration for Apple Wallet web services
52 lines (32 loc) • 1.5 kB
Markdown
Integrate Apple Wallet Web services in your current Express Js integration.
Express Passkit Webservice, as the name says, wraps Apple Wallet specifications into a Express js integration.
It exposes a set of middlewares / routes that will let yourself to dedicate exclusively to the integration of the business logic.
Each plugin represents a subscription to an endpoint defined in [Apple Wallet Developer Documentation](https://developer.apple.com/documentation/walletpasses/adding_a_web_service_to_update_passes).
Everything is designed to provide a good developer experience. It is fully compatible with Typescript.
This package is an integration of [passkit-webservice-toolkit](https://github.com/alexandercerutti/passkit-webservice-toolkit). Visit it for other integrations.
Both Express v4 and v5 are supported.
```sh
$ npm install express-passkit-webservice
```
---
All the details are available in the project wiki.
---
All the exposed middlewares work like this:
```js
import express from "express";
import registrationRouter from "express-passkit-webservice/v1/registration.js";
const app = express();
app.use(registrationRouter({
async onRegister(deviceLibraryIdentifier, passTypeIdentifier, serialNumber, pushToken) {
/** your implementation */
}
async onUnregister(deviceLibraryIdentifier, passTypeIdentifier, serialNumber) {
/** your implementation */
}
}));
```