mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 16:25:21 +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";
|
||||
|
||||
const fieldKeysPoolSymbol = Symbol("fieldKeysPoolSymbol");
|
||||
|
||||
interface NamedBuffers {
|
||||
[key: string]: Buffer;
|
||||
}
|
||||
|
||||
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) {
|
||||
super("application/vnd.apple.pkpass");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user