Skip to content

Commit 0f3ef05

Browse files
updated docs and function name
1 parent 739c714 commit 0f3ef05

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/lib/query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,19 @@ export class Query extends BaseQuery {
184184
}
185185

186186
/**
187-
* @method containedIn
187+
* @method NoContainedIn
188188
* @memberof Query
189189
* @description Returns the raw (JSON) query based on the filters applied on Query object.
190190
* @example
191191
* import contentstack from '@contentstack/delivery-sdk'
192192
*
193193
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
194194
* const query = stack.contentType("contentTypeUid").Query;
195-
* const result = containedIn('fieldUid', ['value1', 'value2']).find()
195+
* const result = notContainedIn('fieldUid', ['value1', 'value2']).find()
196196
*
197197
* @returns {Query}
198198
*/
199-
NotContainedIn(key: string, value: (string | number | boolean)[]): Query {
199+
notContainedIn(key: string, value: (string | number | boolean)[]): Query {
200200
this._queryParams[key] = { '$nin': value };
201201
return this;
202202
}

test/api/contenttype.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('ContentType Query API test cases', () => {
3838
});
3939

4040
it('should get entries which does not match the fieldUid and values', async () => {
41-
const query = await makeContentType('contenttype_uid').Query().NotContainedIn('title', ['test', 'test2']).find<TEntry>()
41+
const query = await makeContentType('contenttype_uid').Query().notContainedIn('title', ['test', 'test2']).find<TEntry>()
4242
if (query.entries) {
4343
expect(query.entries[0]._version).toBeDefined();
4444
expect(query.entries[0].title).toBeDefined();

test/unit/contenttype.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('ContentType Query class', () => {
6161
expect(query._queryParams).toStrictEqual({'fieldUID': {'$in': ['value']}});
6262
});
6363
it('should get entries which does not match the fieldUid and values', () => {
64-
const query = contentType.Query().NotContainedIn('fieldUID', ['value', 'value2']);
64+
const query = contentType.Query().notContainedIn('fieldUID', ['value', 'value2']);
6565
expect(query._queryParams).toStrictEqual({'fieldUID': {'$nin': ['value', 'value2']}});
6666
});
6767
});

0 commit comments

Comments
 (0)