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

wip: odoo adaptor #445

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

wip: odoo adaptor #445

wants to merge 4 commits into from

Conversation

mtuchi
Copy link
Collaborator

@mtuchi mtuchi commented Dec 6, 2023

Summary

Add a high-level, single-sentence summary of what this PR changes.

Details

Add technical details of what you've changed (and why).

Issues

Reference any related issues here.

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, has the migration tool been run and the
    migration guide followed?
  • Are there any unit tests? Should there be?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.

@mtuchi mtuchi linked an issue Dec 6, 2023 that may be closed by this pull request
mtuchi and others added 4 commits March 19, 2024 16:52
* wip add request util

* wip: using undici client

add tests

* wip: add mock agent

* wip: more tests

* wip: test options

* update undici

* add changeset

* fix typo

* improve errorMap

* fix undici

* remove method in assertOK

* improve signature

* improve assertOK

add tests for baseUrl option and errorMap

* throw an error if response code match errorMap

* remove duplicate property value

* test if body is string and add default body timeout

* wip: improvements in util

* remove util.js

* restructure util files

* add recursive option

* common: restructure build output

* remove comments

* update isValidHttpUrl

minor improvements

* rename a test

* wip: parseAs

* wip: update mockClient func

* wip: refactor test

* improve tests

* better url parsing

* remove comment

* update response body

* update content type check

* remove comments

* remove headers

* common: adjust import

* common: tweak request docs

* wip: refactor

* wip: refactor test

* wip: post tests

* wip: skip failed tests

* wip: tests

* common: updated unit tests

* common: fix test

* add request helper function

* wip: clean up tests

* add support for successcode in errorMap

* fix broken test

* remove undici skip test

* remove cookies handling

* remove unused packages

* improve aut parsing

* wip: followRedirect

* wip: follow redirect

* wip: form-data

* http: update formdata tests

* http: remove rediect test

* improve logging

* clean up unused packages and add http-status-codes

* clean up deadcode

* improve form-data test

* add changeset

* remove common changeset

* improvements

* add duration

* add method and url to response body

* add support for tls

* improve jsdoc

* update changelog

* add requestBodyType function

This function assert that body type and convert a plan json to a string

* remove JSON.stringify

* add unit test for requestBodyType

* add helpers for http server

* update dependencies

* remove http helpers

* add intergration test

* add responseUrl function

This function will return history url if found or request url

* fix test

* add koa and koa-sslify

* add certificates for testing

* update tests

* move server into integration file

* add server logic

* update https port

it turns out in ubuntu any port < 1024 needs root permission

* use nodes https module

remove koa implementation

* http: move request helper into utils

* common: typo in docs

* http: fix headers and start updating tests

* package lock

* test updates

* common: rename http helper response touse statusCode and statusMessage. Also remove the response url.

* http: update tests

* http: update tests

* common: restore url to the response object

A version of it anyway

* http: refactor response log

* common: update http error message

* http: update to use new  error handling

* http: tidy ups

* http: docs

* http,common:docs

* http: undocument maxRedirects

Not willing to commit to it tbh

* http: light refactor

* common: another light refactor

* lock node version in ci

* common: restore default error map

* http: fix form processing

* http: remove file extension from import

* common: deprecate old http functions

Shoud print a warning in dev mode, but not in prod (platform or lightning)

* http: expose a general request operation

* common: update release notes

* bump versions

* lockfile

* Update auto-generated documentation.

* docs: improve markdown templates

* tools: update docs

* Update http docs

* http: update request example

* remove build artefacts

* http,common: move some http stuff into common utils

* Update template

* template: update to use new helpers

* template: remove unused code

* readme

* Update template

Template should be locked at 1.0.0 and never published

* common: don't print output if you're given a bad response

* common: better url building

* http: remove custom tags from docs

* common: tweak URL parsing rules

* common: better url reporting in errors

* common: fix url parsing

whoops

* common: don't use URL.parse

* add linting for undeclared variables

Fixes issues in azure-storage, common, http, magpi, mailchimp, mongodb, resourcemap and twilio

* bump versions

* common: better handling of error responses in http

* http: update changelog

* http: changelog fixes

---------

Co-authored-by: Emmanuel Evance <mtuchidev@gmail.com>
Signed-off-by: Hunter Achieng (achienghunter@gmail.com)

Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

Successfully merging this pull request may close these issues.

Odoo adaptor refresh using External API
2 participants