Initial commit: Angular frontend and Expressjs backend
This commit is contained in:
13
worklenz-backend/src/json_schemas/email-request-schema.ts
Normal file
13
worklenz-backend/src/json_schemas/email-request-schema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default {
|
||||
type: "object",
|
||||
properties: {
|
||||
to: {
|
||||
type: "array",
|
||||
items: {type: "string"},
|
||||
minItems: 1 // Optional field, at least 1 item required
|
||||
},
|
||||
subject: {type: "string"},
|
||||
html: {type: "string"}
|
||||
},
|
||||
required: ["to", "subject", "html"] // subject and html fields are required
|
||||
};
|
||||
14
worklenz-backend/src/json_schemas/item-create-schema.ts
Normal file
14
worklenz-backend/src/json_schemas/item-create-schema.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: {type: "string", message: "Invalid Name"},
|
||||
sku: {type: "string", message: "Invalid SKU"},
|
||||
stock_amount: {type: "number", message: "Invalid Stock Amount"},
|
||||
image: {type: "string", message: "Invalid Image"},
|
||||
price: {type: "number", message: "Invalid Price"},
|
||||
value: {type: "number", message: "Invalid Value"},
|
||||
active: {type: "boolean", message: "Invalid type of Active"},
|
||||
category_id: {type: "string", message: "Invalid Category"}
|
||||
},
|
||||
required: ["name", "sku", "stock_amount", "image", "price", "value", "active", "category_id"],
|
||||
};
|
||||
13
worklenz-backend/src/json_schemas/project-category-schema.ts
Normal file
13
worklenz-backend/src/json_schemas/project-category-schema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
minLength: 2,
|
||||
maxLength: 20,
|
||||
message: "Invalid category name"
|
||||
},
|
||||
color_code: {type: ["string", "null"]}
|
||||
},
|
||||
required: ["name"]
|
||||
};
|
||||
13
worklenz-backend/src/json_schemas/project-folder-schema.ts
Normal file
13
worklenz-backend/src/json_schemas/project-folder-schema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
minLength: 2,
|
||||
maxLength: 20,
|
||||
message: "Invalid folder name"
|
||||
},
|
||||
color_code: {type: ["string", "null"]}
|
||||
},
|
||||
required: ["name"]
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
export default {
|
||||
type: "object",
|
||||
properties: {
|
||||
name: {
|
||||
type: "string",
|
||||
message: "Invalid name",
|
||||
minLength: 2,
|
||||
maxLength: 30
|
||||
}
|
||||
},
|
||||
required: ["name"]
|
||||
};
|
||||
Reference in New Issue
Block a user