mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Improved Template schema and interface; Renamed Template.overrides to Template.props
This commit is contained in:
@@ -52,18 +52,6 @@ export const CertificatesSchema = Joi.object<CertificatesSchema>()
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export interface Template {
|
|
||||||
model: string;
|
|
||||||
certificates: CertificatesSchema;
|
|
||||||
overrides?: OverridablePassProps;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Template = Joi.object<Template>({
|
|
||||||
model: Joi.string().required(),
|
|
||||||
certificates: Joi.object().required(),
|
|
||||||
overrides: Joi.object(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export interface PassProps {
|
export interface PassProps {
|
||||||
serialNumber?: string;
|
serialNumber?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
@@ -191,6 +179,18 @@ export const PassProps = Joi.object<
|
|||||||
...PassPropsFromMethods,
|
...PassPropsFromMethods,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export interface Template {
|
||||||
|
model: string;
|
||||||
|
certificates: CertificatesSchema;
|
||||||
|
props?: OverridablePassProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Template = Joi.object<Template>({
|
||||||
|
model: Joi.string().required(),
|
||||||
|
certificates: Joi.object().required(),
|
||||||
|
props: OverridablePassProps,
|
||||||
|
});
|
||||||
|
|
||||||
// --------- UTILITIES ---------- //
|
// --------- UTILITIES ---------- //
|
||||||
|
|
||||||
type AvailableSchemas =
|
type AvailableSchemas =
|
||||||
|
|||||||
Reference in New Issue
Block a user