diff --git a/src/constants.ts b/src/constants.ts index c01d59ac..372e70db 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -160,6 +160,11 @@ export const TOP_LEVEL_FIELDS: { type: Array, templatable: true, }, + appLaunchURL: { + required: false, + type: 'string', + templatable: true, + }, // Expiration Keys expirationDate: { type: 'string', // W3C date, as a string diff --git a/src/lib/base-pass.ts b/src/lib/base-pass.ts index 6e63c2bb..abce759d 100644 --- a/src/lib/base-pass.ts +++ b/src/lib/base-pass.ts @@ -191,6 +191,21 @@ export class PassBase extends PassStructure { else delete this.fields.associatedStoreIdentifiers; } + /** + * A URL the system passes to the associated app from + * associatedStoreIdentifiers during launch. + */ + get appLaunchURL(): ApplePass['appLaunchURL'] { + return this.fields.appLaunchURL; + } + set appLaunchURL(v: ApplePass['appLaunchURL']) { + if (!v) { + delete this.fields.appLaunchURL; + } else { + this.fields.appLaunchURL = v; + } + } + /** * Brief description of the pass, used by the iOS accessibility technologies. * Don’t try to include all of the data on the pass in its description,