@osdk/api 2.7.0-rc.15 → 2.8.0-beta.2
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 +1 -38
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/object/FetchPageArgs.js.map +1 -1
- package/build/browser/object/PropertySecurity.js +2 -0
- package/build/browser/object/PropertySecurity.js.map +1 -0
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +22 -0
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/cjs/{ObjectSet-CADY0fcl.d.cts → ObjectSet-CqVqDXKn.d.cts} +102 -18
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/object/FetchPageArgs.js.map +1 -1
- package/build/esm/object/PropertySecurity.js +2 -0
- package/build/esm/object/PropertySecurity.js.map +1 -0
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +22 -0
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +17 -8
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +10 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/object/FetchPageArgs.d.ts +9 -5
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/object/PropertySecurity.d.ts +61 -0
- package/build/types/object/PropertySecurity.d.ts.map +1 -0
- package/build/types/objectSet/ObjectSet.d.ts +16 -11
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -834,18 +834,19 @@ declare namespace ObjectSetArgs {
|
|
|
834
834
|
$pageSize?: number;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, R extends boolean = false, S extends NullabilityAdherence = NullabilityAdherence.Default, RDP_KEYS extends string = never> {
|
|
837
|
+
interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, R extends boolean = false, S extends NullabilityAdherence = NullabilityAdherence.Default, RDP_KEYS extends string = never, PROPERTY_SECURITIES extends boolean = false> {
|
|
838
838
|
$select?: readonly L[];
|
|
839
839
|
$includeRid?: R;
|
|
840
|
+
$loadPropertySecurityMetadata?: PROPERTY_SECURITIES;
|
|
840
841
|
}
|
|
841
842
|
interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends string = PropertyKeys<Q>, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {
|
|
842
843
|
}
|
|
843
844
|
type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
|
|
844
|
-
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS> {
|
|
845
|
+
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {}, PROPERTY_SECURITIES extends boolean = false> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS, PROPERTY_SECURITIES> {
|
|
845
846
|
$nextPageToken?: string;
|
|
846
847
|
$pageSize?: number;
|
|
847
848
|
}
|
|
848
|
-
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never> extends SelectArg<Q, K, R, S, RDP_KEYS>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {
|
|
849
|
+
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends string = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never, PROPERTY_SECURITIES extends boolean = false> extends SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>, OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS> {
|
|
849
850
|
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
850
851
|
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
851
852
|
}
|
|
@@ -904,6 +905,68 @@ type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyK
|
|
|
904
905
|
[K in Extract<keyof RDPs, L>]: RDPs[K];
|
|
905
906
|
}>, ORDER_BY_OPTIONS>;
|
|
906
907
|
|
|
908
|
+
/**
|
|
909
|
+
* A discriminated union representing different types of property security outcomes.
|
|
910
|
+
*
|
|
911
|
+
* @discriminator type - The type field determines which security outcome is represented:
|
|
912
|
+
* - "propertyMarkings": Successfully computed security markings for the property
|
|
913
|
+
* - "unsupportedPolicy": The property is backed by a restricted view that doesn't support property securities
|
|
914
|
+
* - "errorComputingSecurity": The server was unable to load the securities of the property
|
|
915
|
+
*/
|
|
916
|
+
type PropertySecurity = ({
|
|
917
|
+
type: "propertyMarkings";
|
|
918
|
+
} & PropertyMarkings) | ({
|
|
919
|
+
type: "unsupportedPolicy";
|
|
920
|
+
}) | ({
|
|
921
|
+
type: "errorComputingSecurity";
|
|
922
|
+
});
|
|
923
|
+
/**
|
|
924
|
+
* All marking requirements applicable to a property value.
|
|
925
|
+
*
|
|
926
|
+
* Markings represent security classifications or access control requirements
|
|
927
|
+
* that must be satisfied to access the property value.
|
|
928
|
+
*/
|
|
929
|
+
interface PropertyMarkings {
|
|
930
|
+
/**
|
|
931
|
+
* The conjunctive set of markings required to access the property value.
|
|
932
|
+
* All markings from a conjunctive set must be met for access.
|
|
933
|
+
*/
|
|
934
|
+
conjunctive?: Array<MarkingId>;
|
|
935
|
+
/**
|
|
936
|
+
* The disjunctive set of markings required to access the property value.
|
|
937
|
+
*
|
|
938
|
+
* Disjunctive markings are represented as a conjunctive list of disjunctive sets.
|
|
939
|
+
* The top-level array is a conjunction of sets, where each inner array should be
|
|
940
|
+
* treated as a unit where any marking within the set can satisfy the set.
|
|
941
|
+
* All sets within the top level array must be satisfied.
|
|
942
|
+
*/
|
|
943
|
+
disjunctive?: Array<Array<MarkingId>>;
|
|
944
|
+
/**
|
|
945
|
+
* The conjunctive set of markings for the container of this property value,
|
|
946
|
+
* such as the project of a dataset. These markings may differ from the marking
|
|
947
|
+
* on the actual property value, but still must be satisfied for accessing the property.
|
|
948
|
+
*
|
|
949
|
+
* All markings from a conjunctive set must be met for access.
|
|
950
|
+
*/
|
|
951
|
+
containerConjunctive?: Array<MarkingId>;
|
|
952
|
+
/**
|
|
953
|
+
* The disjunctive set of markings for the container of this property value,
|
|
954
|
+
* such as the project of a dataset. These markings may differ from the marking
|
|
955
|
+
* on the actual property value, but still must be satisfied for accessing the property.
|
|
956
|
+
*
|
|
957
|
+
* Disjunctive markings are represented as a conjunctive list of disjunctive sets.
|
|
958
|
+
* The top-level array is a conjunction of sets, where each inner array should be
|
|
959
|
+
* treated as a unit where any marking within the set can satisfy the set.
|
|
960
|
+
* All sets within the top level array must be satisfied.
|
|
961
|
+
*/
|
|
962
|
+
containerDisjunctive?: Array<Array<MarkingId>>;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* A unique identifier for a security marking.
|
|
966
|
+
* Markings represent security classifications or access control requirements.
|
|
967
|
+
*/
|
|
968
|
+
type MarkingId = string;
|
|
969
|
+
|
|
907
970
|
type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
|
|
908
971
|
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ? CompileTimeMetadata<Q> extends InterfaceMetadata ? NonNullable<CompileTimeMetadata<Q>["implementedBy"]>[number] : never : never);
|
|
909
972
|
};
|
|
@@ -926,7 +989,7 @@ type ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> = SpecialOsdkPro
|
|
|
926
989
|
type ApiNameAsString<T extends ObjectOrInterfaceDefinition> = CompileTimeMetadata<T>["apiName"];
|
|
927
990
|
type JustProps<T extends ObjectOrInterfaceDefinition, P extends ValidOsdkPropParams<T>> = P extends "$all" ? PropertyKeys<T> : Exclude<P, SpecialOsdkPropParams>;
|
|
928
991
|
type PropMapToObject<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition> = NonNullable<CompileTimeMetadata<TO>["interfaceMap"]>[ApiNameAsString<FROM>];
|
|
929
|
-
type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" = never> = "$allBaseProperties" extends OPTIONS ? PropertyKeys<FROM> extends P ? PropertyKeys<TO> : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>] : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
|
|
992
|
+
type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO extends ObjectTypeDefinition, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" | "$propertySecurities" = never> = "$allBaseProperties" extends OPTIONS ? PropertyKeys<FROM> extends P ? PropertyKeys<TO> : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>] : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
|
|
930
993
|
type NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}` ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}` : Before : never;
|
|
931
994
|
type MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> = S extends `${NamespaceOf<S>}.${infer Rest}` ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S : S;
|
|
932
995
|
type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
|
|
@@ -938,7 +1001,7 @@ type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends Inter
|
|
|
938
1001
|
* @param TO - the interface or object type to convert to
|
|
939
1002
|
* @param P - the property(s) to convert
|
|
940
1003
|
*/
|
|
941
|
-
type ConvertProps<FROM extends ObjectOrInterfaceDefinition, TO extends ValidToFrom<FROM>, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" = never> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P, OPTIONS>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
|
|
1004
|
+
type ConvertProps<FROM extends ObjectOrInterfaceDefinition, TO extends ValidToFrom<FROM>, P extends ValidOsdkPropParams<FROM>, OPTIONS extends never | "$rid" | "$allBaseProperties" | "$propertySecurities" = never> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P, OPTIONS>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
|
|
942
1005
|
/** DO NOT EXPORT FROM PACKAGE */
|
|
943
1006
|
type ValidToFrom<FROM extends ObjectOrInterfaceDefinition> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition : InterfaceDefinition;
|
|
944
1007
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
@@ -953,7 +1016,7 @@ type MaybeScore<T extends Osdk.Instance<any>, ORDER_BY_OPTIONS extends ObjectSet
|
|
|
953
1016
|
*/
|
|
954
1017
|
type Osdk<Q extends ObjectOrInterfaceDefinition, OPTIONS extends string = never, P extends PropertyKeys<Q> = PropertyKeys<Q>> = IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P> : (IsNever<Exclude<OPTIONS, "$rid">>) extends true ? Osdk.Instance<Q, OPTIONS & "$rid", P> : Osdk.Instance<Q, ("$rid" extends OPTIONS ? "$rid" : never), ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>>;
|
|
955
1018
|
declare namespace Osdk {
|
|
956
|
-
type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" | "$allBaseProperties" = never, P extends PropertyKeys<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : {
|
|
1019
|
+
type Instance<Q extends ObjectOrInterfaceDefinition, OPTIONS extends never | "$rid" | "$allBaseProperties" | "$propertySecurities" = never, P extends PropertyKeys<Q> = PropertyKeys<Q>, R extends Record<string, SimplePropertyDef> = {}> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : {
|
|
957
1020
|
[A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]>;
|
|
958
1021
|
}) & {
|
|
959
1022
|
readonly $link: Q extends {
|
|
@@ -973,7 +1036,11 @@ declare namespace Osdk {
|
|
|
973
1036
|
locale?: string;
|
|
974
1037
|
timezoneId?: string;
|
|
975
1038
|
}) => string | undefined;
|
|
976
|
-
} & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$
|
|
1039
|
+
} & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$propertySecurities" extends OPTIONS ? {
|
|
1040
|
+
readonly $propertySecurities: ObjectPropertySecurities<Q, GetPropsKeys<Q, P, [
|
|
1041
|
+
R
|
|
1042
|
+
] extends [{}] ? false : true>>;
|
|
1043
|
+
} : {}) & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$rid" extends OPTIONS ? {
|
|
977
1044
|
readonly $rid: string;
|
|
978
1045
|
} : {});
|
|
979
1046
|
}
|
|
@@ -983,8 +1050,12 @@ declare namespace Osdk {
|
|
|
983
1050
|
* Anything you throw at this that is not exactly `true` should always be `never`.
|
|
984
1051
|
*/
|
|
985
1052
|
type ExtractRidOption<R extends boolean> = IsNever<R> extends true ? never : DefaultToFalse<R> extends false ? never : "$rid";
|
|
1053
|
+
type ExtractPropertySecurityOption<S extends boolean> = IsNever<S> extends true ? never : DefaultToFalse<S> extends false ? never : "$propertySecurities";
|
|
986
1054
|
type ExtractAllPropertiesOption<T extends boolean> = IsNever<T> extends true ? never : DefaultToFalse<T> extends false ? never : "$allBaseProperties";
|
|
987
|
-
type ExtractOptions<
|
|
1055
|
+
type ExtractOptions<RID extends boolean, UNUSED extends NullabilityAdherence = NullabilityAdherence.Default, ALL_PROPERTIES extends boolean = false, PROPERTY_SECURITIES extends boolean = false> = ExtractRidOption<RID> | ExtractAllPropertiesOption<ALL_PROPERTIES> | ExtractPropertySecurityOption<PROPERTY_SECURITIES>;
|
|
1056
|
+
type ObjectPropertySecurities<Q extends ObjectOrInterfaceDefinition, T extends PropertyKeys<Q>> = {
|
|
1057
|
+
[K in T]: CompileTimeMetadata<Q>["properties"][K]["multiplicity"] extends true ? PropertySecurity[][] : PropertySecurity[];
|
|
1058
|
+
};
|
|
988
1059
|
|
|
989
1060
|
type Just<Z extends keyof V, V> = {
|
|
990
1061
|
[k in Z]: V[k];
|
|
@@ -1287,7 +1358,7 @@ declare namespace DerivedProperty {
|
|
|
1287
1358
|
};
|
|
1288
1359
|
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
1289
1360
|
}
|
|
1290
|
-
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
1361
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
|
|
1291
1362
|
}
|
|
1292
1363
|
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
1293
1364
|
}
|
|
@@ -1303,6 +1374,15 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
|
|
|
1303
1374
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
1304
1375
|
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>;
|
|
1305
1376
|
};
|
|
1377
|
+
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1378
|
+
readonly constant: {
|
|
1379
|
+
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1380
|
+
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1381
|
+
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1382
|
+
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1383
|
+
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1384
|
+
};
|
|
1385
|
+
};
|
|
1306
1386
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
1307
1387
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
1308
1388
|
limit: number;
|
|
@@ -1327,6 +1407,10 @@ type MinimalDirectedObjectLinkInstance<Q extends ObjectOrInterfaceDefinition, LI
|
|
|
1327
1407
|
target: ObjectIdentifiers<LinkedObjectType<Q, LINK_TYPE_API_NAME>>;
|
|
1328
1408
|
linkType: LINK_TYPE_API_NAME;
|
|
1329
1409
|
};
|
|
1410
|
+
type FetchLinksPageResult<Q extends ObjectOrInterfaceDefinition, LINK_TYPE extends LinkTypeApiNamesFor<Q>> = {
|
|
1411
|
+
data: Array<MinimalDirectedObjectLinkInstance<Q, LINK_TYPE>>;
|
|
1412
|
+
nextPageToken?: string;
|
|
1413
|
+
};
|
|
1330
1414
|
|
|
1331
1415
|
declare namespace ObjectSetSubscription {
|
|
1332
1416
|
interface Listener<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<O> = PropertyKeys<O>, R extends boolean = false> {
|
|
@@ -1386,7 +1470,7 @@ type AllFalse<T extends Record<string, boolean>> = Exclude<T[keyof T], false> ex
|
|
|
1386
1470
|
type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef> = {}> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;
|
|
1387
1471
|
type ExtractRdp<D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>> = [D] extends [never] ? {} : D extends BaseObjectSet<any> ? {} : D extends Record<string, SimplePropertyDef> ? D : {};
|
|
1388
1472
|
type SubSelectKeysHelper<Q extends ObjectOrInterfaceDefinition, L extends string> = [L] extends [never] ? PropertyKeys<Q> : PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;
|
|
1389
|
-
type SubSelectKeys<Q extends ObjectOrInterfaceDefinition, X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never> = SubSelectKeysHelper<Q, Extract$Select<X>>;
|
|
1473
|
+
type SubSelectKeys<Q extends ObjectOrInterfaceDefinition, X extends SelectArg<Q, PropertyKeys<Q>, any, any, any, any> = never> = SubSelectKeysHelper<Q, Extract$Select<X>>;
|
|
1390
1474
|
type NOOP<T> = T extends (...args: any[]) => any ? T : T extends abstract new (...args: any[]) => any ? T : {
|
|
1391
1475
|
[K in keyof T]: T[K];
|
|
1392
1476
|
};
|
|
@@ -1417,7 +1501,7 @@ interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
|
|
|
1417
1501
|
|
|
1418
1502
|
* @returns a page of objects
|
|
1419
1503
|
*/
|
|
1420
|
-
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): Promise<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>;
|
|
1504
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}, PROPERTY_SECURITIES extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): Promise<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>;
|
|
1421
1505
|
}
|
|
1422
1506
|
interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
|
|
1423
1507
|
/**
|
|
@@ -1434,7 +1518,7 @@ interface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1434
1518
|
*/
|
|
1435
1519
|
readonly nearestNeighbors: (query: string | number[], numNeighbors: number, property: PropertyKeys.Filtered<Q, "vector">) => this;
|
|
1436
1520
|
}
|
|
1437
|
-
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1521
|
+
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, PROPERTY_SECURITIES extends boolean = false> {
|
|
1438
1522
|
/**
|
|
1439
1523
|
* Gets a page of objects of this type, with a result wrapper
|
|
1440
1524
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -1449,7 +1533,7 @@ interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RD
|
|
|
1449
1533
|
}
|
|
1450
1534
|
* @returns a page of objects, wrapped in a result wrapper
|
|
1451
1535
|
*/
|
|
1452
|
-
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): Promise<Result<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>>;
|
|
1536
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {}>(args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): Promise<Result<PageResult<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>>>;
|
|
1453
1537
|
}
|
|
1454
1538
|
interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1455
1539
|
/**
|
|
@@ -1464,7 +1548,7 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
|
|
|
1464
1548
|
*/
|
|
1465
1549
|
readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
|
|
1466
1550
|
}
|
|
1467
|
-
interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
|
|
1551
|
+
interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}, PROPERTY_SECURITIES extends boolean = false> {
|
|
1468
1552
|
/**
|
|
1469
1553
|
* Returns an async iterator to load all objects of this type
|
|
1470
1554
|
* @example
|
|
@@ -1482,7 +1566,7 @@ interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends
|
|
|
1482
1566
|
* }
|
|
1483
1567
|
* @returns an async iterator to load all objects
|
|
1484
1568
|
*/
|
|
1485
|
-
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>): AsyncIterableIterator<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>;
|
|
1569
|
+
<L extends PropertyKeys<Q> | (string & keyof RDPs), R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}>(args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS, PROPERTY_SECURITIES>): AsyncIterableIterator<MaybeScore<Osdk.Instance<Q, ExtractOptions<R, S, T, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>, SubSelectRDPs<RDPs, NonNullable<typeof args>>>, ORDER_BY_OPTIONS>>;
|
|
1486
1570
|
}
|
|
1487
1571
|
interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> {
|
|
1488
1572
|
asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;
|
|
@@ -1566,7 +1650,7 @@ interface FetchOneSignature<Q extends ObjectTypeDefinition, RDPs extends Record<
|
|
|
1566
1650
|
/**
|
|
1567
1651
|
* Fetches one object with the specified primary key, without a result wrapper
|
|
1568
1652
|
*/
|
|
1569
|
-
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Osdk.Instance<Q, ExtractOptions<R, S>, NoInfer<SubSelectKeys<Q, {
|
|
1653
|
+
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default, PROPERTY_SECURITIES extends boolean = false>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>): Promise<Osdk.Instance<Q, ExtractOptions<R, S, false, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, {
|
|
1570
1654
|
$select: Array<L>;
|
|
1571
1655
|
}>>, SubSelectRDPs<RDPs, {
|
|
1572
1656
|
$select: Array<L>;
|
|
@@ -1576,7 +1660,7 @@ interface FetchOneWithErrorsSignature<Q extends ObjectTypeDefinition, RDPs exten
|
|
|
1576
1660
|
/**
|
|
1577
1661
|
* Fetches one object with the specified primary key, with a result wrapper
|
|
1578
1662
|
*/
|
|
1579
|
-
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Result<Osdk.Instance<Q, ExtractOptions<R, S>, NoInfer<SubSelectKeys<Q, {
|
|
1663
|
+
<const L extends PropertyKeys<Q> | (string & keyof RDPs), const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default, PROPERTY_SECURITIES extends boolean = false>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S, never, PROPERTY_SECURITIES>): Promise<Result<Osdk.Instance<Q, ExtractOptions<R, S, false, PROPERTY_SECURITIES>, NoInfer<SubSelectKeys<Q, {
|
|
1580
1664
|
$select: Array<L>;
|
|
1581
1665
|
}>>, SubSelectRDPs<RDPs, {
|
|
1582
1666
|
$select: Array<L>;
|
|
@@ -1637,4 +1721,4 @@ interface AsyncIterLinks<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1637
1721
|
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q, ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {}> extends MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED>, NearestNeighbors<Q>, NarrowToType<Q> {
|
|
1638
1722
|
}
|
|
1639
1723
|
|
|
1640
|
-
export {
|
|
1724
|
+
export { type PropertyMarkings as $, type AttachmentUpload as A, type GroupByClause as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type GroupByRange as E, type AsyncIterArgs as F, type GeoFilterOptions as G, type Augment as H, type InterfaceDefinition as I, type Augments as J, type FetchPageArgs as K, NullabilityAdherence as L, type MediaReference as M, type NotWhereClause as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, ObjectSetArgs as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type SelectArg as T, type SelectArgToKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type FetchPageResult as X, type SingleOsdkResult as Y, type Media as Z, type MediaMetadata as _, type MediaUpload as a, type TimeSeriesPoint as a$, type PropertySecurity as a0, isOk as a1, type Result as a2, type BaseObjectSet as a3, type FetchLinksPageResult as a4, type LinkTypeApiNamesFor as a5, type MinimalDirectedObjectLinkInstance as a6, ObjectSetSubscription as a7, InterfaceMetadata as a8, PropertyKeys as a9, type NumberFormatDuration as aA, type NumberFormatFixedValues as aB, type NumberFormatNotation as aC, type NumberFormatOptions as aD, type NumberFormatRatio as aE, type NumberFormatScale as aF, type NumberFormatStandard as aG, type NumberFormatStandardUnit as aH, type NumberRatioType as aI, type NumberRoundingMode as aJ, type NumberScaleType as aK, type PropertyNumberFormattingRule as aL, type PropertyNumberFormattingRuleType as aM, type TimeCodeFormat as aN, type PropertyValueFormattingRule as aO, type PropertyTypeReference as aP, type PropertyTypeReferenceOrStringConstant as aQ, type StringConstant as aR, type BaseWirePropertyTypes as aS, type WirePropertyTypes as aT, type PrimaryKeyType as aU, type ConvertProps as aV, type MaybeScore as aW, Osdk as aX, type PageResult as aY, TimeseriesDurationMapping as aZ, type GeotimeSeriesProperty as a_, type ObjectSpecifier as aa, ObjectMetadata as ab, type PropertyDef as ac, type VersionBound as ad, SimplePropertyDef as ae, type PropertyBooleanFormattingRule as af, type DatetimeFormat as ag, type DatetimeLocalizedFormat as ah, type DatetimeLocalizedFormatType as ai, type DatetimeStringFormat as aj, type DatetimeTimezone as ak, type DatetimeTimezoneStatic as al, type DatetimeTimezoneUser as am, type PropertyDateFormattingRule as an, type PropertyTimestampFormattingRule as ao, type KnownType as ap, type PropertyKnownTypeFormattingRule as aq, type Affix as ar, type DurationBaseValue as as, type DurationFormatStyle as at, type DurationPrecision as au, type HumanReadableFormat as av, type NumberFormatAffix as aw, type NumberFormatCurrency as ax, type NumberFormatCurrencyStyle as ay, type NumberFormatCustomUnit as az, type Attachment as b, type TimeSeriesProperty as b0, type TimeSeriesQuery as b1, type LinkedType as b2, type LinkNames as b3, type ExtractOptions as b4, type MinimalObjectSet as b5, type ObjectIdentifiers as c, type OsdkObjectPrimaryKeyType as d, type ObjectSet as e, type OsdkMetadata as f, type ObjectOrInterfaceDefinition as g, type PrimaryKeyTypes as h, type OsdkBase as i, type AggregateOpts as j, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as k, type AggregationResultsWithGroups as l, type AggregationResultsWithoutGroups as m, type AggregationClause as n, type AggregationsResults as o, type AndWhereClause as p, type GeoFilter_Intersects as q, type GeoFilter_Within as r, type OrWhereClause as s, type PossibleWhereClauseFilters as t, type OsdkObjectCreatePropertyType as u, type OsdkObjectPropertyType as v, type OsdkObjectLinksObject as w, DerivedProperty as x, DurationMapping as y, type AllGroupByValues as z };
|
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, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-
|
|
2
|
-
export {
|
|
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, g as ObjectOrInterfaceDefinition, P as PropertyValueWireToClient, h as PrimaryKeyTypes, i as OsdkBase } from './ObjectSet-CqVqDXKn.cjs';
|
|
2
|
+
export { ar as Affix, j as AggregateOpts, k as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, n as AggregationClause, l as AggregationResultsWithGroups, m as AggregationResultsWithoutGroups, o as AggregationsResults, z as AllGroupByValues, p as AndWhereClause, F as AsyncIterArgs, H as Augment, J as Augments, a3 as BaseObjectSet, aS as BaseWirePropertyTypes, aV as ConvertProps, ag as DatetimeFormat, ah as DatetimeLocalizedFormat, ai as DatetimeLocalizedFormatType, aj as DatetimeStringFormat, ak as DatetimeTimezone, al as DatetimeTimezoneStatic, am as DatetimeTimezoneUser, x as DerivedProperty, D as DistanceUnitMapping, as as DurationBaseValue, at as DurationFormatStyle, y as DurationMapping, au as DurationPrecision, a4 as FetchLinksPageResult, K as FetchPageArgs, X as FetchPageResult, G as GeoFilterOptions, q as GeoFilter_Intersects, r as GeoFilter_Within, a_ as GeotimeSeriesProperty, B as GroupByClause, E as GroupByRange, av as HumanReadableFormat, a8 as InterfaceMetadata, ap as KnownType, b3 as LinkNames, a5 as LinkTypeApiNamesFor, b2 as LinkedType, aW as MaybeScore, Z as Media, _ as MediaMetadata, a6 as MinimalDirectedObjectLinkInstance, N as NotWhereClause, L as NullabilityAdherence, aw as NumberFormatAffix, ax as NumberFormatCurrency, ay as NumberFormatCurrencyStyle, az as NumberFormatCustomUnit, aA as NumberFormatDuration, aB as NumberFormatFixedValues, aC as NumberFormatNotation, aD as NumberFormatOptions, aE as NumberFormatRatio, aF as NumberFormatScale, aG as NumberFormatStandard, aH as NumberFormatStandardUnit, aI as NumberRatioType, aJ as NumberRoundingMode, aK as NumberScaleType, ab as ObjectMetadata, Q as ObjectSetArgs, a7 as ObjectSetSubscription, aa as ObjectSpecifier, s as OrWhereClause, aX as Osdk, u as OsdkObjectCreatePropertyType, w as OsdkObjectLinksObject, v as OsdkObjectPropertyType, aY as PageResult, t as PossibleWhereClauseFilters, aU as PrimaryKeyType, af as PropertyBooleanFormattingRule, an as PropertyDateFormattingRule, ac as PropertyDef, a9 as PropertyKeys, aq as PropertyKnownTypeFormattingRule, $ as PropertyMarkings, aL as PropertyNumberFormattingRule, aM as PropertyNumberFormattingRuleType, a0 as PropertySecurity, ao as PropertyTimestampFormattingRule, aP as PropertyTypeReference, aQ as PropertyTypeReferenceOrStringConstant, aO as PropertyValueFormattingRule, a2 as Result, T as SelectArg, U as SelectArgToKeys, ae as SimplePropertyDef, S as SingleLinkAccessor, Y as SingleOsdkResult, aR as StringConstant, aN as TimeCodeFormat, a$ as TimeSeriesPoint, b0 as TimeSeriesProperty, b1 as TimeSeriesQuery, aZ as TimeseriesDurationMapping, V as ValidAggregationKeys, ad as VersionBound, W as WhereClause, aT as WirePropertyTypes, a1 as isOk } from './ObjectSet-CqVqDXKn.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as ObjectOrInterfaceDefinition,
|
|
2
|
-
export {
|
|
1
|
+
import { g as ObjectOrInterfaceDefinition, a9 as PropertyKeys, M as MediaReference, L as NullabilityAdherence, T as SelectArg, aX as Osdk, b4 as ExtractOptions, K as FetchPageArgs, X as FetchPageResult, i as OsdkBase } from '../ObjectSet-CqVqDXKn.cjs';
|
|
2
|
+
export { b5 as MinimalObjectSet } from '../ObjectSet-CqVqDXKn.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends never | \"$rid\" | \"$allBaseProperties\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <\n PropertyApiName extends PropertyKeys<Q>,\n >(\n propertyApiName: PropertyApiName,\n options?: { locale?: string; timezoneId?: string },\n ) => string | undefined;\n }\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n R extends boolean,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0GA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AA6DrB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAWA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"OsdkObjectFrom.js","names":["Osdk"],"sources":["OsdkObjectFrom.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 {\n DefaultToFalse,\n OsdkObjectLinksObject,\n} from \"./definitions/LinkDefinitions.js\";\nimport type {\n NullabilityAdherence,\n ObjectSetArgs,\n} from \"./object/FetchPageArgs.js\";\nimport type { UnionIfTrue } from \"./object/FetchPageResult.js\";\nimport type { PropertySecurity } from \"./object/PropertySecurity.js\";\nimport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n} from \"./ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nimport type { OsdkBase } from \"./OsdkBase.js\";\n\ntype DropDollarOptions<T extends string> = Exclude<\n T,\n \"$rid\" | \"$all\" | \"$notStrict\"\n>;\n\ntype DropDollarAll<T extends string> = Exclude<\n T,\n \"$all\"\n>;\n\ntype SpecialOsdkPropParams =\n | \"$all\"\n | \"$rid\"\n | \"$strict\"\n | \"$notStrict\";\n\ntype ValidOsdkPropParams<Q extends ObjectOrInterfaceDefinition> =\n | SpecialOsdkPropParams\n | PropertyKeys<Q>;\n\nexport type ApiNameAsString<\n T extends ObjectOrInterfaceDefinition,\n> = CompileTimeMetadata<T>[\"apiName\"];\n\nexport type JustProps<\n T extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<T>,\n> = P extends \"$all\" ? PropertyKeys<T>\n : Exclude<P, SpecialOsdkPropParams>;\n\nexport type PropMapToObject<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n> = NonNullable<CompileTimeMetadata<TO>[\"interfaceMap\"]>[ApiNameAsString<FROM>];\n\nexport type MapPropNamesToObjectType<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ObjectTypeDefinition,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n> = \"$allBaseProperties\" extends OPTIONS\n ? PropertyKeys<FROM> extends P ? PropertyKeys<TO>\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>]\n : PropMapToObject<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];\n\ntype NamespaceOf<S extends string> = S extends `${infer Before}.${infer After}`\n ? After extends `${string}.${string}` ? `${Before}.${NamespaceOf<After>}`\n : Before\n : never;\n\ntype MaybeStripNamespaces<S extends string, TO extends InterfaceDefinition> =\n S extends `${NamespaceOf<S>}.${infer Rest}`\n ? NamespaceOf<S> extends NamespaceOf<ApiNameAsString<TO>> ? Rest : S\n : S;\n\nexport type PropMapToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n> = NonNullable<\n CompileTimeMetadata<FROM>[\"inverseInterfaceMap\"]\n>[ApiNameAsString<TO>];\n\nexport type MapPropNamesToInterface<\n FROM extends ObjectTypeDefinition,\n TO extends InterfaceDefinition,\n P extends ValidOsdkPropParams<FROM>,\n> = MaybeStripNamespaces<\n PropMapToInterface<\n FROM,\n TO\n >[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>],\n TO\n>;\n/**\n * Older version of this helper that allows for `$rid` and co in\n * the properties field.\n * @param FROM - the interface or object type to convert from\n * @param TO - the interface or object type to convert to\n * @param P - the property(s) to convert\n */\nexport type ConvertProps<\n FROM extends ObjectOrInterfaceDefinition,\n TO extends ValidToFrom<FROM>,\n P extends ValidOsdkPropParams<FROM>,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n> = TO extends FROM ? P\n : TO extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToObjectType<FROM, TO, P, OPTIONS>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (\n UnionIfTrue<\n MapPropNamesToInterface<FROM, TO, P>,\n P extends \"$rid\" ? true : false,\n \"$rid\"\n >\n )\n : never\n : never;\n\n/** DO NOT EXPORT FROM PACKAGE */\nexport type ValidToFrom<\n FROM extends ObjectOrInterfaceDefinition,\n> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition\n : InterfaceDefinition;\n\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\ntype ExtractPropsKeysFromOldPropsStyle<\n Q extends ObjectOrInterfaceDefinition,\n P extends ValidOsdkPropParams<Q>,\n> = P extends \"$all\" ? PropertyKeys<Q>\n : Exclude<P, \"$strict\" | \"$notStrict\" | \"$rid\">;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n\nexport type GetPropsKeys<\n Q extends ObjectOrInterfaceDefinition,\n P extends PropertyKeys<Q>,\n N extends boolean = false,\n> = IsNever<P> extends true ? N extends true ? never : PropertyKeys<Q>\n : IsAny<P> extends true ? PropertyKeys<Q>\n : P;\n\n/**\n * Use `Osdk.Instance` or `YourType.OsdkInstance`\n */\nexport type Osdk<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends string = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n> =\n // no middle options is simplest\n IsNever<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n : IsAny<OPTIONS> extends true ? Osdk.Instance<Q, never, P>\n // Options only includes the two allowed in the new style\n : (IsNever<Exclude<OPTIONS, \"$rid\">>) extends true\n ? Osdk.Instance<Q, OPTIONS & \"$rid\", P>\n // else we are in the old style which was just Q and OPTIONS\n // and OPTIONS was $things + prop names\n : Osdk.Instance<\n Q,\n (\"$rid\" extends OPTIONS ? \"$rid\" : never),\n ExtractPropsKeysFromOldPropsStyle<Q, OPTIONS>\n >;\n\nexport type MaybeScore<\n T extends Osdk.Instance<any>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<any>,\n> = ORDER_BY_OPTIONS extends \"relevance\" ? T & { $score: number } : T;\n\nexport namespace Osdk {\n export type Instance<\n Q extends ObjectOrInterfaceDefinition,\n OPTIONS extends\n | never\n | \"$rid\"\n | \"$allBaseProperties\"\n | \"$propertySecurities\" = never,\n P extends PropertyKeys<Q> = PropertyKeys<Q>,\n R extends Record<string, SimplePropertyDef> = {},\n > =\n & OsdkBase<Q>\n & Pick<\n CompileTimeMetadata<Q>[\"props\"],\n // If there aren't any additional properties, then we want GetPropsKeys to default to PropertyKeys<Q>\n GetPropsKeys<Q, P, [R] extends [{}] ? false : true>\n >\n & ([R] extends [never] ? {}\n : { [A in keyof R]: SimplePropertyDef.ToRuntimeProperty<R[A]> })\n & {\n readonly $link: Q extends { linksType?: any } ? Q[\"linksType\"]\n : Q extends ObjectOrInterfaceDefinition ? OsdkObjectLinksObject<Q>\n : never;\n\n readonly $as: <NEW_Q extends ValidToFrom<Q>>(\n type: NEW_Q | string,\n ) => Osdk.Instance<\n NEW_Q,\n OPTIONS,\n ConvertProps<Q, NEW_Q, P, OPTIONS>\n >;\n\n readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(\n updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n },\n ) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>;\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata: Q extends\n ObjectTypeDefinition ? {\n ObjectMetadata: ObjectMetadata;\n }\n : {\n ObjectMetadata: ObjectMetadata;\n InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly $__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue: <\n PropertyApiName extends PropertyKeys<Q>,\n >(\n propertyApiName: PropertyApiName,\n options?: { locale?: string; timezoneId?: string },\n ) => string | undefined;\n }\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$propertySecurities\" extends OPTIONS ? {\n readonly $propertySecurities: ObjectPropertySecurities<\n Q,\n GetPropsKeys<\n Q,\n P,\n [R] extends [{}] ? false : true\n >\n >;\n }\n : {})\n // We are hiding the $rid field if it wasn't requested as we want to discourage its use\n & (IsNever<OPTIONS> extends true ? {}\n : IsAny<OPTIONS> extends true ? {}\n : \"$rid\" extends OPTIONS ? { readonly $rid: string }\n : {});\n}\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not `false` should always be `never`.\n *\n * This is structured in a way that it should always short circuit to never early.\n */\nexport type ExtractStrictOption<S extends NullabilityAdherence> =\n IsNever<S> extends true ? never\n : \"throw\" extends S ? never // catches any time \"throw\" still exists (including any)\n : \"drop\" extends S ? never // catches any time \"drop\" still exists (including any)\n : \"$notStrict\";\n\n/**\n * NOT EXPORTED FROM PACKAGE\n *\n * Anything you throw at this that is not exactly `true` should always be `never`.\n */\nexport type ExtractRidOption<R extends boolean> = // comment for readability\n IsNever<R> extends true ? never\n : DefaultToFalse<R> extends false ? never\n : \"$rid\";\n\nexport type ExtractPropertySecurityOption<S extends boolean> = // comment for readability\n IsNever<S> extends true ? never\n : DefaultToFalse<S> extends false ? never\n : \"$propertySecurities\";\n\nexport type ExtractAllPropertiesOption<T extends boolean> = // comment for readability\n IsNever<T> extends true ? never\n : DefaultToFalse<T> extends false ? never\n : \"$allBaseProperties\";\n\n// not exported from package\nexport type ExtractOptions<\n RID extends boolean,\n UNUSED extends NullabilityAdherence = NullabilityAdherence.Default,\n ALL_PROPERTIES extends boolean = false,\n PROPERTY_SECURITIES extends boolean = false,\n> =\n | ExtractRidOption<RID>\n | ExtractAllPropertiesOption<ALL_PROPERTIES>\n | ExtractPropertySecurityOption<PROPERTY_SECURITIES>;\n\ntype ObjectPropertySecurities<\n Q extends ObjectOrInterfaceDefinition,\n T extends PropertyKeys<Q>,\n> = {\n [K in T]: CompileTimeMetadata<Q>[\"properties\"][K][\"multiplicity\"] extends true\n ? PropertySecurity[][]\n : PropertySecurity[];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA+GA;AACA;AACA;AACA;AACA;AACA;AACA;AA4BA;AA0BA;AACA;AACA;AAFA,WA2BiBA,IAAI;AA8ErB;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAgBA","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 Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<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\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 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
|
+
{"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 Creator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n > = (\n baseObjectSet: Builder<Q, false>,\n ) =>\n | Definition<T, Q>\n | NumericPropertyDefinition<T, Q>\n | DatetimePropertyDefinition<T, Q>;\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: Creator<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>, Constant<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\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":[]}
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} 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 { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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 {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;
|
|
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 AndWhereClause,\n GeoFilter_Intersects,\n GeoFilter_Within,\n NotWhereClause,\n OrWhereClause,\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 { Logger } from \"./Logger.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 ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport type {\n PropertyMarkings,\n PropertySecurity,\n} from \"./object/PropertySecurity.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 {\n FetchLinksPageResult,\n LinkTypeApiNamesFor,\n MinimalDirectedObjectLinkInstance,\n} from \"./objectSet/ObjectSetLinks.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 { SimplePropertyDef } from \"./ontology/SimplePropertyDef.js\";\nexport type { PropertyBooleanFormattingRule } from \"./ontology/valueFormatting/PropertyBooleanFormattingRule.js\";\nexport type {\n DatetimeFormat,\n DatetimeLocalizedFormat,\n DatetimeLocalizedFormatType,\n DatetimeStringFormat,\n DatetimeTimezone,\n DatetimeTimezoneStatic,\n DatetimeTimezoneUser,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"./ontology/valueFormatting/PropertyDateAndTimestampFormattingRule.js\";\nexport type {\n KnownType,\n PropertyKnownTypeFormattingRule,\n} from \"./ontology/valueFormatting/PropertyKnownTypeFormattingRule.js\";\nexport type {\n Affix,\n DurationBaseValue,\n DurationFormatStyle,\n DurationPrecision,\n HumanReadableFormat,\n NumberFormatAffix,\n NumberFormatCurrency,\n NumberFormatCurrencyStyle,\n NumberFormatCustomUnit,\n NumberFormatDuration,\n NumberFormatFixedValues,\n NumberFormatNotation,\n NumberFormatOptions,\n NumberFormatRatio,\n NumberFormatScale,\n NumberFormatStandard,\n NumberFormatStandardUnit,\n NumberRatioType,\n NumberRoundingMode,\n NumberScaleType,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n TimeCodeFormat,\n} from \"./ontology/valueFormatting/PropertyNumberFormattingRule.js\";\nexport type { PropertyValueFormattingRule } from \"./ontology/valueFormatting/PropertyValueFormattingRule.js\";\nexport type {\n PropertyTypeReference,\n PropertyTypeReferenceOrStringConstant,\n StringConstant,\n} from \"./ontology/valueFormatting/PropertyValueFormattingUtils.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, 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 {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAmBhE,SAASC,eAAe,QAAQ,4BAA4B;AAyC5D,SAASC,IAAI,QAAQ,oBAAoB;;AAoGzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n> extends
|
|
1
|
+
{"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n PROPERTY_SECURITIES extends boolean = false,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n $loadPropertySecurityMetadata?: PROPERTY_SECURITIES;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n PROPERTY_SECURITIES extends boolean = false,\n> extends\n AsyncIterArgs<\n Q,\n K,\n R,\n A,\n S,\n T,\n RDP_KEYS,\n ORDER_BY_OPTIONS,\n PROPERTY_SECURITIES\n >\n{\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n PROPERTY_SECURITIES extends boolean = false,\n> extends\n SelectArg<Q, K, R, S, RDP_KEYS, PROPERTY_SECURITIES>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS>\n{\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertySecurity.js","names":[],"sources":["PropertySecurity.ts"],"sourcesContent":["/*\n * Copyright 2026 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 * A discriminated union representing different types of property security outcomes.\n *\n * @discriminator type - The type field determines which security outcome is represented:\n * - \"propertyMarkings\": Successfully computed security markings for the property\n * - \"unsupportedPolicy\": The property is backed by a restricted view that doesn't support property securities\n * - \"errorComputingSecurity\": The server was unable to load the securities of the property\n */\nexport type PropertySecurity =\n | ({\n type: \"propertyMarkings\";\n } & PropertyMarkings)\n | ({\n type: \"unsupportedPolicy\";\n })\n | ({\n type: \"errorComputingSecurity\";\n });\n\n/**\n * All marking requirements applicable to a property value.\n *\n * Markings represent security classifications or access control requirements\n * that must be satisfied to access the property value.\n */\nexport interface PropertyMarkings {\n /**\n * The conjunctive set of markings required to access the property value.\n * All markings from a conjunctive set must be met for access.\n */\n conjunctive?: Array<MarkingId>;\n /**\n * The disjunctive set of markings required to access the property value.\n *\n * Disjunctive markings are represented as a conjunctive list of disjunctive sets.\n * The top-level array is a conjunction of sets, where each inner array should be\n * treated as a unit where any marking within the set can satisfy the set.\n * All sets within the top level array must be satisfied.\n */\n disjunctive?: Array<Array<MarkingId>>;\n /**\n * The conjunctive set of markings for the container of this property value,\n * such as the project of a dataset. These markings may differ from the marking\n * on the actual property value, but still must be satisfied for accessing the property.\n *\n * All markings from a conjunctive set must be met for access.\n */\n containerConjunctive?: Array<MarkingId>;\n /**\n * The disjunctive set of markings for the container of this property value,\n * such as the project of a dataset. These markings may differ from the marking\n * on the actual property value, but still must be satisfied for accessing the property.\n *\n * Disjunctive markings are represented as a conjunctive list of disjunctive sets.\n * The top-level array is a conjunction of sets, where each inner array should be\n * treated as a unit where any marking within the set can satisfy the set.\n * All sets within the top level array must be satisfied.\n */\n containerDisjunctive?: Array<Array<MarkingId>>;\n}\n\n/**\n * A unique identifier for a security marking.\n * Markings represent security classifications or access control requirements.\n */\nexport type MarkingId = string;\n"],"mappings":"","ignoreList":[]}
|