geekle-order-service
This service handles the creation and management of orders which in geekle are job applications
Custom Fields
inside the src/custom-fields.ts
file, additional fields have been added to turn orders into job applications.
Field Name | Type | Description |
---|---|---|
demand_user_info | object | the user data of the person applying to the job |
topic_id | string | if a topic exists, the id of the topic connected to the order |
Custom Validators
inside the src/custom-fields.ts
additional validators have been added to validate the values in the new custom fields.
Endpoints | Validator Name | Description |
---|---|---|
createOrder | valid_compensation_type_amount_create | checks if the compensation_amount is in the correct format |
updateOrder | valid_compensation_type_amount_update | checks if the compensation_amount is in the correct format |
createOrder | valid_compensation_type_create | checks if the compensation_type is 'month', 'hour', 'day' |
updateOrder | valid_compensation_type_update | checks if the compensation_type is 'month', 'hour', 'day' |
createOrder | valid_years_experience_create | checks if the years of experience is in the correct format |
updateOrder | valid_years_experience_update | checks if the years of experience is in the correct format |
updateOrder | order_status_check_update | checks if the order status update is valid for the current order status |
Custom Emails
The custom emails are stored inside src/emails
and enabled from the src/index.ts
file.
Endpoints | Template | Description |
---|---|---|
createOrder | new-order-created.html | this sends the the order information to the supply user |
Custom Side Effect
The order's service contains a custom side effect the logic is setup in
src/update-order-count-side-effect.ts
. This trigger when a demand site user applies for a job, updating the count stored on the product.
Endpoints | Side Effect Name | Description |
---|---|---|
createOrder | updateCountHandler | update the the order count listed on the product |
Disabled Endpoints
Some endpoints are disabled because they are unused.
adapter = sdkAdapter.setEnabledAdapterMethods(adapter, [
'getOrder',
'listOrders',
'listOrdersForOrganization',
'updateOrder',
'listOrdersForUser',
'createOrder',
]);