@osdk/api 2.3.0-beta.9 → 2.3.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/browser/derivedProperties/DerivedProperty.js +16 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/mapping/DataValueMapping.js.map +1 -1
- package/build/browser/object/Media.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +4 -205
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/cjs/{ObjectSet-C67LQ5JX.d.cts → ObjectSet-C3Ud9v-e.d.cts} +6 -57
- package/build/cjs/index.d.cts +4 -4
- package/build/cjs/public/unstable.d.cts +2 -2
- package/build/esm/derivedProperties/DerivedProperty.js +16 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/mapping/DataValueMapping.js.map +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +4 -205
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +6 -32
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +2 -2
- package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
- package/build/types/object/Media.d.ts +0 -7
- package/build/types/object/Media.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/browser/derivedProperties/Expressions.js +0 -2
- package/build/browser/derivedProperties/Expressions.js.map +0 -1
- package/build/esm/derivedProperties/Expressions.js +0 -2
- package/build/esm/derivedProperties/Expressions.js.map +0 -1
- package/build/types/derivedProperties/Expressions.d.ts +0 -53
- package/build/types/derivedProperties/Expressions.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I,aACH,UAAU,+BACR;UACO,YACP,UAAU,qBACR,GACA,4BAGFC,sBAAsB,GACtBC,OAAO,0BAA0B,MAC7B,UAAU,8BAA8B;EAAE;CAAe,IACzD,UAAU,0BAA0B;EAAE;CAAoB,sBAG3D,gBAAgB,WACnB,mBAAmB,WAAW,MAC1B,UAAU,8BAA8B,kBAAkB,KACxD,oBAAoB,GAAG,cAAc,GAAG,SACxC,YACA,WAEF,UAAU,gCAAgC,kBAAkB,KAC1D,oBAAoB,GAAG,cAAc,GAAG,SACxC,YACA,YAEF,UAAU,wBAAwB,kBAChC,kBAAkB,KAClB,WACA,gBACA,YAEF,kBAAkB,KAClB,UACA,YACA,YAEA,UAAU,WAAW,kBAAkB,KACrC,WACA,gBACA,mBAGN;AAEH","names":["DerivedPropertyDefinitionBrand: unique symbol","baseObjectSet: DerivedProperty.Builder<Q, false>","clause: WhereClause<Q>","type: L","aggregationSpecifier: V","opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never"],"sources":["../../../src/derivedProperties/DerivedProperty.ts"],"version":3,"file":"DerivedProperty.d.ts"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type { PropertyValueWireToClient } from "./mapping/PropertyValueMapping.j
|
|
|
20
20
|
export type { Attachment, AttachmentUpload } from "./object/Attachment.js";
|
|
21
21
|
export type { AsyncIterArgs, Augment, Augments, FetchPageArgs, NullabilityAdherence, SelectArg, SelectArgToKeys } from "./object/FetchPageArgs.js";
|
|
22
22
|
export type { FetchPageResult, SingleOsdkResult } from "./object/FetchPageResult.js";
|
|
23
|
-
export type { Media, MediaMetadata, MediaReference
|
|
23
|
+
export type { Media, MediaMetadata, MediaReference } from "./object/Media.js";
|
|
24
24
|
export { isOk } from "./object/Result.js";
|
|
25
25
|
export type { Result } from "./object/Result.js";
|
|
26
26
|
export type { BaseObjectSet } from "./objectSet/BaseObjectSet.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,kCAAkC;AAChD,cACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,cAAc,4BAA4B;AAC1C,cAAc,qBAAqB;AACnC,cAAc,sEAAsE;AACpF,cAAc,oCAAoC;AAClD,cAAc,uCAAuC;AACrD,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,cACE,sBACA,kBACA,4BACA,mBACK;AACP,cAAc,8BAA8B;AAC5C,cACE,uBACA,0BACK;AACP,cAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,cACE,kBACA,eACA,oBACK;AACP,cACE,uBACA,oBACA,uBACA,6BACK;AACP,cACE,iCACK;AACP,cAAc,YAAY,wBAAwB;AAClD,cACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,cACE,iBACA,wBACK;AACP,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,kCAAkC;AAChD,cACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,cAAc,4BAA4B;AAC1C,cAAc,qBAAqB;AACnC,cAAc,sEAAsE;AACpF,cAAc,oCAAoC;AAClD,cAAc,uCAAuC;AACrD,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,cACE,sBACA,kBACA,4BACA,mBACK;AACP,cAAc,8BAA8B;AAC5C,cACE,uBACA,0BACK;AACP,cAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,cACE,kBACA,eACA,oBACK;AACP,cACE,uBACA,oBACA,uBACA,6BACK;AACP,cACE,iCACK;AACP,cAAc,YAAY,wBAAwB;AAClD,cACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,cACE,iBACA,wBACK;AACP,cAAc,OAAO,eAAe,sBAAsB;AAC1D,SAAS,YAAY;AACrB,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cAAc,6BAA6B;AAC3C,cACE,kBACA,sBACK;AACP,cACE,qBACA,yBACK;AACP,cACE,6BACA,oBACK;AACP,cAAc,uBAAuB;AACrC,cACE,qBACA,gBACA,sBACA,aACA,oBACK;AACP,cAAc,wBAAwB;AACtC,cAAc,uBAAuB;AACrC,cACE,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,cACE,uBACA,yBACK;AACP,cACE,mBACA,UACA,sBACK;AACP,cAAc,kBAAkB;AAChC,cAAc,cAAc,YAAY;AACxC,cAAc,kBAAkB;AAChC,cACE,OACA,6BACA,iCACK;AACP,cAAc,YAAY,mBAAmB;AAC7C,SAAS,iCAAiC;AAC1C,cACE,uBACA,iBACA,oBACA,uBACK;AACP,cAAc,YAAY,iBAAiB;AAC3C;AACA,cAAc,cAAc","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Attachment, AttachmentUpload } from "../object/Attachment.js";
|
|
2
|
-
import type { MediaReference
|
|
2
|
+
import type { MediaReference } from "../object/Media.js";
|
|
3
3
|
/**
|
|
4
4
|
* Map from the DataValue type to the typescript type that we return
|
|
5
5
|
*/
|
|
@@ -59,7 +59,7 @@ export interface DataValueClientToWire {
|
|
|
59
59
|
string: string;
|
|
60
60
|
timestamp: string;
|
|
61
61
|
set: Set<any>;
|
|
62
|
-
mediaReference: MediaReference
|
|
62
|
+
mediaReference: MediaReference;
|
|
63
63
|
twoDimensionalAggregation: {
|
|
64
64
|
key: AllowedBucketKeyTypes
|
|
65
65
|
value: AllowedBucketTypes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,YAAY,wBAAwB,yBAA0B;AAC5E,cAAc,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,YAAY,wBAAwB,yBAA0B;AAC5E,cAAc,sBAAsB,oBAAqB;;;;AAKzD,iBAAiB,sBAAsB;CACrC,YAAY;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,gBAAgB;CAChB,2BAA2B;EACzB,KAAK;EACL,OAAO;CACR;CACD,6BAA6B;EAC3B,KAAK;EACL,QAAQ;GAAE,KAAK;GAAuB,OAAO;EAAoB;CAClE;CACD,QAAQ;CACR,KAAK;CACL;CACA,SAAS,QAAQ;CACjB,UAAU,QAAQ;AACnB;;;;AAKD,iBAAiB,sBAAsB;CACrC,qBAAqB,mBAAmB,OAAO;WAAW;CAAc;CACxE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,KAAK;CACL,gBAAgB;CAChB,2BAA2B;EACzB,KAAK;EACL,OAAO;CACR;CACD,6BAA6B;EAC3B,KAAK;EACL,QAAQ;GAAE,KAAK;GAAuB,OAAO;EAAoB;CAClE;CACD,QAAQ;CACR;CACA,SAAS,QAAQ;CACjB,UAAU,QAAQ;AACnB;AAED,YAAY;AACZ,YAAY,wBACR,qBACA;CACA,YAAY;CACZ,UAAU;AACX","names":[],"sources":["../../../src/mapping/DataValueMapping.ts"],"version":3,"file":"DataValueMapping.d.ts"}
|
|
@@ -28,13 +28,6 @@ export interface MediaReference {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Object for uploading Media
|
|
32
|
-
*/
|
|
33
|
-
export interface MediaUpload {
|
|
34
|
-
readonly path: string;
|
|
35
|
-
readonly data: Blob;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
31
|
* Metadata of a media item
|
|
39
32
|
*/
|
|
40
33
|
export interface MediaMetadata {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,iBAAiB,MAAM;;;;CAIrB,iBAAiB,QAAQ;;;;CAIzB,iBAAiB,QAAQ;;;;CAIzB,qBAAqB;AACtB;;;;AAKD,iBAAiB,eAAe;CAC9B;CACA,WAAW;EACT,MAAM;EACN,kBAAkB;GAChB;GACA;GACA;GACA;EACD;CACF;AACF;;;;AAKD,iBAAiB,
|
|
1
|
+
{"mappings":"AAgBA,iBAAiB,MAAM;;;;CAIrB,iBAAiB,QAAQ;;;;CAIzB,iBAAiB,QAAQ;;;;CAIzB,qBAAqB;AACtB;;;;AAKD,iBAAiB,eAAe;CAC9B;CACA,WAAW;EACT,MAAM;EACN,kBAAkB;GAChB;GACA;GACA;GACA;EACD;CACF;AACF;;;;AAKD,iBAAiB,cAAc;CAC7B;CACA;CACA;AACD","names":[],"sources":["../../../src/object/Media.ts"],"version":3,"file":"Media.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,
|
|
1
|
+
{"mappings":"AAkBA,cAEE,6BACA,aAAa,kBAIR,aAAc;AAIrB,OAAO,iBAAS,oBACd,UAAU,gCACP,WAAW","names":[],"sources":["../../../src/objectSet/ObjectSet.test.ts"],"version":3,"file":"ObjectSet.test.d.ts"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expressions.js","names":[],"sources":["Expressions.ts"],"sourcesContent":["/*\n * Copyright 2025 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\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { WirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { DerivedProperty } from \"./DerivedProperty.js\";\n\ntype WithPropertiesNumerics =\n | \"integer\"\n | \"double\"\n | \"float\"\n | \"short\"\n | \"long\";\n\ntype WithPropertiesDatetime =\n | \"datetime\"\n | \"timestamp\";\n\nexport type DefinitionForType<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n> = SimplePropertyDef.ExtractMultiplicity<T> extends \"array\"\n ? DerivedProperty.Definition<T, Q>\n : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesNumerics\n ? DerivedProperty.NumericPropertyDefinition<T, Q>\n : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesDatetime\n ? DerivedProperty.DatetimePropertyDefinition<T, Q>\n : DerivedProperty.Definition<T, Q>;\n\ntype NumericExpressionArg<Q extends ObjectOrInterfaceDefinition> =\n | number\n | DerivedProperty.NumericPropertyDefinition<any, Q>;\n\ntype ReturnTypeForNumericMethod<\n Q extends ObjectOrInterfaceDefinition,\n LEFT extends WirePropertyTypes,\n RIGHT extends WirePropertyTypes,\n> = \"double\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >\n : \"float\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >\n : \"long\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >\n : DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n\ntype ReturnTypeForDatetimeMethod<\n Q extends ObjectOrInterfaceDefinition,\n LEFT extends WirePropertyTypes,\n RIGHT extends WirePropertyTypes,\n> = \"timestamp\" extends (LEFT | RIGHT)\n ? DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >\n : DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n\ntype ExtractWirePropertyTypeFromNumericArg<\n Q extends ObjectOrInterfaceDefinition,\n ARG extends NumericExpressionArg<Q>,\n> = ARG extends number ? \"double\"\n : ARG extends DerivedProperty.NumericPropertyDefinition<infer T, Q>\n ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T>\n : never\n : ARG extends PropertyKeys.Filtered<Q, WithPropertiesNumerics>\n ? NonNullable<CompileTimeMetadata<Q>[\"properties\"][ARG][\"type\"]>\n : never;\n\nexport type NumericExpressions<\n Q extends ObjectOrInterfaceDefinition,\n LEFT_PROPERTY_TYPE extends SimplePropertyDef,\n> = {\n readonly add: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly subtract: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly multiply: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly divide: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly abs: () => DerivedProperty.NumericPropertyDefinition<\n LEFT_PROPERTY_TYPE,\n Q\n >;\n\n readonly negate: () => DerivedProperty.NumericPropertyDefinition<\n LEFT_PROPERTY_TYPE,\n Q\n >;\n\n readonly max: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly min: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n};\n\ntype DatetimeExpressionArg<Q extends ObjectOrInterfaceDefinition> =\n DerivedProperty.DatetimePropertyDefinition<any, Q>;\n\ntype ExtractPropertyTypeFromDatetimeArg<\n Q extends ObjectOrInterfaceDefinition,\n ARG extends DatetimeExpressionArg<Q>,\n> = ARG extends DerivedProperty.DatetimePropertyDefinition<infer T, Q>\n ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T>\n : never\n : ARG extends PropertyKeys.Filtered<Q, WithPropertiesDatetime>\n ? NonNullable<CompileTimeMetadata<Q>[\"properties\"][ARG][\"type\"]>\n : never;\n\nexport type DatetimeExpressions<\n Q extends ObjectOrInterfaceDefinition,\n LEFT_PROPERTY_TYPE extends SimplePropertyDef,\n> = {\n readonly min: <A extends DatetimeExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForDatetimeMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractPropertyTypeFromDatetimeArg<Q, A>\n >;\n readonly max: (\n value: DatetimeExpressionArg<Q>,\n ) => ReturnTypeForDatetimeMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractPropertyTypeFromDatetimeArg<Q, typeof value>\n >;\n readonly extractPart: (\n value: DerivedProperty.ValidParts,\n ) => DerivedProperty.Definition<\n SimplePropertyDef.Make<\"string\", \"non-nullable\", \"single\">,\n Q\n >;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expressions.js","names":[],"sources":["Expressions.ts"],"sourcesContent":["/*\n * Copyright 2025 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\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { WirePropertyTypes } from \"../ontology/WirePropertyTypes.js\";\nimport type { DerivedProperty } from \"./DerivedProperty.js\";\n\ntype WithPropertiesNumerics =\n | \"integer\"\n | \"double\"\n | \"float\"\n | \"short\"\n | \"long\";\n\ntype WithPropertiesDatetime =\n | \"datetime\"\n | \"timestamp\";\n\nexport type DefinitionForType<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n> = SimplePropertyDef.ExtractMultiplicity<T> extends \"array\"\n ? DerivedProperty.Definition<T, Q>\n : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesNumerics\n ? DerivedProperty.NumericPropertyDefinition<T, Q>\n : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesDatetime\n ? DerivedProperty.DatetimePropertyDefinition<T, Q>\n : DerivedProperty.Definition<T, Q>;\n\ntype NumericExpressionArg<Q extends ObjectOrInterfaceDefinition> =\n | number\n | DerivedProperty.NumericPropertyDefinition<any, Q>;\n\ntype ReturnTypeForNumericMethod<\n Q extends ObjectOrInterfaceDefinition,\n LEFT extends WirePropertyTypes,\n RIGHT extends WirePropertyTypes,\n> = \"double\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >\n : \"float\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >\n : \"long\" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >\n : DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n\ntype ReturnTypeForDatetimeMethod<\n Q extends ObjectOrInterfaceDefinition,\n LEFT extends WirePropertyTypes,\n RIGHT extends WirePropertyTypes,\n> = \"timestamp\" extends (LEFT | RIGHT)\n ? DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >\n : DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n\ntype ExtractWirePropertyTypeFromNumericArg<\n Q extends ObjectOrInterfaceDefinition,\n ARG extends NumericExpressionArg<Q>,\n> = ARG extends number ? \"double\"\n : ARG extends DerivedProperty.NumericPropertyDefinition<infer T, Q>\n ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T>\n : never\n : ARG extends PropertyKeys.Filtered<Q, WithPropertiesNumerics>\n ? NonNullable<CompileTimeMetadata<Q>[\"properties\"][ARG][\"type\"]>\n : never;\n\nexport type NumericExpressions<\n Q extends ObjectOrInterfaceDefinition,\n LEFT_PROPERTY_TYPE extends SimplePropertyDef,\n> = {\n readonly add: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly subtract: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly multiply: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly divide: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly abs: () => DerivedProperty.NumericPropertyDefinition<\n LEFT_PROPERTY_TYPE,\n Q\n >;\n\n readonly negate: () => DerivedProperty.NumericPropertyDefinition<\n LEFT_PROPERTY_TYPE,\n Q\n >;\n\n readonly max: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n\n readonly min: <A extends NumericExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForNumericMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractWirePropertyTypeFromNumericArg<Q, A>\n >;\n};\n\ntype DatetimeExpressionArg<Q extends ObjectOrInterfaceDefinition> =\n DerivedProperty.DatetimePropertyDefinition<any, Q>;\n\ntype ExtractPropertyTypeFromDatetimeArg<\n Q extends ObjectOrInterfaceDefinition,\n ARG extends DatetimeExpressionArg<Q>,\n> = ARG extends DerivedProperty.DatetimePropertyDefinition<infer T, Q>\n ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T>\n : never\n : ARG extends PropertyKeys.Filtered<Q, WithPropertiesDatetime>\n ? NonNullable<CompileTimeMetadata<Q>[\"properties\"][ARG][\"type\"]>\n : never;\n\nexport type DatetimeExpressions<\n Q extends ObjectOrInterfaceDefinition,\n LEFT_PROPERTY_TYPE extends SimplePropertyDef,\n> = {\n readonly min: <A extends DatetimeExpressionArg<Q>>(\n value: A,\n ) => ReturnTypeForDatetimeMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractPropertyTypeFromDatetimeArg<Q, A>\n >;\n readonly max: (\n value: DatetimeExpressionArg<Q>,\n ) => ReturnTypeForDatetimeMethod<\n Q,\n SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>,\n ExtractPropertyTypeFromDatetimeArg<Q, typeof value>\n >;\n readonly extractPart: (\n value: DerivedProperty.ValidParts,\n ) => DerivedProperty.Definition<\n SimplePropertyDef.Make<\"string\", \"non-nullable\", \"single\">,\n Q\n >;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
2
|
-
import type { CompileTimeMetadata } from "../ontology/ObjectTypeDefinition.js";
|
|
3
|
-
import type { SimplePropertyDef } from "../ontology/SimplePropertyDef.js";
|
|
4
|
-
import type { WirePropertyTypes } from "../ontology/WirePropertyTypes.js";
|
|
5
|
-
import type { DerivedProperty } from "./DerivedProperty.js";
|
|
6
|
-
type WithPropertiesNumerics = "integer" | "double" | "float" | "short" | "long";
|
|
7
|
-
type WithPropertiesDatetime = "datetime" | "timestamp";
|
|
8
|
-
export type DefinitionForType<
|
|
9
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
10
|
-
T extends SimplePropertyDef
|
|
11
|
-
> = SimplePropertyDef.ExtractMultiplicity<T> extends "array" ? DerivedProperty.Definition<T, Q> : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesNumerics ? DerivedProperty.NumericPropertyDefinition<T, Q> : SimplePropertyDef.ExtractWirePropertyType<T> extends WithPropertiesDatetime ? DerivedProperty.DatetimePropertyDefinition<T, Q> : DerivedProperty.Definition<T, Q>;
|
|
12
|
-
type NumericExpressionArg<Q extends ObjectOrInterfaceDefinition> = number | DerivedProperty.NumericPropertyDefinition<any, Q>;
|
|
13
|
-
type ReturnTypeForNumericMethod<
|
|
14
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
15
|
-
LEFT extends WirePropertyTypes,
|
|
16
|
-
RIGHT extends WirePropertyTypes
|
|
17
|
-
> = "double" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q> : "float" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q> : "long" extends (LEFT | RIGHT) ? DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q> : DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
18
|
-
type ReturnTypeForDatetimeMethod<
|
|
19
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
20
|
-
LEFT extends WirePropertyTypes,
|
|
21
|
-
RIGHT extends WirePropertyTypes
|
|
22
|
-
> = "timestamp" extends (LEFT | RIGHT) ? DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q> : DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
23
|
-
type ExtractWirePropertyTypeFromNumericArg<
|
|
24
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
25
|
-
ARG extends NumericExpressionArg<Q>
|
|
26
|
-
> = ARG extends number ? "double" : ARG extends DerivedProperty.NumericPropertyDefinition<infer T, Q> ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T> : never : ARG extends PropertyKeys.Filtered<Q, WithPropertiesNumerics> ? NonNullable<CompileTimeMetadata<Q>["properties"][ARG]["type"]> : never;
|
|
27
|
-
export type NumericExpressions<
|
|
28
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
29
|
-
LEFT_PROPERTY_TYPE extends SimplePropertyDef
|
|
30
|
-
> = {
|
|
31
|
-
readonly add: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
32
|
-
readonly subtract: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
33
|
-
readonly multiply: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
34
|
-
readonly divide: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
35
|
-
readonly abs: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>
|
|
36
|
-
readonly negate: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>
|
|
37
|
-
readonly max: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
38
|
-
readonly min: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>
|
|
39
|
-
};
|
|
40
|
-
type DatetimeExpressionArg<Q extends ObjectOrInterfaceDefinition> = DerivedProperty.DatetimePropertyDefinition<any, Q>;
|
|
41
|
-
type ExtractPropertyTypeFromDatetimeArg<
|
|
42
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
43
|
-
ARG extends DatetimeExpressionArg<Q>
|
|
44
|
-
> = ARG extends DerivedProperty.DatetimePropertyDefinition<infer T, Q> ? T extends SimplePropertyDef ? SimplePropertyDef.ExtractWirePropertyType<T> : never : ARG extends PropertyKeys.Filtered<Q, WithPropertiesDatetime> ? NonNullable<CompileTimeMetadata<Q>["properties"][ARG]["type"]> : never;
|
|
45
|
-
export type DatetimeExpressions<
|
|
46
|
-
Q extends ObjectOrInterfaceDefinition,
|
|
47
|
-
LEFT_PROPERTY_TYPE extends SimplePropertyDef
|
|
48
|
-
> = {
|
|
49
|
-
readonly min: <A extends DatetimeExpressionArg<Q>>(value: A) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, A>>
|
|
50
|
-
readonly max: (value: DatetimeExpressionArg<Q>) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, typeof value>>
|
|
51
|
-
readonly extractPart: (value: DerivedProperty.ValidParts) => DerivedProperty.Definition<SimplePropertyDef.Make<"string", "non-nullable", "single">, Q>
|
|
52
|
-
};
|
|
53
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,yBAAyB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qBAAqB,IACjDA,OAAO,MACJ,2BACH,GACA,kBAAkB,wBAAwB,qBAC1C,sCAAsC,GAAG;UAGlC,WAAW,UAAU,qBAAqB,IACjDA,OAAO,MACJ,2BACH,GACA,kBAAkB,wBAAwB,qBAC1C,sCAAsC,GAAG;UAGlC,SAAS,UAAU,qBAAqB,IAC/CA,OAAO,MACJ,2BACH,GACA,kBAAkB,wBAAwB,qBAC1C,sCAAsC,GAAG;UAGlC,WAAW,gBAAgB,0BAClC,oBACA;UAGO,cAAc,gBAAgB,0BACrC,oBACA;UAGO,MAAM,UAAU,qBAAqB,IAC5CA,OAAO,MACJ,2BACH,GACA,kBAAkB,wBAAwB,qBAC1C,sCAAsC,GAAG;UAGlC,MAAM,UAAU,qBAAqB,IAC5CA,OAAO,MACJ,2BACH,GACA,kBAAkB,wBAAwB,qBAC1C,sCAAsC,GAAG;AAE5C;KAEI,sBAAsB,UAAU,+BACnC,gBAAgB,gCAAgC;KAE7C;CACH,UAAU;CACV,YAAY,sBAAsB;IAChC,YAAY,gBAAgB,iCAAiC,GAAG,KAChE,UAAU,oBAAoB,kBAAkB,wBAAwB,aAExE,YAAY,aAAa,SAAS,GAAG,0BACnC,YAAY,oBAAoB,GAAG,cAAc,KAAK;AAG5D,YAAY;CACV,UAAU;CACV,2BAA2B;IACzB;UACO,MAAM,UAAU,sBAAsB,IAC7CA,OAAO,MACJ,4BACH,GACA,kBAAkB,wBAAwB,qBAC1C,mCAAmC,GAAG;UAE/B,MACPC,OAAO,sBAAsB,OAC1B,4BACH,GACA,kBAAkB,wBAAwB,qBAC1C,mCAAmC,UAAU;UAEtC,cACPC,OAAO,gBAAgB,eACpB,gBAAgB,WACnB,kBAAkB,KAAK,UAAU,gBAAgB,WACjD;AAEH","names":["value: A","value: DatetimeExpressionArg<Q>","value: DerivedProperty.ValidParts"],"sources":["../../../src/derivedProperties/Expressions.ts"],"version":3,"file":"Expressions.d.ts"}
|