Skip to content

Commit

Permalink
Merge pull request #226 from skedify/develop
Browse files Browse the repository at this point in the history
release/next
  • Loading branch information
DemianD committed Mar 23, 2021
2 parents cb33bd0 + c94591c commit ab5630e
Show file tree
Hide file tree
Showing 25 changed files with 3,009 additions and 2,606 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install dependencies
run: npm ci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
!.prettierignore
!.babelrc
!.releaserc
!.nvmrc

# dependencies
node_modules/
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,28 @@ SDK.appointments('appointment id').then({ data } => {
})
```

## Custom Domain Map
Some endpoints require a domain mapping when instantiating the SDK. Consider the
following example:

```js
const SDK = new API({
auth_provider: API.createAuthProviderString('public_client', {
client_id: 'someclientidtokengoeshere',
realm: 'https://api.example.com',
}),
locale: 'nl-BE',
resource_domain_map: {
events: {
url: 'https://events-api.example.com',
},
'users.events': {
url: 'https://users-events-api.example.com',
},
},
})
```

## Testing

If you want to test your application's code, you can use these test utils so that you can safely execute the calls.
Expand Down
5,420 changes: 2,843 additions & 2,577 deletions package-lock.json

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,38 @@
"semantic-release": "semantic-release"
},
"devDependencies": {
"@babel/preset-env": "^7.11.5",
"@commitlint/cli": "^9.1.2",
"@commitlint/config-conventional": "^9.1.2",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-babel": "^5.2.0",
"@babel/preset-env": "^7.13.12",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@rollup/plugin-alias": "^3.1.2",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-inject": "^4.0.2",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-node-resolve": "^11.2.0",
"@rollup/plugin-replace": "^2.4.1",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-polyfills": "^2.3.0",
"codecov": "^3.7.2",
"commitizen": "^4.2.1",
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"codecov": "^3.8.1",
"commitizen": "^4.2.3",
"core-js": "^3.9.1",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-better": "^0.1.5",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-require-in-package": "^1.0.3",
"husky": "^4.3.0",
"jest": "^26.4.2",
"livereload": "^0.9.1",
"husky": "^4.3.8",
"jest": "^26.6.3",
"livereload": "^0.9.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"rollup": "^2.26.11",
"rollup": "^2.42.3",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^17.1.1",
"semantic-release": "^17.4.2",
"serve": "^11.3.2"
},
"config": {
Expand All @@ -83,6 +83,6 @@
}
},
"dependencies": {
"axios": "^0.19.2"
"axios": "^0.21.1"
}
}
2 changes: 1 addition & 1 deletion src/__snapshots__/Skedify.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ exports[`API API/Resources should throw an error when an external://abc123 call

exports[`API API/Resources should throw an error when an external://abc123 call returns no records 2`] = `Array []`;

exports[`API API/Resources should throw an error when calling a non existing filter function 1`] = `"[RESOURCE]: item.nonExistingMethod is not a function. You can only call \`.category_id()\`, \`.external_id()\`, \`.lead_segment_code()\`, \`.schedulable_at_office()\`, \`.schedulable_for_meeting_type()\`, \`.schedulable_with_contact()\`, \`.schedulable()\`, \`.page()\` or \`.per_page()\`."`;
exports[`API API/Resources should throw an error when calling a non existing filter function 1`] = `"[RESOURCE]: item.nonExistingMethod is not a function. You can only call \`.category_id()\`, \`.external_id()\`, \`.lead_segment_code()\`, \`.schedulable_at_office()\`, \`.schedulable_for_meeting_type()\`, \`.schedulable_with_contact()\`, \`.schedulable()\`, \`.page()\`, \`.per_page()\` or \`.id()\`."`;

exports[`API API/Resources should throw an error when calling a non existing filter function and one of the defined filters is using an object alias 1`] = `"[RESOURCE]: item.nonExistingMethod is not a function. You can only call \`.type()\`."`;

Expand Down
Loading

0 comments on commit ab5630e

Please sign in to comment.