@osdk/api 2.4.0-beta.8 → 2.4.0-rc.19
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 +39 -0
- package/build/browser/OsdkObjectPrimaryKeyType.js.map +1 -1
- package/build/browser/actions/Actions.js.map +1 -1
- package/build/browser/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/browser/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/groupby/GroupByClause.js.map +1 -1
- package/build/browser/index.js +0 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/mapping/DataValueMapping.js.map +1 -1
- package/build/browser/mapping/PropertyValueMapping.js.map +1 -1
- package/build/browser/object/Media.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +0 -22
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/InterfaceDefinition.js +16 -1
- package/build/browser/ontology/InterfaceDefinition.js.map +1 -1
- package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
- package/build/browser/ontology/QueryDefinition.js.map +1 -1
- package/build/browser/queries/Queries.js.map +1 -1
- package/build/browser/util/LinkUtils.js.map +1 -1
- package/build/cjs/{ObjectSet-TRW1A5Ut.d.cts → ObjectSet-BdIHDSBH.d.cts} +49 -33
- package/build/cjs/index.cjs +0 -4
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +34 -20
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/OsdkObjectPrimaryKeyType.js.map +1 -1
- package/build/esm/actions/Actions.js.map +1 -1
- package/build/esm/aggregate/AggregateOptsThatErrors.js.map +1 -1
- package/build/esm/aggregate/AggregationResultsWithGroups.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/groupby/GroupByClause.js.map +1 -1
- package/build/esm/index.js +0 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/mapping/DataValueMapping.js.map +1 -1
- package/build/esm/mapping/PropertyValueMapping.js.map +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +0 -22
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/InterfaceDefinition.js +16 -1
- package/build/esm/ontology/InterfaceDefinition.js.map +1 -1
- package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
- package/build/esm/ontology/QueryDefinition.js.map +1 -1
- package/build/esm/queries/Queries.js.map +1 -1
- package/build/esm/util/LinkUtils.js.map +1 -1
- package/build/types/OsdkObjectPrimaryKeyType.d.ts +3 -1
- package/build/types/OsdkObjectPrimaryKeyType.d.ts.map +1 -1
- package/build/types/actions/Actions.d.ts +0 -2
- package/build/types/actions/Actions.d.ts.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/derivedProperties/DerivedProperty.d.ts +1 -10
- package/build/types/derivedProperties/DerivedProperty.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/build/types/index.d.ts +3 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +2 -2
- package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
- package/build/types/mapping/PropertyValueMapping.d.ts +1 -1
- package/build/types/object/Media.d.ts +0 -7
- package/build/types/object/Media.d.ts.map +1 -1
- package/build/types/ontology/InterfaceDefinition.d.ts +13 -1
- package/build/types/ontology/InterfaceDefinition.d.ts.map +1 -1
- package/build/types/ontology/ObjectTypeDefinition.d.ts +1 -1
- package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
- package/build/types/ontology/QueryDefinition.d.ts +12 -3
- package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
- package/build/types/queries/Queries.d.ts +19 -5
- package/build/types/queries/Queries.d.ts.map +1 -1
- package/build/types/util/LinkUtils.d.ts +2 -1
- package/build/types/util/LinkUtils.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -52,13 +52,6 @@ interface MediaReference {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Object for uploading Media
|
|
57
|
-
*/
|
|
58
|
-
interface MediaUpload {
|
|
59
|
-
readonly path: string;
|
|
60
|
-
readonly data: Blob;
|
|
61
|
-
}
|
|
62
55
|
/**
|
|
63
56
|
* Metadata of a media item
|
|
64
57
|
*/
|
|
@@ -284,7 +277,7 @@ interface PropertyValueWireToCreate {
|
|
|
284
277
|
vector: number[];
|
|
285
278
|
}
|
|
286
279
|
type GetCreatePropertyValueFromWire<T extends keyof PropertyValueWireToCreate | Record<string, keyof PropertyValueWireToCreate>> = T extends keyof PropertyValueWireToCreate ? PropertyValueWireToCreate[T] : T extends Record<string, keyof PropertyValueWireToCreate> ? {
|
|
287
|
-
[K in keyof T]: PropertyValueWireToCreate[T[K]];
|
|
280
|
+
[K in keyof T]: PropertyValueWireToCreate[T[K]] | undefined;
|
|
288
281
|
} : never;
|
|
289
282
|
|
|
290
283
|
type IncludeValuesExtending<T extends Record<keyof any, any>, M> = {
|
|
@@ -311,7 +304,6 @@ type ObjectInterfaceBaseMetadata = {
|
|
|
311
304
|
displayName: string;
|
|
312
305
|
description: string | undefined;
|
|
313
306
|
properties: Record<any, ObjectMetadata.Property>;
|
|
314
|
-
links: Record<string, ObjectMetadata.Link<any, any>>;
|
|
315
307
|
rid: string;
|
|
316
308
|
/**
|
|
317
309
|
* Represents the "super interfaces" of this object.
|
|
@@ -334,6 +326,7 @@ interface ObjectMetadata extends ObjectInterfaceBaseMetadata {
|
|
|
334
326
|
type: "object";
|
|
335
327
|
primaryKeyApiName: keyof this["properties"];
|
|
336
328
|
titleProperty: keyof this["properties"];
|
|
329
|
+
links: Record<string, ObjectMetadata.Link<any, any>>;
|
|
337
330
|
primaryKeyType: PrimaryKeyTypes;
|
|
338
331
|
icon: Icon | undefined;
|
|
339
332
|
visibility: ObjectTypeVisibility | undefined;
|
|
@@ -378,16 +371,25 @@ type BlueprintIcon = {
|
|
|
378
371
|
};
|
|
379
372
|
type Icon = BlueprintIcon;
|
|
380
373
|
|
|
381
|
-
interface InterfaceMetadata extends ObjectInterfaceBaseMetadata {
|
|
382
|
-
type: "interface";
|
|
383
|
-
implementedBy?: ReadonlyArray<string>;
|
|
384
|
-
}
|
|
385
374
|
interface InterfaceDefinition {
|
|
386
375
|
type: "interface";
|
|
387
376
|
apiName: string;
|
|
388
377
|
osdkMetadata?: OsdkMetadata;
|
|
389
378
|
__DefinitionMetadata?: InterfaceMetadata & ObjectInterfaceCompileDefinition;
|
|
390
379
|
}
|
|
380
|
+
interface InterfaceMetadata extends ObjectInterfaceBaseMetadata {
|
|
381
|
+
type: "interface";
|
|
382
|
+
implementedBy?: ReadonlyArray<string>;
|
|
383
|
+
links: Record<string, InterfaceMetadata.Link<any, any>>;
|
|
384
|
+
}
|
|
385
|
+
declare namespace InterfaceMetadata {
|
|
386
|
+
interface Link<Q extends ObjectTypeDefinition | InterfaceDefinition, M extends boolean> {
|
|
387
|
+
__OsdkLinkTargetType?: Q;
|
|
388
|
+
targetTypeApiName: Q["apiName"];
|
|
389
|
+
multiplicity: M;
|
|
390
|
+
targetType: Q["type"];
|
|
391
|
+
}
|
|
392
|
+
}
|
|
391
393
|
|
|
392
394
|
type SimplePropertyDef = WirePropertyTypes | undefined | Array<WirePropertyTypes>;
|
|
393
395
|
declare namespace SimplePropertyDef {
|
|
@@ -459,8 +461,16 @@ type BaseGroupByValue = "exact" | {
|
|
|
459
461
|
type ExactGroupByWithOptions = {
|
|
460
462
|
$exact: {
|
|
461
463
|
$limit?: number;
|
|
462
|
-
|
|
463
|
-
|
|
464
|
+
} & ({
|
|
465
|
+
$defaultValue?: undefined;
|
|
466
|
+
$includeNullValue?: false;
|
|
467
|
+
} | {
|
|
468
|
+
$defaultValue: string;
|
|
469
|
+
$includeNullValue?: false;
|
|
470
|
+
} | {
|
|
471
|
+
$defaultValue?: never;
|
|
472
|
+
$includeNullValue: true;
|
|
473
|
+
});
|
|
464
474
|
};
|
|
465
475
|
type GroupByRange<T> = [T, T];
|
|
466
476
|
type StringGroupByValue = BaseGroupByValue;
|
|
@@ -537,10 +547,20 @@ type AggregateOpts<Q extends ObjectOrInterfaceDefinition> = {
|
|
|
537
547
|
$groupBy?: GroupByClause<Q>;
|
|
538
548
|
};
|
|
539
549
|
|
|
540
|
-
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> =
|
|
550
|
+
type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = ContainsExactMatchWithNull<AO["$groupBy"]> extends true ? {
|
|
551
|
+
$groupBy: AO["$groupBy"];
|
|
552
|
+
$select: UnorderedAggregationClause<Q>;
|
|
553
|
+
} : SingleKeyObject<AO["$groupBy"]> extends never ? (AO["$select"] extends UnorderedAggregationClause<Q> ? AggregateOptsThatErrors<Q, AO> : {} extends AO["$groupBy"] ? AggregateOptsThatErrors<Q, AO> : {
|
|
541
554
|
$groupBy: AO["$groupBy"];
|
|
542
555
|
$select: UnorderedAggregationClause<Q>;
|
|
543
556
|
}) : AggregateOptsThatErrors<Q, AO>;
|
|
557
|
+
type ContainsExactMatchWithNull<GB extends GroupByClause<any> | undefined> = undefined extends GB ? false : {} extends GB ? false : {
|
|
558
|
+
[P in keyof GB]: GB[P] extends {
|
|
559
|
+
$exact: {
|
|
560
|
+
$includeNullValue: true;
|
|
561
|
+
};
|
|
562
|
+
} ? true : false;
|
|
563
|
+
}[keyof GB];
|
|
544
564
|
type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends AggregateOpts<Q>> = AO & {
|
|
545
565
|
$select: Pick<AO["$select"], keyof AggregateOpts<Q>["$select"] & keyof AO["$select"]> & Record<Exclude<keyof AO["$select"], keyof AggregateOpts<Q>["$select"]>, never>;
|
|
546
566
|
} & (unknown extends AO["$groupBy"] ? {} : Exclude<AO["$groupBy"], undefined> extends never ? {} : {
|
|
@@ -550,18 +570,18 @@ type AggregateOptsThatErrors<Q extends ObjectOrInterfaceDefinition, AO extends A
|
|
|
550
570
|
type MaybeArray<T extends {
|
|
551
571
|
multiplicity?: boolean | undefined;
|
|
552
572
|
}, U> = T["multiplicity"] extends true ? Array<U> : U;
|
|
553
|
-
type MaybeNullable<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
573
|
+
type MaybeNullable$1<T extends ObjectMetadata.Property, U> = T["nullable"] extends true ? U | undefined : U;
|
|
554
574
|
type Converted<T> = T extends Array<any> ? T[1] : T;
|
|
555
575
|
/**
|
|
556
576
|
* @param {T} ObjectMetadata.Property in literal form
|
|
557
577
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
558
578
|
*/
|
|
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"]>>>>;
|
|
579
|
+
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
580
|
/**
|
|
561
581
|
* @param {T} ObjectMetadata.Property in literal form
|
|
562
582
|
* @param {STRICTLY_ENFORCE_NULLABLE} S for strict. If false, always `|undefined`
|
|
563
583
|
*/
|
|
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"]>>>>;
|
|
584
|
+
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
585
|
|
|
566
586
|
type ExtractPropName<T extends string> = T extends `${infer PropName}:${string}` ? PropName : T extends "$count" ? T : never;
|
|
567
587
|
type ExtractMetricNameForPropName<T, PropName extends string> = T extends `${PropName}:${infer MetricName}` ? MetricName : never;
|
|
@@ -578,9 +598,14 @@ type AggregationResultsWithGroups<Q extends ObjectOrInterfaceDefinition, A exten
|
|
|
578
598
|
} ? {
|
|
579
599
|
startValue: T;
|
|
580
600
|
endValue: T;
|
|
581
|
-
} : OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true
|
|
601
|
+
} : MaybeNullable<G[P], OsdkObjectPropertyType<CompileTimeMetadata<Q>["properties"][P], true>>;
|
|
582
602
|
};
|
|
583
603
|
} & AggregationResultsWithoutGroups<Q, A>)[];
|
|
604
|
+
type MaybeNullable<GROUP, VALUE> = GROUP extends {
|
|
605
|
+
$exact: {
|
|
606
|
+
$includeNullValue: true;
|
|
607
|
+
};
|
|
608
|
+
} ? VALUE | null : VALUE;
|
|
584
609
|
|
|
585
610
|
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
611
|
|
|
@@ -681,7 +706,7 @@ type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
|
|
|
681
706
|
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ? CompileTimeMetadata<Q> extends InterfaceMetadata ? NonNullable<CompileTimeMetadata<Q>["implementedBy"]>[number] : never : never);
|
|
682
707
|
};
|
|
683
708
|
|
|
684
|
-
type OsdkObjectPrimaryKeyType<Q extends
|
|
709
|
+
type OsdkObjectPrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? PropertyValueWireToClient[CompileTimeMetadata<Q>["primaryKeyType"]] : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
|
|
685
710
|
|
|
686
711
|
type ObjectIdentifiers<Q extends ObjectOrInterfaceDefinition> = {
|
|
687
712
|
readonly $apiName: Q["apiName"];
|
|
@@ -994,7 +1019,7 @@ type PropertyWhereClause<T extends ObjectOrInterfaceDefinition> = {
|
|
|
994
1019
|
};
|
|
995
1020
|
type WhereClause<T extends ObjectOrInterfaceDefinition> = OrWhereClause<T> | AndWhereClause<T> | NotWhereClause<T> | (IsNever<keyof CompileTimeMetadata<T>["properties"]> extends true ? Record<string, never> : PropertyWhereClause<T>);
|
|
996
1021
|
|
|
997
|
-
type LinkNames<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
|
|
1022
|
+
type LinkNames<Q extends ObjectOrInterfaceDefinition> = Q extends InterfaceDefinition ? keyof CompileTimeMetadata<Q>["links"] : keyof CompileTimeMetadata<Q>["links"] & string;
|
|
998
1023
|
type LinkedType<Q extends ObjectOrInterfaceDefinition, L extends LinkNames<Q>> = NonNullable<CompileTimeMetadata<Q>["links"][L]["__OsdkLinkTargetType"]>;
|
|
999
1024
|
|
|
1000
1025
|
type WithPropertiesNumerics = "integer" | "double" | "float" | "short" | "long";
|
|
@@ -1036,7 +1061,7 @@ declare namespace DerivedProperty {
|
|
|
1036
1061
|
};
|
|
1037
1062
|
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
1038
1063
|
}
|
|
1039
|
-
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q
|
|
1064
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
1040
1065
|
}
|
|
1041
1066
|
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
1042
1067
|
}
|
|
@@ -1053,15 +1078,6 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
|
|
|
1053
1078
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1054
1079
|
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : NonNullable<CompileTimeMetadata<Q>["links"][L]["multiplicity"]> extends true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true> : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;
|
|
1055
1080
|
};
|
|
1056
|
-
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1057
|
-
readonly constant: {
|
|
1058
|
-
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1059
|
-
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1060
|
-
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1061
|
-
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1062
|
-
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1063
|
-
};
|
|
1064
|
-
};
|
|
1065
1081
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1066
1082
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
1067
1083
|
limit: number;
|
|
@@ -1334,4 +1350,4 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1334
1350
|
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q> {
|
|
1335
1351
|
}
|
|
1336
1352
|
|
|
1337
|
-
export {
|
|
1353
|
+
export { PropertyKeys as $, type AttachmentUpload as A, type Augment as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type Augments as E, type FetchPageArgs as F, type GeoFilterOptions as G, type SelectArg as H, type InterfaceDefinition as I, type SelectArgToKeys as J, type FetchPageResult as K, type SingleOsdkResult as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type Media as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type MediaMetadata as T, isOk as U, type ValidAggregationKeys as V, type WhereClause as W, type Result as X, type BaseObjectSet as Y, ObjectSetSubscription as Z, InterfaceMetadata as _, type Attachment as a, type ObjectSpecifier as a0, ObjectMetadata as a1, type PropertyDef as a2, type VersionBound as a3, type BaseWirePropertyTypes as a4, type WirePropertyTypes as a5, type PrimaryKeyType as a6, type ConvertProps as a7, Osdk as a8, type PageResult as a9, TimeseriesDurationMapping as aa, type GeotimeSeriesProperty as ab, type TimeSeriesPoint as ac, type TimeSeriesProperty as ad, type TimeSeriesQuery as ae, type LinkedType as af, type LinkNames as ag, type ExtractOptions as ah, type MinimalObjectSet as ai, type ObjectIdentifiers as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type ObjectOrInterfaceDefinition as f, type PrimaryKeyTypes as g, type OsdkBase as h, type AggregateOpts as i, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as j, type AggregationResultsWithGroups as k, type AggregationResultsWithoutGroups as l, type AggregationClause as m, type AggregationsResults as n, type GeoFilter_Intersects as o, type GeoFilter_Within as p, type PossibleWhereClauseFilters as q, type OsdkObjectCreatePropertyType as r, type OsdkObjectPropertyType as s, type OsdkObjectLinksObject as t, DerivedProperty as u, DurationMapping as v, type AllGroupByValues as w, type GroupByClause as x, type GroupByRange as y, type AsyncIterArgs as z };
|
package/build/cjs/index.cjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// src/actions/NullValue.ts
|
|
4
|
-
var NULL_VALUE = Symbol.for("NULL_VALUE");
|
|
5
|
-
|
|
6
3
|
// src/aggregate/WhereClause.ts
|
|
7
4
|
var DistanceUnitMapping = {
|
|
8
5
|
"centimeter": "CENTIMETERS",
|
|
@@ -72,7 +69,6 @@ var TimeseriesDurationMapping = {
|
|
|
72
69
|
|
|
73
70
|
exports.DistanceUnitMapping = DistanceUnitMapping;
|
|
74
71
|
exports.DurationMapping = DurationMapping;
|
|
75
|
-
exports.NULL_VALUE = NULL_VALUE;
|
|
76
72
|
exports.TimeseriesDurationMapping = TimeseriesDurationMapping;
|
|
77
73
|
exports.isOk = isOk;
|
|
78
74
|
//# sourceMappingURL=index.cjs.map
|
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/aggregate/WhereClause.ts","../../src/mapping/DurationMapping.ts","../../src/groupby/GroupByClause.ts","../../src/object/Result.ts","../../src/timeseries/timeseries.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,YAAc,EAAA,aAAA;AAAA,EACd,aAAe,EAAA,aAAA;AAAA,EACf,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,GAAK,EAAA,QAAA;AAAA,EACL,WAAa,EAAA,YAAA;AAAA,EACb,YAAc,EAAA,YAAA;AAAA,EACd,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,MAAA;AAAA,EACR,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,eAAiB,EAAA,gBAAA;AAAA,EACjB,cAAgB,EAAA,gBAAA;AAAA,EAChB,gBAAkB,EAAA;AACpB;;;ACvBO,IAAM,mBAAsB,GAAA;AAAA,EACjC,KAAO,EAAA,SAAA;AAAA,EACP,SAAW,EAAA,SAAA;AAAA,EACX,KAAO,EAAA,SAAA;AAAA,EACP,QAAU,EAAA,SAAA;AAAA,EACV,SAAW,EAAA,SAAA;AAAA,EACX,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA,MAAA;AAAA,EACR,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA,OAAA;AAAA,EACT,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,QAAA;AAAA,EACT,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA,OAAA;AAAA,EACR,OAAS,EAAA;AACX,CAAA;;;ACpBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,GAAG,mBAAA;AAAA,EACH,SAAW,EAAA,UAAA;AAAA,EACX,UAAY,EAAA;AACd;;;ACAO,SAAS,KAAK,CAAG,EAAA;AACtB,EAAA,OAAO,OAAW,IAAA,CAAA;AACpB;;;ACNO,IAAM,yBAA4B,GAAA;AAAA,EACvC,IAAM,EAAA,cAAA;AAAA,EACN,cAAgB,EAAA,cAAA;AAAA,EAChB,GAAG;AACL","file":"index.cjs","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\n// the value side of this needs to match DistanceUnit from @osdk/foundry but we don't\n// want the dependency\nexport const DistanceUnitMapping = {\n \"centimeter\": \"CENTIMETERS\",\n \"centimeters\": \"CENTIMETERS\",\n \"cm\": \"CENTIMETERS\",\n \"meter\": \"METERS\",\n \"meters\": \"METERS\",\n \"m\": \"METERS\",\n \"kilometer\": \"KILOMETERS\",\n \"kilometers\": \"KILOMETERS\",\n \"km\": \"KILOMETERS\",\n \"inch\": \"INCHES\",\n \"inches\": \"INCHES\",\n \"foot\": \"FEET\",\n \"feet\": \"FEET\",\n \"yard\": \"YARDS\",\n \"yards\": \"YARDS\",\n \"mile\": \"MILES\",\n \"miles\": \"MILES\",\n \"nautical_mile\": \"NAUTICAL_MILES\",\n \"nauticalMile\": \"NAUTICAL_MILES\",\n \"nautical miles\": \"NAUTICAL_MILES\"\n};\n\n// FIXME we need to represent all types","/*\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\nexport const TimeDurationMapping = {\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 * 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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const DurationMapping = {\n ...TimeDurationMapping,\n \"quarter\": \"QUARTERS\",\n \"quarters\": \"QUARTERS\"\n};","/*\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\n/**\n * Check if a result was successfully received\n * @param a - result wrapped value\n * @returns whether a result has a value in it\n */\nexport function isOk(a) {\n return \"value\" in a;\n}\n\n/**\n * Check if a result contains an error value\n * @param a Result wrapped value\n * @returns whether a result has an error in it\n */\nexport function isError(a) {\n return \"error\" in a;\n}","/*\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 { TimeDurationMapping } from \"../mapping/DurationMapping.js\";\nexport const TimeseriesDurationMapping = {\n \"ms\": \"MILLISECONDS\",\n \"milliseconds\": \"MILLISECONDS\",\n ...TimeDurationMapping\n};"]}
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, a as
|
|
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,
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, a as Attachment, O as ObjectTypeDefinition, b as ObjectIdentifiers, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, e as OsdkMetadata, R as ReleaseStatus, f as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, g as PrimaryKeyTypes, h as OsdkBase } from './ObjectSet-BdIHDSBH.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, Y as BaseObjectSet, a4 as BaseWirePropertyTypes, a7 as ConvertProps, u as DerivedProperty, D as DistanceUnitMapping, v as DurationMapping, F as FetchPageArgs, K as FetchPageResult, G as GeoFilterOptions, o as GeoFilter_Intersects, p as GeoFilter_Within, ab as GeotimeSeriesProperty, x as GroupByClause, y as GroupByRange, _ as InterfaceMetadata, ag as LinkNames, af as LinkedType, Q as Media, T as MediaMetadata, N as NullabilityAdherence, a1 as ObjectMetadata, Z as ObjectSetSubscription, a0 as ObjectSpecifier, a8 as Osdk, r as OsdkObjectCreatePropertyType, t as OsdkObjectLinksObject, s as OsdkObjectPropertyType, a9 as PageResult, q as PossibleWhereClauseFilters, a6 as PrimaryKeyType, a2 as PropertyDef, $ as PropertyKeys, X as Result, H as SelectArg, J as SelectArgToKeys, S as SingleLinkAccessor, L as SingleOsdkResult, ac as TimeSeriesPoint, ad as TimeSeriesProperty, ae as TimeSeriesQuery, aa as TimeseriesDurationMapping, V as ValidAggregationKeys, a3 as VersionBound, W as WhereClause, a5 as WirePropertyTypes, U as isOk } from './ObjectSet-BdIHDSBH.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ interface DataValueClientToWire {
|
|
|
62
62
|
string: string;
|
|
63
63
|
timestamp: string;
|
|
64
64
|
set: Set<any>;
|
|
65
|
-
mediaReference: MediaReference
|
|
65
|
+
mediaReference: MediaReference;
|
|
66
66
|
twoDimensionalAggregation: {
|
|
67
67
|
key: AllowedBucketKeyTypes$1;
|
|
68
68
|
value: AllowedBucketTypes$1;
|
|
@@ -169,10 +169,6 @@ type ParameterEvaluatedConstraint = {
|
|
|
169
169
|
type: "unevaluable";
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
declare const NULL_VALUE: symbol & {
|
|
173
|
-
__type: "NULL_VALUE";
|
|
174
|
-
};
|
|
175
|
-
|
|
176
172
|
type ApplyActionOptions = {
|
|
177
173
|
$returnEdits?: true;
|
|
178
174
|
$validateOnly?: false;
|
|
@@ -211,11 +207,6 @@ declare namespace ActionParam {
|
|
|
211
207
|
type StructType<T extends Record<string, keyof DataValueClientToWire>> = {
|
|
212
208
|
[K in keyof T]: DataValueClientToWire[T[K]];
|
|
213
209
|
};
|
|
214
|
-
/**
|
|
215
|
-
* Type of the symbol that indicates that a "null" value should be passed for the action parameter.
|
|
216
|
-
* For any autogenerated modify actions, this will cause the action to clear the value of the parameter.
|
|
217
|
-
*/
|
|
218
|
-
type NullValueType = typeof NULL_VALUE;
|
|
219
210
|
}
|
|
220
211
|
type ActionEditResponse = ActionResults;
|
|
221
212
|
type ActionValidationResponse = ValidateActionResponseV2;
|
|
@@ -310,7 +301,7 @@ interface QueryDefinition<T = any> {
|
|
|
310
301
|
type QueryParameterDefinition<T_Target extends ObjectTypeDefinition = any> = {
|
|
311
302
|
description?: string;
|
|
312
303
|
} & QueryDataTypeDefinition<T_Target>;
|
|
313
|
-
type QueryDataTypeDefinition<T_Target extends
|
|
304
|
+
type QueryDataTypeDefinition<T_Target extends ObjectOrInterfaceDefinition = any> = PrimitiveDataType | ObjectQueryDataType<T_Target> | InterfaceQueryDataType<T_Target> | ObjectSetQueryDataType<T_Target> | InterfaceObjectSetQueryDataType<T_Target> | SetQueryDataType | UnionQueryDataType | StructQueryDataType | TwoDimensionalAggregationDataType | ThreeDimensionalAggregationDataType | MapDataType;
|
|
314
305
|
type BaseQueryDataTypeDefinition<T extends string> = {
|
|
315
306
|
multiplicity?: boolean;
|
|
316
307
|
nullable?: boolean;
|
|
@@ -318,11 +309,19 @@ type BaseQueryDataTypeDefinition<T extends string> = {
|
|
|
318
309
|
};
|
|
319
310
|
type WireQueryDataTypes = "double" | "float" | "integer" | "long" | "boolean" | "string" | "date" | "timestamp" | "attachment";
|
|
320
311
|
type PrimitiveDataType<Q extends WireQueryDataTypes = WireQueryDataTypes> = BaseQueryDataTypeDefinition<Q>;
|
|
321
|
-
interface ObjectQueryDataType<T_Target extends
|
|
312
|
+
interface ObjectQueryDataType<T_Target extends ObjectOrInterfaceDefinition = never> extends BaseQueryDataTypeDefinition<"object"> {
|
|
322
313
|
object: string;
|
|
323
314
|
__OsdkTargetType?: T_Target;
|
|
324
315
|
}
|
|
325
|
-
interface
|
|
316
|
+
interface InterfaceQueryDataType<T_Target extends ObjectOrInterfaceDefinition = never> extends BaseQueryDataTypeDefinition<"interface"> {
|
|
317
|
+
interface: string;
|
|
318
|
+
__OsdkTargetType?: T_Target;
|
|
319
|
+
}
|
|
320
|
+
interface ObjectSetQueryDataType<T_Target extends ObjectOrInterfaceDefinition = never> extends BaseQueryDataTypeDefinition<"objectSet"> {
|
|
321
|
+
objectSet: string;
|
|
322
|
+
__OsdkTargetType?: T_Target;
|
|
323
|
+
}
|
|
324
|
+
interface InterfaceObjectSetQueryDataType<T_Target extends ObjectOrInterfaceDefinition = never> extends BaseQueryDataTypeDefinition<"interfaceObjectSet"> {
|
|
326
325
|
objectSet: string;
|
|
327
326
|
__OsdkTargetType?: T_Target;
|
|
328
327
|
}
|
|
@@ -406,11 +405,25 @@ declare namespace QueryParam {
|
|
|
406
405
|
/**
|
|
407
406
|
* Helper type to convert action definition parameter object types to typescript types
|
|
408
407
|
*/
|
|
409
|
-
type ObjectType<T extends
|
|
408
|
+
type ObjectType<T extends ObjectOrInterfaceDefinition> = ObjectIdentifiers<T> | OsdkObjectPrimaryKeyType<T>;
|
|
409
|
+
/**
|
|
410
|
+
* Helper type to convert action definition parameter interface types to typescript types
|
|
411
|
+
*/
|
|
412
|
+
type InterfaceType<T extends InterfaceDefinition> = {
|
|
413
|
+
$objectType: CompileTimeMetadata<T> extends {
|
|
414
|
+
implementedBy: infer U;
|
|
415
|
+
} ? (U extends ReadonlyArray<never> ? string : U extends ReadonlyArray<string> ? U[number] : string) : string;
|
|
416
|
+
$primaryKey: string | number;
|
|
417
|
+
$apiName?: never;
|
|
418
|
+
} | {
|
|
419
|
+
$apiName: T["apiName"];
|
|
420
|
+
$objectType: string;
|
|
421
|
+
$primaryKey: string | number;
|
|
422
|
+
};
|
|
410
423
|
/**
|
|
411
424
|
* Helper type to convert action definition parameter object sets to typescript types
|
|
412
425
|
*/
|
|
413
|
-
type ObjectSetType<T extends
|
|
426
|
+
type ObjectSetType<T extends ObjectOrInterfaceDefinition> = ObjectSet<T>;
|
|
414
427
|
type RangeKey<T extends AggregationRangeKeyTypes> = AggKeyClientToWire<"range", T>;
|
|
415
428
|
type TwoDimensionalAggregationType<T extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = TwoDimensionalAggregation<T extends AggregationKeyTypes ? AggKeyClientToWire<T> : T, AggValueClientToWire<V>>;
|
|
416
429
|
type ThreeDimensionalAggregationType<OUT extends AggregationKeyTypes | RangeKey<any>, IN extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = ThreeDimensionalAggregation<OUT extends AggregationKeyTypes ? AggKeyClientToWire<OUT> : OUT, IN extends AggregationKeyTypes ? AggKeyClientToWire<IN> : IN, AggValueClientToWire<V>>;
|
|
@@ -426,11 +439,12 @@ declare namespace QueryResult {
|
|
|
426
439
|
/**
|
|
427
440
|
* Helper type to convert action definition parameter object types to typescript types
|
|
428
441
|
*/
|
|
429
|
-
type ObjectType<T extends
|
|
442
|
+
type ObjectType<T extends ObjectOrInterfaceDefinition> = OsdkBase<T>;
|
|
443
|
+
type InterfaceType<T extends ObjectOrInterfaceDefinition> = OsdkBase<T>;
|
|
430
444
|
/**
|
|
431
445
|
* Helper type to convert action definition parameter object sets to typescript types
|
|
432
446
|
*/
|
|
433
|
-
type ObjectSetType<T extends
|
|
447
|
+
type ObjectSetType<T extends ObjectOrInterfaceDefinition> = ObjectSet<T>;
|
|
434
448
|
type RangeKey<T extends AggregationRangeKeyTypes> = AggKeyWireToClient<"range", T>;
|
|
435
449
|
type TwoDimensionalAggregationType<T extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = TwoDimensionalAggregation<T extends AggregationKeyTypes ? AggKeyWireToClient<T> : T, AggValueWireToClient<V>>;
|
|
436
450
|
type ThreeDimensionalAggregationType<OUT extends AggregationKeyTypes | RangeKey<any>, IN extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = ThreeDimensionalAggregation<OUT extends AggregationKeyTypes ? AggKeyWireToClient<OUT> : OUT, IN extends AggregationKeyTypes ? AggKeyWireToClient<IN> : IN, AggValueWireToClient<V>>;
|
|
@@ -456,4 +470,4 @@ declare namespace Logger {
|
|
|
456
470
|
}
|
|
457
471
|
}
|
|
458
472
|
|
|
459
|
-
export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, Logger, MediaReference,
|
|
473
|
+
export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, type InterfaceQueryDataType, Logger, MediaReference, ObjectIdentifiers, ObjectOrInterfaceDefinition, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { f as ObjectOrInterfaceDefinition, $ as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, H as SelectArg, a8 as Osdk, ah as ExtractOptions, F as FetchPageArgs, K as FetchPageResult, h as OsdkBase } from '../ObjectSet-BdIHDSBH.cjs';
|
|
2
|
+
export { ai as MinimalObjectSet } from '../ObjectSet-BdIHDSBH.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsdkObjectPrimaryKeyType.js","names":[],"sources":["OsdkObjectPrimaryKeyType.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 { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\n\nexport type OsdkObjectPrimaryKeyType<\n Q extends
|
|
1
|
+
{"version":3,"file":"OsdkObjectPrimaryKeyType.js","names":[],"sources":["OsdkObjectPrimaryKeyType.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 { PropertyValueWireToClient } from \"./mapping/PropertyValueMapping.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\n\nexport type OsdkObjectPrimaryKeyType<\n Q extends ObjectOrInterfaceDefinition,\n> =\n & (Q extends ObjectTypeDefinition\n ? PropertyValueWireToClient[CompileTimeMetadata<Q>[\"primaryKeyType\"]]\n : unknown)\n // if the type is `unknown` then the next line will\n // restrict it down to all valid primary key types\n & PropertyValueWireToClient[PrimaryKeyTypes];\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.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 { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\
|
|
1
|
+
{"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.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 { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
|
|
@@ -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":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q
|
|
1
|
+
{"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\nexport type DerivedPropertyCreator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n> = (\n baseObjectSet: DerivedProperty.Builder<Q, false>,\n) =>\n | DerivedProperty.Definition<T, Q>\n | DerivedProperty.NumericPropertyDefinition<T, Q>\n | DerivedProperty.DatetimePropertyDefinition<T, Q>;\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","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":[]}
|
package/build/esm/index.js
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export { NULL_VALUE } from "./actions/NullValue.js";
|
|
18
17
|
export { DistanceUnitMapping } from "./aggregate/WhereClause.js";
|
|
19
18
|
export { DurationMapping } from "./groupby/GroupByClause.js";
|
|
20
19
|
export { isOk } from "./object/Result.js";
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.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\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\nexport type { Logger } from \"./Logger.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAgBhE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AAwDzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataValueMapping.js","names":[],"sources":["DataValueMapping.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 { Attachment, AttachmentUpload } from \"../object/Attachment.js\";\nimport type { MediaReference
|
|
1
|
+
{"version":3,"file":"DataValueMapping.js","names":[],"sources":["DataValueMapping.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 { Attachment, AttachmentUpload } from \"../object/Attachment.js\";\nimport type { MediaReference } from \"../object/Media.js\";\n\n/**\n * Map from the DataValue type to the typescript type that we return\n */\nexport interface DataValueWireToClient {\n attachment: Attachment;\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string;\n float: number;\n double: number;\n integer: number;\n long: string;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n mediaReference: MediaReference;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n set: Set<any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\n/**\n * Map from the DataValue type to the typescript type that we accept\n */\nexport interface DataValueClientToWire {\n attachment: string | AttachmentUpload | Blob & { readonly name: string };\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string | number;\n float: number;\n double: number;\n integer: number;\n long: string | number;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n set: Set<any>;\n mediaReference: MediaReference;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\nexport type AllowedBucketTypes = string | number | boolean;\nexport type AllowedBucketKeyTypes =\n | AllowedBucketTypes\n | {\n startValue: AllowedBucketTypes;\n endValue: AllowedBucketTypes;\n };\n"],"mappings":"","ignoreList":[]}
|