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

Couchbase: Lots of missing things from v2.4.5 SDK #27457

Merged
10 commits merged into from
Jul 25, 2018
Merged

Couchbase: Lots of missing things from v2.4.5 SDK #27457

10 commits merged into from
Jul 25, 2018

Conversation

fluggo
Copy link
Contributor

@fluggo fluggo commented Jul 20, 2018

This patch set adds and fixes a variety of things, such as:

  • Adds the cluster-level authentication API
  • Adds bucket index management API
  • Adds the full-text search API
  • Adds missing events from Bucket class
  • Adds specific event definitions for query response classes
  • Adds much more test code from the documentation
  • Fixes a lot of function definitions

This patch set does not bring these definitions fully in-line with 2.4.5, but it gets them much closer.

Many definitions are written directly from the SDK's source code, because the SDK docs don't cover a lot of uses. Java docs have been used in many places where the Node SDK docs were missing.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

Brian Crowell added 10 commits July 19, 2018 14:44
"code" was not optional, but it is definitely not included on all errors.
I've added two more properties that I've seen in the couchbase source code.
The first page of the couchbase documentation contains the code that is now
in couchbase-tests.ts (except that I've left out the underdocumented
cluster.authenticate() call). For this, I've added the index management
methods on the bucket manager interface as well as specific definitions
for the events on the query response interfaces.
It's marked "uncommitted," but it's in the main page sample, so...
Needs some fixes to the Bucket query call, but that will be fixed here in a
bit.
The samples force us to recognize that the query callbacks are optional.
Even though this doesn't cover everything in the latest SDK, that's the
version I based my changes on.
@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 20, 2018

@fluggo Thank you for submitting this PR!

🔔 @maouida - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Jul 25, 2018
@typescript-bot
Copy link
Contributor

After 5 days, no one has reviewed the PR 😞. A maintainer will be reviewing the PR in the next few days and will either merge it or request revisions. Thank you for your patience!

@ghost ghost merged commit 75cb16b into DefinitelyTyped:master Jul 25, 2018
briandk pushed a commit to briandk/DefinitelyTyped that referenced this pull request Jul 26, 2018
)

* couchbase: Fix Bucket key parameter types

Documentation says key type is string or Buffer, not any.

http://docs.couchbase.com/sdk-api/couchbase-node-client-2.4.5/Bucket.html

* couchbase: Add connect/error events to Bucket interface

* couchbase: Add optional properties for errors

"code" was not optional, but it is definitely not included on all errors.
I've added two more properties that I've seen in the couchbase source code.

* couchbase: Add enough features to get the front-page sample working

The first page of the couchbase documentation contains the code that is now
in couchbase-tests.ts (except that I've left out the underdocumented
cluster.authenticate() call). For this, I've added the index management
methods on the bucket manager interface as well as specific definitions
for the events on the query response interfaces.

* couchbase: Add authenticator API

It's marked "uncommitted," but it's in the main page sample, so...

* couchbase: Add the basic full-text search API

Needs some fixes to the Bucket query call, but that will be fixed here in a
bit.

* couchbase: Split query API, add SearchQuery + FtsQueryResponse.Meta props

Several important fixes.

* couchbase: Add FTS facet and sorting capabilities

* couchbase: Add more samples, make query callbacks optional

The samples force us to recognize that the query callbacks are optional.

* couchbase: Add version number and add me

Even though this doesn't cover everything in the latest SDK, that's the
version I based my changes on.
@fluggo fluggo deleted the feature/couchbase branch July 26, 2018 14:08
briandk pushed a commit to briandk/DefinitelyTyped that referenced this pull request Aug 7, 2018
)

* couchbase: Fix Bucket key parameter types

Documentation says key type is string or Buffer, not any.

http://docs.couchbase.com/sdk-api/couchbase-node-client-2.4.5/Bucket.html

* couchbase: Add connect/error events to Bucket interface

* couchbase: Add optional properties for errors

"code" was not optional, but it is definitely not included on all errors.
I've added two more properties that I've seen in the couchbase source code.

* couchbase: Add enough features to get the front-page sample working

The first page of the couchbase documentation contains the code that is now
in couchbase-tests.ts (except that I've left out the underdocumented
cluster.authenticate() call). For this, I've added the index management
methods on the bucket manager interface as well as specific definitions
for the events on the query response interfaces.

* couchbase: Add authenticator API

It's marked "uncommitted," but it's in the main page sample, so...

* couchbase: Add the basic full-text search API

Needs some fixes to the Bucket query call, but that will be fixed here in a
bit.

* couchbase: Split query API, add SearchQuery + FtsQueryResponse.Meta props

Several important fixes.

* couchbase: Add FTS facet and sorting capabilities

* couchbase: Add more samples, make query callbacks optional

The samples force us to recognize that the query callbacks are optional.

* couchbase: Add version number and add me

Even though this doesn't cover everything in the latest SDK, that's the
version I based my changes on.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unmerged The author did not merge the PR when it was ready.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants