1.0.0 • Published 6 months ago

adonis-passkit-webservice v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Adonis Passkit WebService

Integrate Apple Wallet Web services in your current AdonisJS integration.

Architecture

Adonis Passkit Webservice, as the name says, wraps Apple Wallet specifications into an Adonis js integration.

It exposes a set of routing groups 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.

Everything is designed to provide a good developer experience. It is fully compatible with Typescript.

This package is an integration of passkit-webservice-toolkit. Visit it for other integrations.

Installation

$ npm install adonis-passkit-webservice

API Documentation

All the details are available in the project wiki.


Usage example

All the exposed routes work like this:

/** src/start/routes.ts */
import router from "@adonisjs/core/services/router";

router.group(
	(await import("adonis-passkit-webservice/v1/registration.js")).default({
		async onRegister(
			deviceLibraryIdentifier,
			passTypeIdentifier,
			serialNumber,
			pushToken,
		) {
			/** Your implementation */
		},
		async onUnregister(
			deviceLibraryIdentifier,
			passTypeIdentifier,
			serialNumber,
		) {
			/** Your implementation */
		},
		async tokenVerifier(token) {
			/** Your implementation */
			return true;
		},
	}),
);