UNPKG

@basetime/a2w-api-ts

Version:

Client library that communicates with the addtowallet API.

28 lines (27 loc) 783 B
import { Template } from 'passkit-generator/lib/schemas'; import { TemplateThumbnail } from '../types/TemplateThumbnail'; import Endpoint from './Endpoint'; /** * Communicate with the templates endpoints. */ export default class TemplatesEndpoint extends Endpoint { /** * Returns a template by ID. * * @param id The ID of the template. */ getById: (id: string) => Promise<TemplateThumbnail>; /** * Returns all of the templates for authenticated organization. * * @returns The templates. */ getAll: () => Promise<Template[]>; /** * Returns all of the templates for a specific tag. * * @param tag The tag. * @returns The templates. */ getByTag: (tag: string) => Promise<TemplateThumbnail[]>; }