Skip to content

Commit

Permalink
fix: allow timestaged in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Mar 3, 2022
1 parent 5dbe7d6 commit 4f2337f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/validations/co-benefits.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const cobenefitSchema = Joi.object({
// warehouseProjectId - derived upon creation
id: Joi.string().optional(),
cobenefit: Joi.string().required(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/estimations.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const estimationSchema = Joi.object({
.min(Joi.ref('creditingPeriodStart'))
.required(),
unitCount: Joi.number().integer().required(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/issuances.validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const issuanceSchema = Joi.object({
verificationApproach: Joi.string().required(),
verificationBody: Joi.string().required(),
verificationReportDate: Joi.date().required(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/labelUnit.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const labelUnitSchema = Joi.object({
orgUid: Joi.string(),
warehouseUnitId: Joi.string(),
labelId: Joi.string(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/labels.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const labelSchema = Joi.object({
.min(Joi.ref('validityPeriodStartDate'))
.required(),
unitQuantity: Joi.number().integer().required(),
timeStaged: Joi.date().timestamp().optional(),
labelLink: Joi.string().required(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
Expand Down
1 change: 1 addition & 0 deletions src/validations/locations.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const locationSchema = Joi.object({
.required(),
inCountryRegion: Joi.string().optional(),
geographicIdentifier: Joi.string().required(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/projects.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const baseSchema = {
projectLocations: Joi.array().items(locationSchema).min(1).optional(),
projectRatings: Joi.array().items(ratingSchema).min(1).optional(),
estimations: Joi.array().items(estimationSchema).min(1).optional(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
};
Expand Down
1 change: 1 addition & 0 deletions src/validations/ratings.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const ratingSchema = Joi.object({
ratingRangeHighest: Joi.string().required(),
rating: Joi.string().required(),
ratingLink: Joi.string().required(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/relatedProjects.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const relatedProjectSchema = Joi.object({
relatedProjectId: Joi.string().required(),
relationshipType: Joi.string().optional(),
registry: Joi.string().optional(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
});
1 change: 1 addition & 0 deletions src/validations/units.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const unitsBaseSchema = {
.required(),
issuance: issuanceSchema.optional(),
labels: Joi.array().items(labelSchema).optional(),
timeStaged: Joi.date().timestamp().optional(),
updatedAt: Joi.date().optional(),
createdAt: Joi.date().optional(),
};
Expand Down

0 comments on commit 4f2337f

Please sign in to comment.