/// /// /** * The BambuPassStyles determine the type of card that will be constructed for both Android and Apple wallet cards. */ export declare enum BambuPassStyles { STORE_CARD = "storeCard", GIFT_CARD = "giftCard", EVENT = "eventTicket", COUPON = "coupon", GENERIC = "generic", PROFILE = "profile" } /** * The BambuPassStyles determine the type of card that will be constructed for both Android and Apple wallet cards. */ export declare enum AppleImageStyles { LOGO = "logo", ICON = "icon", THUMBNAIL = "thumbnail", STRIP = "strip", BACKGROUND = "background" } /** * The BambuPassStyles determine the type of card that will be constructed for both Android and Apple wallet cards. */ export declare enum AndroidImageStyles { ICON = "icon", THUMBNAIL = "thumbnail", STRIP = "strip" } /** * The AndroidLocalizedString object contains the configuration for the Android Wallet layout of the template. */ interface AndroidLocalizedString { defaultValue: { language: string; value: string; }; } /** * The BarCode object contains the configuration for the barcodes on the Apple and Android Wallet layout of the template. */ interface BarCode { format: 'PKBarcodeFormatQR' | 'PKBarcodeFormatPDF417' | 'PKBarcodeFormatAztec' | 'PKBarcodeFormatCode128'; messageEncoding?: string; altText: { mappedValue: string; defaultValue: string; }; message: { mappedValue: string; defaultValue: string; }; } /** * The Image object contains the configuration for the images on the Apple and Android Wallet layout of the template. */ interface Image { /** * The image type identifier. */ image: ImageType; /** * The image file to be uploaded or the URL of the image. */ imageFile: Buffer | string; } /** * The NFCField object contains the configuration for the NFC field on the Apple and Android Wallet layout of the template. */ interface NFCField { message: string; encryptionKey: string; securityEnabled?: boolean; } interface ValidTimeInterval { start: { date: string; }; end: { date: string; }; } interface Venue { name: string; address: string; } interface DateTime { doorsOpen?: string; start?: string; end?: string; doorsOpenLabel?: 'DOORS_OPEN_LABEL_UNSPECIFIED' | 'DOORS_OPEN' | 'GATES_OPEN'; customDoorsOpenLabel?: AndroidLocalizedString; } interface SeatInfo { seat?: AndroidLocalizedString; row?: AndroidLocalizedString; section?: AndroidLocalizedString; gate?: AndroidLocalizedString; } /** * The WalletTemplateFieldMapping object contains the configuration for the field mappings on the Apple Wallet layout of the template. */ export interface IWalletTemplateFieldMapping { /** * The field key, this is the key used in the layout to map the field to the template. * This must be unique to each field, and should only be applied to a PassData and AndroidPassData record once each. */ key: string; /** * The field label, this is the label used in the layout to map the field to the template. */ label: string; /** * The default value is used when no mapped value is set or if the mapped value is found to be undefined. * No variable support is provided for default values. */ defaultValue?: string; /** * The mapped value is used to map the field to a variable in the program. * You can either put the path to the card attribute, for example: "person.firstName" or "customMessage" or "passdata.metaData.favoriteColor", or * you can replace the variables in other text for example: "{{person.firstName}} {{person.lastName}}" or "Your favorite color is {{passdata.metaData.favoriteColor}}" */ mappedValue?: string; /** * The dateStyle of the field, this is used to determine the type of display for a date. * Not currently used */ dateStyle?: 'PKDateStyleNone' | 'PKDateStyleShort' | 'PKDateStyleMedium' | 'PKDateStyleLong' | 'PKDateStyleFull'; /** * The timeStyle of the field, this is used to determine the type of display for a date. * Not currently used */ timeStyle?: 'PKDateStyleNone' | 'PKDateStyleShort' | 'PKDateStyleMedium' | 'PKDateStyleLong' | 'PKDateStyleFull'; /** * The textAlignment of the field, this is used to determine the layout of the text */ textAlignment?: 'PKTextAlignmentLeft' | 'PKTextAlignmentCenter' | 'PKTextAlignmentRight' | 'PKTextAlignmentNatural'; /** * The changeMessage of the field, this is used to determine the message that is displayed when the field is changed, that is displayed in a push notification. * * Currently we only recomment using in the currentMessage display. */ changeMessage?: string; /** * The currencyCode of the field, this is used to determine the currency code for the field. * Current not used */ currencyCode?: string; /** * The numberStyle of the field, this is used to determine the number style for the field. * Current not used */ numberStyle?: 'PKNumberStyleDecimal' | 'PKNumberStylePercent' | 'PKNumberStyleScientific' | 'PKNumberStyleSpellOut'; /** * Current not used */ isRelative?: boolean; /** * Current not used */ ignoresTimeZone?: boolean; /** * Current not used */ androidType?: 'TEXT' | 'IMAGE' | 'LINK'; /** * Current not used */ isDefault?: boolean; } /** * The WalletTemplatePassData object contains the configuration for the Apple Wallet layout of the template. */ export interface IWalletTemplatePassData { /** * The pass style can be one of the following: * - storeCard * - giftCard * - eventTicket * - coupon * - generic * - profile */ passStyle: BambuPassStyles; /** * The pass grouping identifier used to group multiple cards together on a single device. */ groupingIdentifier?: string; /** * If you want to apply barcodes to the card, you can define them here. Typically you only have 1 barcode per card. */ barCodes: BarCode[]; /** * The images for the card. These are used to construct the card layout. * The images styles used are dependant on the passStyle. */ images: Image[]; /** * The header fields for the card. These are used to construct the card layout. * You add the key of the field you want to set here in the sequence you want them to be displayed. */ headerFields?: string[]; /** * The primary fields for the card. These are used to construct the card layout. * You add the key of the field you want to set here in the sequence you want them to be displayed. * *This is not used on all card styles. */ primaryFields?: string[]; /** * The secondary fields for the card. These are used to construct the card layout. * You add the key of the field you want to set here in the sequence you want them to be displayed. */ secondaryFields?: string[]; /** * The auxilary fields for the card. These are used to construct the card layout. * You add the key of the field you want to set here in the sequence you want them to be displayed. * *This is not used on all card styles. */ auxiliaryFields?: string[]; /** * The back fields for the card. These are used to construct the card layout. * You add the key of the field you want to set here in the sequence you want them to be displayed. */ backFields?: string[]; /** * This will apply an NFC to the card, if NFC is supported by your certificate. */ nfcField?: NFCField; /** * The background color of the apple card. */ backgroundColor?: string; /** * The text color of the apple card. */ foregroundColor?: string; /** * The label color of the apple card. */ labelColor?: string; /** * The description of the card. */ description?: string; /** * The relevantDate of this card. Applicable to events and coupons, will cause a message to be displayed on the card. */ relevantDate?: string; /** * The expiration date of this card. This card will be moved to the expired section of the device wallet once expired. */ expirationDate?: string; /** * The subtitle of the card. */ subheader?: string; associatedStoreIdentifiers?: number[]; /** * Will show the android header on the card if true. */ includeLogoText?: boolean; } /** * The WalletTemplateAndroidPassData object contains the configuration for the Android Wallet layout of the template. */ export interface IWalletTemplateAndroidPassData { /** * The title displayed on the top of the android card, if not set the organization name is used. */ title?: string; /** * The header displayed on the top of the android card. */ header: string; /** * The subheader displayed on the top of the android card. * Not applicable for all card styles. */ subheader?: string; /** * The background color of the android card. */ hexBackgroundColor: string; /** * The layout for the front of the android card * Currently only support 3 rows of text */ rows: { /** * the items of the row, Android only supports up too 3 items per row. */ items: string[]; }[]; /** * The layout for the back of the android card */ detailRows?: { /** * the items of the row, Android only supports up too 2 items per row. */ items: string[]; }[]; /** * The images for the card. These are used to construct the card layout. * The images styles used are dependant on the passStyle. */ images: Image[]; /** * The time this card is valid for, not applicable for all passStyles. */ validTimeInterval?: ValidTimeInterval; /** * The NFC field for the card, not applicable for all passStyles. */ nfcField?: NFCField; /** * The venue for the card, not applicable for all passStyles. */ venue?: Venue; /** * The date time for the card, not applicable for all passStyles. */ dateTime?: DateTime; /** * The seat info for the card, not applicable for all passStyles. */ seatInfo?: SeatInfo; } /** * The WalletTemplate object contains the configuration for the template. * This is used to create a wallet template or update a template */ export interface IWalletTemplate { /** * The template name */ name: string; /** * The organization name, this will show on the back of apple cards and the title in android cards. */ organizationName: string; /** * If sharing is allowed, this will provide a share option on the card. For Apple cards, if no sharingUrl is provided, the pass file will be shared. */ sharingProhibited?: boolean; /** * The sharing URL to be used for sharing the card. This is only used for Apple cards. */ sharingUrl?: string; /** * The pass data for the template. This constructs the layout for the Apple wallet card. */ passdata: IWalletTemplatePassData; /** * The pass data for the template. This constructs the layout for the Android wallet card. */ androidPassData: IWalletTemplateAndroidPassData; /** * The field mappings for the template. This maps the fields from the program to the wallet card. The fields are common to both layouts and are referenced with the key on the layout. */ fieldMappings: IWalletTemplateFieldMapping[]; /** * The wallet identifier id for the template. This is used to determine the wallet identifier for the card and is required for all card types. */ walletIdentifierId: number; /** * The default message for the template. This is used to provide a default message for the card, this is set into the currentMessage on the user's card during generation and will be used to set the currentMessage on the card when the tier is changed. */ defaultMessage?: string; } export type IWalletTemplateCreateInput = IWalletTemplate; export type IWalletTemplateUpdateInput = Partial; export {};