UNPKG

@basetime/a2w-api-ts

Version:

Client library that communicates with the addtowallet API.

167 lines (166 loc) 5.67 kB
import { z } from 'zod'; /** * Schema for the possible types of template attributes. */ export declare const TemplateAttributeTypeSchema: z.ZodEnum<{ boolean: "boolean"; color: "color"; image: "image"; text: "text"; }>; /** * The possible types of attributes. */ export type TemplateAttributeType = z.infer<typeof TemplateAttributeTypeSchema>; /** * Schema for a single attribute of a template. */ export declare const TemplateAttributeSchema: z.ZodObject<{ key: z.ZodString; value: z.ZodString; type: z.ZodEnum<{ boolean: "boolean"; color: "color"; image: "image"; text: "text"; }>; }, z.core.$loose>; /** * A single attribute of a template. */ export type TemplateAttribute = z.infer<typeof TemplateAttributeSchema>; /** * Schema for a list of attributes of a template. */ export declare const TemplateAttributesSchema: z.ZodArray<z.ZodObject<{ key: z.ZodString; value: z.ZodString; type: z.ZodEnum<{ boolean: "boolean"; color: "color"; image: "image"; text: "text"; }>; }, z.core.$loose>>; /** * A list of attributes of a template. */ export type TemplateAttributes = z.infer<typeof TemplateAttributesSchema>; /** * Schema for a template from which passes can be created. * * The `apple` field carries the Apple `PassProps` shape used by the * [`passkit-generator`](https://www.npmjs.com/package/passkit-generator) package, but * the SDK no longer takes a runtime dependency on that package. If you want strong * typing on `template.apple`, cast it: `template.apple as PassProps`. */ export declare const TemplateSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; version: z.ZodNumber; versionID: z.ZodString; files: z.ZodRecord<z.ZodString, z.ZodString>; templateUrls: z.ZodRecord<z.ZodString, z.ZodString>; attributes: z.ZodArray<z.ZodObject<{ key: z.ZodString; value: z.ZodString; type: z.ZodEnum<{ boolean: "boolean"; color: "color"; image: "image"; text: "text"; }>; }, z.core.$loose>>; apple: z.ZodRecord<z.ZodString, z.ZodUnknown>; google: z.ZodObject<{ id: z.ZodString; }, z.core.$loose>; relevantDateOverride: z.ZodOptional<z.ZodString>; expirationDateOverride: z.ZodOptional<z.ZodString>; organization: z.ZodObject<{ id: z.ZodString; name: z.ZodString; logoUrl: z.ZodString; domain: z.ZodNullable<z.ZodObject<{ organization: z.ZodString; name: z.ZodString; domain: z.ZodString; hostname: z.ZodString; homepageRedirectUrl: z.ZodString; cNameVerification: z.ZodString; cNameDomain: z.ZodString; isProcessing: z.ZodBoolean; status: z.ZodEnum<{ valid: "valid"; invalid: "invalid"; pending: "pending"; still_pending: "still_pending"; }>; isActive: z.ZodBoolean; isDeleted: z.ZodBoolean; validationDate: z.ZodOptional<z.ZodCoercedDate<unknown>>; firstChecked: z.ZodOptional<z.ZodCoercedDate<unknown>>; }, z.core.$loose>>; backgroundColor: z.ZodString; favIcon16: z.ZodString; favIcon32: z.ZodString; favIcon48: z.ZodString; favIcon120: z.ZodString; favIcon240: z.ZodString; defaultProximityUUID: z.ZodString; termsHtml: z.ZodString; privacyHtml: z.ZodString; headerPixels: z.ZodOptional<z.ZodString>; footerPixels: z.ZodOptional<z.ZodString>; owner: z.ZodString; ownerUser: z.ZodOptional<z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; email: z.ZodString; photoURL: z.ZodString; avatarColor: z.ZodString; organizations: z.ZodArray<z.ZodString>; clientsDisplay: z.ZodArray<z.ZodString>; dateLastLogin: z.ZodCoercedDate<unknown>; }, z.core.$loose>>; admins: z.ZodArray<z.ZodString>; editors: z.ZodArray<z.ZodString>; joinCode: z.ZodString; }, z.core.$loose>; folder: z.ZodString; sessionId: z.ZodString; screenshotUrl: z.ZodOptional<z.ZodString>; screenshotAppleUrl: z.ZodOptional<z.ZodString>; screenshotAndroidUrl: z.ZodOptional<z.ZodString>; pdfUrl: z.ZodOptional<z.ZodString>; pdfAppleUrl: z.ZodOptional<z.ZodString>; pdfAndroidUrl: z.ZodOptional<z.ZodString>; updatedDate: z.ZodCoercedDate<unknown>; isPublicShare: z.ZodBoolean; status: z.ZodString; assignee: z.ZodOptional<z.ZodNullable<z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; email: z.ZodString; photoURL: z.ZodString; avatarColor: z.ZodString; organizations: z.ZodArray<z.ZodString>; clientsDisplay: z.ZodArray<z.ZodString>; dateLastLogin: z.ZodCoercedDate<unknown>; }, z.core.$loose>>>; createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; email: z.ZodString; photoURL: z.ZodString; avatarColor: z.ZodString; organizations: z.ZodArray<z.ZodString>; clientsDisplay: z.ZodArray<z.ZodString>; dateLastLogin: z.ZodCoercedDate<unknown>; }, z.core.$loose>>>; labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>; }, z.core.$loose>; /** * Represents a template from which passes can be created. */ export type Template = z.infer<typeof TemplateSchema>;