@osdk/api 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/build/js/index.js +4 -14
- package/build/js/index.js.map +1 -1
- package/build/js/index.mjs +3 -6
- package/build/js/index.mjs.map +1 -1
- package/build/js/public/utils.js +0 -1
- package/build/js/public/utils.mjs +0 -1
- package/build/types/index.d.ts +3 -4
- package/build/types/ontology/index.d.ts +3 -3
- package/build/types/util/index.d.ts +0 -3
- package/package.json +2 -2
- package/build/js/chunk-4D6JZ4TL.js +0 -7
- package/build/js/chunk-4D6JZ4TL.js.map +0 -1
- package/build/js/chunk-BYTHMUUS.mjs +0 -9
- package/build/js/chunk-BYTHMUUS.mjs.map +0 -1
- package/build/js/chunk-EVOZ7UGO.js +0 -19
- package/build/js/chunk-EVOZ7UGO.js.map +0 -1
- package/build/js/chunk-XIJ2ZQRX.mjs +0 -5
- package/build/js/chunk-XIJ2ZQRX.mjs.map +0 -1
- package/build/js/public/objects.js +0 -17
- package/build/js/public/objects.js.map +0 -1
- package/build/js/public/objects.mjs +0 -4
- package/build/js/public/objects.mjs.map +0 -1
- package/build/types/client/Client.d.ts +0 -8
- package/build/types/client/ObjectSetCreator.d.ts +0 -15
- package/build/types/client/PageResult.d.ts +0 -5
- package/build/types/client/createCachedOntologyTransform.d.ts +0 -7
- package/build/types/client/createClient.d.ts +0 -3
- package/build/types/client/index.d.ts +0 -8
- package/build/types/client/internal/conversions/index.d.ts +0 -4
- package/build/types/client/internal/conversions/legacyToModernSingleAggregationResult.d.ts +0 -4
- package/build/types/client/internal/conversions/modernToLegacyAggregationClause.d.ts +0 -4
- package/build/types/client/internal/conversions/modernToLegacyGroupByClause.d.ts +0 -4
- package/build/types/client/internal/conversions/modernToLegacyWhereClause.d.ts +0 -4
- package/build/types/client/internal/net/V2_BASE.d.ts +0 -1
- package/build/types/client/internal/net/index.d.ts +0 -1
- package/build/types/client/internal/net/types.d.ts +0 -357
- package/build/types/client/object/aggregateOrThrow.d.ts +0 -5
- package/build/types/client/object/aggregateOrThrow.test.d.ts +0 -1
- package/build/types/client/object/convertWireToOsdkObjects.d.ts +0 -4
- package/build/types/client/object/fetchPageOrThrow.d.ts +0 -10
- package/build/types/client/object/index.d.ts +0 -2
- package/build/types/client/objectSet/LinkTypesFrom.d.ts +0 -2
- package/build/types/client/objectSet/ObjectSet.d.ts +0 -25
- package/build/types/client/objectSet/createObjectSet.d.ts +0 -5
- package/build/types/client/query/WhereClause.d.ts +0 -24
- package/build/types/client/query/aggregations/AggregatableKeys.d.ts +0 -4
- package/build/types/client/query/aggregations/AggregateOpts.d.ts +0 -7
- package/build/types/client/query/aggregations/AggregationResultsWithGroups.d.ts +0 -10
- package/build/types/client/query/aggregations/AggregationResultsWithoutGroups.d.ts +0 -10
- package/build/types/client/query/aggregations/AggregationsClause.d.ts +0 -8
- package/build/types/client/query/aggregations/AggregationsClause.test.d.ts +0 -42
- package/build/types/client/query/aggregations/AggregationsResults.d.ts +0 -5
- package/build/types/client/query/aggregations/AggregationsResults.test.d.ts +0 -1
- package/build/types/client/query/aggregations/GroupByClause.d.ts +0 -12
- package/build/types/client/query/aggregations/GroupByClause.test.d.ts +0 -21
- package/build/types/client/query/aggregations/GroupByMapper.d.ts +0 -4
- package/build/types/client/query/index.d.ts +0 -7
- package/build/types/public/objects.d.ts +0 -1
- package/build/types/util/ArrayElement.d.ts +0 -1
- package/build/types/util/NOOP.d.ts +0 -3
- package/build/types/util/StringArrayToUnion.d.ts +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { legacyToModernSingleAggregationResult } from "./legacyToModernSingleAggregationResult";
|
|
2
|
-
export { modernToLegacyAggregationClause } from "./modernToLegacyAggregationClause";
|
|
3
|
-
export { modernToLegacyGroupByClause } from "./modernToLegacyGroupByClause";
|
|
4
|
-
export { modernToLegacyWhereClause } from "./modernToLegacyWhereClause";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ArrayElement } from "../../../util";
|
|
2
|
-
import type { AggregationClause, AggregationResultsWithoutGroups } from "../../query";
|
|
3
|
-
import type { Wire } from "../net";
|
|
4
|
-
export declare function legacyToModernSingleAggregationResult<AC extends AggregationClause<any, any>>(entry: ArrayElement<Wire.AggregateObjectsResponseV2["data"]>): AggregationResultsWithoutGroups<any, any, AC>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Aggregation } from "@osdk/gateway/types";
|
|
2
|
-
import type { ObjectTypesFrom, OntologyDefinition } from "../../../ontology";
|
|
3
|
-
import type { AggregationClause } from "../../query";
|
|
4
|
-
export declare function modernToLegacyAggregationClause<T extends OntologyDefinition<any>, K extends ObjectTypesFrom<T>, AC extends AggregationClause<T, K>>(select: AC): Aggregation[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AggregationGroupByV2 } from "@osdk/gateway/types";
|
|
2
|
-
import type { ObjectTypesFrom, OntologyDefinition } from "../../../ontology";
|
|
3
|
-
import type { GroupByClause } from "../../query";
|
|
4
|
-
export declare function modernToLegacyGroupByClause<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>>(groupByClause: GroupByClause<O, K> | undefined): AggregationGroupByV2[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ObjectDefinition } from "../../../ontology";
|
|
2
|
-
import type { WhereClause } from "../../query";
|
|
3
|
-
import type { Wire } from "../net";
|
|
4
|
-
export declare function modernToLegacyWhereClause<T extends ObjectDefinition<any, any>>(whereClause: WhereClause<T>): Wire.SearchJsonQueryV2;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const V2_BASE = "api/v2/ontologies";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as Wire from "./types";
|
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
export interface AggregationClause {
|
|
2
|
-
type: string;
|
|
3
|
-
field?: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
export type AggregationValueType = number | string | boolean;
|
|
7
|
-
export type BaseGroupValue = number | string | boolean;
|
|
8
|
-
export type Bucketing<T> = {
|
|
9
|
-
startValue?: T;
|
|
10
|
-
endValue: T;
|
|
11
|
-
} | {
|
|
12
|
-
startValue: T;
|
|
13
|
-
endValue?: T;
|
|
14
|
-
};
|
|
15
|
-
export type GroupValue = BaseGroupValue | Bucketing<BaseGroupValue>;
|
|
16
|
-
export interface WhereClauseV2 {
|
|
17
|
-
type: string;
|
|
18
|
-
field?: string;
|
|
19
|
-
value?: string | number | BoundingBoxFilter | PolyGonGeoJson | DistanceOf | boolean | WhereClauseV2 | WhereClauseV2[];
|
|
20
|
-
}
|
|
21
|
-
export type BoundingBoxFilter = {
|
|
22
|
-
topLeft: PointGeoJson;
|
|
23
|
-
bottomRight: PointGeoJson;
|
|
24
|
-
};
|
|
25
|
-
export type PolyGonGeoJson = {
|
|
26
|
-
type: "Polygon";
|
|
27
|
-
coordinates: number[][][];
|
|
28
|
-
};
|
|
29
|
-
export type DistanceOf = {
|
|
30
|
-
center: PointGeoJson;
|
|
31
|
-
distance: {
|
|
32
|
-
value: number;
|
|
33
|
-
unit: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export type PointGeoJson = {
|
|
37
|
-
type: "Point";
|
|
38
|
-
coordinates: number[];
|
|
39
|
-
};
|
|
40
|
-
export interface SearchClauseV2 {
|
|
41
|
-
where?: WhereClauseV2;
|
|
42
|
-
orderBy?: {
|
|
43
|
-
fields: OrderByClause[];
|
|
44
|
-
};
|
|
45
|
-
pageSize?: number;
|
|
46
|
-
pageToken?: string;
|
|
47
|
-
}
|
|
48
|
-
export interface OrderByClause {
|
|
49
|
-
field: string;
|
|
50
|
-
direction: string;
|
|
51
|
-
}
|
|
52
|
-
export type GroupByClause = GroupByExact | GroupByFixedWidth | GroupByDuration | GroupByRanges;
|
|
53
|
-
export type GroupByExact = {
|
|
54
|
-
type: "exact";
|
|
55
|
-
field: string;
|
|
56
|
-
maxGroupCount?: number;
|
|
57
|
-
};
|
|
58
|
-
export type GroupByFixedWidth = {
|
|
59
|
-
type: "fixedWidth";
|
|
60
|
-
field: string;
|
|
61
|
-
fixedWidth: number;
|
|
62
|
-
};
|
|
63
|
-
export type TimeUnit = "MILLISECONDS" | "SECONDS" | "MINUTES" | "HOURS" | "DAYS" | "WEEKS" | "MONTHS" | "YEARS" | "QUARTERS";
|
|
64
|
-
export type GroupByDuration = {
|
|
65
|
-
type: "duration";
|
|
66
|
-
field: string;
|
|
67
|
-
unit: TimeUnit;
|
|
68
|
-
value: number;
|
|
69
|
-
};
|
|
70
|
-
export type GroupByRanges = {
|
|
71
|
-
type: "ranges";
|
|
72
|
-
field: string;
|
|
73
|
-
ranges: Array<{
|
|
74
|
-
startValue?: string | number;
|
|
75
|
-
endValue: string | number;
|
|
76
|
-
} | {
|
|
77
|
-
startValue: string | number;
|
|
78
|
-
endValue?: string | number;
|
|
79
|
-
}>;
|
|
80
|
-
};
|
|
81
|
-
export interface AggregateObjectsV2Body {
|
|
82
|
-
aggregation: AggregationClause[];
|
|
83
|
-
groupBy?: GroupByClause[];
|
|
84
|
-
where?: SearchClauseV2;
|
|
85
|
-
}
|
|
86
|
-
export type AggregationAPIResponse = {
|
|
87
|
-
excludedItems?: number;
|
|
88
|
-
data: Array<{
|
|
89
|
-
group: {
|
|
90
|
-
[key: string]: GroupValue;
|
|
91
|
-
};
|
|
92
|
-
metrics: Array<{
|
|
93
|
-
name: string;
|
|
94
|
-
value: AggregationValueType;
|
|
95
|
-
}>;
|
|
96
|
-
}>;
|
|
97
|
-
};
|
|
98
|
-
export type AggregateObjectsResponseV2 = {
|
|
99
|
-
excludedItems?: number;
|
|
100
|
-
data: Array<AggregateObjectsResponseItemV2>;
|
|
101
|
-
};
|
|
102
|
-
export type AggregateObjectsResponseItemV2 = {
|
|
103
|
-
group: Record<AggregationGroupKeyV2, AggregationGroupValueV2>;
|
|
104
|
-
metrics: Array<AggregationMetricResultV2>;
|
|
105
|
-
};
|
|
106
|
-
export type AggregationGroupKeyV2 = string;
|
|
107
|
-
export type AggregationGroupValueV2 = any;
|
|
108
|
-
export type AggregationMetricResultV2 = {
|
|
109
|
-
name: string;
|
|
110
|
-
value?: any;
|
|
111
|
-
};
|
|
112
|
-
export type LoadObjectSetRequestV2 = {
|
|
113
|
-
objectSet: ObjectSet;
|
|
114
|
-
orderBy?: SearchOrderBy;
|
|
115
|
-
select: Array<SelectedPropertyApiName>;
|
|
116
|
-
pageToken?: PageToken;
|
|
117
|
-
pageSize?: PageSize;
|
|
118
|
-
};
|
|
119
|
-
export type SearchOrderBy = {
|
|
120
|
-
fields: Array<SearchOrdering>;
|
|
121
|
-
};
|
|
122
|
-
export type SearchOrdering = {
|
|
123
|
-
field: string;
|
|
124
|
-
direction?: string;
|
|
125
|
-
};
|
|
126
|
-
export type SelectedPropertyApiName = string;
|
|
127
|
-
export type PageToken = string;
|
|
128
|
-
export type PageSize = number;
|
|
129
|
-
export type ObjectRid = string;
|
|
130
|
-
export type ObjectSet = (ObjectSetBaseType & {
|
|
131
|
-
type: "base";
|
|
132
|
-
}) | (ObjectSetStaticType & {
|
|
133
|
-
type: "static";
|
|
134
|
-
}) | (ObjectSetReferenceType & {
|
|
135
|
-
type: "reference";
|
|
136
|
-
}) | (ObjectSetFilterType & {
|
|
137
|
-
type: "filter";
|
|
138
|
-
}) | (ObjectSetUnionType & {
|
|
139
|
-
type: "union";
|
|
140
|
-
}) | (ObjectSetIntersectionType & {
|
|
141
|
-
type: "intersect";
|
|
142
|
-
}) | (ObjectSetSubtractType & {
|
|
143
|
-
type: "subtract";
|
|
144
|
-
}) | (ObjectSetSearchAroundType & {
|
|
145
|
-
type: "searchAround";
|
|
146
|
-
});
|
|
147
|
-
export type ObjectSetBaseType = {
|
|
148
|
-
objectType: string;
|
|
149
|
-
};
|
|
150
|
-
export type ObjectSetStaticType = {
|
|
151
|
-
objects: Array<ObjectRid>;
|
|
152
|
-
};
|
|
153
|
-
export type ObjectSetReferenceType = {
|
|
154
|
-
reference: string;
|
|
155
|
-
};
|
|
156
|
-
export type ObjectSetFilterType = {
|
|
157
|
-
objectSet: ObjectSet;
|
|
158
|
-
where: SearchJsonQueryV2;
|
|
159
|
-
};
|
|
160
|
-
export type ObjectSetIntersectionType = {
|
|
161
|
-
objectSets: Array<ObjectSet>;
|
|
162
|
-
};
|
|
163
|
-
/** */
|
|
164
|
-
export type ObjectSetUnionType = {
|
|
165
|
-
objectSets: Array<ObjectSet>;
|
|
166
|
-
};
|
|
167
|
-
export type ObjectSetSubtractType = {
|
|
168
|
-
objectSets: Array<ObjectSet>;
|
|
169
|
-
};
|
|
170
|
-
export type ObjectSetSearchAroundType = {
|
|
171
|
-
objectSet: ObjectSet;
|
|
172
|
-
link: LinkTypeApiName;
|
|
173
|
-
};
|
|
174
|
-
export type LinkTypeApiName = string;
|
|
175
|
-
export type SearchJsonQueryV2 = (LtQuery & {
|
|
176
|
-
type: "lt";
|
|
177
|
-
}) | (GtQuery & {
|
|
178
|
-
type: "gt";
|
|
179
|
-
}) | (LteQuery & {
|
|
180
|
-
type: "lte";
|
|
181
|
-
}) | (GteQuery & {
|
|
182
|
-
type: "gte";
|
|
183
|
-
}) | (EqualsQuery & {
|
|
184
|
-
type: "eq";
|
|
185
|
-
}) | (IsNullQuery & {
|
|
186
|
-
type: "isNull";
|
|
187
|
-
}) | (ContainsQuery & {
|
|
188
|
-
type: "contains";
|
|
189
|
-
}) | (AndQueryV2 & {
|
|
190
|
-
type: "and";
|
|
191
|
-
}) | (OrQueryV2 & {
|
|
192
|
-
type: "or";
|
|
193
|
-
}) | (NotQueryV2 & {
|
|
194
|
-
type: "not";
|
|
195
|
-
}) | (StartsWithQuery & {
|
|
196
|
-
type: "startsWith";
|
|
197
|
-
}) | (ContainsAllTermsInOrderQuery & {
|
|
198
|
-
type: "containsAllTermsInOrder";
|
|
199
|
-
}) | (ContainsAnyTermQuery & {
|
|
200
|
-
type: "containsAnyTerm";
|
|
201
|
-
}) | (ContainsAllTermsQuery & {
|
|
202
|
-
type: "containsAllTerms";
|
|
203
|
-
}) | (WithinDistanceOfQuery & {
|
|
204
|
-
type: "withinDistanceOf";
|
|
205
|
-
}) | (WithinBoundingBoxQuery & {
|
|
206
|
-
type: "withinBoundingBox";
|
|
207
|
-
}) | (IntersectsBoundingBoxQuery & {
|
|
208
|
-
type: "intersectsBoundingBox";
|
|
209
|
-
}) | (DoesNotIntersectBoundingBoxQuery & {
|
|
210
|
-
type: "doesNotIntersectBoundingBox";
|
|
211
|
-
}) | (WithinPolygonQuery & {
|
|
212
|
-
type: "withinPolygon";
|
|
213
|
-
}) | (IntersectsPolygonQuery & {
|
|
214
|
-
type: "intersectsPolygon";
|
|
215
|
-
}) | (DoesNotIntersectPolygonQuery & {
|
|
216
|
-
type: "doesNotIntersectPolygon";
|
|
217
|
-
});
|
|
218
|
-
export type LtQuery = {
|
|
219
|
-
field: string;
|
|
220
|
-
value: any;
|
|
221
|
-
};
|
|
222
|
-
export type GtQuery = {
|
|
223
|
-
field: string;
|
|
224
|
-
value: any;
|
|
225
|
-
};
|
|
226
|
-
export type LteQuery = {
|
|
227
|
-
field: string;
|
|
228
|
-
value: any;
|
|
229
|
-
};
|
|
230
|
-
/** Returns objects where the specified field is greater than or equal to a value. */
|
|
231
|
-
export type GteQuery = {
|
|
232
|
-
field: string;
|
|
233
|
-
value: any;
|
|
234
|
-
};
|
|
235
|
-
/** Returns objects where the specified field is equal to a value. */
|
|
236
|
-
export type EqualsQuery = {
|
|
237
|
-
field: string;
|
|
238
|
-
value: any;
|
|
239
|
-
};
|
|
240
|
-
/** Returns objects based on the existence of the specified field. */
|
|
241
|
-
export type IsNullQuery = {
|
|
242
|
-
field: string;
|
|
243
|
-
value: boolean;
|
|
244
|
-
};
|
|
245
|
-
/** Returns objects where the specified array contains a value. */
|
|
246
|
-
export type ContainsQuery = {
|
|
247
|
-
field: string;
|
|
248
|
-
value: any;
|
|
249
|
-
};
|
|
250
|
-
export type AndQueryV2 = {
|
|
251
|
-
value: Array<SearchJsonQueryV2>;
|
|
252
|
-
};
|
|
253
|
-
export type OrQueryV2 = {
|
|
254
|
-
value: Array<SearchJsonQueryV2>;
|
|
255
|
-
};
|
|
256
|
-
export type NotQueryV2 = {
|
|
257
|
-
value: SearchJsonQueryV2;
|
|
258
|
-
};
|
|
259
|
-
export type StartsWithQuery = {
|
|
260
|
-
field: string;
|
|
261
|
-
value: string;
|
|
262
|
-
};
|
|
263
|
-
export type ContainsAllTermsInOrderQuery = {
|
|
264
|
-
field: string;
|
|
265
|
-
value: string;
|
|
266
|
-
};
|
|
267
|
-
export type ContainsAnyTermQuery = {
|
|
268
|
-
field: string;
|
|
269
|
-
value: string;
|
|
270
|
-
fuzzy?: Fuzzy;
|
|
271
|
-
};
|
|
272
|
-
export type ContainsAllTermsQuery = {
|
|
273
|
-
field: string;
|
|
274
|
-
value: string;
|
|
275
|
-
fuzzy?: Fuzzy;
|
|
276
|
-
};
|
|
277
|
-
export type WithinDistanceOfQuery = {
|
|
278
|
-
field: string;
|
|
279
|
-
value: CenterPoint;
|
|
280
|
-
};
|
|
281
|
-
export type WithinBoundingBoxQuery = {
|
|
282
|
-
field: string;
|
|
283
|
-
value: BoundingBoxValue;
|
|
284
|
-
};
|
|
285
|
-
export type IntersectsBoundingBoxQuery = {
|
|
286
|
-
field: string;
|
|
287
|
-
value: BoundingBoxValue;
|
|
288
|
-
};
|
|
289
|
-
export type DoesNotIntersectBoundingBoxQuery = {
|
|
290
|
-
field: string;
|
|
291
|
-
value: BoundingBoxValue;
|
|
292
|
-
};
|
|
293
|
-
export type WithinPolygonQuery = {
|
|
294
|
-
field: string;
|
|
295
|
-
value: PolygonValue;
|
|
296
|
-
};
|
|
297
|
-
export type IntersectsPolygonQuery = {
|
|
298
|
-
field: string;
|
|
299
|
-
value: PolygonValue;
|
|
300
|
-
};
|
|
301
|
-
export type DoesNotIntersectPolygonQuery = {
|
|
302
|
-
field: string;
|
|
303
|
-
value: PolygonValue;
|
|
304
|
-
};
|
|
305
|
-
export type CenterPoint = {
|
|
306
|
-
center: CenterPointTypes;
|
|
307
|
-
distance: Distance;
|
|
308
|
-
};
|
|
309
|
-
export type CenterPointTypes = GeoPoint & {
|
|
310
|
-
type: "Point";
|
|
311
|
-
};
|
|
312
|
-
export type GeoPoint = {
|
|
313
|
-
coordinates: Position;
|
|
314
|
-
bbox?: BBox;
|
|
315
|
-
};
|
|
316
|
-
export type Position = Array<Coordinate>;
|
|
317
|
-
export type Fuzzy = boolean;
|
|
318
|
-
export type Coordinate = number;
|
|
319
|
-
export type BBox = Array<Coordinate>;
|
|
320
|
-
export type Distance = {
|
|
321
|
-
value: number;
|
|
322
|
-
unit: DistanceUnit;
|
|
323
|
-
};
|
|
324
|
-
export type DistanceUnit = "MILLIMETERS" | "CENTIMETERS" | "METERS" | "KILOMETERS" | "INCHES" | "FEET" | "YARDS" | "MILES" | "NAUTICAL_MILES";
|
|
325
|
-
export type BoundingBoxValue = {
|
|
326
|
-
topLeft: WithinBoundingBoxPoint;
|
|
327
|
-
bottomRight: WithinBoundingBoxPoint;
|
|
328
|
-
};
|
|
329
|
-
export type WithinBoundingBoxPoint = GeoPoint & {
|
|
330
|
-
type: "Point";
|
|
331
|
-
};
|
|
332
|
-
export type PolygonValue = Polygon & {
|
|
333
|
-
type: "Polygon";
|
|
334
|
-
};
|
|
335
|
-
export type Polygon = {
|
|
336
|
-
coordinates: Array<LinearRing>;
|
|
337
|
-
bbox?: BBox;
|
|
338
|
-
};
|
|
339
|
-
export type LinearRing = Array<Position>;
|
|
340
|
-
type ApiValueBaseType = string | number | boolean;
|
|
341
|
-
type ApiValueType = ApiValueBaseType[] | ApiValueBaseType;
|
|
342
|
-
type rid = string;
|
|
343
|
-
export type OntologyObjectV2 = {
|
|
344
|
-
[key: string]: ApiValueType;
|
|
345
|
-
} & {
|
|
346
|
-
__rid: rid;
|
|
347
|
-
__primaryKey: ApiValueType;
|
|
348
|
-
};
|
|
349
|
-
export type PagedResponse<T> = {
|
|
350
|
-
data: T[];
|
|
351
|
-
nextPageToken?: string;
|
|
352
|
-
};
|
|
353
|
-
export type PageOptions = {
|
|
354
|
-
pageSize?: number;
|
|
355
|
-
pageToken?: string;
|
|
356
|
-
};
|
|
357
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition } from "../../ontology";
|
|
2
|
-
import type { AggregationsResults } from "../query";
|
|
3
|
-
import type { AggregateOpts } from "../query/aggregations/AggregateOpts";
|
|
4
|
-
import type { ThinClient } from "../ThinClient";
|
|
5
|
-
export declare function aggregateOrThrow<T extends OntologyDefinition<any>, K extends ObjectTypesFrom<T>, const AO extends AggregateOpts<T, K, any>>(thinClient: ThinClient<T>, objectType: K & string, req: AO): Promise<AggregationsResults<T, K, AO>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { OntologyObjectV2 } from "@osdk/gateway/types";
|
|
2
|
-
import type { ObjectTypesFrom, OntologyDefinition, OsdkObjectFrom, PropertyKeysFrom } from "../../ontology";
|
|
3
|
-
import type { ThinClient } from "../ThinClient";
|
|
4
|
-
export declare function convertWireToOsdkObjects<T_ClientApiName extends ObjectTypesFrom<T_OntologyDefinition> & string, T_OntologyDefinition extends OntologyDefinition<any>>(client: ThinClient<T_OntologyDefinition>, apiName: T_ClientApiName, objs: OntologyObjectV2[]): OsdkObjectFrom<T_ClientApiName, T_OntologyDefinition, PropertyKeysFrom<T_OntologyDefinition, T_ClientApiName>>[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition, OsdkObjectFrom, PropertyKeysFrom } from "../../ontology";
|
|
2
|
-
import type { NOOP } from "../../util";
|
|
3
|
-
import type { Wire } from "../internal/net";
|
|
4
|
-
import type { PageResult } from "../PageResult";
|
|
5
|
-
import type { ThinClient } from "../ThinClient";
|
|
6
|
-
export interface FetchPageOrThrowArgs<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>, L extends PropertyKeysFrom<O, K>> {
|
|
7
|
-
select?: readonly L[];
|
|
8
|
-
nextPageToken?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function fetchPageOrThrow<O extends OntologyDefinition<any>, T extends ObjectTypesFrom<O>, const A extends FetchPageOrThrowArgs<O, T, PropertyKeysFrom<O, T>>>(client: ThinClient<O>, objectType: T & string, args: A, objectSet?: Wire.ObjectSet): Promise<PageResult<NOOP<OsdkObjectFrom<T, O, A["select"] extends readonly string[] ? A["select"][number] : PropertyKeysFrom<O, T>>>>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ObjectInfoFrom, ObjectTypesFrom, OntologyDefinition, OsdkObjectFrom, PropertyKeysFrom } from "../../ontology";
|
|
2
|
-
import type { FetchPageOrThrowArgs } from "../object/fetchPageOrThrow";
|
|
3
|
-
import type { PageResult } from "../PageResult";
|
|
4
|
-
import type { AggregationsResults, WhereClause } from "../query";
|
|
5
|
-
import type { AggregateOpts } from "../query/aggregations/AggregateOpts";
|
|
6
|
-
import type { ResultOrError } from "../ResultOrError";
|
|
7
|
-
import type { LinkTypesFrom } from "./LinkTypesFrom";
|
|
8
|
-
export type ObjectSet<O extends OntologyDefinition<string>, K extends ObjectTypesFrom<O>> = BaseObjectSet<O, K>;
|
|
9
|
-
export type SearchAround<O extends OntologyDefinition<string>, K extends ObjectTypesFrom<O>> = {
|
|
10
|
-
[L in LinkTypesFrom<O, K> & string as `searchAround_${L}`]: () => ObjectSet<O, L>;
|
|
11
|
-
};
|
|
12
|
-
export interface BaseObjectSet<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>> {
|
|
13
|
-
fetchPageOrThrow: <L extends PropertyKeysFrom<O, K>>(args?: FetchPageOrThrowArgs<O, K, L>) => Promise<PageResult<OsdkObjectFrom<K, O, L>>>;
|
|
14
|
-
fetchPage: <L extends PropertyKeysFrom<O, K>>(args?: FetchPageOrThrowArgs<O, K, L>) => Promise<ResultOrError<PageResult<OsdkObjectFrom<K, O, L>>>>;
|
|
15
|
-
asyncIter: () => AsyncIterableIterator<OsdkObjectFrom<K, O, PropertyKeysFrom<O, K>>>;
|
|
16
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<OsdkObjectFrom<K, O, PropertyKeysFrom<O, K>>>;
|
|
17
|
-
aggregateOrThrow: <const AO extends AggregateOpts<O, K, any>>(req: AO) => Promise<AggregationsResults<O, K, AO>>;
|
|
18
|
-
aggregate: <const AO extends AggregateOpts<O, K, any>>(req: AO) => Promise<ResultOrError<AggregationsResults<O, K, typeof req>>>;
|
|
19
|
-
where: (clause: WhereClause<ObjectInfoFrom<O, K>>) => ObjectSet<O, K>;
|
|
20
|
-
pivotTo: <T extends LinkTypesFrom<O, K>>(type: T & string, opts?: ObjectSetOptions<O, O["objects"][K]["links"][T]["targetType"]>) => ObjectSet<O, O["objects"][K]["links"][T]["targetType"]>;
|
|
21
|
-
}
|
|
22
|
-
export interface ObjectSetOptions<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>> {
|
|
23
|
-
$where?: WhereClause<ObjectInfoFrom<O, K>>;
|
|
24
|
-
}
|
|
25
|
-
export type ObjectSetFactory<O extends OntologyDefinition<any>> = <K extends ObjectTypesFrom<O>>(type: K & string, opts?: ObjectSetOptions<O, K>) => ObjectSet<O, K>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition } from "../../ontology";
|
|
2
|
-
import type { Wire } from "../internal/net";
|
|
3
|
-
import type { ThinClient } from "../ThinClient";
|
|
4
|
-
import type { ObjectSet, ObjectSetOptions } from "./ObjectSet";
|
|
5
|
-
export declare function createObjectSet<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>>(objectType: K & string, thinClient: ThinClient<O>, opts: ObjectSetOptions<O, K> | undefined, objectSet?: Wire.ObjectSet): ObjectSet<O, K>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ObjectDefinition, PropertyDefinition } from "../../ontology";
|
|
2
|
-
export type PossibleWhereClauseFilters = "gt" | "eq" | "ne" | "isNull" | "gte" | "lt" | "lte";
|
|
3
|
-
type MakeFilter<K extends PossibleWhereClauseFilters, V> = K extends string ? Omit<{
|
|
4
|
-
[k in PossibleWhereClauseFilters]?: undefined;
|
|
5
|
-
}, K> & {
|
|
6
|
-
[k in K]: V;
|
|
7
|
-
} : never;
|
|
8
|
-
type BaseFilter<T> = T | MakeFilter<"eq" | "ne", T> | MakeFilter<"isNull", boolean>;
|
|
9
|
-
type StringFilter = BaseFilter<string>;
|
|
10
|
-
type NumberFilter = BaseFilter<number> | MakeFilter<"gt" | "gte" | "lt" | "lte", number>;
|
|
11
|
-
type FilterFor<PD extends PropertyDefinition> = PD["type"] extends "string" ? StringFilter : NumberFilter;
|
|
12
|
-
export interface AndWhereClause<T extends ObjectDefinition<any, any>> {
|
|
13
|
-
$and: WhereClause<T>[];
|
|
14
|
-
}
|
|
15
|
-
export interface OrWhereClause<T extends ObjectDefinition<any, any>> {
|
|
16
|
-
$or: WhereClause<T>[];
|
|
17
|
-
}
|
|
18
|
-
export interface NotWhereClause<T extends ObjectDefinition<any, any>> {
|
|
19
|
-
$not: WhereClause<T>;
|
|
20
|
-
}
|
|
21
|
-
export type WhereClause<T extends ObjectDefinition<any, any>> = OrWhereClause<T> | AndWhereClause<T> | NotWhereClause<T> | {
|
|
22
|
-
[P in keyof T["properties"]]?: FilterFor<T["properties"][P]>;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ObjectInfoFrom, ObjectTypesFrom, OntologyDefinition } from "../../../ontology";
|
|
2
|
-
import type { AggregationClause, GroupByClause, WhereClause } from "../../query";
|
|
3
|
-
export type AggregateOpts<T extends OntologyDefinition<any>, K extends ObjectTypesFrom<T>, AC extends AggregationClause<T, K>> = {
|
|
4
|
-
select: AC;
|
|
5
|
-
where?: WhereClause<ObjectInfoFrom<T, K>>;
|
|
6
|
-
groupBy?: GroupByClause<T, K>;
|
|
7
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition, OsdkObjectPropertyType, PropertyDefinitionFrom, PropertyKeysFrom } from "../../../ontology";
|
|
2
|
-
import type { AggregationResultsWithoutGroups } from "./AggregationResultsWithoutGroups";
|
|
3
|
-
import type { AggregationClause } from "./AggregationsClause";
|
|
4
|
-
import type { GroupByClause } from "./GroupByClause";
|
|
5
|
-
export type AggregationResultsWithGroups<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>, A extends AggregationClause<O, K>, G extends GroupByClause<O, K> | undefined> = {
|
|
6
|
-
group: {
|
|
7
|
-
[P in keyof G & PropertyKeysFrom<O, K>]: OsdkObjectPropertyType<PropertyDefinitionFrom<O, K, P>>;
|
|
8
|
-
};
|
|
9
|
-
values: AggregationResultsWithoutGroups<O, K, A>;
|
|
10
|
-
}[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition, OsdkObjectPropertyType, PropertyDefinitionFrom, PropertyKeysFrom } from "../../../ontology";
|
|
2
|
-
import type { StringArrayToUnion } from "../../../util";
|
|
3
|
-
import type { AggregationClause } from "./AggregationsClause";
|
|
4
|
-
type SubselectKeys<AC extends AggregationClause<any, any>, P extends keyof AC> = AC[P] extends readonly string[] | string ? P : never;
|
|
5
|
-
export type AggregationResultsWithoutGroups<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>, AC extends AggregationClause<O, K>> = {
|
|
6
|
-
[P in PropertyKeysFrom<O, K> as SubselectKeys<AC, P>]: AC[P] extends readonly string[] | string ? {
|
|
7
|
-
[Z in StringArrayToUnion<AC[P]>]: Z extends "approximateDistinct" ? number : OsdkObjectPropertyType<PropertyDefinitionFrom<O, K, P>>;
|
|
8
|
-
} : never;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition, PropertyDefinitionsFrom } from "../../../ontology";
|
|
2
|
-
import type { AggregatableKeys } from "./AggregatableKeys";
|
|
3
|
-
type StringAggregateOption = "approximateDistinct";
|
|
4
|
-
type NumericAggregateOption = "min" | "max" | "sum" | "avg" | "approximateDistinct";
|
|
5
|
-
export type AggregationClause<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>> = {
|
|
6
|
-
[P in AggregatableKeys<O, K>]?: PropertyDefinitionsFrom<O, K>[P]["type"] extends "string" ? StringAggregateOption | StringAggregateOption[] : PropertyDefinitionsFrom<O, K>[P]["type"] extends "double" ? NumericAggregateOption | NumericAggregateOption[] : PropertyDefinitionsFrom<O, K>[P]["type"];
|
|
7
|
-
};
|
|
8
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { AggregatableKeys } from "./AggregatableKeys";
|
|
2
|
-
import type { AggregationClause } from "./AggregationsClause";
|
|
3
|
-
export type huh = AggregatableKeys<{
|
|
4
|
-
metadata: any;
|
|
5
|
-
objects: {
|
|
6
|
-
Todo: {
|
|
7
|
-
apiName: "Todo";
|
|
8
|
-
primaryKeyType: "double";
|
|
9
|
-
links: {};
|
|
10
|
-
properties: {
|
|
11
|
-
text: {
|
|
12
|
-
type: "string";
|
|
13
|
-
};
|
|
14
|
-
id: {
|
|
15
|
-
type: "double";
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
actions: {};
|
|
21
|
-
queries: {};
|
|
22
|
-
}, "Todo">;
|
|
23
|
-
export type Q = AggregationClause<{
|
|
24
|
-
metadata: any;
|
|
25
|
-
objects: {
|
|
26
|
-
Todo: {
|
|
27
|
-
apiName: "Todo";
|
|
28
|
-
primaryKeyType: "double";
|
|
29
|
-
links: {};
|
|
30
|
-
properties: {
|
|
31
|
-
text: {
|
|
32
|
-
type: "string";
|
|
33
|
-
};
|
|
34
|
-
id: {
|
|
35
|
-
type: "double";
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
actions: {};
|
|
41
|
-
queries: {};
|
|
42
|
-
}, "Todo">;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition } from "../../../ontology";
|
|
2
|
-
import type { AggregateOpts } from "./AggregateOpts";
|
|
3
|
-
import type { AggregationResultsWithGroups } from "./AggregationResultsWithGroups";
|
|
4
|
-
import type { AggregationResultsWithoutGroups } from "./AggregationResultsWithoutGroups";
|
|
5
|
-
export type AggregationsResults<T extends OntologyDefinition<any>, K extends ObjectTypesFrom<T>, AO extends AggregateOpts<T, K, any>> = unknown extends AO["groupBy"] ? AggregationResultsWithoutGroups<T, K, AO["select"]> : Exclude<AO["groupBy"], undefined> extends never ? AggregationResultsWithoutGroups<T, K, AO["select"]> : AggregationResultsWithGroups<T, K, AO["select"], AO["groupBy"]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ObjectTypesFrom, OntologyDefinition, PropertyDefinitionFrom } from "../../../ontology";
|
|
2
|
-
import type { AggregatableKeys } from "./AggregatableKeys";
|
|
3
|
-
import type { GroupByMapper } from "./GroupByMapper";
|
|
4
|
-
export type GroupByClause<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>> = {
|
|
5
|
-
[P in AggregatableKeys<O, K>]?: GroupByEntry<O, K, P>;
|
|
6
|
-
};
|
|
7
|
-
export type StringGroupByValue = "exact" | {
|
|
8
|
-
exactWithLimit: number;
|
|
9
|
-
};
|
|
10
|
-
type GroupByEntry<O extends OntologyDefinition<any>, K extends ObjectTypesFrom<O>, P extends AggregatableKeys<O, K>> = PropertyDefinitionFrom<O, K, P>["type"] extends keyof GroupByMapper ? GroupByMapper[PropertyDefinitionFrom<O, K, P>["type"]] : never;
|
|
11
|
-
export type AllGroupByValues = GroupByMapper[keyof GroupByMapper];
|
|
12
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { GroupByClause } from "./GroupByClause";
|
|
2
|
-
export type F = GroupByClause<{
|
|
3
|
-
metadata: any;
|
|
4
|
-
objects: {
|
|
5
|
-
Todo: {
|
|
6
|
-
apiName: "Todo";
|
|
7
|
-
primaryKeyType: "double";
|
|
8
|
-
links: {};
|
|
9
|
-
properties: {
|
|
10
|
-
text: {
|
|
11
|
-
type: "string";
|
|
12
|
-
};
|
|
13
|
-
id: {
|
|
14
|
-
type: "double";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
actions: {};
|
|
20
|
-
queries: {};
|
|
21
|
-
}, "Todo">;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type * from "./aggregations/AggregatableKeys";
|
|
2
|
-
export type * from "./aggregations/AggregationResultsWithGroups";
|
|
3
|
-
export type * from "./aggregations/AggregationResultsWithoutGroups";
|
|
4
|
-
export type * from "./aggregations/AggregationsClause";
|
|
5
|
-
export type * from "./aggregations/AggregationsResults";
|
|
6
|
-
export type { AllGroupByValues, GroupByClause, } from "./aggregations/GroupByClause";
|
|
7
|
-
export type { AndWhereClause, NotWhereClause, OrWhereClause, PossibleWhereClauseFilters, WhereClause, } from "./WhereClause";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../client/object";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type StringArrayToUnion<T extends string | readonly string[]> = T extends ReadonlyArray<infer U> ? U : T;
|