-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api-core): pass config object to core classes
BREAKING CHANGE: Options to core classes are being passed in as config object instead of parameters.
- Loading branch information
1 parent
a48a072
commit d7b859c
Showing
52 changed files
with
758 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import axios from 'axios'; | ||
|
||
import utils from 'axios/lib/utils'; | ||
import Api from '@availity/api-core'; | ||
|
||
const { merge } = utils; | ||
|
||
export default class AvApi extends Api { | ||
constructor(options) { | ||
super(axios, Promise, options); | ||
super({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
config: options, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import axios from 'axios'; | ||
|
||
import utils from 'axios/lib/utils'; | ||
import { AvLogMessages } from '@availity/api-core'; | ||
|
||
export default new AvLogMessages(axios, Promise); | ||
const { merge } = utils; | ||
|
||
export default new AvLogMessages({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvNavigation } from '@availity/api-core'; | ||
|
||
export default new AvNavigation(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvNavigation({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import axios from 'axios'; | ||
|
||
import utils from 'axios/lib/utils'; | ||
import { AvOrganizations } from '@availity/api-core'; | ||
import avUserApi from './user'; | ||
|
||
export default new AvOrganizations(axios, Promise, avUserApi); | ||
const { merge } = utils; | ||
export default new AvOrganizations({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
avUsers: avUserApi, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvPdf } from '@availity/api-core'; | ||
|
||
export default new AvPdf(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvPdf({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvPermissions } from '@availity/api-core'; | ||
|
||
export default new AvPermissions(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvPermissions({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import axios from 'axios'; | ||
|
||
import utils from 'axios/lib/utils'; | ||
import { AvProviders } from '@availity/api-core'; | ||
|
||
export default new AvProviders(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvProviders({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import axios from 'axios'; | ||
|
||
import utils from 'axios/lib/utils'; | ||
import { AvProxy } from '@availity/api-core'; | ||
|
||
const { merge } = utils; | ||
export default class AvProxyApi extends AvProxy { | ||
constructor(options) { | ||
super(axios, Promise, options); | ||
super({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
config: options, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvRegions } from '@availity/api-core'; | ||
import userApi from './user'; | ||
|
||
export default new AvRegions(axios, Promise, userApi); | ||
const { merge } = utils; | ||
export default new AvRegions({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
avUsers: userApi, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvSpaces } from '@availity/api-core'; | ||
|
||
export default new AvSpaces(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvSpaces({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvUsers } from '@availity/api-core'; | ||
|
||
export default new AvUsers(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvUsers({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import axios from 'axios'; | ||
import utils from 'axios/lib/utils'; | ||
import { AvUserPermissions } from '@availity/api-core'; | ||
|
||
export default new AvUserPermissions(axios, Promise); | ||
const { merge } = utils; | ||
export default new AvUserPermissions({ | ||
http: axios, | ||
promise: Promise, | ||
merge, | ||
}); |
Oops, something went wrong.