@osdk/api 2.4.0-beta.8 → 2.4.0-beta.9
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 +6 -0
- package/build/browser/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/browser/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/browser/groupby/GroupByClause.js.map +1 -1
- package/build/cjs/{ObjectSet-TRW1A5Ut.d.cts → ObjectSet-DmnkezS6.d.cts} +30 -7
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/esm/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/esm/groupby/GroupByClause.js.map +1 -1
- package/build/types/aggregate/AggregateOptsThatErrors.d.ts +9 -1
- package/build/types/aggregate/AggregateOptsThatErrors.d.ts.map +1 -1
- package/build/types/aggregate/AggregationResultsWithGroups.d.ts +10 -1
- package/build/types/aggregate/AggregationResultsWithGroups.d.ts.map +1 -1
- package/build/types/groupby/GroupByClause.d.ts +10 -2
- package/build/types/groupby/GroupByClause.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n
|
|
1
|
+
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = ContainsExactMatchWithNull<AO[\"$groupBy\"]> extends true ? {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n : SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n AO[\"$select\"] extends UnorderedAggregationClause<Q>\n ? AggregateOptsThatErrors<Q, AO>\n : {} extends AO[\"$groupBy\"] ? AggregateOptsThatErrors<Q, AO>\n : {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n )\n : AggregateOptsThatErrors<Q, AO>;\n\ntype ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> =\n undefined extends GB ? false : {} extends GB ? false : {\n [P in keyof GB]: GB[P] extends { $exact: { $includeNullValue: true } }\n ? true\n : false;\n }[keyof GB];\n\ntype AggregateOptsThatErrors<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> =\n & AO\n & {\n $select:\n & Pick<\n AO[\"$select\"],\n keyof AggregateOpts<Q>[\"$select\"] & keyof AO[\"$select\"]\n >\n & Record<\n Exclude<keyof AO[\"$select\"], keyof AggregateOpts<Q>[\"$select\"]>,\n never\n >;\n }\n & (unknown extends AO[\"$groupBy\"] ? {}\n : Exclude<AO[\"$groupBy\"], undefined> extends never ? {}\n : {\n $groupBy:\n & Pick<\n AO[\"$groupBy\"],\n keyof GroupByClause<Q> & keyof AO[\"$groupBy\"]\n >\n & Record<\n Exclude<keyof AO[\"$groupBy\"], keyof GroupByClause<Q>>,\n never\n >;\n });\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : OsdkObjectPropertyType
|
|
1
|
+
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : MaybeNullable<\n G[P],\n OsdkObjectPropertyType<\n CompileTimeMetadata<Q>[\"properties\"][P],\n true\n >\n >;\n };\n }\n & AggregationResultsWithoutGroups<Q, A>\n)[];\n\ntype MaybeNullable<GROUP, VALUE> = GROUP extends {\n $exact: { $includeNullValue: true };\n} ? VALUE | null\n : VALUE;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupByClause.js","names":["TimeDurationMapping","DurationMapping"],"sources":["GroupByClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregatableKeys } from \"../aggregate/AggregatableKeys.js\";\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { GroupByMapper } from \"./GroupByMapper.js\";\n\nexport type GroupByClause<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n [P in AggregatableKeys<Q>]?: GroupByEntry<Q, P>;\n};\n\ntype BaseGroupByValue =\n | \"exact\"\n | { $exactWithLimit: number }\n | ExactGroupByWithOptions;\n\ntype ExactGroupByWithOptions = {\n $exact
|
|
1
|
+
{"version":3,"file":"GroupByClause.js","names":["TimeDurationMapping","DurationMapping"],"sources":["GroupByClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregatableKeys } from \"../aggregate/AggregatableKeys.js\";\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { GroupByMapper } from \"./GroupByMapper.js\";\n\nexport type GroupByClause<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n [P in AggregatableKeys<Q>]?: GroupByEntry<Q, P>;\n};\n\ntype BaseGroupByValue =\n | \"exact\"\n | { $exactWithLimit: number }\n | ExactGroupByWithOptions;\n\ntype ExactGroupByWithOptions = {\n $exact:\n & {\n $limit?: number;\n }\n & (\n | {\n $defaultValue?: undefined;\n $includeNullValue?: false;\n }\n | {\n $defaultValue: string;\n $includeNullValue?: false;\n }\n | {\n $defaultValue?: never;\n $includeNullValue: true;\n }\n );\n};\n\nexport type GroupByRange<T> = [T, T];\n\nexport type StringGroupByValue = BaseGroupByValue;\n\nexport type NumericGroupByValue = BaseGroupByValue | {\n $fixedWidth: number;\n} | { $ranges: GroupByRange<number>[] };\n\nexport type TimestampGroupByValue =\n | BaseGroupByValue\n | { $ranges: GroupByRange<string>[] }\n | { $duration: TimestampDurationGroupBy };\n\nexport type DateGroupByValue =\n | BaseGroupByValue\n | { $ranges: GroupByRange<string>[] }\n | { $duration: DatetimeDurationGroupBy };\n\nexport type BooleanGroupByValue = BaseGroupByValue;\n\nexport type TimestampTimeUnits =\n | DateTimeUnits\n | \"SECONDS\"\n | \"MINUTES\"\n | \"HOURS\";\n\nexport type DateTimeUnits = \"DAYS\" | \"WEEKS\" | \"MONTHS\" | \"YEARS\" | \"QUARTERS\";\nexport const DurationMapping: {\n quarter: \"QUARTERS\";\n quarters: \"QUARTERS\";\n sec: \"SECONDS\";\n seconds: \"SECONDS\";\n min: \"MINUTES\";\n minute: \"MINUTES\";\n minutes: \"MINUTES\";\n hr: \"HOURS\";\n hrs: \"HOURS\";\n hour: \"HOURS\";\n hours: \"HOURS\";\n day: \"DAYS\";\n days: \"DAYS\";\n wk: \"WEEKS\";\n week: \"WEEKS\";\n weeks: \"WEEKS\";\n mos: \"MONTHS\";\n month: \"MONTHS\";\n months: \"MONTHS\";\n yr: \"YEARS\";\n year: \"YEARS\";\n years: \"YEARS\";\n} = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\",\n} satisfies Record<string, DateTimeUnits | TimestampTimeUnits>;\n\ninterface TimeValueMapping {\n SECONDS: number;\n MINUTES: number;\n HOURS: number;\n DAYS: number;\n WEEKS: 1;\n MONTHS: 1;\n YEARS: 1;\n QUARTERS: 1;\n}\n\ntype DurationGroupBy<A> = {\n [K in keyof typeof DurationMapping]: typeof DurationMapping[K] extends A\n ? [TimeValueMapping[typeof DurationMapping[K]], K]\n : never;\n}[keyof typeof DurationMapping];\n\ntype TimestampDurationGroupBy = DurationGroupBy<TimestampTimeUnits>;\ntype DatetimeDurationGroupBy = DurationGroupBy<DateTimeUnits>;\n\ntype GroupByEntry<\n Q extends ObjectOrInterfaceDefinition,\n P extends AggregatableKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P][\"type\"] extends keyof GroupByMapper\n ? GroupByMapper[CompileTimeMetadata<Q>[\"properties\"][P][\"type\"]]\n : never;\n\nexport type AllGroupByValues = GroupByMapper[keyof GroupByMapper];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,+BAA+B;AAgEnE,OAAO,MAAMC,eAuBZ,GAAG;EACF,GAAGD,mBAAmB;EACtB,SAAS,EAAE,UAAU;EACrB,UAAU,EAAE;AACd,CAA8D","ignoreList":[]}
|
|
@@ -459,8 +459,16 @@ type BaseGroupByValue = "exact" | {
|
|
|
459
459
|
type ExactGroupByWithOptions = {
|
|
460
460
|
$exact: {
|
|
461
461
|
$limit?: number;
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
} & ({
|
|
463
|
+
$defaultValue?: undefined;
|
|
464
|
+
$includeNullValue?: false;
|
|
465
|
+
} | {
|
|
466
|
+
$defaultValue: string;
|
|
467
|
+
$includeNullValue?: false;
|
|
468
|
+
} | {
|
|
469
|
+
$defaultValue?: never;
|
|
470
|
+
$includeNullValue: true;
|
|
471
|
+
});
|
|
464
472
|
};
|
|
465
473
|
type GroupByRange<T> = [T, T];
|
|
466
474
|
type StringGroupByValue = BaseGroupByValue;
|
|
@@ -537,10 +545,20 @@ type AggregateOpts<Q extends ObjectOrInterfaceDefinition> = {
|
|
|
537
545
|
$groupBy?: GroupByClause<Q>;
|
|
538
546
|
};
|
|
539
547
|
|
|
540
|
-
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> =
|
|
548
|
+
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = ContainsExactMatchWithNull<AO["$groupBy"]> extends true ? {
|
|
549
|
+
$groupBy: AO["$groupBy"];
|
|
550
|
+
$select: UnorderedAggregationClause<Q>;
|
|
551
|
+
} : SingleKeyObject<AO["$groupBy"]> extends never ? (AO["$select"] extends UnorderedAggregationClause<Q> ? AggregateOptsThatErrors<Q, AO> : {} extends AO["$groupBy"] ? AggregateOptsThatErrors<Q, AO> : {
|
|
541
552
|
$groupBy: AO["$groupBy"];
|
|
542
553
|
$select: UnorderedAggregationClause<Q>;
|
|
543
554
|
}) : AggregateOptsThatErrors<Q, AO>;
|
|
555
|
+
type ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> = undefined extends GB ? false : {} extends GB ? false : {
|
|
556
|
+
[P in keyof GB]: GB[P] extends {
|
|
557
|
+
$exact: {
|
|
558
|
+
$includeNullValue: true;
|
|
559
|
+
};
|
|
560
|
+
} ? true : false;
|
|
561
|
+
}[keyof GB];
|
|
544
562
|
type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = AO & {
|
|
545
563
|
$select: Pick<AO["$select"], keyof AggregateOpts<Q>["$select"] & keyof AO["$select"]> & Record<Exclude<keyof AO["$select"], keyof AggregateOpts<Q>["$select"]>, never>;
|
|
546
564
|
} & (unknown extends AO["$groupBy"] ? {} : Exclude<AO["$groupBy"], undefined> extends never ? {} : {
|
|
@@ -550,18 +568,18 @@ type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends A
|
|
|
550
568
|
type MaybeArray<T extends {
|
|
551
569
|
multiplicity?: boolean | undefined;
|
|
552
570
|
}, U> = T["multiplicity"] extends true ? Array<U> : U;
|
|
553
|
-
type MaybeNullable<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
571
|
+
type MaybeNullable$1<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
554
572
|
type Converted<T> = T extends Array<any> ? T[1] : T;
|
|
555
573
|
/**
|
|
556
574
|
* @param {T} ObjectMetadata.Property in literal form
|
|
557
575
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
558
576
|
*/
|
|
559
|
-
type OsdkObjectPropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable<T, MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>>;
|
|
577
|
+
type OsdkObjectPropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable$1<T, MaybeArray<T, Converted<GetClientPropertyValueFromWire<T["type"]>>>>;
|
|
560
578
|
/**
|
|
561
579
|
* @param {T} ObjectMetadata.Property in literal form
|
|
562
580
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
563
581
|
*/
|
|
564
|
-
type OsdkObjectCreatePropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable<T, MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>>>;
|
|
582
|
+
type OsdkObjectCreatePropertyType<T extends ObjectMetadata.Property, STRICTLY_ENFORCE_NULLABLE extends boolean = true> = STRICTLY_ENFORCE_NULLABLE extends false ? MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>> | undefined : MaybeNullable$1<T, MaybeArray<T, Converted<GetCreatePropertyValueFromWire<T["type"]>>>>;
|
|
565
583
|
|
|
566
584
|
type ExtractPropName<T extends string> = T extends `${infer PropName}:${string}` ? PropName : T extends "$count" ? T : never;
|
|
567
585
|
type ExtractMetricNameForPropName<T, PropName extends string> = T extends `${PropName}:${infer MetricName}` ? MetricName : never;
|
|
@@ -578,9 +596,14 @@ type AggregationResultsWithGroups<Q extends ObjectOrInterfaceDefinition, A exten
|
|
|
578
596
|
} ? {
|
|
579
597
|
startValue: T;
|
|
580
598
|
endValue: T;
|
|
581
|
-
} : OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true
|
|
599
|
+
} : MaybeNullable<G[P], OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true>>;
|
|
582
600
|
};
|
|
583
601
|
} & AggregationResultsWithoutGroups<Q, A>)[];
|
|
602
|
+
type MaybeNullable<GROUP, VALUE> = GROUP extends {
|
|
603
|
+
$exact: {
|
|
604
|
+
$includeNullValue: true;
|
|
605
|
+
};
|
|
606
|
+
} ? VALUE | null : VALUE;
|
|
584
607
|
|
|
585
608
|
type AggregationsResults<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = Exclude<keyof AO["$select"], ValidAggregationKeys<Q>> extends never ? unknown extends AO["$groupBy"] ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<AO["$groupBy"], undefined> extends never ? AggregationResultsWithoutGroups<Q, AO["$select"]> : Exclude<keyof AO["$groupBy"], AggregatableKeys<Q>> extends never ? AggregationResultsWithGroups<Q, AO["$select"], AO["$groupBy"]> : `Sorry, the following are not valid groups for an aggregation: ${Exclude<keyof AO["$groupBy"] & string, AggregatableKeys<Q>>}` : `Sorry, the following are not valid selectors for an aggregation: ${Exclude<keyof AO["$select"] & string, ValidAggregationKeys<Q>>}`;
|
|
586
609
|
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, g as PrimaryKeyTypes, h as OsdkBase } from './ObjectSet-
|
|
2
|
-
export { i as AggregateOpts, j as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, m as AggregationClause, k as AggregationResultsWithGroups, l as AggregationResultsWithoutGroups, n as AggregationsResults, w as AllGroupByValues, z as AsyncIterArgs, B as Augment, E as Augments, Z as BaseObjectSet, a6 as BaseWirePropertyTypes, a9 as ConvertProps, u as DerivedProperty, D as DistanceUnitMapping, v as DurationMapping, F as FetchPageArgs, L as FetchPageResult, G as GeoFilterOptions, o as GeoFilter_Intersects, p as GeoFilter_Within, ad as GeotimeSeriesProperty, x as GroupByClause, y as GroupByRange, $ as InterfaceMetadata, ai as LinkNames, ah as LinkedType, T as Media, U as MediaMetadata, N as NullabilityAdherence, a3 as ObjectMetadata, a0 as ObjectOrInterfaceDefinition, H as ObjectSetArgs, _ as ObjectSetSubscription, a2 as ObjectSpecifier, aa as Osdk, r as OsdkObjectCreatePropertyType, t as OsdkObjectLinksObject, s as OsdkObjectPropertyType, ab as PageResult, q as PossibleWhereClauseFilters, a8 as PrimaryKeyType, a4 as PropertyDef, a1 as PropertyKeys, Y as Result, J as SelectArg, K as SelectArgToKeys, S as SingleLinkAccessor, Q as SingleOsdkResult, ae as TimeSeriesPoint, af as TimeSeriesProperty, ag as TimeSeriesQuery, ac as TimeseriesDurationMapping, V as ValidAggregationKeys, a5 as VersionBound, W as WhereClause, a7 as WirePropertyTypes, X as isOk } from './ObjectSet-
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, a as MediaUpload, b as Attachment, O as ObjectTypeDefinition, c as ObjectIdentifiers, d as OsdkObjectPrimaryKeyType, e as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, f as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, g as PrimaryKeyTypes, h as OsdkBase } from './ObjectSet-DmnkezS6.cjs';
|
|
2
|
+
export { i as AggregateOpts, j as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, m as AggregationClause, k as AggregationResultsWithGroups, l as AggregationResultsWithoutGroups, n as AggregationsResults, w as AllGroupByValues, z as AsyncIterArgs, B as Augment, E as Augments, Z as BaseObjectSet, a6 as BaseWirePropertyTypes, a9 as ConvertProps, u as DerivedProperty, D as DistanceUnitMapping, v as DurationMapping, F as FetchPageArgs, L as FetchPageResult, G as GeoFilterOptions, o as GeoFilter_Intersects, p as GeoFilter_Within, ad as GeotimeSeriesProperty, x as GroupByClause, y as GroupByRange, $ as InterfaceMetadata, ai as LinkNames, ah as LinkedType, T as Media, U as MediaMetadata, N as NullabilityAdherence, a3 as ObjectMetadata, a0 as ObjectOrInterfaceDefinition, H as ObjectSetArgs, _ as ObjectSetSubscription, a2 as ObjectSpecifier, aa as Osdk, r as OsdkObjectCreatePropertyType, t as OsdkObjectLinksObject, s as OsdkObjectPropertyType, ab as PageResult, q as PossibleWhereClauseFilters, a8 as PrimaryKeyType, a4 as PropertyDef, a1 as PropertyKeys, Y as Result, J as SelectArg, K as SelectArgToKeys, S as SingleLinkAccessor, Q as SingleOsdkResult, ae as TimeSeriesPoint, af as TimeSeriesProperty, ag as TimeSeriesQuery, ac as TimeseriesDurationMapping, V as ValidAggregationKeys, a5 as VersionBound, W as WhereClause, a7 as WirePropertyTypes, X as isOk } from './ObjectSet-DmnkezS6.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a0 as ObjectOrInterfaceDefinition, a1 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, J as SelectArg, aa as Osdk, aj as ExtractOptions, F as FetchPageArgs, L as FetchPageResult, h as OsdkBase } from '../ObjectSet-
|
|
2
|
-
export { ak as MinimalObjectSet } from '../ObjectSet-
|
|
1
|
+
import { a0 as ObjectOrInterfaceDefinition, a1 as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, J as SelectArg, aa as Osdk, aj as ExtractOptions, F as FetchPageArgs, L as FetchPageResult, h as OsdkBase } from '../ObjectSet-DmnkezS6.cjs';
|
|
2
|
+
export { ak as MinimalObjectSet } from '../ObjectSet-DmnkezS6.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n
|
|
1
|
+
{"version":3,"file":"AggregateOptsThatErrors.js","names":[],"sources":["AggregateOptsThatErrors.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SingleKeyObject } from \"type-fest\";\nimport type { GroupByClause } from \"../groupby/GroupByClause.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { AggregateOpts } from \"./AggregateOpts.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> = ContainsExactMatchWithNull<AO[\"$groupBy\"]> extends true ? {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n : SingleKeyObject<AO[\"$groupBy\"]> extends never ? (\n AO[\"$select\"] extends UnorderedAggregationClause<Q>\n ? AggregateOptsThatErrors<Q, AO>\n : {} extends AO[\"$groupBy\"] ? AggregateOptsThatErrors<Q, AO>\n : {\n $groupBy: AO[\"$groupBy\"];\n $select: UnorderedAggregationClause<Q>;\n }\n )\n : AggregateOptsThatErrors<Q, AO>;\n\ntype ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> =\n undefined extends GB ? false : {} extends GB ? false : {\n [P in keyof GB]: GB[P] extends { $exact: { $includeNullValue: true } }\n ? true\n : false;\n }[keyof GB];\n\ntype AggregateOptsThatErrors<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n> =\n & AO\n & {\n $select:\n & Pick<\n AO[\"$select\"],\n keyof AggregateOpts<Q>[\"$select\"] & keyof AO[\"$select\"]\n >\n & Record<\n Exclude<keyof AO[\"$select\"], keyof AggregateOpts<Q>[\"$select\"]>,\n never\n >;\n }\n & (unknown extends AO[\"$groupBy\"] ? {}\n : Exclude<AO[\"$groupBy\"], undefined> extends never ? {}\n : {\n $groupBy:\n & Pick<\n AO[\"$groupBy\"],\n keyof GroupByClause<Q> & keyof AO[\"$groupBy\"]\n >\n & Record<\n Exclude<keyof AO[\"$groupBy\"], keyof GroupByClause<Q>>,\n never\n >;\n });\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : OsdkObjectPropertyType
|
|
1
|
+
{"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : MaybeNullable<\n G[P],\n OsdkObjectPropertyType<\n CompileTimeMetadata<Q>[\"properties\"][P],\n true\n >\n >;\n };\n }\n & AggregationResultsWithoutGroups<Q, A>\n)[];\n\ntype MaybeNullable<GROUP, VALUE> = GROUP extends {\n $exact: { $includeNullValue: true };\n} ? VALUE | null\n : VALUE;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupByClause.js","names":["TimeDurationMapping","DurationMapping"],"sources":["GroupByClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregatableKeys } from \"../aggregate/AggregatableKeys.js\";\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { GroupByMapper } from \"./GroupByMapper.js\";\n\nexport type GroupByClause<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n [P in AggregatableKeys<Q>]?: GroupByEntry<Q, P>;\n};\n\ntype BaseGroupByValue =\n | \"exact\"\n | { $exactWithLimit: number }\n | ExactGroupByWithOptions;\n\ntype ExactGroupByWithOptions = {\n $exact
|
|
1
|
+
{"version":3,"file":"GroupByClause.js","names":["TimeDurationMapping","DurationMapping"],"sources":["GroupByClause.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AggregatableKeys } from \"../aggregate/AggregatableKeys.js\";\nimport { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { GroupByMapper } from \"./GroupByMapper.js\";\n\nexport type GroupByClause<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n [P in AggregatableKeys<Q>]?: GroupByEntry<Q, P>;\n};\n\ntype BaseGroupByValue =\n | \"exact\"\n | { $exactWithLimit: number }\n | ExactGroupByWithOptions;\n\ntype ExactGroupByWithOptions = {\n $exact:\n & {\n $limit?: number;\n }\n & (\n | {\n $defaultValue?: undefined;\n $includeNullValue?: false;\n }\n | {\n $defaultValue: string;\n $includeNullValue?: false;\n }\n | {\n $defaultValue?: never;\n $includeNullValue: true;\n }\n );\n};\n\nexport type GroupByRange<T> = [T, T];\n\nexport type StringGroupByValue = BaseGroupByValue;\n\nexport type NumericGroupByValue = BaseGroupByValue | {\n $fixedWidth: number;\n} | { $ranges: GroupByRange<number>[] };\n\nexport type TimestampGroupByValue =\n | BaseGroupByValue\n | { $ranges: GroupByRange<string>[] }\n | { $duration: TimestampDurationGroupBy };\n\nexport type DateGroupByValue =\n | BaseGroupByValue\n | { $ranges: GroupByRange<string>[] }\n | { $duration: DatetimeDurationGroupBy };\n\nexport type BooleanGroupByValue = BaseGroupByValue;\n\nexport type TimestampTimeUnits =\n | DateTimeUnits\n | \"SECONDS\"\n | \"MINUTES\"\n | \"HOURS\";\n\nexport type DateTimeUnits = \"DAYS\" | \"WEEKS\" | \"MONTHS\" | \"YEARS\" | \"QUARTERS\";\nexport const DurationMapping: {\n quarter: \"QUARTERS\";\n quarters: \"QUARTERS\";\n sec: \"SECONDS\";\n seconds: \"SECONDS\";\n min: \"MINUTES\";\n minute: \"MINUTES\";\n minutes: \"MINUTES\";\n hr: \"HOURS\";\n hrs: \"HOURS\";\n hour: \"HOURS\";\n hours: \"HOURS\";\n day: \"DAYS\";\n days: \"DAYS\";\n wk: \"WEEKS\";\n week: \"WEEKS\";\n weeks: \"WEEKS\";\n mos: \"MONTHS\";\n month: \"MONTHS\";\n months: \"MONTHS\";\n yr: \"YEARS\";\n year: \"YEARS\";\n years: \"YEARS\";\n} = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\",\n} satisfies Record<string, DateTimeUnits | TimestampTimeUnits>;\n\ninterface TimeValueMapping {\n SECONDS: number;\n MINUTES: number;\n HOURS: number;\n DAYS: number;\n WEEKS: 1;\n MONTHS: 1;\n YEARS: 1;\n QUARTERS: 1;\n}\n\ntype DurationGroupBy<A> = {\n [K in keyof typeof DurationMapping]: typeof DurationMapping[K] extends A\n ? [TimeValueMapping[typeof DurationMapping[K]], K]\n : never;\n}[keyof typeof DurationMapping];\n\ntype TimestampDurationGroupBy = DurationGroupBy<TimestampTimeUnits>;\ntype DatetimeDurationGroupBy = DurationGroupBy<DateTimeUnits>;\n\ntype GroupByEntry<\n Q extends ObjectOrInterfaceDefinition,\n P extends AggregatableKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][P][\"type\"] extends keyof GroupByMapper\n ? GroupByMapper[CompileTimeMetadata<Q>[\"properties\"][P][\"type\"]]\n : never;\n\nexport type AllGroupByValues = GroupByMapper[keyof GroupByMapper];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,+BAA+B;AAgEnE,OAAO,MAAMC,eAuBZ,GAAG;EACF,GAAGD,mBAAmB;EACtB,SAAS,EAAE,UAAU;EACrB,UAAU,EAAE;AACd,CAA8D","ignoreList":[]}
|
|
@@ -6,10 +6,18 @@ import type { UnorderedAggregationClause } from "./AggregationsClause.js";
|
|
|
6
6
|
export type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<
|
|
7
7
|
Q extends ObjectOrInterfaceDefinition,
|
|
8
8
|
AO extends AggregateOpts<Q>
|
|
9
|
-
> =
|
|
9
|
+
> = ContainsExactMatchWithNull<AO["$groupBy"]> extends true ? {
|
|
10
|
+
$groupBy: AO["$groupBy"]
|
|
11
|
+
$select: UnorderedAggregationClause<Q>
|
|
12
|
+
} : SingleKeyObject<AO["$groupBy"]> extends never ? (AO["$select"] extends UnorderedAggregationClause<Q> ? AggregateOptsThatErrors<Q, AO> : {} extends AO["$groupBy"] ? AggregateOptsThatErrors<Q, AO> : {
|
|
10
13
|
$groupBy: AO["$groupBy"]
|
|
11
14
|
$select: UnorderedAggregationClause<Q>
|
|
12
15
|
}) : AggregateOptsThatErrors<Q, AO>;
|
|
16
|
+
type ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> = undefined extends GB ? false : {} extends GB ? false : { [P in keyof GB] : GB[P] extends {
|
|
17
|
+
$exact: {
|
|
18
|
+
$includeNullValue: true
|
|
19
|
+
}
|
|
20
|
+
} ? true : false }[keyof GB];
|
|
13
21
|
type AggregateOptsThatErrors<
|
|
14
22
|
Q extends ObjectOrInterfaceDefinition,
|
|
15
23
|
AO extends AggregateOpts<Q>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,uBAAuB,WAAY;AACjD,cAAc,qBAAqB,6BAA8B;AACjE,cAAc,mCAAmC,kCAAmC;AACpF,cAAc,qBAAqB,oBAAqB;AACxD,cAAc,kCAAkC,yBAA0B;AAE1E,YAAY;CACV,UAAU;CACV,WAAW,cAAc;IACvB,gBAAgB,GAAG,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,uBAAuB,WAAY;AACjD,cAAc,qBAAqB,6BAA8B;AACjE,cAAc,mCAAmC,kCAAmC;AACpF,cAAc,qBAAqB,oBAAqB;AACxD,cAAc,kCAAkC,yBAA0B;AAE1E,YAAY;CACV,UAAU;CACV,WAAW,cAAc;IACvB,2BAA2B,GAAG,qBAAqB,OAAO;CAC1D,UAAU,GAAG;CACb,SAAS,2BAA2B;AACrC,IACC,gBAAgB,GAAG,8BACjB,GAAG,mBAAmB,2BAA2B,KAC7C,wBAAwB,GAAG,MAC3B,CAAE,UAAS,GAAG,cAAc,wBAAwB,GAAG,MACvD;CACA,UAAU,GAAG;CACb,SAAS,2BAA2B;AACrC,KAEL,wBAAwB,GAAG;KAE1B,2BAA2B,WAAW,oDACvB,KAAK,QAAQ,CAAE,UAAS,KAAK,WAC5C,WAAW,MAAK,GAAG,WAAW;CAAE,QAAQ;EAAE,mBAAmB;CAAM;AAAE,IAClE,OACA,cACE;KAEL;CACH,UAAU;CACV,WAAW,cAAc;IAEvB,KACA;CACA,SACI,KACA,GAAG,kBACG,cAAc,GAAG,mBAAmB,GAAG,cAE7C,OACA,cAAc,GAAG,kBAAkB,cAAc,GAAG;AAGzD,qBACkB,GAAG,cAAc,CAAE,IAClC,QAAQ,GAAG,wCAAwC,CAAE,IACrD;CACA,UACI,KACA,GAAG,mBACG,cAAc,WAAW,GAAG,eAElC,OACA,cAAc,GAAG,mBAAmB,cAAc;AAGvD","names":[],"sources":["../../../src/aggregate/AggregateOptsThatErrors.ts"],"version":3,"file":"AggregateOptsThatErrors.d.ts"}
|
|
@@ -14,5 +14,14 @@ export type AggregationResultsWithGroups<
|
|
|
14
14
|
} ? {
|
|
15
15
|
startValue: T
|
|
16
16
|
endValue: T
|
|
17
|
-
} : OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true
|
|
17
|
+
} : MaybeNullable<G[P], OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true>> }
|
|
18
18
|
} & AggregationResultsWithoutGroups<Q, A>)[];
|
|
19
|
+
type MaybeNullable<
|
|
20
|
+
GROUP,
|
|
21
|
+
VALUE
|
|
22
|
+
> = GROUP extends {
|
|
23
|
+
$exact: {
|
|
24
|
+
$includeNullValue: true
|
|
25
|
+
}
|
|
26
|
+
} ? VALUE | null : VALUE;
|
|
27
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,8BAA8B,mBAAoB;AAChE,cAAc,eAAe,oBAAoB,6BAA8B;AAC/E,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,uCAAuC,sCAAuC;AAC5F,cACE,0BACA,kCACK,yBAA0B;AAEjC,YAAY;CACV,UAAU;CACV,UAAU,2BAA2B,KAAK,yBAAyB;CACnE,UAAU,cAAc;KAEtB;CACA,WACG,WAAW,IAAI,aAAa,MAAK,EAAE,WAClC;EAAE,SAAS,mBAAmB;CAAM,IAAG;EAAE,YAAY;EAAG,UAAU;CAAG,IACnE,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,8BAA8B,mBAAoB;AAChE,cAAc,eAAe,oBAAoB,6BAA8B;AAC/E,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,uCAAuC,sCAAuC;AAC5F,cACE,0BACA,kCACK,yBAA0B;AAEjC,YAAY;CACV,UAAU;CACV,UAAU,2BAA2B,KAAK,yBAAyB;CACnE,UAAU,cAAc;KAEtB;CACA,WACG,WAAW,IAAI,aAAa,MAAK,EAAE,WAClC;EAAE,SAAS,mBAAmB;CAAM,IAAG;EAAE,YAAY;EAAG,UAAU;CAAG,IACnE,cACA,EAAE,IACF,uBACE,oBAAoB,GAAG,cAAc,IACrC;AAIT,IACC,gCAAgC,GAAG;KAGlC;CAAc;CAAO;IAAS,cAAc;CAC/C,QAAQ;EAAE,mBAAmB;CAAM;AACpC,IAAG,eACA","names":[],"sources":["../../../src/aggregate/AggregationResultsWithGroups.ts"],"version":3,"file":"AggregationResultsWithGroups.d.ts"}
|
|
@@ -9,8 +9,16 @@ type BaseGroupByValue = "exact" | {
|
|
|
9
9
|
type ExactGroupByWithOptions = {
|
|
10
10
|
$exact: {
|
|
11
11
|
$limit?: number
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
} & ({
|
|
13
|
+
$defaultValue?: undefined
|
|
14
|
+
$includeNullValue?: false
|
|
15
|
+
} | {
|
|
16
|
+
$defaultValue: string
|
|
17
|
+
$includeNullValue?: false
|
|
18
|
+
} | {
|
|
19
|
+
$defaultValue?: never
|
|
20
|
+
$includeNullValue: true
|
|
21
|
+
})
|
|
14
22
|
};
|
|
15
23
|
export type GroupByRange<T> = [T, T];
|
|
16
24
|
export type StringGroupByValue = BaseGroupByValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,wBAAwB,kCAAmC;AAEzE,cAAc,mCAAmC,kCAAmC;AACpF,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,qBAAqB,oBAAqB;AAExD,YAAY,cACV,UAAU,kCAET,KAAK,iBAAiB,OAAM,aAAa,GAAG;KAG1C,mBACD,UACA;CAAE;AAAyB,IAC3B;KAEC,0BAA0B;CAC7B,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,wBAAwB,kCAAmC;AAEzE,cAAc,mCAAmC,kCAAmC;AACpF,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,qBAAqB,oBAAqB;AAExD,YAAY,cACV,UAAU,kCAET,KAAK,iBAAiB,OAAM,aAAa,GAAG;KAG1C,mBACD,UACA;CAAE;AAAyB,IAC3B;KAEC,0BAA0B;CAC7B,QACI;EACA;CACD,KAEG;EACA;EACA,oBAAoB;CACrB,IACC;EACA;EACA,oBAAoB;CACrB,IACC;EACA;EACA,mBAAmB;CACpB;AAEN;AAED,YAAY,aAAa,MAAM,GAAG;AAElC,YAAY,qBAAqB;AAEjC,YAAY,sBAAsB,mBAAmB;CACnD;AACD,IAAG;CAAE,SAAS;AAAwB;AAEvC,YAAY,wBACR,mBACA;CAAE,SAAS;AAAwB,IACnC;CAAE,WAAW;AAA0B;AAE3C,YAAY,mBACR,mBACA;CAAE,SAAS;AAAwB,IACnC;CAAE,WAAW;AAAyB;AAE1C,YAAY,sBAAsB;AAElC,YAAY,qBACR,gBACA,YACA,YACA;AAEJ,YAAY,gBAAgB,SAAS,UAAU,WAAW,UAAU;AACpE,OAAO,cAAMA,iBAAiB;CAC5B,SAAS;CACT,UAAU;CACV,KAAK;CACL,SAAS;CACT,KAAK;CACL,QAAQ;CACR,SAAS;CACT,IAAI;CACJ,KAAK;CACL,MAAM;CACN,OAAO;CACP,KAAK;CACL,MAAM;CACN,IAAI;CACJ,MAAM;CACN,OAAO;CACP,KAAK;CACL,OAAO;CACP,QAAQ;CACR,IAAI;CACJ,MAAM;CACN,OAAO;AACR;UAMS,iBAAiB;CACzB;CACA;CACA;CACA;CACA,OAAO;CACP,QAAQ;CACR,OAAO;CACP,UAAU;AACX;KAEI,gBAAgB,QAClB,kBAAkB,0BAAyB,gBAAgB,WAAW,KAClE,wBAAwB,gBAAgB,KAAK,0BAErC;KAEV,2BAA2B,gBAAgB;KAC3C,0BAA0B,gBAAgB;KAE1C;CACH,UAAU;CACV,UAAU,iBAAiB;IACzB,oBAAoB,GAAG,cAAc,GAAG,sBAAsB,gBAC9D,cAAc,oBAAoB,GAAG,cAAc,GAAG;AAG1D,YAAY,mBAAmB,oBAAoB","names":["DurationMapping: {\n quarter: \"QUARTERS\";\n quarters: \"QUARTERS\";\n sec: \"SECONDS\";\n seconds: \"SECONDS\";\n min: \"MINUTES\";\n minute: \"MINUTES\";\n minutes: \"MINUTES\";\n hr: \"HOURS\";\n hrs: \"HOURS\";\n hour: \"HOURS\";\n hours: \"HOURS\";\n day: \"DAYS\";\n days: \"DAYS\";\n wk: \"WEEKS\";\n week: \"WEEKS\";\n weeks: \"WEEKS\";\n mos: \"MONTHS\";\n month: \"MONTHS\";\n months: \"MONTHS\";\n yr: \"YEARS\";\n year: \"YEARS\";\n years: \"YEARS\";\n}"],"sources":["../../../src/groupby/GroupByClause.ts"],"version":3,"file":"GroupByClause.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/api",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@microsoft/api-extractor": "^7.52.7",
|
|
49
49
|
"ts-expect": "^1.3.0",
|
|
50
50
|
"typescript": "~5.5.4",
|
|
51
|
-
"@osdk/monorepo.
|
|
52
|
-
"@osdk/monorepo.
|
|
51
|
+
"@osdk/monorepo.api-extractor": "~0.3.0-beta.1",
|
|
52
|
+
"@osdk/monorepo.tsconfig": "~0.3.0-beta.1"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|