@osdk/api 2.2.0-beta.16 → 2.2.0-beta.18
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 +15 -0
- package/build/browser/Logger.js +16 -1
- package/build/browser/Logger.js.map +1 -1
- package/build/browser/OsdkBase.js.map +1 -1
- package/build/browser/OsdkObjectFrom.js +2 -4
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/OsdkObjectFrom.test.js +3 -3
- package/build/browser/OsdkObjectFrom.test.js.map +1 -1
- package/build/browser/actions/Actions.js.map +1 -1
- package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/browser/derivedProperties/Expressions.js +2 -0
- package/build/browser/derivedProperties/Expressions.js.map +1 -0
- package/build/browser/experimental/createMediaReference.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/FetchPageArgs.js +1 -0
- package/build/browser/object/FetchPageArgs.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +343 -31
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/ActionDefinition.js.map +1 -1
- package/build/browser/ontology/ObjectOrInterface.js +1 -0
- package/build/browser/ontology/ObjectOrInterface.js.map +1 -1
- package/build/browser/ontology/ObjectSpecifier.js.map +1 -1
- package/build/browser/ontology/PrimaryKeyTypes.js.map +1 -1
- package/build/browser/ontology/SimplePropertyDef.js.map +1 -1
- package/build/browser/queries/Queries.js.map +1 -1
- package/build/browser/test/EmployeeApiTest.js.map +1 -1
- package/build/browser/util/IncludeValuesExtending.js +2 -0
- package/build/browser/util/IncludeValuesExtending.js.map +1 -0
- package/build/cjs/{FilteredPropertyKeys-CyOYr7Je.d.cts → ObjectSet-CTMK80LD.d.cts} +182 -51
- package/build/cjs/index.d.cts +21 -15
- package/build/cjs/public/unstable.d.cts +3 -3
- package/build/esm/Logger.js +16 -1
- package/build/esm/Logger.js.map +1 -1
- package/build/esm/OsdkBase.js.map +1 -1
- package/build/esm/OsdkObjectFrom.js +2 -4
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/OsdkObjectFrom.test.js +3 -3
- package/build/esm/OsdkObjectFrom.test.js.map +1 -1
- package/build/esm/actions/Actions.js.map +1 -1
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/derivedProperties/Expressions.js +2 -0
- package/build/esm/derivedProperties/Expressions.js.map +1 -0
- package/build/esm/experimental/createMediaReference.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/FetchPageArgs.js +1 -0
- package/build/esm/object/FetchPageArgs.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +343 -31
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/ActionDefinition.js.map +1 -1
- package/build/esm/ontology/ObjectOrInterface.js +1 -0
- package/build/esm/ontology/ObjectOrInterface.js.map +1 -1
- package/build/esm/ontology/ObjectSpecifier.js.map +1 -1
- package/build/esm/ontology/PrimaryKeyTypes.js.map +1 -1
- package/build/esm/ontology/SimplePropertyDef.js.map +1 -1
- package/build/esm/queries/Queries.js.map +1 -1
- package/build/esm/test/EmployeeApiTest.js.map +1 -1
- package/build/esm/util/IncludeValuesExtending.js +2 -0
- package/build/esm/util/IncludeValuesExtending.js.map +1 -0
- package/build/types/Logger.d.ts +11 -9
- package/build/types/Logger.d.ts.map +1 -1
- package/build/types/OsdkBase.d.ts +3 -1
- package/build/types/OsdkBase.d.ts.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +4 -2
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/actions/Actions.d.ts +2 -2
- package/build/types/actions/Actions.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +40 -13
- package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
- package/build/types/derivedProperties/Expressions.d.ts +53 -0
- package/build/types/derivedProperties/Expressions.d.ts.map +1 -0
- package/build/types/experimental/createMediaReference.d.ts +2 -3
- package/build/types/experimental/createMediaReference.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/mapping/DataValueMapping.d.ts +4 -0
- package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
- package/build/types/object/FetchPageArgs.d.ts +36 -6
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +137 -31
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.test.d.ts +2 -1
- package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
- package/build/types/ontology/ActionDefinition.d.ts +1 -1
- package/build/types/ontology/ActionDefinition.d.ts.map +1 -1
- package/build/types/ontology/ObjectOrInterface.d.ts +12 -5
- package/build/types/ontology/ObjectOrInterface.d.ts.map +1 -1
- package/build/types/ontology/ObjectSpecifier.d.ts +2 -1
- package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -1
- package/build/types/ontology/PrimaryKeyTypes.d.ts +1 -1
- package/build/types/ontology/PrimaryKeyTypes.d.ts.map +1 -1
- package/build/types/ontology/SimplePropertyDef.d.ts +4 -4
- package/build/types/ontology/SimplePropertyDef.d.ts.map +1 -1
- package/build/types/queries/Queries.d.ts +2 -2
- package/build/types/queries/Queries.d.ts.map +1 -1
- package/build/types/test/EmployeeApiTest.d.ts +13 -5
- package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
- package/build/types/util/IncludeValuesExtending.d.ts +4 -0
- package/build/types/util/IncludeValuesExtending.d.ts.map +1 -0
- package/package.json +1 -1
- package/build/browser/ontology/FilteredPropertyKeys.js +0 -2
- package/build/browser/ontology/FilteredPropertyKeys.js.map +0 -1
- package/build/esm/ontology/FilteredPropertyKeys.js +0 -2
- package/build/esm/ontology/FilteredPropertyKeys.js.map +0 -1
- package/build/types/ontology/FilteredPropertyKeys.d.ts +0 -6
- package/build/types/ontology/FilteredPropertyKeys.d.ts.map +0 -1
|
@@ -4,30 +4,48 @@ import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/Obje
|
|
|
4
4
|
import type { CompileTimeMetadata } from "../ontology/ObjectTypeDefinition.js";
|
|
5
5
|
import type { SimplePropertyDef } from "../ontology/SimplePropertyDef.js";
|
|
6
6
|
import type { LinkedType, LinkNames } from "../util/LinkUtils.js";
|
|
7
|
+
import type { DatetimeExpressions, DefinitionForType, NumericExpressions } from "./Expressions.js";
|
|
7
8
|
import type { CollectWithPropAggregations, MinMaxWithPropAggregateOption } from "./WithPropertiesAggregationOptions.js";
|
|
8
9
|
export declare namespace DerivedProperty {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
export interface Definition<
|
|
11
|
+
T extends SimplePropertyDef,
|
|
12
|
+
Q extends ObjectOrInterfaceDefinition
|
|
13
|
+
> {
|
|
14
|
+
type: T;
|
|
15
|
+
}
|
|
16
|
+
export interface NumericPropertyDefinition<
|
|
17
|
+
T extends SimplePropertyDef,
|
|
18
|
+
Q extends ObjectOrInterfaceDefinition
|
|
19
|
+
> extends Definition<T, Q>, NumericExpressions<Q, T> {}
|
|
20
|
+
export interface DatetimePropertyDefinition<
|
|
21
|
+
T extends SimplePropertyDef,
|
|
22
|
+
Q extends ObjectOrInterfaceDefinition
|
|
23
|
+
> extends Definition<T, Q>, DatetimeExpressions<Q, T> {}
|
|
24
|
+
export type Clause<Q extends ObjectOrInterfaceDefinition> = {
|
|
25
|
+
[key: string]: Creator<Q, SimplePropertyDef>
|
|
11
26
|
};
|
|
12
|
-
type
|
|
13
|
-
[key: string]: Selector<Q, SimplePropertyDef>
|
|
14
|
-
};
|
|
15
|
-
type Selector<
|
|
27
|
+
export type Creator<
|
|
16
28
|
Q extends ObjectOrInterfaceDefinition,
|
|
17
29
|
T extends SimplePropertyDef
|
|
18
|
-
> = (baseObjectSet:
|
|
19
|
-
interface
|
|
30
|
+
> = (baseObjectSet: Builder<Q, false>) => Definition<T, Q> | NumericPropertyDefinition<T, Q> | DatetimePropertyDefinition<T, Q>;
|
|
31
|
+
interface BaseBuilder<
|
|
20
32
|
Q extends ObjectOrInterfaceDefinition,
|
|
21
33
|
CONSTRAINED extends boolean
|
|
22
34
|
> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {}
|
|
23
|
-
interface
|
|
35
|
+
export interface Builder<
|
|
36
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
37
|
+
CONSTRAINED extends boolean
|
|
38
|
+
> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {}
|
|
39
|
+
export interface AggregateBuilder<
|
|
24
40
|
Q extends ObjectOrInterfaceDefinition,
|
|
25
41
|
CONSTRAINED extends boolean
|
|
26
|
-
> extends
|
|
27
|
-
interface SelectPropertyBuilder<
|
|
42
|
+
> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {}
|
|
43
|
+
export interface SelectPropertyBuilder<
|
|
28
44
|
Q extends ObjectOrInterfaceDefinition,
|
|
29
45
|
CONSTRAINED extends boolean
|
|
30
46
|
> extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {}
|
|
47
|
+
export type ValidParts = "DAYS" | "MONTHS" | "QUARTERS" | "YEARS";
|
|
48
|
+
export {};
|
|
31
49
|
}
|
|
32
50
|
type BuilderTypeFromConstraint<
|
|
33
51
|
Q extends ObjectOrInterfaceDefinition,
|
|
@@ -45,14 +63,23 @@ type Pivotable<
|
|
|
45
63
|
> = {
|
|
46
64
|
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>
|
|
47
65
|
};
|
|
66
|
+
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
67
|
+
readonly constant: {
|
|
68
|
+
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>
|
|
69
|
+
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>
|
|
70
|
+
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>
|
|
71
|
+
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>
|
|
72
|
+
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>
|
|
73
|
+
}
|
|
74
|
+
};
|
|
48
75
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
49
76
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
50
77
|
limit: number
|
|
51
78
|
} : P extends "approximatePercentile" ? {
|
|
52
79
|
percentile: number
|
|
53
|
-
} : never : never) =>
|
|
80
|
+
} : never : never) => DefinitionForType<Q, V extends `${infer N}:${infer P}` ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "array"> : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][N]["type"], "nullable", "single"> : P extends "approximateDistinct" | "exactDistinct" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : SimplePropertyDef.Make<"double", "nullable", "single"> : V extends "$count" ? SimplePropertyDef.Make<"integer", "non-nullable", "single"> : never>
|
|
54
81
|
};
|
|
55
82
|
type Selectable<Q extends ObjectOrInterfaceDefinition> = {
|
|
56
|
-
readonly selectProperty: <R extends PropertyKeys<Q>>(propertyName: R) =>
|
|
83
|
+
readonly selectProperty: <R extends PropertyKeys<Q>>(propertyName: R) => DefinitionForType<Q, SimplePropertyDef.Make<CompileTimeMetadata<Q>["properties"][R]["type"], CompileTimeMetadata<Q>["properties"][R]["nullable"] extends true ? "nullable" : "non-nullable", CompileTimeMetadata<Q>["properties"][R]["multiplicity"] extends true ? "array" : "single">>
|
|
57
84
|
};
|
|
58
85
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,4BAA4B,kCAAmC;AAC7E,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cACE,6BACA,qCACK,uCAAwC;AAE/C,yBAAiB;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,4BAA4B,kCAAmC;AAC7E,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cACE,qBACA,mBACA,0BACK,kBAAmB;AAC1B,cACE,6BACA,qCACK,uCAAwC;AAE/C,yBAAiB;AACf,kBAAiB;EACf,UAAU;EACV,UAAU;GACV;EACA,MAAM;CACP;AAED,kBAAiB;EACf,UAAU;EACV,UAAU;WACF,WAAW,GAAG,IAAI,mBAAmB,GAAG,GAAG,CAAE;AAEvD,kBAAiB;EACf,UAAU;EACV,UAAU;WACF,WAAW,GAAG,IAAI,oBAAoB,GAAG,GAAG,CAAE;AAExD,aAAY,OACV,UAAU,+BACR;iBACa,QAAQ,GAAG;CAC3B;AAED,aA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AK,aAAa,gBAAgB,WACpD;CAEH;AACF;KAEI,aACH,UAAU,+BACR;UACO,YACP,UAAU,qBACR,GACA,4BAGFC,sBAAsB,GACtBC,OAAO,0BAA0B,MAC7B,UAAU,8BAA8B;EAAE;CAAe,IACzD,UAAU,0BAA0B;EAAE;CAAoB,sBAG3D,kBACH,GACA,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;AAIT;KAEI,WAAW,UAAU,+BAA+B;UAC9C,iBAAiB,UAAU,aAAa,IAC/CC,cAAc,MACX,kBACH,GACA,kBAAkB,KAChB,oBAAoB,GAAG,cAAc,GAAG,SACxC,oBAAoB,GAAG,cAAc,GAAG,oBAAoB,OACxD,aACA,gBACJ,oBAAoB,GAAG,cAAc,GAAG,wBAAwB,OAC5D,UACA;AAGT","names":["baseObjectSet: Builder<Q, false>","clause: WhereClause<Q>","type: L","value: number","value: string","aggregationSpecifier: V","opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never","propertyName: R"],"sources":["../../../src/derivedProperties/DerivedProperty.ts"],"version":3,"file":"DerivedProperty.d.ts"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,uBAAuB,sBAAuB;KAEvD,yBACD,YACA,WACA,UACA,UACA;KAEC,yBACD,aACA;AAEJ,YAAY;CACV,UAAU;CACV,UAAU;IACR,kBAAkB,oBAAoB,WAAW,UACjD,gBAAgB,WAAW,GAAG,KAC9B,kBAAkB,wBAAwB,WAAW,yBACnD,gBAAgB,0BAA0B,GAAG,KAC/C,kBAAkB,wBAAwB,WAAW,yBACnD,gBAAgB,2BAA2B,GAAG,KAChD,gBAAgB,WAAW,GAAG;KAE7B,qBAAqB,UAAU,wCAEhC,gBAAgB,+BAA+B;KAE9C;CACH,UAAU;CACV,aAAa;CACb,cAAc;IACZ,kBAAkB,OAAO,SAAS,gBAAgB,0BAClD,kBAAkB,KAAK,UAAU,gBAAgB,WACjD,KAEA,iBAAiB,OAAO,SAAS,gBAAgB,0BAC/C,kBAAkB,KAAK,UAAU,gBAAgB,WACjD,KAEF,gBAAgB,OAAO,SAAS,gBAAgB,0BAC9C,kBAAkB,KAAK,QAAQ,gBAAgB,WAC/C,KAEF,gBAAgB,0BAChB,kBAAkB,KAAK,WAAW,gBAAgB,WAClD;KAGC;CACH,UAAU;CACV,aAAa;CACb,cAAc;IACZ,qBAAqB,OAAO,SAC5B,gBAAgB,2BAChB,kBAAkB,KAAK,aAAa,gBAAgB,WACpD,KAEA,gBAAgB,2BAChB,kBAAkB,KAAK,YAAY,gBAAgB,WACnD;KAGC;CACH,UAAU;CACV,YAAY,qBAAqB;IAC/B,qBAAqB,WACrB,YAAY,gBAAgB,gCAAgC,GAAG,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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"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { MediaReference } from "../object/Media.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { ObjectOrInterfaceDefinition } from "../ontology/ObjectOrInterface.js";
|
|
2
|
+
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
4
3
|
import type { Experiment } from "./Experiment.js";
|
|
5
4
|
/**
|
|
6
5
|
* @experimental This feature is experimental and might change in the future.
|
|
@@ -16,7 +15,7 @@ import type { Experiment } from "./Experiment.js";
|
|
|
16
15
|
*/
|
|
17
16
|
type createMediaReference = <
|
|
18
17
|
Q extends ObjectOrInterfaceDefinition,
|
|
19
|
-
const L extends
|
|
18
|
+
const L extends PropertyKeys.Filtered<Q, "mediaReference">
|
|
20
19
|
>(args: {
|
|
21
20
|
data: Blob
|
|
22
21
|
fileName: string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,oBAAqB;AACzD,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,oBAAqB;AACzD,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,kBAAkB,iBAAkB;;;;;;;;;;;;;KAc7C;CACH,UAAU;OACJ,UAAU,aAAa,SAAS,GAAG;EAEzCA,MAAM;CACJ,MAAM;CACN;CACA,YAAY;CACZ,cAAc;AACf,MACE,QAAQ;AAEb,OAAO,cAAMC,yDACX,WACE,SACA,2DACA;CAAE,sBAAsB;AAAsB","names":["args: {\n data: Blob;\n fileName: string;\n objectType: Q;\n propertyType: L;\n }","__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference:\n Experiment<\n \"2.1.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference\",\n { createMediaReference: createMediaReference }\n >"],"sources":["../../../src/experimental/createMediaReference.ts"],"version":3,"file":"createMediaReference.d.ts"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export type { BaseObjectSet } from "./objectSet/BaseObjectSet.js";
|
|
|
27
27
|
export type { ObjectSet } from "./objectSet/ObjectSet.js";
|
|
28
28
|
export type { ObjectSetSubscription } from "./objectSet/ObjectSetListener.js";
|
|
29
29
|
export type { ActionDefinition, ActionMetadata } from "./ontology/ActionDefinition.js";
|
|
30
|
-
export type { FilteredPropertyKeys } from "./ontology/FilteredPropertyKeys.js";
|
|
31
30
|
export type { InterfaceDefinition, InterfaceMetadata } from "./ontology/InterfaceDefinition.js";
|
|
32
31
|
export type { ObjectOrInterfaceDefinition, PropertyKeys } from "./ontology/ObjectOrInterface.js";
|
|
33
32
|
export type { ObjectSpecifier } from "./ontology/ObjectSpecifier.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,eAAc,kCAAkC;AAChD,eACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,eAAc,4BAA4B;AAC1C,eAAc,qBAAqB;AACnC,eAAc,sEAAsE;AACpF,eAAc,oCAAoC;AAClD,eAAc,uCAAuC;AACrD,eAAc,yBAAyB;AACvC,eAAc,2BAA2B;AACzC,eAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,eACE,sBACA,kBACA,4BACA,mBACK;AACP,eAAc,8BAA8B;AAC5C,eACE,uBACA,0BACK;AACP,eAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,eACE,kBACA,eACA,oBACK;AACP,eACE,uBACA,oBACA,uBACA,6BACK;AACP,eACE,iCACK;AACP,eAAc,YAAY,wBAAwB;AAClD,eACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,eACE,iBACA,wBACK;AACP,eAAc,OAAO,eAAe,sBAAsB;AAC1D,SAAS,YAAY;AACrB,eAAc,cAAc;AAC5B,eAAc,qBAAqB;AACnC,eAAc,iBAAiB;AAC/B,eAAc,6BAA6B;AAC3C,eACE,kBACA,sBACK;AACP,
|
|
1
|
+
{"mappings":"AAgBA,eAAc,kCAAkC;AAChD,eACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,eAAc,4BAA4B;AAC1C,eAAc,qBAAqB;AACnC,eAAc,sEAAsE;AACpF,eAAc,oCAAoC;AAClD,eAAc,uCAAuC;AACrD,eAAc,yBAAyB;AACvC,eAAc,2BAA2B;AACzC,eAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,eACE,sBACA,kBACA,4BACA,mBACK;AACP,eAAc,8BAA8B;AAC5C,eACE,uBACA,0BACK;AACP,eAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,eACE,kBACA,eACA,oBACK;AACP,eACE,uBACA,oBACA,uBACA,6BACK;AACP,eACE,iCACK;AACP,eAAc,YAAY,wBAAwB;AAClD,eACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,eACE,iBACA,wBACK;AACP,eAAc,OAAO,eAAe,sBAAsB;AAC1D,SAAS,YAAY;AACrB,eAAc,cAAc;AAC5B,eAAc,qBAAqB;AACnC,eAAc,iBAAiB;AAC/B,eAAc,6BAA6B;AAC3C,eACE,kBACA,sBACK;AACP,eACE,qBACA,yBACK;AACP,eACE,6BACA,oBACK;AACP,eAAc,uBAAuB;AACrC,eACE,qBACA,gBACA,sBACA,aACA,oBACK;AACP,eAAc,wBAAwB;AACtC,eAAc,uBAAuB;AACrC,eACE,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,eACE,uBACA,yBACK;AACP,eAAc,UAAU,sBAAsB;AAC9C,eAAc,kBAAkB;AAChC,eAAc,cAAc,YAAY;AACxC,eAAc,kBAAkB;AAChC,eACE,OACA,6BACA,iCACK;AACP,eAAc,YAAY,mBAAmB;AAC7C,SAAS,iCAAiC;AAC1C,eACE,uBACA,iBACA,oBACA,uBACK;AACP,eAAc,YAAY,iBAAiB;AAC3C;AACA,eAAc,cAAc","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -34,6 +34,8 @@ export interface DataValueWireToClient {
|
|
|
34
34
|
struct: Record<string, any>;
|
|
35
35
|
set: Set<any>;
|
|
36
36
|
objectType: string;
|
|
37
|
+
geohash: GeoJSON.Point;
|
|
38
|
+
geoshape: GeoJSON.GeoJSON;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Map from the DataValue type to the typescript type that we accept
|
|
@@ -71,6 +73,8 @@ export interface DataValueClientToWire {
|
|
|
71
73
|
}[];
|
|
72
74
|
struct: Record<string, any>;
|
|
73
75
|
objectType: string;
|
|
76
|
+
geohash: GeoJSON.Point;
|
|
77
|
+
geoshape: GeoJSON.GeoJSON;
|
|
74
78
|
}
|
|
75
79
|
export type AllowedBucketTypes = string | number | boolean;
|
|
76
80
|
export type AllowedBucketKeyTypes = AllowedBucketTypes | {
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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"}
|
|
@@ -4,6 +4,36 @@ export type NullabilityAdherence = false | "throw" | "drop";
|
|
|
4
4
|
export declare namespace NullabilityAdherence {
|
|
5
5
|
type Default = "throw";
|
|
6
6
|
}
|
|
7
|
+
export declare namespace ObjectSetArgs {
|
|
8
|
+
interface Select<
|
|
9
|
+
OBJECT_KEYS extends string = never,
|
|
10
|
+
RDP_KEYS extends string = never
|
|
11
|
+
> {
|
|
12
|
+
$select?: readonly (OBJECT_KEYS | RDP_KEYS)[];
|
|
13
|
+
$includeRid?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface OrderBy<L extends string = never> {
|
|
16
|
+
$orderBy?: { [K in L]? : "asc" | "desc" };
|
|
17
|
+
}
|
|
18
|
+
interface AsyncIter<
|
|
19
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
20
|
+
K extends PropertyKeys<Q> = never,
|
|
21
|
+
T extends boolean = false,
|
|
22
|
+
RDP_KEYS extends string = never
|
|
23
|
+
> extends Select<K, RDP_KEYS>, OrderBy<K> {
|
|
24
|
+
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
25
|
+
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
26
|
+
}
|
|
27
|
+
interface FetchPage<
|
|
28
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
29
|
+
K extends PropertyKeys<Q> = never,
|
|
30
|
+
T extends boolean = false,
|
|
31
|
+
RDP_KEYS extends string = never
|
|
32
|
+
> extends AsyncIter<Q, K, T, RDP_KEYS> {
|
|
33
|
+
$nextPageToken?: string;
|
|
34
|
+
$pageSize?: number;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
7
37
|
export interface SelectArg<
|
|
8
38
|
Q extends ObjectOrInterfaceDefinition,
|
|
9
39
|
L extends PropertyKeys<Q> = PropertyKeys<Q>,
|
|
@@ -16,9 +46,7 @@ export interface SelectArg<
|
|
|
16
46
|
export interface OrderByArg<
|
|
17
47
|
Q extends ObjectOrInterfaceDefinition,
|
|
18
48
|
L extends PropertyKeys<Q> = PropertyKeys<Q>
|
|
19
|
-
> {
|
|
20
|
-
$orderBy?: { [K in L]? : "asc" | "desc" };
|
|
21
|
-
}
|
|
49
|
+
> extends ObjectSetArgs.OrderBy<L> {}
|
|
22
50
|
export type SelectArgToKeys<
|
|
23
51
|
Q extends ObjectOrInterfaceDefinition,
|
|
24
52
|
A extends SelectArg<Q, any, any>
|
|
@@ -29,8 +57,9 @@ export interface FetchPageArgs<
|
|
|
29
57
|
R extends boolean = false,
|
|
30
58
|
A extends Augments = never,
|
|
31
59
|
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
32
|
-
T extends boolean = false
|
|
33
|
-
|
|
60
|
+
T extends boolean = false,
|
|
61
|
+
RDP_KEYS extends string = never
|
|
62
|
+
> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS> {
|
|
34
63
|
$nextPageToken?: string;
|
|
35
64
|
$pageSize?: number;
|
|
36
65
|
}
|
|
@@ -40,7 +69,8 @@ export interface AsyncIterArgs<
|
|
|
40
69
|
R extends boolean = false,
|
|
41
70
|
A extends Augments = never,
|
|
42
71
|
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
43
|
-
T extends boolean = false
|
|
72
|
+
T extends boolean = false,
|
|
73
|
+
RDP_KEYS extends string = never
|
|
44
74
|
> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
|
|
45
75
|
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
46
76
|
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;EACtD;CACA,mBAAmB;CACnB,cAAc;AACf;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;
|
|
1
|
+
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,yBAAiB;WACE;EACf;EACA;GACA;EACA,oBAAoB,cAAc;EAClC;CACD;WAEgB,QACf,0BACA;EACA,cACG,KAAK,MAAK,QAAQ;CAEtB;WAEgB;EACf,UAAU;EACV,UAAU,aAAa;EACvB,oBAAoB;EACpB;WACQ,OAAO,GAAG,WAAW,QAAQ,GAAG;EACxC;EACA,kCAAkC,aAAa,WAAW,IAAI;CAC/D;WAEgB;EACf,UAAU;EACV,UAAU,aAAa;EACvB,oBAAoB;EACpB;WACQ,UAAU,GAAG,GAAG,GAAG,UAAU;EACrC;EACA;CACD;;AAGH,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU,uBAAuB,qBAAqB;EACtD;CACA,mBAAmB;CACnB,cAAc;AACf;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;UACjC,cAAc,QAAQ,GAAG,CAClC;AAED,YAAY;CACV,UAAU;CACV,UAAU,UAAU;IAClB,UAAU,UAAU,YAAY,aAAa,KAC7C,EAAE,uCAAuC,EAAE,qBAC3C,aAAa;AAEjB,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;CACpB;UACQ,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,UAAU;CAClD;CACA;AACD;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,aAAa,KAAK,aAAa;CACzC,oBAAoB;CACpB,UAAU;CACV,UAAU,uBAAuB,qBAAqB;CACtD,oBAAoB;CACpB;UACQ,UAAU,GAAG,GAAG,GAAG,IAAI,WAAW,GAAG,aAAa,IAAI;CAC9D;CACA,kCAAkC,aAAa,WAAW,IAAI;AAC/D;AAED,YAAY;CACV,UAAU;CACV;OACK,KAAK,oBAAoB,GAAG,cAAa;AAEhD,YAAY,WAAW","names":[],"sources":["../../../src/object/FetchPageArgs.ts"],"version":3,"file":"FetchPageArgs.d.ts"}
|
|
@@ -3,29 +3,67 @@ import type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } f
|
|
|
3
3
|
import type { AggregationsResults } from "../aggregate/AggregationsResults.js";
|
|
4
4
|
import type { WhereClause } from "../aggregate/WhereClause.js";
|
|
5
5
|
import type { DerivedProperty } from "../derivedProperties/DerivedProperty.js";
|
|
6
|
-
import type { AsyncIterArgs, Augments, FetchPageArgs, NullabilityAdherence, SelectArg } from "../object/FetchPageArgs.js";
|
|
6
|
+
import type { AsyncIterArgs, Augments, FetchPageArgs, NullabilityAdherence, ObjectSetArgs, SelectArg } from "../object/FetchPageArgs.js";
|
|
7
7
|
import type { Result } from "../object/Result.js";
|
|
8
8
|
import type { DerivedObjectOrInterfaceDefinition, ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
9
9
|
import type { CompileTimeMetadata, ObjectTypeDefinition } from "../ontology/ObjectTypeDefinition.js";
|
|
10
10
|
import type { SimplePropertyDef } from "../ontology/SimplePropertyDef.js";
|
|
11
11
|
import type { PrimaryKeyType } from "../OsdkBase.js";
|
|
12
|
-
import type { ExtractOptions, Osdk } from "../OsdkObjectFrom.js";
|
|
12
|
+
import type { ExtractAllPropertiesOption, ExtractOptions, ExtractRidOption, Osdk } from "../OsdkObjectFrom.js";
|
|
13
13
|
import type { PageResult } from "../PageResult.js";
|
|
14
14
|
import type { LinkedType, LinkNames } from "../util/LinkUtils.js";
|
|
15
15
|
import type { BaseObjectSet } from "./BaseObjectSet.js";
|
|
16
16
|
import type { ObjectSetSubscription } from "./ObjectSetListener.js";
|
|
17
17
|
type MergeObjectSet<
|
|
18
18
|
Q extends ObjectOrInterfaceDefinition,
|
|
19
|
-
D extends
|
|
20
|
-
> =
|
|
21
|
-
type ExtractRdp<D extends
|
|
19
|
+
D extends Record<string, SimplePropertyDef> = {}
|
|
20
|
+
> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;
|
|
21
|
+
type ExtractRdp<D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>> = [D] extends [never] ? {} : D extends BaseObjectSet<any> ? {} : D extends Record<string, SimplePropertyDef> ? D : {};
|
|
22
|
+
type MaybeSimplifyPropertyKeys<
|
|
23
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
24
|
+
L extends PropertyKeys<Q>
|
|
25
|
+
> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L;
|
|
26
|
+
type SubSelectKeysHelper<
|
|
27
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
28
|
+
L extends string
|
|
29
|
+
> = [L] extends [never] ? PropertyKeys<Q> : PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;
|
|
30
|
+
type SubSelectKeys<
|
|
31
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
32
|
+
X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never
|
|
33
|
+
> = SubSelectKeysHelper<Q, Extract$Select<X>>;
|
|
34
|
+
type NOOP<T> = T extends (...args: any[]) => any ? T : T extends abstract new (...args: any[]) => any ? T : { [K in keyof T] : T[K] };
|
|
35
|
+
type SubSelectRDPsHelper<
|
|
36
|
+
X extends ValidFetchPageArgs<any, any> | ValidAsyncIterArgs<any, any>,
|
|
37
|
+
DEFAULT extends string
|
|
38
|
+
> = [X] extends [never] ? DEFAULT : (X["$select"] & string[])[number] & DEFAULT;
|
|
39
|
+
type SubSelectRDPs<
|
|
40
|
+
RDPs extends Record<string, SimplePropertyDef>,
|
|
41
|
+
X extends ValidFetchPageArgs<any, RDPs> | ValidAsyncIterArgs<any, RDPs>
|
|
42
|
+
> = [RDPs] extends [never] ? never : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>] : RDPs[K] }>;
|
|
22
43
|
export interface MinimalObjectSet<
|
|
23
44
|
Q extends ObjectOrInterfaceDefinition,
|
|
24
45
|
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
25
46
|
> extends BaseObjectSet<Q>, FetchPage<Q, RDPs>, AsyncIter<Q, RDPs>, Where<Q, RDPs> {}
|
|
47
|
+
export type ExtractOptions2<X extends FetchPageArgs<any, any, any, any, any, any, any>> = [X] extends [never] ? never : ExtractRidOption<X["$includeRid"] extends true ? true : false> | ExtractAllPropertiesOption<X["$includeAllBaseObjectProperties"] extends true ? true : false>;
|
|
48
|
+
type Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<X["$select"]>[number];
|
|
26
49
|
interface FetchPage<
|
|
27
50
|
Q extends ObjectOrInterfaceDefinition,
|
|
28
51
|
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
52
|
+
> {
|
|
53
|
+
readonly fetchPage: FetchPageSignature<Q, RDPs>;
|
|
54
|
+
readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;
|
|
55
|
+
}
|
|
56
|
+
type ValidFetchPageArgs<
|
|
57
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
58
|
+
RDPs extends Record<string, SimplePropertyDef>
|
|
59
|
+
> = ObjectSetArgs.FetchPage<Q, PropertyKeys<Q>, false, string & keyof RDPs> | ObjectSetArgs.FetchPage<Q, never, true, string & keyof RDPs>;
|
|
60
|
+
type ValidAsyncIterArgs<
|
|
61
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
62
|
+
RDPs extends Record<string, SimplePropertyDef>
|
|
63
|
+
> = ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs> | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;
|
|
64
|
+
interface FetchPageSignature<
|
|
65
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
66
|
+
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
29
67
|
> {
|
|
30
68
|
/**
|
|
31
69
|
* Gets a page of objects of this type, with a result wrapper
|
|
@@ -39,13 +77,46 @@ interface FetchPage<
|
|
|
39
77
|
|
|
40
78
|
* @returns a page of objects
|
|
41
79
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
80
|
+
<const X extends ValidFetchPageArgs<Q, RDPs> = never>(args?: X): Promise<PageResult<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>>;
|
|
81
|
+
/**
|
|
82
|
+
* Gets a page of objects of this type, with a result wrapper
|
|
83
|
+
* @param args - Args to specify next page token and page size, if applicable
|
|
84
|
+
* @example
|
|
85
|
+
* const myObjs = await objectSet.fetchPage({
|
|
86
|
+
$pageSize: 10,
|
|
87
|
+
$nextPageToken: "nextPage"
|
|
88
|
+
});
|
|
89
|
+
const myObjsResult = myObjs.data;
|
|
90
|
+
|
|
91
|
+
* @returns a page of objects
|
|
92
|
+
*/
|
|
93
|
+
<
|
|
94
|
+
L extends PropertyKeys<Q>,
|
|
44
95
|
R extends boolean,
|
|
45
96
|
const A extends Augments,
|
|
46
97
|
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
47
98
|
T extends boolean = false
|
|
48
|
-
>(args?: FetchPageArgs<Q, L, R, A, S, T>)
|
|
99
|
+
>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>>;
|
|
100
|
+
}
|
|
101
|
+
interface FetchPageWithErrorsSignature<
|
|
102
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
103
|
+
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
104
|
+
> {
|
|
105
|
+
/**
|
|
106
|
+
* Gets a page of objects of this type, with a result wrapper
|
|
107
|
+
* @param args - Args to specify next page token and page size, if applicable
|
|
108
|
+
* @example
|
|
109
|
+
* const myObjs = await objectSet.fetchPage({
|
|
110
|
+
$pageSize: 10,
|
|
111
|
+
$nextPageToken: "nextPage"
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
if(isOk(myObjs)){
|
|
115
|
+
const myObjsResult = myObjs.value.data;
|
|
116
|
+
}
|
|
117
|
+
* @returns a page of objects, wrapped in a result wrapper
|
|
118
|
+
*/
|
|
119
|
+
<X extends ValidFetchPageArgs<Q, RDPs> = never>(args?: X): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>>>;
|
|
49
120
|
/**
|
|
50
121
|
* Gets a page of objects of this type, with a result wrapper
|
|
51
122
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -60,13 +131,13 @@ interface FetchPage<
|
|
|
60
131
|
}
|
|
61
132
|
* @returns a page of objects, wrapped in a result wrapper
|
|
62
133
|
*/
|
|
63
|
-
|
|
64
|
-
L extends PropertyKeys<Q
|
|
134
|
+
<
|
|
135
|
+
L extends PropertyKeys<Q>,
|
|
65
136
|
R extends boolean,
|
|
66
137
|
const A extends Augments,
|
|
67
138
|
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
68
139
|
T extends boolean = false
|
|
69
|
-
>(args?: FetchPageArgs<Q, L, R, A, S, T>)
|
|
140
|
+
>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>>>;
|
|
70
141
|
}
|
|
71
142
|
interface Where<
|
|
72
143
|
Q extends ObjectOrInterfaceDefinition,
|
|
@@ -84,7 +155,7 @@ interface Where<
|
|
|
84
155
|
*/
|
|
85
156
|
readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
|
|
86
157
|
}
|
|
87
|
-
interface
|
|
158
|
+
interface AsyncIterSignature<
|
|
88
159
|
Q extends ObjectOrInterfaceDefinition,
|
|
89
160
|
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
90
161
|
> {
|
|
@@ -96,24 +167,39 @@ interface AsyncIter<
|
|
|
96
167
|
* }
|
|
97
168
|
* @returns an async iterator to load all objects
|
|
98
169
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
170
|
+
<X extends ValidAsyncIterArgs<Q, RDPs> = never>(args?: X): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
171
|
+
/**
|
|
172
|
+
* Returns an async iterator to load all objects of this type
|
|
173
|
+
* @example
|
|
174
|
+
* for await (const obj of myObjectSet.asyncIter()){
|
|
175
|
+
* // Handle obj
|
|
176
|
+
* }
|
|
177
|
+
* @returns an async iterator to load all objects
|
|
178
|
+
*/
|
|
179
|
+
<
|
|
180
|
+
L extends PropertyKeys<Q>,
|
|
101
181
|
R extends boolean,
|
|
102
182
|
const A extends Augments,
|
|
103
183
|
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
104
184
|
T extends boolean = false
|
|
105
|
-
>(args?: AsyncIterArgs<Q, L, R, A, S, T>)
|
|
185
|
+
>(args?: AsyncIterArgs<Q, L, R, A, S, T>): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>;
|
|
186
|
+
}
|
|
187
|
+
interface AsyncIter<
|
|
188
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
189
|
+
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
190
|
+
> {
|
|
191
|
+
asyncIter: AsyncIterSignature<Q, RDPs>;
|
|
106
192
|
}
|
|
107
193
|
interface WithProperties<
|
|
108
194
|
Q extends ObjectOrInterfaceDefinition = any,
|
|
109
195
|
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
110
196
|
> {
|
|
111
|
-
readonly withProperties: <NEW extends Record<string, SimplePropertyDef>>(clause: { [K in keyof NEW] : DerivedProperty.
|
|
197
|
+
readonly withProperties: <NEW extends Record<string, SimplePropertyDef>>(clause: { [K in keyof NEW] : DerivedProperty.Creator<Q, NEW[K]> }) => ObjectSet<Q, { [NN in keyof NEW | keyof RDPs] : NN extends keyof NEW ? NEW[NN] : NN extends keyof RDPs ? RDPs[NN] : never }>;
|
|
112
198
|
}
|
|
113
199
|
export interface ObjectSet<
|
|
114
200
|
Q extends ObjectOrInterfaceDefinition = any,
|
|
115
|
-
UNUSED_OR_RDP extends
|
|
116
|
-
> extends ObjectSetCleanedTypes<Q, ExtractRdp<UNUSED_OR_RDP>, MergeObjectSet<Q, UNUSED_OR_RDP
|
|
201
|
+
UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> = never
|
|
202
|
+
> extends ObjectSetCleanedTypes<Q, ExtractRdp<UNUSED_OR_RDP>, MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>> {}
|
|
117
203
|
interface Aggregate<Q extends ObjectOrInterfaceDefinition> {
|
|
118
204
|
/**
|
|
119
205
|
* Aggregate on a field in an object type
|
|
@@ -178,28 +264,48 @@ interface PivotTo<Q extends ObjectOrInterfaceDefinition> {
|
|
|
178
264
|
* @param type - The linked object type you want to pivot to
|
|
179
265
|
* @returns an object set of the specified linked type
|
|
180
266
|
*/
|
|
181
|
-
readonly pivotTo: <L extends LinkNames<Q>>(type: L) =>
|
|
267
|
+
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => ObjectSet<LinkedType<Q, L>>;
|
|
182
268
|
}
|
|
183
|
-
interface
|
|
184
|
-
Q extends
|
|
269
|
+
interface FetchOneSignature<
|
|
270
|
+
Q extends ObjectTypeDefinition,
|
|
185
271
|
RDPs extends Record<string, SimplePropertyDef>
|
|
186
272
|
> {
|
|
187
273
|
/**
|
|
188
274
|
* Fetches one object with the specified primary key, without a result wrapper
|
|
189
275
|
*/
|
|
190
|
-
|
|
191
|
-
|
|
276
|
+
<X extends ObjectSetArgs.Select<PropertyKeys<Q>, string & keyof RDPs> = never>(primaryKey: PrimaryKeyType<Q>, options?: X): Promise<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
277
|
+
/**
|
|
278
|
+
* Fetches one object with the specified primary key, without a result wrapper
|
|
279
|
+
*/
|
|
280
|
+
<
|
|
281
|
+
const L extends PropertyKeys<Q>,
|
|
192
282
|
const R extends boolean,
|
|
193
283
|
const S extends false | "throw" = NullabilityAdherence.Default
|
|
194
|
-
>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>)
|
|
284
|
+
>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Osdk.Instance<Q, ExtractOptions<R, S>, MaybeSimplifyPropertyKeys<Q, L>>>;
|
|
285
|
+
}
|
|
286
|
+
interface FetchOneWithErrorsSignature<
|
|
287
|
+
Q extends ObjectTypeDefinition,
|
|
288
|
+
RDPs extends Record<string, SimplePropertyDef>
|
|
289
|
+
> {
|
|
195
290
|
/**
|
|
196
291
|
* Fetches one object with the specified primary key, with a result wrapper
|
|
197
292
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
293
|
+
<X extends ObjectSetArgs.Select<PropertyKeys<Q>, string & keyof RDPs>>(primaryKey: PrimaryKeyType<Q>, options?: X): Promise<Result<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>>;
|
|
294
|
+
/**
|
|
295
|
+
* Fetches one object with the specified primary key, with a result wrapper
|
|
296
|
+
*/
|
|
297
|
+
<
|
|
298
|
+
const L extends PropertyKeys<Q>,
|
|
299
|
+
const R extends boolean,
|
|
300
|
+
const S extends false | "throw" = NullabilityAdherence.Default
|
|
301
|
+
>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Result<Osdk.Instance<Q, ExtractOptions<R, S>, MaybeSimplifyPropertyKeys<Q, L>>>>;
|
|
302
|
+
}
|
|
303
|
+
interface FetchOne<
|
|
304
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
305
|
+
RDPs extends Record<string, SimplePropertyDef>
|
|
306
|
+
> {
|
|
307
|
+
fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;
|
|
308
|
+
fetchOneWithErrors: Q extends ObjectTypeDefinition ? FetchOneWithErrorsSignature<Q, RDPs> : never;
|
|
203
309
|
}
|
|
204
310
|
interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
205
311
|
/**
|
|
@@ -215,6 +321,6 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
|
215
321
|
interface ObjectSetCleanedTypes<
|
|
216
322
|
Q extends ObjectOrInterfaceDefinition,
|
|
217
323
|
D extends Record<string, SimplePropertyDef>,
|
|
218
|
-
MERGED extends ObjectOrInterfaceDefinition
|
|
219
|
-
> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<
|
|
324
|
+
MERGED extends ObjectOrInterfaceDefinition & Q
|
|
325
|
+
> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED> {}
|
|
220
326
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,eACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAClD,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cACE,4BACA,gBACA,kBACA,YACK,sBAAuB;AAC9B,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,eAAe,qBAAqB,CAAE;IAC9C,mCAAmC,sBAAsB,GAAG;KAE3D,WACH,U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QACD,KAAK,SACH,GACA,eAAe,GAAG,IAClB,0BAA0B,GAAG;AAGlC;UAES;CACR,UAAU;CACV,aAAa,eAAe;EAC5B;;;;EAIC,UAAU,cAAc,OAAO,aAAa,mBAAmB,OAC9DF,YAAY,eAAe,IAC3BC,UAAU,IACT,QACD,OACE,KAAK,SACH,GACA,gBAAgB,IAChB,cAAc,GAAG,IACjB,cAAc,MAAM;;;;;QASlB,UAAU,aAAa;QACvB;QACA,UAAU,QAAQ,UAAU,qBAAqB;GAEvDD,YAAY,eAAe,IAC3BE,UAAU,UAAU,GAAG,GAAG,GAAG,KAC5B,QACD,OACE,KAAK,SACH,GACA,eAAe,GAAG,IAClB,0BAA0B,GAAG;AAIpC;UAES;CACR,UAAU;CACV,aAAa,eAAe;EAC5B;CACA,UAAU,UAAU,uBAAuB,kBAAkB,GAAG;CAChE,oBAAoB,UAAU,uBAC1B,4BAA4B,GAAG;AAEpC;UAGS,UACR,UAAU,6BACV;;;;;;;UAOS,kBACD,UAAU,aAAa,IAE7BC,UAAU,sBAAsB,SAAS,GAAG,IAC5CC,OAAO,sBAAsB,QAAQ,GAAG,OACrC;EAAE;CAAyB;AACjC;UAES;CACR,UAAU;CACV,UAAU,eAAe;CACzB,eAAe,8BAA8B;UAE7C,iBAAiB,GAAG,IACpB,eAAe,GAAG,IAClB,UAAU,SACV,cAAc,SACd,QAAQ,IACR,SAAS,GAAG,IACZ,UAAU,QACZ,CACC","names":["args?: X","args?: FetchPageArgs<Q, L, R, A, S, T>","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: AsyncIterArgs<Q, L, R, A, S, T>","clause: { [K in keyof NEW]: DerivedProperty.Creator<Q, NEW[K]> }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: X","options?: SelectArg<Q, L, R, S>","listener: ObjectSetSubscription.Listener<Q, P>","opts?: ObjectSetSubscription.Options<Q, P>"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ObjectOrInterfaceDefinition, ObjectSet as $ObjectSet } from "../index.js";
|
|
2
|
+
export declare function createMockObjectSet<Q extends ObjectOrInterfaceDefinition>(): $ObjectSet<Q, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"","names":[],"sources":["../../../src/objectSet/ObjectSet.test.ts"],"version":3,"file":"ObjectSet.test.d.ts"}
|
|
1
|
+
{"mappings":"AAkBA,cAGE,6BACA,aAAa,kBAIR,aAAc;AAGrB,OAAO,iBAAS,oBACd,UAAU,gCACP,WAAW","names":[],"sources":["../../../src/objectSet/ObjectSet.test.ts"],"version":3,"file":"ObjectSet.test.d.ts"}
|