Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@aws-amplify/geo): createGeofences #9278

Merged
merged 29 commits into from
Dec 6, 2021
Merged

feat(@aws-amplify/geo): createGeofences #9278

merged 29 commits into from
Dec 6, 2021

Conversation

TreTuna
Copy link
Contributor

@TreTuna TreTuna commented Nov 24, 2021

Description of changes

  • add createGeofence to Geo and AmazonLocationServiceProvider
  • add validation utility functions for coordinates and all geofence data structures

Description of how you validated changes

  • tests.... lots of tests

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
    Documentation will be written after all geofence APIs are created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TreTuna TreTuna added the Geo Related to the Geo category label Nov 24, 2021
@TreTuna TreTuna requested a review from a team November 24, 2021 08:02
@lgtm-com
Copy link

lgtm-com bot commented Nov 24, 2021

This pull request introduces 1 alert when merging 9e1aee8 into b8645f6 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

packages/geo/src/Geo.ts Outdated Show resolved Hide resolved
packages/geo/src/Geo.ts Outdated Show resolved Hide resolved
packages/geo/src/types/Geo.ts Outdated Show resolved Hide resolved
packages/geo/src/util.ts Outdated Show resolved Hide resolved
packages/geo/src/util.ts Outdated Show resolved Hide resolved
packages/geo/src/util.ts Outdated Show resolved Hide resolved
packages/geo/src/util.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #9278 (84d850f) into geo/main (b8645f6) will increase coverage by 0.08%.
The diff coverage is 87.44%.

Impacted file tree graph

@@             Coverage Diff              @@
##           geo/main    #9278      +/-   ##
============================================
+ Coverage     78.24%   78.32%   +0.08%     
============================================
  Files           250      251       +1     
  Lines         18187    18400     +213     
  Branches       3902     3937      +35     
============================================
+ Hits          14230    14412     +182     
- Misses         3827     3858      +31     
  Partials        130      130              
Impacted Files Coverage Δ
packages/geo/src/util.ts 78.16% <78.16%> (ø)
packages/geo/src/Geo.ts 88.88% <81.81%> (-2.78%) ⬇️
packages/datastore/src/sync/outbox.ts 92.10% <91.30%> (-1.04%) ⬇️
...geo/src/Providers/AmazonLocationServiceProvider.ts 94.66% <92.15%> (-1.49%) ⬇️
packages/core/src/Platform/version.ts 100.00% <100.00%> (ø)
packages/geo/__tests__/data.ts 100.00% <100.00%> (ø)
...kages/amazon-cognito-identity-js/src/BigInteger.js 89.31% <0.00%> (-0.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8645f6...84d850f. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Nov 24, 2021

This pull request introduces 1 alert when merging 5318a8c into b8645f6 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Nov 25, 2021

This pull request introduces 1 alert when merging 403cc99 into b8645f6 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Comment on lines 316 to 319
const response = await this._AmazonLocationServiceBatchPutGeofenceCall(
tenGeofences,
options?.collectionName
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method can throw which will break the loop and the subsequent batches will not be called. We should figure out if we want to continue with the next batches or exit out the loop with creating error objects for all the left over batches including the one that threw. And ideally we should pick one of the two based on the type of exception thrown (e.g. recoverable or not)

In the end, for this type of API, the number of items in the input request should be equal to the number of items (success + errors) in the output response in every case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, that call should only error out if something happens to the call itself, not if a geofence fails to create, since it returns an object with both successes and errors in those cases, which we are handling that. With this, I would lean towards the path of catching the error, adding all of that specific call's geofenceIds to our error array with the message from the thrown error itself, still running the remaining batches, and then returning everything in the end. Does this sound like a good path forward to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that sounds good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have the implementation here, but need to write more tests.
Just verified in my sample app that it's successfully making 150 geofences in a single call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good to go now.

iartemiev and others added 10 commits December 1, 2021 15:00
 - @aws-amplify/ui-angular@1.0.36
 - @aws-amplify/ui-components@1.9.7
 - @aws-amplify/ui-react@1.2.27
 - @aws-amplify/ui-storybook@2.0.27
 - @aws-amplify/ui-vue@1.1.21
 - @aws-amplify/ui@2.0.4
 - @aws-amplify/analytics@5.1.7
 - @aws-amplify/api-graphql@2.2.16
 - @aws-amplify/api-rest@2.0.27
 - @aws-amplify/api@4.0.27
 - @aws-amplify/auth@4.3.17
 - aws-amplify-angular@6.0.27
 - aws-amplify-react@5.1.10
 - aws-amplify-vue@2.1.6
 - aws-amplify@4.3.9
 - @aws-amplify/cache@4.0.29
 - @aws-amplify/core@4.3.9
 - @aws-amplify/datastore-storage-adapter@1.2.1
 - @aws-amplify/datastore@3.7.1
 - @aws-amplify/geo@1.1.9
 - @aws-amplify/interactions@4.0.27
 - @aws-amplify/predictions@4.0.27
 - @aws-amplify/pubsub@4.2.3
 - @aws-amplify/pushnotification@4.3.6
 - @aws-amplify/storage@4.4.10
 - @aws-amplify/xr@3.0.27
…kage.json (#9303)

Resolving an issue with installing the library
…9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
…9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
 - @aws-amplify/ui-angular@1.0.37
 - @aws-amplify/ui-components@1.9.8
 - @aws-amplify/ui-react@1.2.28
 - @aws-amplify/ui-storybook@2.0.28
 - @aws-amplify/ui-vue@1.1.22
 - @aws-amplify/ui@2.0.5
 - @aws-amplify/analytics@5.1.8
 - @aws-amplify/api-graphql@2.2.17
 - @aws-amplify/api-rest@2.0.28
 - @aws-amplify/api@4.0.28
 - @aws-amplify/auth@4.3.18
 - aws-amplify-angular@6.0.28
 - aws-amplify-react@5.1.11
 - aws-amplify@4.3.10
 - @aws-amplify/cache@4.0.30
 - @aws-amplify/core@4.3.10
 - @aws-amplify/datastore-storage-adapter@1.2.2
 - @aws-amplify/datastore@3.7.2
 - @aws-amplify/geo@1.1.10
 - @aws-amplify/interactions@4.0.28
 - @aws-amplify/predictions@4.0.28
 - @aws-amplify/pubsub@4.2.4
 - @aws-amplify/pushnotification@4.3.7
 - @aws-amplify/storage@4.4.11
 - @aws-amplify/xr@3.0.28
Copy link
Contributor

@Amplifiyer Amplifiyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@TreTuna TreTuna merged commit 187cba5 into geo/main Dec 6, 2021
@TreTuna TreTuna deleted the geo/geofences branch December 6, 2021 18:52
TreTuna added a commit that referenced this pull request Dec 6, 2021
* fix(@aws-amplify/datastore): consecutive saves with timestamps (#9298)

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.36
 - @aws-amplify/ui-components@1.9.7
 - @aws-amplify/ui-react@1.2.27
 - @aws-amplify/ui-storybook@2.0.27
 - @aws-amplify/ui-vue@1.1.21
 - @aws-amplify/ui@2.0.4
 - @aws-amplify/analytics@5.1.7
 - @aws-amplify/api-graphql@2.2.16
 - @aws-amplify/api-rest@2.0.27
 - @aws-amplify/api@4.0.27
 - @aws-amplify/auth@4.3.17
 - aws-amplify-angular@6.0.27
 - aws-amplify-react@5.1.10
 - aws-amplify-vue@2.1.6
 - aws-amplify@4.3.9
 - @aws-amplify/cache@4.0.29
 - @aws-amplify/core@4.3.9
 - @aws-amplify/datastore-storage-adapter@1.2.1
 - @aws-amplify/datastore@3.7.1
 - @aws-amplify/geo@1.1.9
 - @aws-amplify/interactions@4.0.27
 - @aws-amplify/predictions@4.0.27
 - @aws-amplify/pubsub@4.2.3
 - @aws-amplify/pushnotification@4.3.6
 - @aws-amplify/storage@4.4.10
 - @aws-amplify/xr@3.0.27

* chore(release): update version.ts [ci skip]

* fix(@aws-amplify/amplify-ui): change private property to false in package.json (#9303)

Resolving an issue with installing the library

* chore: preparing release

* fix(@aws-amplify/amplify-ui): remove private prop from package.json (#9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>

* fix(@aws-amplify/amplify-ui): remove private prop from package.json (#9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.37
 - @aws-amplify/ui-components@1.9.8
 - @aws-amplify/ui-react@1.2.28
 - @aws-amplify/ui-storybook@2.0.28
 - @aws-amplify/ui-vue@1.1.22
 - @aws-amplify/ui@2.0.5
 - @aws-amplify/analytics@5.1.8
 - @aws-amplify/api-graphql@2.2.17
 - @aws-amplify/api-rest@2.0.28
 - @aws-amplify/api@4.0.28
 - @aws-amplify/auth@4.3.18
 - aws-amplify-angular@6.0.28
 - aws-amplify-react@5.1.11
 - aws-amplify@4.3.10
 - @aws-amplify/cache@4.0.30
 - @aws-amplify/core@4.3.10
 - @aws-amplify/datastore-storage-adapter@1.2.2
 - @aws-amplify/datastore@3.7.2
 - @aws-amplify/geo@1.1.10
 - @aws-amplify/interactions@4.0.28
 - @aws-amplify/predictions@4.0.28
 - @aws-amplify/pubsub@4.2.4
 - @aws-amplify/pushnotification@4.3.7
 - @aws-amplify/storage@4.4.11
 - @aws-amplify/xr@3.0.28

* chore(release): update version.ts [ci skip]

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Co-authored-by: aws-amplify-bot <aws@amazon.com>
Co-authored-by: Nick Arocho <16296496+nickarocho@users.noreply.github.com>
Co-authored-by: Nick Arocho <nicaroch@amazon.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>
TreTuna added a commit that referenced this pull request Dec 13, 2021
* fix(@aws-amplify/datastore): consecutive saves with timestamps (#9298)

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.36
 - @aws-amplify/ui-components@1.9.7
 - @aws-amplify/ui-react@1.2.27
 - @aws-amplify/ui-storybook@2.0.27
 - @aws-amplify/ui-vue@1.1.21
 - @aws-amplify/ui@2.0.4
 - @aws-amplify/analytics@5.1.7
 - @aws-amplify/api-graphql@2.2.16
 - @aws-amplify/api-rest@2.0.27
 - @aws-amplify/api@4.0.27
 - @aws-amplify/auth@4.3.17
 - aws-amplify-angular@6.0.27
 - aws-amplify-react@5.1.10
 - aws-amplify-vue@2.1.6
 - aws-amplify@4.3.9
 - @aws-amplify/cache@4.0.29
 - @aws-amplify/core@4.3.9
 - @aws-amplify/datastore-storage-adapter@1.2.1
 - @aws-amplify/datastore@3.7.1
 - @aws-amplify/geo@1.1.9
 - @aws-amplify/interactions@4.0.27
 - @aws-amplify/predictions@4.0.27
 - @aws-amplify/pubsub@4.2.3
 - @aws-amplify/pushnotification@4.3.6
 - @aws-amplify/storage@4.4.10
 - @aws-amplify/xr@3.0.27

* chore(release): update version.ts [ci skip]

* fix(@aws-amplify/amplify-ui): change private property to false in package.json (#9303)

Resolving an issue with installing the library

* chore: preparing release

* fix(@aws-amplify/amplify-ui): remove private prop from package.json (#9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>

* fix(@aws-amplify/amplify-ui): remove private prop from package.json (#9304)

* fix(@aws-amplify/amplify-ui): change private property to false in package.json

* fix(@aws-amplify/amplify-ui): remove private property from package.json

Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.37
 - @aws-amplify/ui-components@1.9.8
 - @aws-amplify/ui-react@1.2.28
 - @aws-amplify/ui-storybook@2.0.28
 - @aws-amplify/ui-vue@1.1.22
 - @aws-amplify/ui@2.0.5
 - @aws-amplify/analytics@5.1.8
 - @aws-amplify/api-graphql@2.2.17
 - @aws-amplify/api-rest@2.0.28
 - @aws-amplify/api@4.0.28
 - @aws-amplify/auth@4.3.18
 - aws-amplify-angular@6.0.28
 - aws-amplify-react@5.1.11
 - aws-amplify@4.3.10
 - @aws-amplify/cache@4.0.30
 - @aws-amplify/core@4.3.10
 - @aws-amplify/datastore-storage-adapter@1.2.2
 - @aws-amplify/datastore@3.7.2
 - @aws-amplify/geo@1.1.10
 - @aws-amplify/interactions@4.0.28
 - @aws-amplify/predictions@4.0.28
 - @aws-amplify/pubsub@4.2.4
 - @aws-amplify/pushnotification@4.3.7
 - @aws-amplify/storage@4.4.11
 - @aws-amplify/xr@3.0.28

* chore(release): update version.ts [ci skip]

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Co-authored-by: aws-amplify-bot <aws@amazon.com>
Co-authored-by: Nick Arocho <16296496+nickarocho@users.noreply.github.com>
Co-authored-by: Nick Arocho <nicaroch@amazon.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>
TreTuna added a commit that referenced this pull request Mar 1, 2022
* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions
TreTuna added a commit that referenced this pull request Mar 28, 2022
* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions
TreTuna added a commit that referenced this pull request Mar 29, 2022
* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions
TreTuna added a commit that referenced this pull request Mar 30, 2022
* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions
TreTuna added a commit that referenced this pull request Apr 4, 2022
* feat(@aws-amplify/geo): add geofence APIs (#9278)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions

* fix(geo): update validations and error messages (#9670)

* chore(geo): remove unused `logger` function

* fix(geo): update validation error messages

* fix(geo): add validation for empty input arrays

* fix(geo): polygon if statement and nits

* fix(geo): get rid of that really bad extra space in comment

* fix(geo): fix nextToken type

* fix(geo): fix missspelling

* fix(geo): update batch array naming and types

* fix(geo): add GeofenceId type

* fix(geo): add test for tooManyVertices
svidgen added a commit that referenced this pull request Apr 20, 2022
* chore(amazon-cognito-identity-js): Relicense to Apache-2.0 (#9632)

* chore(amazon-cognito-identity-js): 3p licenses

Clarified third-party licenses in amazon-cognito-identity-js

* chore(amazon-cognito-identity-js): relicense

Relicensed amazon-cognito-identity-js from the proprietary Amazon
Software License (AmzSL) to the open source Apache License 2.0,
consistent with the rest of the Amplify for JavaScript project.

* ci: update cypress docker image for firefox (#9676)

* fix(@aws-amplify/auth): Invalid session cleanup (#9628)

Co-authored-by: Francisco Rodriguez <elorzafe@amazon.com>

* refactor(amplify-js/scripts): replace npm-exec alias with npx, move watchman cmd into the script and remove unnecessary steps in the contribution guide (#9579)

* refactor: replace npm-exec with npx and remove step 2 in guide

* refactor: remove commented code

* refactor: grammar correction

* refactor: move watchman command into the script and update guide

* typo

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* expanding the link to more words

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* rephrasing

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* Added a note on having watchman installed

* removes conflicts

* rephrases the note

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

Co-authored-by: Manoj NB <manojnb@amazon.com>
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* chore: preparing release

* chore(release): Publish [ci skip]

 - amazon-cognito-identity-js@5.2.8
 - @aws-amplify/ui-angular@1.0.43
 - @aws-amplify/ui-components@1.9.14
 - @aws-amplify/ui-react@1.2.34
 - @aws-amplify/ui-storybook@2.0.34
 - @aws-amplify/ui-vue@1.1.28
 - @aws-amplify/analytics@5.2.1
 - @aws-amplify/api-graphql@2.2.23
 - @aws-amplify/api-rest@2.0.34
 - @aws-amplify/api@4.0.34
 - @aws-amplify/auth@4.4.3
 - aws-amplify-angular@6.0.34
 - aws-amplify-react@5.1.17
 - aws-amplify@4.3.16
 - @aws-amplify/cache@4.0.36
 - @aws-amplify/core@4.4.1
 - @aws-amplify/datastore-storage-adapter@1.2.8
 - @aws-amplify/datastore@3.7.8
 - @aws-amplify/geo@1.2.2
 - @aws-amplify/interactions@4.0.34
 - @aws-amplify/predictions@4.0.34
 - @aws-amplify/pubsub@4.2.10
 - @aws-amplify/pushnotification@4.3.13
 - @aws-amplify/storage@4.4.17
 - @aws-amplify/xr@3.0.34

* chore(release): update version.ts [ci skip]

* chore(data): update API docs (#9690)

* fix(pushnotification/android): return just the error message rather than the whole exception (#9641)

Co-authored-by: Manoj NB <manojnb@amazon.com>
Co-authored-by: Caleb Pollman <cpollman@amazon.com>

* fix(@aws-amplify/datastore): fix mutations to retry indefinitely on network error (#9724)

* Use custom retry strategy in outbox processing

- Export `jitteredBackoff` from core
- Define custom strategy extending `jitteredBackoff` that retries indefinitely for network errors

* typo fix, testing for safe jittered backoff

* updated axios packet loss test

* Update packages/datastore/src/sync/processors/mutation.ts

Co-authored-by: Manuel Iglesias <6154160+manueliglesias@users.noreply.github.com>

* updated 20500 literal to show the math

Co-authored-by: Manuel Iglesias <6154160+manueliglesias@users.noreply.github.com>

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.44
 - @aws-amplify/ui-components@1.9.15
 - @aws-amplify/ui-react@1.2.35
 - @aws-amplify/ui-storybook@2.0.35
 - @aws-amplify/ui-vue@1.1.29
 - @aws-amplify/analytics@5.2.2
 - @aws-amplify/api-graphql@2.2.24
 - @aws-amplify/api-rest@2.0.35
 - @aws-amplify/api@4.0.35
 - @aws-amplify/auth@4.4.4
 - aws-amplify-angular@6.0.35
 - aws-amplify-react@5.1.18
 - aws-amplify@4.3.17
 - @aws-amplify/cache@4.0.37
 - @aws-amplify/core@4.4.2
 - @aws-amplify/datastore-storage-adapter@1.2.9
 - @aws-amplify/datastore@3.7.9
 - @aws-amplify/geo@1.2.3
 - @aws-amplify/interactions@4.0.35
 - @aws-amplify/predictions@4.0.35
 - @aws-amplify/pubsub@4.2.11
 - @aws-amplify/pushnotification@4.3.14
 - @aws-amplify/storage@4.4.18
 - @aws-amplify/xr@3.0.35

* chore(release): update version.ts [ci skip]

* fix(storage): axios handler error handling fix (#9587)

* feat: PubSub Add Options objects for all Providers and fix: Spelling error and deprecation of old exports (#9683)

* fix: Spelling error and add deprecation warnings to deprecated interfaces

* feat: PubSub - Add options extensions for each provider

* fix(withAuthenticator): RN Set default usernameAttributes to username and autofill the username in ConfirmSignUp Page. (#9723)

* Set default usernameAttributes to username and autofill the username in ConfirmSignUp page

* Set default usernameAttributes in the Authenticator Component

Co-authored-by: Caleb Pollman <cpollman@amazon.com>

* fix: upgrade CircleCI Cypress image to 12.22.8 (#9744)

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.45
 - @aws-amplify/ui-components@1.9.16
 - @aws-amplify/ui-react@1.2.36
 - @aws-amplify/ui-storybook@2.0.36
 - @aws-amplify/ui-vue@1.1.30
 - @aws-amplify/analytics@5.2.3
 - @aws-amplify/api-graphql@2.3.0
 - @aws-amplify/api-rest@2.0.36
 - @aws-amplify/api@4.0.36
 - @aws-amplify/auth@4.5.0
 - aws-amplify-angular@6.0.36
 - aws-amplify-react-native@6.0.4
 - aws-amplify-react@5.1.19
 - aws-amplify@4.3.18
 - @aws-amplify/cache@4.0.38
 - @aws-amplify/core@4.5.0
 - @aws-amplify/datastore-storage-adapter@1.2.10
 - @aws-amplify/datastore@3.8.0
 - @aws-amplify/geo@1.2.4
 - @aws-amplify/interactions@4.0.36
 - @aws-amplify/predictions@4.0.36
 - @aws-amplify/pubsub@4.3.0
 - @aws-amplify/pushnotification@4.3.15
 - @aws-amplify/storage@4.4.19
 - @aws-amplify/xr@3.0.36

* chore(release): update version.ts [ci skip]

* feat: update DataStore observe / observeQuery to return all fields in local update snapshot (#9556)

* address PR feedback

* test(DataStore): add observe unit tests

Co-authored-by: Jon Wire <iambipedal@gmail.com>

* update types for internal / external subscription messages; minor update to datastore 'observe'

* chore(data): format DataStore with Prettier

* Revert "feat(@aws-amplify/geo): searchForSuggestions API (#9516)" (#9747)

This reverts commit bb60060.

* chore: update .github/CODEOWNERS (#9740)

Co-authored-by: Caleb Pollman <cpollman@amazon.com>

* fix: upgraded commonmarker in Gemfile (#9692)

* upgraded commonmarker

* after running yarn docs

* Revert "after running yarn docs"

This reverts commit e8c813c.

Co-authored-by: David McAfee <mcafd@amazon.com>

* feat(@aws-amplify/geo): add geofence APIs (#9743)

* feat(@aws-amplify/geo): add geofence APIs (#9278)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): remove unused file

* feat(@aws-amplify/geo): add initial types for geofences

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to Geo

* fix(@aws-amplify/geo): remove bad import

* fix(@aws-amplify/geo): update jsdoc on createGeofence

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update jsdoc on createGeofence in provider

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): update error message for bad polygon

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(@aws-amplify/geo): first update from PR comments

* fix(@aws-amplify/geo): update #2 from PR comments

* fix(@aws-amplify/geo): update types and batch calls

* Update packages/geo/src/types/Geo.ts

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* fix(geo): update types from PR feedback

* chore(geo): add error handling on failed API call

* test(geo): add test for batch API calls

* test(geo): add test for bad api call in createGeofences

feat(geo): add getGeofence api (#9309)

* feat(@aws-amplify/geo): verify coordinates

* chore(@aws-amplify/geo): add types and validation utils

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(@aws-amplify/geo): add createGeofence to provider

* feat(geo): add getGeofence api

* chore(geo): combine some try/catch blocks

* chore(geo): add > to jsdoc comment

feat(geo): add listGeofences api (#9310)

feat(geo): add updateGeofences api (#9312)

* feat(geo): add listGeofences api

* feat(geo): add initial updateGeofences api

* refactor(geo): optimize _batchPutGeofence function

feat(geo): add deleteGeofences api (#9314)

* feat(@aws-amplify/geo): verify coordinates

* feat(geo): batch deleteGeofences call

* chore(geo): fix issue with response

refactor(geo): update loggers and remove unused code

refactor(geo): create/updateGeofences => saveGeofences

chore(geo): split out testData and testFunctions

* fix(geo): update validations and error messages (#9670)

* chore(geo): remove unused `logger` function

* fix(geo): update validation error messages

* fix(geo): add validation for empty input arrays

* fix(geo): polygon if statement and nits

* fix(geo): get rid of that really bad extra space in comment

* fix(geo): fix nextToken type

* fix(geo): fix missspelling

* fix(geo): update batch array naming and types

* fix(geo): add GeofenceId type

* fix(geo): add test for tooManyVertices

* fix: PubSub - Resolve ts strict errors in the root import object (#9733)

fix: PubSub - Resolve ts strict errors in the PubSub root file

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.46
 - @aws-amplify/ui-components@1.9.17
 - @aws-amplify/ui-react@1.2.37
 - @aws-amplify/ui-storybook@2.0.37
 - @aws-amplify/ui-vue@1.1.31
 - @aws-amplify/analytics@5.2.4
 - @aws-amplify/api-graphql@2.3.1
 - @aws-amplify/api-rest@2.0.37
 - @aws-amplify/api@4.0.37
 - @aws-amplify/auth@4.5.1
 - aws-amplify-angular@6.0.37
 - aws-amplify-react@5.1.20
 - aws-amplify@4.3.19
 - @aws-amplify/cache@4.0.39
 - @aws-amplify/core@4.5.1
 - @aws-amplify/datastore-storage-adapter@1.2.11
 - @aws-amplify/datastore@3.9.0
 - @aws-amplify/geo@1.3.0
 - @aws-amplify/interactions@4.0.37
 - @aws-amplify/predictions@4.0.37
 - @aws-amplify/pubsub@4.3.1
 - @aws-amplify/pushnotification@4.3.16
 - @aws-amplify/storage@4.4.20
 - @aws-amplify/xr@3.0.37

* chore(release): update version.ts [ci skip]

* fix(pushnotification): onTap of notification after the app is killed in Android Oreo or higher (#9729)

* fix: make the notification open intent explicit

* remove irrelavant gradle changes

Co-authored-by: Manoj NB <manojnb@amazon.com>
Co-authored-by: Caleb Pollman <cpollman@amazon.com>

* fix: PubSub - Resolve ts strict errors in the MqttOverWSProvider (#9732)

* fix: PubSub - Resolve ts strict errors in the AWSAppSyncRealTimeProvider (#9731)

* fix: PubSub - Resolve ts strict errors in the AWSAppSyncRealTimeProvider

* feat(data): Datastore Docs (#9753)

* fix(pushnotification): unused and androidX imports  (#9708)

Resolves #8023

Co-authored-by: ManojNB <manojnb95@gmail.com>

* gem update (#9808)

* chore: preparing release

* chore(release): Publish [ci skip]

 - @aws-amplify/ui-angular@1.0.47
 - @aws-amplify/ui-components@1.9.18
 - @aws-amplify/ui-react@1.2.38
 - @aws-amplify/ui-storybook@2.0.38
 - @aws-amplify/ui-vue@1.1.32
 - @aws-amplify/analytics@5.2.5
 - @aws-amplify/api-graphql@2.3.2
 - @aws-amplify/api-rest@2.0.38
 - @aws-amplify/api@4.0.38
 - @aws-amplify/auth@4.5.2
 - aws-amplify-angular@6.0.38
 - aws-amplify-react@5.1.21
 - aws-amplify@4.3.20
 - @aws-amplify/cache@4.0.40
 - @aws-amplify/core@4.5.2
 - @aws-amplify/datastore-storage-adapter@1.2.12
 - @aws-amplify/datastore@3.10.0
 - @aws-amplify/geo@1.3.1
 - @aws-amplify/interactions@4.0.38
 - @aws-amplify/predictions@4.0.38
 - @aws-amplify/pubsub@4.3.2
 - @aws-amplify/pushnotification@4.3.17
 - @aws-amplify/storage@4.4.21
 - @aws-amplify/xr@3.0.38

* chore(release): update version.ts [ci skip]

* fix(@aws-amplify/datastore-storage-adapter): SQLite adapter NULL handling and mutation queue management bugs (#9813)

* experimenting with sqlite adapter tests

* seemingly working react-native-sqlite-storage mock

* stash

* checkpoint: found a combo that creates  rogue mutations

* successfully detecting the mutation discrepency in jest

* replicated sqlite test for rogue mutations to indexeddb

* stash

* fix: outbox handling, sqlite adapter null comparison handling

* expanded test coverage for adapter comparison operators

* cleanup sqlite adapter test file

* cleanup debugging cruft

* trying to make sqlite3 bin work

* another attempt to make sqlite3 work

* seeing if we can shorten sqlite3 build  step

* cruft cleanup, comment update

* fix tslint and package version errors

* chore: fixed sqlite testing adapter, add sanity checks for batchSave, batchQuery (#9823)

* fix: sqlite mock, add sanity checks for batchSave, batchQuery

* chore: remove inadvertent VS Code auto-import

* test fix: ensure there's sql in the test log to assert on

Co-authored-by: Andrew Jorgensen <ajorgens@amazon.com>
Co-authored-by: Tré Ammatuna <16496746+TreTuna@users.noreply.github.com>
Co-authored-by: James Au <40404256+jamesaucode@users.noreply.github.com>
Co-authored-by: Francisco Rodriguez <elorzafe@amazon.com>
Co-authored-by: ManojNB <manojnb95@gmail.com>
Co-authored-by: Manoj NB <manojnb@amazon.com>
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>
Co-authored-by: ArkamJ <arkamj@amazon.com>
Co-authored-by: aws-amplify-bot <aws@amazon.com>
Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: Caleb Pollman <cpollman@amazon.com>
Co-authored-by: Manuel Iglesias <6154160+manueliglesias@users.noreply.github.com>
Co-authored-by: Nick Arocho <nicaroch@amazon.com>
Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
Co-authored-by: chintannp <88387035+chintannp@users.noreply.github.com>
Co-authored-by: ArkamJ <67259466+ArkamJ@users.noreply.github.com>
Co-authored-by: James Au <auchu@amazon.com>
Co-authored-by: Simon-TechForm <73996878+Simon-TechForm@users.noreply.github.com>
Co-authored-by: Ashika <35131273+ashika01@users.noreply.github.com>
Co-authored-by: Ashika Kasiviswanathan Arumugakarthik <akasivis@amazon.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Geo Related to the Geo category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants