mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #45874 Add support to sample aggregate operator in Parse.Query by @vegidio
Co-authored-by: Vinicius Egidio <me@vinicius.io>
This commit is contained in:
parent
cb5e017ba6
commit
58f07c94a9
2
types/parse/index.d.ts
vendored
2
types/parse/index.d.ts
vendored
@ -732,6 +732,8 @@ namespace Parse {
|
||||
skip?: number;
|
||||
// Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort
|
||||
sort?: { [key: string]: 1 | -1 };
|
||||
// Sample documentation: https://docs.mongodb.com/v3.2/reference/operator/aggregation/sample/
|
||||
sample?: { size: number };
|
||||
}
|
||||
|
||||
// According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText
|
||||
|
||||
@ -160,6 +160,11 @@ function test_query() {
|
||||
objectId: '$name',
|
||||
},
|
||||
});
|
||||
query.aggregate({
|
||||
sample: {
|
||||
size: 1
|
||||
},
|
||||
});
|
||||
|
||||
// Find objects with distinct key
|
||||
query.distinct('name');
|
||||
|
||||
2
types/parse/ts3.7/index.d.ts
vendored
2
types/parse/ts3.7/index.d.ts
vendored
@ -704,6 +704,8 @@ namespace Parse {
|
||||
skip?: number;
|
||||
// Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort
|
||||
sort?: { [key: string]: 1 | -1 };
|
||||
// Sample documentation: https://docs.mongodb.com/v3.2/reference/operator/aggregation/sample/
|
||||
sample?: { size: number };
|
||||
}
|
||||
|
||||
// According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText
|
||||
|
||||
10
types/parse/v1/index.d.ts
vendored
10
types/parse/v1/index.d.ts
vendored
@ -668,13 +668,15 @@ declare namespace Parse {
|
||||
|
||||
// According to http://docs.parseplatform.org/rest/guide/#aggregate-queries
|
||||
interface AggregationOptions {
|
||||
group?: { objectId?: string, [key:string]: any };
|
||||
match?: {[key: string]: any};
|
||||
project?: {[key: string]: any};
|
||||
group?: { objectId?: string, [key: string]: any };
|
||||
match?: { [key: string]: any };
|
||||
project?: { [key: string]: any };
|
||||
limit?: number;
|
||||
skip?: number;
|
||||
// Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort
|
||||
sort?: {[key: string]: 1|-1};
|
||||
sort?: { [key: string]: 1 | -1 };
|
||||
// Sample documentation: https://docs.mongodb.com/v3.2/reference/operator/aggregation/sample/
|
||||
sample?: { size: number };
|
||||
}
|
||||
|
||||
// According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText
|
||||
|
||||
Loading…
Reference in New Issue
Block a user