mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Added fields and pool creation to PKPass
This commit is contained in:
@@ -1,11 +1,21 @@
|
|||||||
import { Certificates } from "../lib/schemas";
|
import FieldsArray from "../src/fieldsArray";
|
||||||
|
import { Certificates } from "../src/schemas";
|
||||||
import { default as Bundle, filesSymbol } from "./Bundle";
|
import { default as Bundle, filesSymbol } from "./Bundle";
|
||||||
|
|
||||||
|
const fieldKeysPoolSymbol = Symbol("fieldKeysPoolSymbol");
|
||||||
|
|
||||||
interface NamedBuffers {
|
interface NamedBuffers {
|
||||||
[key: string]: Buffer;
|
[key: string]: Buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PKPass extends Bundle {
|
export class PKPass extends Bundle {
|
||||||
|
private [fieldKeysPoolSymbol] = new Set<string>();
|
||||||
|
public primaryFields /*****/ = new FieldsArray(this[fieldKeysPoolSymbol]);
|
||||||
|
public secondaryFields /***/ = new FieldsArray(this[fieldKeysPoolSymbol]);
|
||||||
|
public auxiliaryFields /***/ = new FieldsArray(this[fieldKeysPoolSymbol]);
|
||||||
|
public headerFields /******/ = new FieldsArray(this[fieldKeysPoolSymbol]);
|
||||||
|
public backFields /********/ = new FieldsArray(this[fieldKeysPoolSymbol]);
|
||||||
|
|
||||||
constructor(buffers: NamedBuffers, certificates: Certificates) {
|
constructor(buffers: NamedBuffers, certificates: Certificates) {
|
||||||
super("application/vnd.apple.pkpass");
|
super("application/vnd.apple.pkpass");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user