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(location): location-startfree-maxmin-distance #70

Merged
merged 9 commits into from
Nov 3, 2023

Commits on Oct 12, 2023

  1. push old stuff up

    jamalsoueidan committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    840d504 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2023

  1. fix conflicts

    jamalsoueidan committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    8b2e6a0 View commit details
    Browse the repository at this point in the history
  2. chore(location.service.spec.ts): refactor test data creation to use g…

    …etLocationObject helper function
    
    chore(lookup.service.spec.ts): refactor test data creation to use getLocationObject helper function
    jamalsoueidan committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    0d15e98 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. feat(openapi): add support for location body in customer API

    - Add `CustomerLocationBody` definition in `openapi.yaml`
    - Create `location-body.yaml` with properties for location body
    - Update `location.yaml` and `create/body.yaml` to reference `location-body.yaml`
    - Update `update/body.yaml` to reference `location-body.yaml`
    jamalsoueidan committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    1667b9c View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. feat(shipping): add calculate service and controller

    feat(shipping): add create controller
    feat(shipping): remove get controller
    feat(shipping): add rates controller
    feat(shipping): add calculate-cost service
    feat(shipping): add calculate-cost tests
    feat(shipping): add calculate service
    feat(shipping): add calculate tests
    
    The changes in this commit include:
    - Added a new calculate service and controller for shipping calculations.
    - Added a new create controller for shipping.
    - Removed the get controller for shipping.
    - Added a new rates controller for shipping.
    - Added a new calculate-cost service for shipping calculations.
    - Added tests for the calculate-cost service.
    - Added a new calculate service for shipping calculations.
    - Added tests for the calculate service.
    
    feat(shipping): add create service and tests
    feat(shipping): add get service and tests
    feat(shipping): add rates service and tests
    feat(shipping): add shipping model
    
    feat(shipping): add shipping schema and types
    
    - Add shipping.schema.ts file to define the mongoose schema for the shipping model.
    - Define the IShipping and IShippingDocument interfaces to represent the shape of the shipping document in the database.
    - Create the ShippingMongooseSchema using mongoose.Schema to define the fields and their types for the shipping model.
    - Add the necessary fields and their types to the ShippingMongooseSchema.
    - Add timestamps to the ShippingMongooseSchema to automatically track the creation and update timestamps.
    
    refactor(shipping): remove shipping service and types
    
    - Remove the shipping.service.ts file as it is no longer needed.
    - Remove the shipping.types.ts file as it is no longer needed.
    jamalsoueidan committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    de590ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9701f06 View commit details
    Browse the repository at this point in the history
  3. feat(location): add get-coordinates service

    feat(location): add get-travel-time service
    feat(location): add validate-address service
    feat(location): add create service
    feat(location): add get service
    
    chore(location): remove unused location service files
    feat(location): add update service for locations
    test(location): add tests for location update service
    
    feat(location): add LocationServiceUpdate function
    
    This commit adds the `LocationServiceUpdate` function to the location service in order to update a location in the database. The function takes in a filter object containing the locationId and customerId, and a body object containing the updated location data. If the `fullAddress` property is included in the body, the function checks if the location exists and if the address has changed. If the address has changed, the function calls the `LocationServiceValidateAddress` function to validate the new address and update the `fullAddress`, `geoLocation`, and `handle` properties of the location. The function then updates the location in the database and returns the updated location.
    
    feat(location): add LocationServiceValidateAddress function
    
    This commit adds the `LocationServiceValidateAddress` function to the location service in order to validate an address and check if it already exists in the database. The function takes in a `fullAddress` string and an optional `
    jamalsoueidan committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    1afbb1b View commit details
    Browse the repository at this point in the history
  4. feat(availability.ts): add support for filtering availability by ship…

    …ping ID
    
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts): create and use mocked shipping object in test case
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts): create and use mocked shipping object in test case
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts): create and use mocked shipping object in test case
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts): create and use mocked shipping object in test case
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts): create and use mocked shipping object in test case
    fix(availability.spec.ts): remove unused imports and mock ShippingServiceGet function
    fix(availability.spec.ts):
    
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix(location.spec.ts): update import statement for LocationServiceCreate
    fix
    jamalsoueidan committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    f5ce656 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. fix(openapi): update references to shipping types in openapi.yaml

    feat(openapi): add ShippingCreate endpoint to openapi.yaml
    feat(openapi): add ShippingBody and ShippingCreateResponse types to openapi.yaml
    feat(openapi): add shippingId property to customer availability get body
    feat(openapi): add ShippingBody type to shipping calculate endpoint in openapi.yaml
    feat(openapi): add ShippingCreate endpoint to openapi.yaml
    feat(openapi): add ShippingCreateResponse type to openapi.yaml
    feat(openapi): add NumberOrString type to openapi.yaml
    fix(server.ts): change port variable case from lowercase port to uppercase PORT
    feat(server.ts): add support for process.env.PORT environment variable
    fix(shipping/controllers/calculate.ts): add customerId property to ShippingControllerCalculateRequest
    fix(shipping/services/calculate.ts): add comment about using customerId to find locationId
    jamalsoueidan committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    07ee45e View commit details
    Browse the repository at this point in the history