0.2.0 • Published 3 months ago

wbb-abavus v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

WBB Abavus

With this integration you can check waste schedule and create service requests in Abavus.

Blocks Provided

Provide a list of the blocks provided as part of this integration. This should be a list of block name, and its description.

Block NamePurpose
waste-collection-schedule-functionThis will lookup waste schedule services based on provided postcode
missed-binsThis will lookup if there are any missed bins for the address requested
create-service-request-functionThis will create a service request with questions provided
user-authentication-functionThis will authenticate user based on email address and one more field configured in args and set person number in user session
missing-person-numberThis will inform user if there is no person number in sessions
missing-required-argsThis will inform user that required args from function are missing
no-uprn-foundThis will inform user if no UPRN was found for the address
no-missed-binsThis will inform user it there aren't any missed bins

Handler Names

The following handler names and their functions are available :

Handler NamePurpose
waste-collection-scheduleSearches for waste collections based on the user input postcode
user-authenticationIt will authenticate user based on email address and configured and field configured in args
create-service-requestIt will create service request based on set args
missed-binsSearch missed collections based on user input address

Configuration Options

( Provide a list of the configuration options for each of the handlers mentioned above )

Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.

waste-collection-schedule

PropertyRequiredDescription
apiKeytrueA secure API key, provided by Abavus which will be used to authenticate all API calls
postcode_fieldfalseif set it will user another form, default is Abavus locality form
address1_fieldfalseif set it will be used as first line of address
address2_fieldfalseif set it will be used as second line of address
noWasteScheduleBlockfalseOverrides default no waste schedule block
startDateOfCollectionFormatfalseOverrides default date format MMMM D, YYYY. Should use date formats from moment.js library
nextCollectionStringfalseOverrides default string for next collections: Your next collection will be on %%startDateOfCollection%%. To be %%subject%%
dateTemplatefalseOverrides default date format DD-MMM-YYYY HH:mm:ss to comply with the date format from API. Should use date formats from moment.js library
tryAgainfalseIf set it will show the choice to try again when the block for arguments is missing will be thrown
resetFormfalseIf set it will reset the form after tryAgain was clicked

user-authentication

PropertyRequiredDescription
apiKeytrueA secure API key, provided by Abavus which will be used to authenticate all API calls
emailtruename of the form value which will set email
matchFieldValuetrueform value of the field which will be matched against abavus user
matchFieldKeytrueabavus user property which matchFieldValue will be compared

create-service-request

PropertyRequiredDescription
apiKeytrueA secure API key, provided by Abavus which will be used to authenticate all API calls
formCodetrueAbavus form code
catalogueCodetrueAbavus catalogue code
statustrueAbavus service request status
questionCodestrueValid question codes used to create service request
QUESTION_CODEtrueValid Abavus question code will be the key and value should be form value field name
answerCodestrueValid answer codes used to create service request
ANSWER_CODEtrueValid Abavus answer code will be the key and value should be form value field name

missed-bins

PropertyRequiredDescription
apiKeytrueA secure API key, provided by Abavus which will be used to authenticate all API calls
postcode_fieldfalseif set it will user another form, default is Abavus locality form
address1_fieldfalseif set it will be used as first line of address
address2_fieldfalseif set it will be used as second line of address
noMissedBinBlockfalseOverrides default no missed bins block
startDateOfCollectionFormatfalseOverrides default date format MMMM D, YYYY. Should use date formats from moment.js library
missedCollectionStringfalseOverrides default string for missed collections: Your missed collection was to %%subject%% on %%startDateOfCollection%%.
dateTemplatefalseOverrides default date format DD-MMM-YYYY HH:mm:ss to comply with the date format from API. Should use date formats from moment.js library
tryAgainfalseIf set it will show the choice to try again when the block for arguments is missing will be thrown
resetFormfalseIf set it will reset the form after tryAgain was clicked