@osdk/api 2.8.0-beta.29 → 2.8.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/build/browser/definitions/LinkDefinitions.js.map +1 -1
- package/build/cjs/{ObjectSet-DkBNIajH.d.cts → ObjectSet-DxD7I6OR.d.cts} +2 -2
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/shapes-internal.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +4 -4
- package/build/cjs/{shapes-internal-DQ2ODZcP.d.cts → shapes-internal-C7-hN21K.d.cts} +1 -1
- package/build/esm/definitions/LinkDefinitions.js.map +1 -1
- package/build/types/definitions/LinkDefinitions.d.ts +3 -3
- package/build/types/definitions/LinkDefinitions.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.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 { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceMetadata } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n
|
|
1
|
+
{"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.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 { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceMetadata } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeLinkKeysFrom2,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\n\n/** The $link container to get from one object type to its linked objects */\nexport type OsdkObjectLinksObject<\n O extends ObjectOrInterfaceDefinition,\n> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {\n readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;\n};\n\nexport type OsdkObjectLinksEntry<\n Q extends ObjectOrInterfaceDefinition,\n L extends ObjectTypeLinkKeysFrom2<Q>,\n> = CompileTimeMetadata<Q>[\"links\"][L] extends\n ObjectMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : CompileTimeMetadata<Q>[\"links\"][L] extends\n InterfaceMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : never;\n\nexport type DefaultToFalse<B extends boolean | undefined> = false extends B\n ? false\n : undefined extends B ? false\n : true;\n\nexport interface SingleLinkAccessor<\n T extends ObjectOrInterfaceDefinition,\n> {\n /** Load the linked object\n */\n fetchOne: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>>\n : Osdk.Instance<T>\n >;\n\n /** Load the linked object, with a result wrapper\n */\n fetchOneWithErrors: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n Result<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L>\n : Osdk.Instance<T>\n >\n >;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -891,9 +891,9 @@ declare function isOk<X>(a: Result<X>): a is OkResult<X>;
|
|
|
891
891
|
type OsdkObjectLinksObject<O extends ObjectOrInterfaceDefinition> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {
|
|
892
892
|
readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;
|
|
893
893
|
};
|
|
894
|
-
type OsdkObjectLinksEntry<Q extends ObjectOrInterfaceDefinition, L extends ObjectTypeLinkKeysFrom2<Q>> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : CompileTimeMetadata<Q>["links"][L] extends InterfaceMetadata.Link<infer T, infer M> ? ObjectSet<T> : never;
|
|
894
|
+
type OsdkObjectLinksEntry<Q extends ObjectOrInterfaceDefinition, L extends ObjectTypeLinkKeysFrom2<Q>> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : CompileTimeMetadata<Q>["links"][L] extends InterfaceMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : never;
|
|
895
895
|
type DefaultToFalse<B extends boolean | undefined> = false extends B ? false : undefined extends B ? false : true;
|
|
896
|
-
interface SingleLinkAccessor<T extends
|
|
896
|
+
interface SingleLinkAccessor<T extends ObjectOrInterfaceDefinition> {
|
|
897
897
|
/** Load the linked object
|
|
898
898
|
*/
|
|
899
899
|
fetchOne: <const A extends SelectArg<T, PropertyKeys<T>, boolean>>(options?: A) => Promise<A extends FetchPageArgs<T, infer L, infer R, any, infer S> ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>> : Osdk.Instance<T>>;
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, e as MediaUpload, f as Media, g as Attachment, h as ObjectTypeDefinition, i as ObjectIdentifiers, j as OsdkObjectPrimaryKeyType, k as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, l as OsdkMetadata, R as ReleaseStatus, O as ObjectOrInterfaceDefinition, m as PropertyValueWireToClient, n as PrimaryKeyTypes, c as OsdkBase } from './ObjectSet-
|
|
2
|
-
export { ax as Affix, o as AggregateOpts, p as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, s as AggregationClause, q as AggregationResultsWithGroups, r as AggregationResultsWithoutGroups, t as AggregationsResults, U as AllGroupByValues, v as AndWhereClause, _ as AsyncIterArgs, Z as AttachmentMetadata, $ as Augment, a0 as Augments, aa as BaseObjectSet, aY as BaseWirePropertyTypes, a$ as ConvertProps, am as DatetimeFormat, an as DatetimeLocalizedFormat, ao as DatetimeLocalizedFormatType, ap as DatetimeStringFormat, aq as DatetimeTimezone, ar as DatetimeTimezoneStatic, as as DatetimeTimezoneUser, Q as DerivedProperty, D as DistanceUnitMapping, ay as DurationBaseValue, az as DurationFormatStyle, T as DurationMapping, aA as DurationPrecision, ab as FetchLinksPageResult, F as FetchPageArgs, b as FetchPageResult, G as GeoFilterOptions, w as GeoFilter_Intersects, x as GeoFilter_Within, b3 as GeotimeSeriesProperty, X as GroupByClause, Y as GroupByRange, aB as HumanReadableFormat, af as InterfaceMetadata, u as IntervalRule, av as KnownType, b8 as LinkNames, ac as LinkTypeApiNamesFor, b7 as LinkedType, b0 as MaybeScore, a4 as MediaMetadata, a5 as MediaPropertyLocation, ad as MinimalDirectedObjectLinkInstance, y as NotWhereClause, N as NullabilityAdherence, aC as NumberFormatAffix, aD as NumberFormatCurrency, aE as NumberFormatCurrencyStyle, aF as NumberFormatCustomUnit, aG as NumberFormatDuration, aH as NumberFormatFixedValues, aI as NumberFormatNotation, aJ as NumberFormatOptions, aK as NumberFormatRatio, aL as NumberFormatScale, aM as NumberFormatStandard, aN as NumberFormatStandardUnit, aO as NumberRatioType, aP as NumberRoundingMode, aQ as NumberScaleType, ah as ObjectMetadata, a1 as ObjectSetArgs, ae as ObjectSetSubscription, ag as ObjectSpecifier, z as OrWhereClause, a as Osdk, H as OsdkObjectCreatePropertyType, K as OsdkObjectLinksObject, J as OsdkObjectPropertyType, b1 as PageResult, B as PossibleWhereClauseFilters, a_ as PrimaryKeyType, al as PropertyBooleanFormattingRule, at as PropertyDateFormattingRule, ai as PropertyDef, P as PropertyKeys, aw as PropertyKnownTypeFormattingRule, a6 as PropertyMarkings, aR as PropertyNumberFormattingRule, aS as PropertyNumberFormattingRuleType, a7 as PropertySecurity, au as PropertyTimestampFormattingRule, aV as PropertyTypeReference, aW as PropertyTypeReferenceOrStringConstant, aU as PropertyValueFormattingRule, a9 as Result, S as SelectArg, a2 as SelectArgToKeys, ak as SimplePropertyDef, L as SingleLinkAccessor, a3 as SingleOsdkResult, aX as StringConstant, aT as TimeCodeFormat, b4 as TimeSeriesPoint, b5 as TimeSeriesProperty, b6 as TimeSeriesQuery, b2 as TimeseriesDurationMapping, V as ValidAggregationKeys, aj as VersionBound, W as WhereClause, aZ as WirePropertyTypes, a8 as isOk } from './ObjectSet-
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, e as MediaUpload, f as Media, g as Attachment, h as ObjectTypeDefinition, i as ObjectIdentifiers, j as OsdkObjectPrimaryKeyType, k as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, l as OsdkMetadata, R as ReleaseStatus, O as ObjectOrInterfaceDefinition, m as PropertyValueWireToClient, n as PrimaryKeyTypes, c as OsdkBase } from './ObjectSet-DxD7I6OR.cjs';
|
|
2
|
+
export { ax as Affix, o as AggregateOpts, p as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, s as AggregationClause, q as AggregationResultsWithGroups, r as AggregationResultsWithoutGroups, t as AggregationsResults, U as AllGroupByValues, v as AndWhereClause, _ as AsyncIterArgs, Z as AttachmentMetadata, $ as Augment, a0 as Augments, aa as BaseObjectSet, aY as BaseWirePropertyTypes, a$ as ConvertProps, am as DatetimeFormat, an as DatetimeLocalizedFormat, ao as DatetimeLocalizedFormatType, ap as DatetimeStringFormat, aq as DatetimeTimezone, ar as DatetimeTimezoneStatic, as as DatetimeTimezoneUser, Q as DerivedProperty, D as DistanceUnitMapping, ay as DurationBaseValue, az as DurationFormatStyle, T as DurationMapping, aA as DurationPrecision, ab as FetchLinksPageResult, F as FetchPageArgs, b as FetchPageResult, G as GeoFilterOptions, w as GeoFilter_Intersects, x as GeoFilter_Within, b3 as GeotimeSeriesProperty, X as GroupByClause, Y as GroupByRange, aB as HumanReadableFormat, af as InterfaceMetadata, u as IntervalRule, av as KnownType, b8 as LinkNames, ac as LinkTypeApiNamesFor, b7 as LinkedType, b0 as MaybeScore, a4 as MediaMetadata, a5 as MediaPropertyLocation, ad as MinimalDirectedObjectLinkInstance, y as NotWhereClause, N as NullabilityAdherence, aC as NumberFormatAffix, aD as NumberFormatCurrency, aE as NumberFormatCurrencyStyle, aF as NumberFormatCustomUnit, aG as NumberFormatDuration, aH as NumberFormatFixedValues, aI as NumberFormatNotation, aJ as NumberFormatOptions, aK as NumberFormatRatio, aL as NumberFormatScale, aM as NumberFormatStandard, aN as NumberFormatStandardUnit, aO as NumberRatioType, aP as NumberRoundingMode, aQ as NumberScaleType, ah as ObjectMetadata, a1 as ObjectSetArgs, ae as ObjectSetSubscription, ag as ObjectSpecifier, z as OrWhereClause, a as Osdk, H as OsdkObjectCreatePropertyType, K as OsdkObjectLinksObject, J as OsdkObjectPropertyType, b1 as PageResult, B as PossibleWhereClauseFilters, a_ as PrimaryKeyType, al as PropertyBooleanFormattingRule, at as PropertyDateFormattingRule, ai as PropertyDef, P as PropertyKeys, aw as PropertyKnownTypeFormattingRule, a6 as PropertyMarkings, aR as PropertyNumberFormattingRule, aS as PropertyNumberFormattingRuleType, a7 as PropertySecurity, au as PropertyTimestampFormattingRule, aV as PropertyTypeReference, aW as PropertyTypeReferenceOrStringConstant, aU as PropertyValueFormattingRule, a9 as Result, S as SelectArg, a2 as SelectArgToKeys, ak as SimplePropertyDef, L as SingleLinkAccessor, a3 as SingleOsdkResult, aX as StringConstant, aT as TimeCodeFormat, b4 as TimeSeriesPoint, b5 as TimeSeriesProperty, b6 as TimeSeriesQuery, b2 as TimeseriesDurationMapping, V as ValidAggregationKeys, aj as VersionBound, W as WhereClause, aZ as WirePropertyTypes, a8 as isOk } from './ObjectSet-DxD7I6OR.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-
|
|
2
|
-
import '../ObjectSet-
|
|
1
|
+
export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-C7-hN21K.cjs';
|
|
2
|
+
import '../ObjectSet-DxD7I6OR.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, P as PropertyKeys, M as MediaReference, N as NullabilityAdherence, S as SelectArg, a as Osdk, E as ExtractOptions, F as FetchPageArgs, b as FetchPageResult, c as OsdkBase } from '../ObjectSet-
|
|
2
|
-
export { d as MinimalObjectSet } from '../ObjectSet-
|
|
3
|
-
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-
|
|
4
|
-
export { L as LinkLoadConfig, e as LinkStatus, N as NullabilityViolation, f as ShapeBaseType, g as ShapeDerivedLinks, h as ShapeInstance, j as ShapeLinkResult, c as ShapeNullabilityError, d as SourcePrimaryKeySymbol, i as isSourcePkSymbol } from '../shapes-internal-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, P as PropertyKeys, M as MediaReference, N as NullabilityAdherence, S as SelectArg, a as Osdk, E as ExtractOptions, F as FetchPageArgs, b as FetchPageResult, c as OsdkBase } from '../ObjectSet-DxD7I6OR.cjs';
|
|
2
|
+
export { d as MinimalObjectSet } from '../ObjectSet-DxD7I6OR.cjs';
|
|
3
|
+
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-C7-hN21K.cjs';
|
|
4
|
+
export { L as LinkLoadConfig, e as LinkStatus, N as NullabilityViolation, f as ShapeBaseType, g as ShapeDerivedLinks, h as ShapeInstance, j as ShapeLinkResult, c as ShapeNullabilityError, d as SourcePrimaryKeySymbol, i as isSourcePkSymbol } from '../shapes-internal-C7-hN21K.cjs';
|
|
5
5
|
import 'type-fest';
|
|
6
6
|
import 'geojson';
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, W as WhereClause, P as PropertyKeys, C as CompileTimeMetadata, b8 as LinkNames, b7 as LinkedType, c as OsdkBase } from './ObjectSet-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, W as WhereClause, P as PropertyKeys, C as CompileTimeMetadata, b8 as LinkNames, b7 as LinkedType, c as OsdkBase } from './ObjectSet-DxD7I6OR.cjs';
|
|
2
2
|
|
|
3
3
|
declare const SourcePrimaryKeySymbol: unique symbol;
|
|
4
4
|
declare function isSourcePkSymbol(value: unknown): value is symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.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 { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceMetadata } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n
|
|
1
|
+
{"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.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 { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceMetadata } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeLinkKeysFrom2,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\n\n/** The $link container to get from one object type to its linked objects */\nexport type OsdkObjectLinksObject<\n O extends ObjectOrInterfaceDefinition,\n> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {\n readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;\n};\n\nexport type OsdkObjectLinksEntry<\n Q extends ObjectOrInterfaceDefinition,\n L extends ObjectTypeLinkKeysFrom2<Q>,\n> = CompileTimeMetadata<Q>[\"links\"][L] extends\n ObjectMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : CompileTimeMetadata<Q>[\"links\"][L] extends\n InterfaceMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : never;\n\nexport type DefaultToFalse<B extends boolean | undefined> = false extends B\n ? false\n : undefined extends B ? false\n : true;\n\nexport interface SingleLinkAccessor<\n T extends ObjectOrInterfaceDefinition,\n> {\n /** Load the linked object\n */\n fetchOne: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>>\n : Osdk.Instance<T>\n >;\n\n /** Load the linked object, with a result wrapper\n */\n fetchOneWithErrors: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n Result<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L>\n : Osdk.Instance<T>\n >\n >;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -3,16 +3,16 @@ import type { Result } from "../object/Result.js";
|
|
|
3
3
|
import type { ObjectSet } from "../objectSet/ObjectSet.js";
|
|
4
4
|
import type { InterfaceMetadata } from "../ontology/InterfaceDefinition.js";
|
|
5
5
|
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
6
|
-
import type { CompileTimeMetadata, ObjectMetadata,
|
|
6
|
+
import type { CompileTimeMetadata, ObjectMetadata, ObjectTypeLinkKeysFrom2 } from "../ontology/ObjectTypeDefinition.js";
|
|
7
7
|
import type { ExtractOptions, Osdk } from "../OsdkObjectFrom.js";
|
|
8
8
|
/** The $link container to get from one object type to its linked objects */
|
|
9
9
|
export type OsdkObjectLinksObject<O extends ObjectOrInterfaceDefinition> = ObjectTypeLinkKeysFrom2<O> extends never ? never : { readonly [L in ObjectTypeLinkKeysFrom2<O>] : OsdkObjectLinksEntry<O, L> };
|
|
10
10
|
export type OsdkObjectLinksEntry<
|
|
11
11
|
Q extends ObjectOrInterfaceDefinition,
|
|
12
12
|
L extends ObjectTypeLinkKeysFrom2<Q>
|
|
13
|
-
> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : CompileTimeMetadata<Q>["links"][L] extends InterfaceMetadata.Link<infer T, infer M> ? ObjectSet<T> : never;
|
|
13
|
+
> = CompileTimeMetadata<Q>["links"][L] extends ObjectMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : CompileTimeMetadata<Q>["links"][L] extends InterfaceMetadata.Link<infer T, infer M> ? (M extends false ? SingleLinkAccessor<T> : ObjectSet<T>) : never;
|
|
14
14
|
export type DefaultToFalse<B extends boolean | undefined> = false extends B ? false : undefined extends B ? false : true;
|
|
15
|
-
export interface SingleLinkAccessor<T extends
|
|
15
|
+
export interface SingleLinkAccessor<T extends ObjectOrInterfaceDefinition> {
|
|
16
16
|
/** Load the linked object
|
|
17
17
|
*/
|
|
18
18
|
fetchOne: <const A extends SelectArg<T, PropertyKeys<T>, boolean>>(options?: A) => Promise<A extends FetchPageArgs<T, infer L, infer R, any, infer S> ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>> : Osdk.Instance<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,eAAe,iBAAiB,4BAA6B;AAC3E,cAAc,cAAc,qBAAsB;AAClD,cAAc,iBAAiB,2BAA4B;AAC3D,cAAc,yBAAyB,oCAAqC;AAC5E,cACE,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,gBACA
|
|
1
|
+
{"mappings":"AAgBA,cAAc,eAAe,iBAAiB,4BAA6B;AAC3E,cAAc,cAAc,qBAAsB;AAClD,cAAc,iBAAiB,2BAA4B;AAC3D,cAAc,yBAAyB,oCAAqC;AAC5E,cACE,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,gBACA,+BACK,qCAAsC;AAC7C,cAAc,gBAAgB,YAAY,sBAAuB;;AAGjE,YAAY,sBACV,UAAU,+BACR,wBAAwB,uCAChB,KAAK,wBAAwB,MAAK,qBAAqB,GAAG;AAGtE,YAAY;CACV,UAAU;CACV,UAAU,wBAAwB;IAChC,oBAAoB,GAAG,SAAS,WAClC,eAAe,WAAW,SAAS,MACjC,UAAU,QAAQ,mBAAmB,KAAK,UAAU,MAEpD,oBAAoB,GAAG,SAAS,WAChC,kBAAkB,WAAW,SAAS,MACpC,UAAU,QAAQ,mBAAmB,KAAK,UAAU;AAI1D,YAAY,eAAe,iCAAiC,cAAc,IACtE,0BACkB,IAAI,QACtB;AAEJ,iBAAiB,mBACf,UAAU,6BACV;;;CAGA,iBACQ,UAAU,UACd,GACA,aAAa,cAIfA,UAAU,MACP,QACH,UAAU,cAAc,SAAS,SAAS,cAAc,KACpD,KAAK,SAAS,GAAG,eAAe,GAAG,IAAI,IAAI,aAAa,MACxD,KAAK,SAAS;;;CAKpB,2BACQ,UAAU,UACd,GACA,aAAa,cAIfA,UAAU,MACP,QACH,OACE,UAAU,cAAc,SAAS,SAAS,cAAc,KACpD,KAAK,SAAS,GAAG,eAAe,GAAG,IAAI,KACvC,KAAK,SAAS;AAGvB","names":["options?: A"],"sources":["../../../src/definitions/LinkDefinitions.ts"],"version":3,"file":"LinkDefinitions.d.ts"}
|