Skip to content

Conversation

Aschen
Copy link
Contributor

@Aschen Aschen commented Jul 22, 2020

What does this PR do?

Add typescript support for Index and Collection controllers

Other changes

  • Update collection:update and collection:create methods (new syntax with mappings and settings)
  • Returns undefined instead of some useless { acknowledged: true }. Since this was undocumented it's not a breaking change

Boyscout

@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #531 into 7-dev will decrease coverage by 1.17%.
The diff coverage is 75.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##            7-dev     #531      +/-   ##
==========================================
- Coverage   89.68%   88.50%   -1.18%     
==========================================
  Files          32       32              
  Lines        1406     1427      +21     
  Branches      225      242      +17     
==========================================
+ Hits         1261     1263       +2     
- Misses         99      117      +18     
- Partials       46       47       +1     
Impacted Files Coverage Δ
src/Kuzzle.ts 87.50% <ø> (ø)
src/controllers/Collection.ts 75.43% <75.43%> (ø)
src/controllers/Index.ts 76.19% <76.19%> (ø)

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 a167d04...e6f622c. Read the comment docs.

*
* @see https://docs.kuzzle.io/core/2/guides/essentials/database-mappings/#dynamic-mapping-policy
*/
dynamic?: 'true' | 'false' | 'strict'
Copy link
Contributor

Choose a reason for hiding this comment

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

As per kuzzleio/kuzzle#1745, shouldn't we also accept boolean values?

Co-authored-by: Sébastien Cottinet <scottinet@protonmail.com>
## Usage

:::: tabs
::: tab yourTabName
Copy link
Contributor

Choose a reason for hiding this comment

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

does this really render to yourTabName and anotherTab, or is this just a copy-paste error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was an experiment to include TS snippet but it will be done later since it's a lot of work
(removed)

Aschen added 2 commits August 11, 2020 11:54
…kuzzleio/sdk-javascript into add-typescript-support-index-collection
@scottinet scottinet merged commit ae60f66 into 7-dev Aug 12, 2020
@scottinet scottinet deleted the add-typescript-support-index-collection branch August 12, 2020 09:01
This was referenced Aug 18, 2020
Aschen added a commit that referenced this pull request Aug 18, 2020
# [7.4.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.4.0) (2020-08-18)


#### New features

- [ [#542](#542) ] Finalize typescript support   ([Aschen](https://github.com/Aschen))
- [ [#529](#529) ] Add typescript support for protocols   ([Aschen](https://github.com/Aschen))

#### Enhancements

- [ [#541](#541) ] Add meaningful stacktrace   ([Aschen](https://github.com/Aschen))
- [ [#537](#537) ] Add typescript support realtime   ([Aschen](https://github.com/Aschen))
- [ [#531](#531) ] Add typescript support for Index and Collection controllers   ([Aschen](https://github.com/Aschen))
- [ [#530](#530) ] Add typescript support for search results   ([Aschen](https://github.com/Aschen))
- [ [#523](#523) ] Add support for the collection:delete API action   ([morgandruesne](https://github.com/morgandruesne))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants