Change Log
All notable changes to this project will be documented in this file.
[0.10.4] - 2024-10-xx
Added
Changed
Fixed
[0.10.3] - 2024-10-01
Changed
- refactored Client
- initialized with
deep_loggingnamed argumnet - previously
response_logging
- initialized with
[0.10.2] - 2024-09-27
Added
Ecoportal::API::Common::TimeOutto calculate adaptive time outs.
Changed
Ecoportal::API::V1::Person#job- added adaptative await
- evaluate
truetocomplete?ifprogressis that of total count.
[0.10.1] - 2024-08-01
Added
Ecoportal::API::V1::Person#brand_idEcoportal::API::V1::Person#archived
Changed
- require
ruby 3
[0.9.8] - 2024-05-15
Added
rubocop
Changed
Ecoportal::API::Common::Client#with_retry- Make resilient (re-try) to recent silent server errors where the body doesn't parse as JSON.
Fixed
[0.9.7] - 2024-02-03
Changed
Ecoportal::API::V1::Person- removed property
subordinates
- removed property
[0.9.6] - 2024-02-03
Changed
- upgraded some gems
Fixed
- Compatibility with
ruby 3- replaced
Proc.new(with no block) byblockin methods
- replaced
[0.9.5] - 2023-09-05
Fixed
Ecoportal::API::V1::Person#as_updatemissing parameter onsupercall.
[0.9.4] - 2023-04-17
Changed
- Softened max version of gem dependencies
- Upgraded required ruby version
Fixed
Ecoportal::API::Common::BaseModelshould make a copy ofdoconinitialize- This was affecting
reset!asdocwas being changed
- This was affecting
[0.9.3] - 2023-03-16
Added
Ecoportal::API::V1::SchemaFieldValue#clearhelper to clear the value
[0.9.1] - 2023-03-09
Added
Ecoportal::API::V1::Person#contractor_organization_idsupport for contractor managementEcoportal::API::Common::BaseModeladdeddochelper methods:replace_doc!and#replace_original_doc!
Ecoportal::API::Internal::Personadded methods- breaking change, they default to compare with
original_doc, while they did it withinitial_doc) #new?=> to know if this person is being created now (it doesn't exist on server side).#account_added?=> to know if this person is getting the account added.#account_removed?=> to know if this person is getting their account removed.
- breaking change, they default to compare with
Ecoportal::API::Common::Client#hostexposeEcoportal::API::Internal::Permissionsadded abilitiescontractor_management
Fixed
Ecoportal::API::V1::PersonDetails.key?should index first.
Changed
Ecoportal::API::V1::Person::VALID_TAG_REGEXallow dot.in tags.
[0.8.5] - 2022-02-28
Added
Ecoportal::API::V1::PersonDetails#[]to raise a specific error type to allow handlingEcoportal::API::V1::PersonDetails.key?to allow to check if a field existsEcoportal::API::Internal::Account#force_send_invitessupport for back-end new method
Fixed
Ecoportal::API::V1::People#getfixed typoEcoportal::API::Common::BaseModel#original_docand#initial_docmaybe empty for the parent object
Changed
Ecoportal::API::V1::People#eachlimited theGETretries to5Ecoportal::API::Internal::Account#default_tag=- Controls input type to be
Stringornil - Inherent
upcase
- Controls input type to be
[0.8.4] - 2021-11-05
Added
Ecoportal::API::Internal::Permissionsadded abilitiesvisitor_management,cross_register_reportingandbroadcast_notifications
- Some yardocs too
- Some callbacks are done in a non-obvious way and the returned object type was not documented
- For this reason, some yardocs have been added to some of the parts that have been worked on.
Fixed
Ecoportal::API::V1::People#create_job- Removed call to
BatchOperation#process_response - The method was is already called by
job_result - As a consequence there was a double up of
callbacks - Fixed line in wrong position
- Removed call to
Ecoportal::API::V1::People#batchEcoportal::API::Common::ElasticApmIntegration#unexpected_server_error?- No code or code lesser than 100 is a server error as well
Changed
Ecoportal::API::Common::Client: changed- Logging the response of batches or batch jobs can be handy when debugging the back-end
- removed method
#without_response_logging - This change entailed to remove dependencies in
Ecoportal::API::V1::People- Specifically in methods
#batch,#job_resultand#create_job
- Specifically in methods
@response_logging_enabledto be set in initialization stage (added parameter for.new)
[0.8.3] - 2021-05-24
Added
Ecoportal::API::ErrorsnamespaceEcoportal::API::Errors::Basebase error class.Ecoportal::API::Errors::TimeOuterror when an api request fails with time out.- This serves the purpose to allow a client script to re-start the process where it stopped by capturing this specific Error
Ecoportal::API::Common::BaseModel::UnlinkedModeladded more description to track down the source of the error.Ecoportal::API::Common::BaseModel#reset!added parameterkey, which should try to recoverdoc[key]fromoriginal_doc[key]- Thanks to this, you are supposed to be able to do things like:
person.account = nil && person.reset!("account")person.name = nil && person.reset!("name")
Ecoportal::API::V1::People#jobmethods to provide more information on failure.- Specific changes due to eP release
1.5.9.70(Policy Group Abilities)Ecoportal::API::Internal::Account#permissions_mergedEcoportal::API::Internal::Permissions#person_abilities(new ability)Ecoportal::API::Internal::Account#user_id
Fixed
Ecoportal::API::Internal::Account: consistency in setting arrays (uniq!&compact)#policy_group_ids=,#login_provider_ids=,#starred_ids=
Ecoportal::API::Common::HashDiff.diffwas including empty{}objects- This change sacrifices the case
account: {}(which will be also removed fromas_update), but it should be fine.
- This change sacrifices the case
Changed
Ecoportal::API::V1::People#jobto raise specific error on time outAPI::Errors::TimeOut- Specific changes due to eP release
1.5.9.70(Policy Group Abilities)Ecoportal::API::Internal::Accountremoved methods:#permissions_preset,#presetand#preset=Ecoportal::API::Internal::Person#account=added support foruser_idwhich should remain unchanged when existing
- remove from
as_updateread-only dataEcoportal::API::Common::HashDiff.diffadded parameter:ignore(Array)Ecoportal::API::Common::BaseModel#as_updateadded parameter:ignoreEcoportal::API::V1::Person#as_updateadded method, which ignoressubordinatesEcoportal::API::Internal::Person#as_updateadded method, which ignoresuser_id,permissions_mergedandprefilterEcoportal::API::Internal::Account#as_updateadded method, which ignoresuser_id,permissions_mergedandprefilterEcoportal::API::Common::Clientnative support forelastic-apm- Via new module
Ecoportal::API::Common::ElasticApmIntegrationwith methodlog_unexpected_server_error, which will only log anUnexpectedServerErrorto ElasticAPM if- There's a correct configuration: environmental variables
ELASTIC_APM_KEYandELASTIC_APM_ACCOUNT_IDare defined - The
Responsefrom the server gavecodein the range5xx(which are those under server responsibility)
- There's a correct configuration: environmental variables
Ecoportal::API::Common::Clientadded retry logics whenresponse.status == 5xx
[0.8.2] - 2021-02-24
Fixed
Ecoportal::API::V1::Person#filter_tags=should ignorenilvalues
Changed
- removed all the namespace under
Ecoportal::API::V2as that is managed byecoportal-api-oozesgem Ecoportal::API::V1::People.getshould return aPersonobject- observe that it was returning the
WrappedResponse(anEnumerablehelper that works better when getting multiple people).
- observe that it was returning the
[0.7.5] - 2021-02-12
Fixed
pretty_printmethod was colliding withppmodule:- renamed to
Ecoportal::API::Common::BaseModel#print_pretty - renamed to
Ecoportal::API::Common::BatchReponse#print_pretty - renamed to
Ecoportal::API::Common::Reponse#print_pretty - renamed to
Ecoportal::API::Common::WrappedResponse#print_pretty
- renamed to
Changed
- forgot to change
Ecoportal::API::VERSIONduring last release
[0.7.4] - 2021-01-2
Fixed
- changed
compacttocompact!:Ecoportal::API::V1::Person#filter_tags=Ecoportal::API::Internal::Account#policy_group_ids=Ecoportal::API::Internal::Account#login_provider_ids=Ecoportal::API::Internal::Account#starred_ids=
Changed
Added
Fixed
Ecoportal::API::V1::Person#email=: was not showing the incorrect value in the error message- added
compactto removenullvalues on:Ecoportal::API::V1::Person#filter_tags=Ecoportal::API::Internal::Account#policy_group_ids=Ecoportal::API::Internal::Account#login_provider_ids=Ecoportal::API::Internal::Account#starred_ids=
[0.7.2] - 2020-10-19
Added
Ecoportal::API::V1::Person#email=:- do a minimum validation (no blanks in the email)
- set in lower case (as this is how it's in the server)
Fixed
Ecoportal::API::V1::People#each: whensilentit shouldn't print a blank line- fixed so they return empty array
[]whennil:Ecoportal::API::V1::Person#filter_tagsEcoportal::API::Internal::Account#policy_group_idsEcoportal::API::Internal::Account#login_provider_idsEcoportal::API::Internal::Account#starred_ids
Changed
- made it so some methods the
Arraywithuniqvalues:Ecoportal::API::V1::Person#filter_tags=Ecoportal::API::Internal::Account#policy_group_ids=
- made it so it only updates the keys defined in the
Hashpassed to the setter:Ecoportal::API::Internal::Account#permissions_custom=Ecoportal::API::Internal::Account#preferences=
[0.7.1] - 2020-09-30
Added
Ecoportal::API::Internal::Permissions: update for new abilitytasksof ecoPortal release1.5.3Ecoportal::API::V1::People#each: added keyword argumentsilent:to display download progress
Fixed
Ecoportal::API::V1::People#each: when no block provided, it was creating anEnumaratorwithout preserving the parameters (i.e.:qorper_pagewere lost)
[0.7.0] - 2020-09-11
Added
- added hook, private method
body_datafor child classes to define behaviour onresponse.bodytoEcoportal::API::V1::PeopleEcoportal::API::Common::BatchOperation
Changed
Ecoportal::API::Internal::Permissions: update for new abilities of ecoPortal release1.5.2- decoupled abilities:
person_coreintoperson_core_create,person_core_edit
- decoupled abilities:
[0.6.0] - 2020-07-14
Added
Ecoportal::API::Common::BaseModel#initial_doc:#consolidate!modifiesoriginal_doc- this helper allows to know what was the initial document the object was created with
Ecoportal::API::Common::BaseModel#as_update: added parameter (default::last=> compare withoriginal_doc)- calling it with
:totalwill compare the currentdocwith theinitial_doc
- calling it with
Changed
Ecoportal::API::Internal::Permissions: update for new abilities of ecoPortal release1.5.0- added abilities:
person_core,person_account,person_details - removed ability:
people
- added abilities:
- renamed
printtopretty_printto avoid overriding$stdout.print, on:Ecoportal::API::Common::BaseModelEcoportal::API::Common::BatchReponseEcoportal::API::Common::ResponseEcoportal::API::Common::WrappedResponse
Fixed
Ecoportal::API::Internal::Preferences: kiosk settings should default tofalse(nil)
[0.5.8] - 2020-06-23
Fixed
Ecoportal::API::V1::Person#filter_tags=:original_doc["filter_tags"]isnilwhen creating a personEcoportal::API::Internal::Account#policy_group_ids=:original_doc["account"]isnilwhen creating a person
[0.5.7] - 2020-06-22
Added
Ecoportal::API::V1::PersonSchema: addedenable_tags&tagspropertiesEcoportal::API::Internal::Preferences: added missing fields for kiosk
Changed
Ecoportal::API::V1::People::JOB_TIMEOUT: from 1 minute to 3 minutesEcoportal::API::V1::Person#filter_tags=: will preserve the original order of the matching tags- this change is to prevent
as_updateto generate false update positives
- this change is to prevent
Ecoportal::API::Internal::Account#policy_group_ids=: will preserve the original order of the matching ids- this change is to prevent
as_updateto generate false update positives
- this change is to prevent
Fixed
Ecoportal::API::Internal::Preferences: accessdocusing string keys (not withsymbolkeys)
[0.5.6] - 2020-06-08
Added
- this
CHANGELOG.mdfile - person model:
freemiumcore property