@osdk/api 2.8.0-beta.27 → 2.8.0-beta.28
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.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/object/Media.js.map +1 -1
- package/build/browser/public/shapes-internal.js +2 -0
- package/build/browser/public/shapes-internal.js.map +1 -0
- package/build/browser/public/unstable.js +2 -0
- package/build/browser/public/unstable.js.map +1 -1
- package/build/browser/shapes/InlineShapeConfig.js +2 -0
- package/build/browser/shapes/InlineShapeConfig.js.map +1 -0
- package/build/browser/shapes/ShapeDefinition.js +59 -0
- package/build/browser/shapes/ShapeDefinition.js.map +1 -0
- package/build/browser/shapes/computeShapeId.js +97 -0
- package/build/browser/shapes/computeShapeId.js.map +1 -0
- package/build/browser/shapes/index.js +23 -0
- package/build/browser/shapes/index.js.map +1 -0
- package/build/browser/shapes/internal.js +2 -0
- package/build/browser/shapes/internal.js.map +1 -0
- package/build/cjs/{ObjectSet-By-T_QQB.d.cts → ObjectSet-DkBNIajH.d.cts} +16 -11
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/shapes-internal.cjs +4 -0
- package/build/cjs/public/shapes-internal.cjs.map +1 -0
- package/build/cjs/public/shapes-internal.d.cts +4 -0
- package/build/cjs/public/unstable.cjs +20 -0
- package/build/cjs/public/unstable.cjs.map +1 -1
- package/build/cjs/public/unstable.d.cts +39 -3
- package/build/cjs/shapes-internal-DBznJX3f.d.cts +152 -0
- package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/esm/public/shapes-internal.js +2 -0
- package/build/esm/public/shapes-internal.js.map +1 -0
- package/build/esm/public/unstable.js +2 -0
- package/build/esm/public/unstable.js.map +1 -1
- package/build/esm/shapes/InlineShapeConfig.js +2 -0
- package/build/esm/shapes/InlineShapeConfig.js.map +1 -0
- package/build/esm/shapes/ShapeDefinition.js +59 -0
- package/build/esm/shapes/ShapeDefinition.js.map +1 -0
- package/build/esm/shapes/computeShapeId.js +97 -0
- package/build/esm/shapes/computeShapeId.js.map +1 -0
- package/build/esm/shapes/index.js +23 -0
- package/build/esm/shapes/index.js.map +1 -0
- package/build/esm/shapes/internal.js +2 -0
- package/build/esm/shapes/internal.js.map +1 -0
- package/build/types/derivedProperties/DerivedProperty.d.ts +1 -10
- 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/object/Media.d.ts +14 -0
- package/build/types/object/Media.d.ts.map +1 -1
- package/build/types/public/shapes-internal.d.ts +1 -0
- package/build/types/public/shapes-internal.d.ts.map +1 -0
- package/build/types/public/unstable.d.ts +2 -0
- package/build/types/public/unstable.d.ts.map +1 -1
- package/build/types/shapes/InlineShapeConfig.d.ts +29 -0
- package/build/types/shapes/InlineShapeConfig.d.ts.map +1 -0
- package/build/types/shapes/ShapeDefinition.d.ts +167 -0
- package/build/types/shapes/ShapeDefinition.d.ts.map +1 -0
- package/build/types/shapes/computeShapeId.d.ts +14 -0
- package/build/types/shapes/computeShapeId.d.ts.map +1 -0
- package/build/types/shapes/index.d.ts +3 -0
- package/build/types/shapes/index.d.ts.map +1 -0
- package/build/types/shapes/internal.d.ts +1 -0
- package/build/types/shapes/internal.d.ts.map +1 -0
- package/package.json +10 -1
- package/shapes-internal.d.ts +17 -0
|
@@ -36,7 +36,7 @@ export declare namespace DerivedProperty {
|
|
|
36
36
|
export interface Builder<
|
|
37
37
|
Q extends ObjectOrInterfaceDefinition,
|
|
38
38
|
CONSTRAINED extends boolean
|
|
39
|
-
> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q
|
|
39
|
+
> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {}
|
|
40
40
|
export interface AggregateBuilder<
|
|
41
41
|
Q extends ObjectOrInterfaceDefinition,
|
|
42
42
|
CONSTRAINED extends boolean
|
|
@@ -64,15 +64,6 @@ type Pivotable<
|
|
|
64
64
|
> = {
|
|
65
65
|
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>
|
|
66
66
|
};
|
|
67
|
-
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
68
|
-
readonly constant: {
|
|
69
|
-
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>
|
|
70
|
-
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>
|
|
71
|
-
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>
|
|
72
|
-
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>
|
|
73
|
-
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
67
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
77
68
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
78
69
|
limit: number
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,4BAA4B,kCAAmC;AAC7E,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2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,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":["DerivedPropertyDefinitionBrand: unique symbol","baseObjectSet: 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","propertyName: R"],"sources":["../../../src/derivedProperties/DerivedProperty.ts"],"version":3,"file":"DerivedProperty.d.ts"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { PropertyValueWireToClient } from "./mapping/PropertyValueMapping.j
|
|
|
22
22
|
export type { Attachment, AttachmentMetadata, AttachmentUpload } from "./object/Attachment.js";
|
|
23
23
|
export type { AsyncIterArgs, Augment, Augments, FetchPageArgs, NullabilityAdherence, ObjectSetArgs, SelectArg, SelectArgToKeys } from "./object/FetchPageArgs.js";
|
|
24
24
|
export type { FetchPageResult, SingleOsdkResult } from "./object/FetchPageResult.js";
|
|
25
|
-
export type { Media, MediaMetadata, MediaReference, MediaUpload } from "./object/Media.js";
|
|
25
|
+
export type { Media, MediaMetadata, MediaPropertyLocation, MediaReference, MediaUpload } from "./object/Media.js";
|
|
26
26
|
export type { PropertyMarkings, PropertySecurity } from "./object/PropertySecurity.js";
|
|
27
27
|
export { isOk } from "./object/Result.js";
|
|
28
28
|
export type { Result } from "./object/Result.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,cAAc,oBAAoB;AAClC,SAAS,2BAA2B;AACpC,cACE,gBACA,sBACA,kBACA,gBACA,eACA,4BACA,mBACK;AACP,cACE,8BACA,8BACK;AACP,cACE,uBACA,0BACK;AACP,cAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,cACE,kBACA,eACA,oBACK;AACP,cAAc,cAAc;AAC5B,cACE,uBACA,oBACA,uBACA,6BACK;AACP,cACE,iCACK;AACP,cACE,YACA,oBACA,wBACK;AACP,cACE,eACA,SACA,UACA,eACA,sBACA,eACA,WACA,uBACK;AACP,cACE,iBACA,wBACK;AACP,cACE,OACA,eACA,gBACA,mBACK;AACP,cACE,kBACA,wBACK;AACP,SAAS,YAAY;AACrB,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cACE,sBACA,qBACA,yCACK;AACP,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,wBACA,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,cAAc,yBAAyB;AACvC,cAAc,qCAAqC;AACnD,cACE,gBACA,yBACA,6BACA,sBACA,kBACA,wBACA,sBACA,4BACA,uCACK;AACP,cACE,WACA,uCACK;AACP,cACE,OACA,mBACA,qBACA,mBACA,qBACA,mBACA,sBACA,2BACA,wBACA,sBACA,yBACA,sBACA,qBACA,mBACA,mBACA,sBACA,0BACA,iBACA,oBACA,iBACA,8BACA,kCACA,sBACK;AACP,cAAc,mCAAmC;AACjD,cACE,uBACA,uCACA,sBACK;AACP,cACE,uBACA,yBACK;AACP,cACE,mBACA,UACA,sBACK;AAEP,cAAc,kBAAkB;AAChC,cAAc,cAAc,YAAY,YAAY;AACpD,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","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
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,cAAc,oBAAoB;AAClC,SAAS,2BAA2B;AACpC,cACE,gBACA,sBACA,kBACA,gBACA,eACA,4BACA,mBACK;AACP,cACE,8BACA,8BACK;AACP,cACE,uBACA,0BACK;AACP,cAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,cACE,kBACA,eACA,oBACK;AACP,cAAc,cAAc;AAC5B,cACE,uBACA,oBACA,uBACA,6BACK;AACP,cACE,iCACK;AACP,cACE,YACA,oBACA,wBACK;AACP,cACE,eACA,SACA,UACA,eACA,sBACA,eACA,WACA,uBACK;AACP,cACE,iBACA,wBACK;AACP,cACE,OACA,eACA,uBACA,gBACA,mBACK;AACP,cACE,kBACA,wBACK;AACP,SAAS,YAAY;AACrB,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cACE,sBACA,qBACA,yCACK;AACP,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,wBACA,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,cAAc,yBAAyB;AACvC,cAAc,qCAAqC;AACnD,cACE,gBACA,yBACA,6BACA,sBACA,kBACA,wBACA,sBACA,4BACA,uCACK;AACP,cACE,WACA,uCACK;AACP,cACE,OACA,mBACA,qBACA,mBACA,qBACA,mBACA,sBACA,2BACA,wBACA,sBACA,yBACA,sBACA,qBACA,mBACA,mBACA,sBACA,0BACA,iBACA,oBACA,iBACA,8BACA,kCACA,sBACK;AACP,cAAc,mCAAmC;AACjD,cACE,uBACA,uCACA,sBACK;AACP,cACE,uBACA,yBACK;AACP,cACE,mBACA,UACA,sBACK;AAEP,cAAc,kBAAkB;AAChC,cAAc,cAAc,YAAY,YAAY;AACpD,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","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -11,6 +11,20 @@ export interface Media {
|
|
|
11
11
|
* Returns the media reference
|
|
12
12
|
*/
|
|
13
13
|
getMediaReference(): MediaReference;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the source location of this media (object type, primary key, property name).
|
|
16
|
+
*
|
|
17
|
+
* Optional because not all media has a source location (e.g., transient/uploaded media).
|
|
18
|
+
*/
|
|
19
|
+
getMediaSourceLocation?(): MediaPropertyLocation;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Location of a media property on an object.
|
|
23
|
+
*/
|
|
24
|
+
export interface MediaPropertyLocation {
|
|
25
|
+
objectType: string;
|
|
26
|
+
primaryKey: string | number;
|
|
27
|
+
propertyName: string;
|
|
14
28
|
}
|
|
15
29
|
/**
|
|
16
30
|
* Unique identifier of a media item in Foundry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,iBAAiB,MAAM;;;;CAIrB,iBAAiB,QAAQ;;;;CAIzB,iBAAiB,QAAQ;;;;CAIzB,qBAAqB;
|
|
1
|
+
{"mappings":"AAgBA,iBAAiB,MAAM;;;;CAIrB,iBAAiB,QAAQ;;;;CAIzB,iBAAiB,QAAQ;;;;CAIzB,qBAAqB;;;;;;CAMrB,2BAA2B;AAC5B;;;;AAKD,iBAAiB,sBAAsB;CACrC;CACA;CACA;AACD;;;;AAKD,iBAAiB,eAAe;CAC9B;CACA,WAAW;EACT,MAAM;EACN,kBAAkB;GAChB;GACA;GACA;GACA;;GAEA;EACD;CACF;AACF;;;;AAKD,iBAAiB,YAAY;UAClB;UACA,MAAM;AAChB;;;;AAKD,iBAAiB,cAAc;CAC7B;CACA;CACA;AACD","names":[],"sources":["../../../src/object/Media.ts"],"version":3,"file":"Media.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { DerivedLinkConfig, NullabilityOp, ShapeDerivedLinkDef, ShapeLinkObjectSetDef, ShapeLinkOrderBy, ShapeLinkSegment, ShapeLinkSetOperation, ShapePropertyConfig } from "../shapes/internal.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,mBACA,eACA,qBACA,uBACA,kBACA,kBACA,uBACA,2BACK","names":[],"sources":["../../../src/public/shapes-internal.ts"],"version":3,"file":"shapes-internal.d.ts"}
|
|
@@ -5,3 +5,5 @@ export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid, type FetchPageByRidP
|
|
|
5
5
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "../experimental/getBulkLinks.js";
|
|
6
6
|
export type { EXPERIMENTAL_BulkLinkResult } from "../objectSet/BulkLinkResult.js";
|
|
7
7
|
export type { MinimalObjectSet } from "../objectSet/ObjectSet.js";
|
|
8
|
+
export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "../shapes/index.js";
|
|
9
|
+
export type { InferShapeDefinition, InlineLinkConfig, InlineShapeConfig, LinkLoadConfig, LinkStatus, NullabilityViolation, PropertyType, RequiredProperty, ShapeBaseType, ShapeBuilder, ShapeDefinition, ShapeDerivedLinks, ShapeInstance, ShapeLinkBuilder, ShapeLinkResult } from "../shapes/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,YAAY,qBAAqB;AAE/C,SAAS,+DAA+D;AACxE,SAAS,wDAAwD;AACjE,SACE,wDACK,6BACA;AACP,SAAS,uDAAuD;AAEhE,cAAc,mCAAmC;AACjD,cAAc,wBAAwB","names":[],"sources":["../../../src/public/unstable.ts"],"version":3,"file":"unstable.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,cAAc,YAAY,qBAAqB;AAE/C,SAAS,+DAA+D;AACxE,SAAS,wDAAwD;AACjE,SACE,wDACK,6BACA;AACP,SAAS,uDAAuD;AAEhE,cAAc,mCAAmC;AACjD,cAAc,wBAAwB;AAGtC,SACE,kBACA,uBACA,8BACK;AAEP,cACE,sBACA,kBACA,mBACA,gBACA,YACA,sBACA,cACA,kBACA,eACA,cACA,iBACA,mBACA,eACA,kBACA,uBACK","names":[],"sources":["../../../src/public/unstable.ts"],"version":3,"file":"unstable.d.ts"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
2
|
+
import type { PropertyType, RequiredProperty, ShapeDefinition, ShapeLinkBuilder } from "./ShapeDefinition.js";
|
|
3
|
+
export interface InlineShapeConfig<BASE extends ObjectOrInterfaceDefinition> {
|
|
4
|
+
readonly require?: readonly PropertyKeys<BASE>[];
|
|
5
|
+
readonly select?: readonly PropertyKeys<BASE>[];
|
|
6
|
+
readonly dropIfNull?: readonly PropertyKeys<BASE>[];
|
|
7
|
+
readonly defaults?: { readonly [K in PropertyKeys<BASE>]? : NonNullable<PropertyType<BASE, K>> };
|
|
8
|
+
readonly transforms?: { readonly [K in PropertyKeys<BASE>]? : (value: PropertyType<BASE, K>) => unknown };
|
|
9
|
+
readonly links?: Record<string, InlineLinkConfig<BASE>>;
|
|
10
|
+
}
|
|
11
|
+
export interface InlineLinkConfig<SOURCE extends ObjectOrInterfaceDefinition> {
|
|
12
|
+
readonly via: (builder: ShapeLinkBuilder<SOURCE, SOURCE>) => ShapeLinkBuilder<SOURCE, ObjectOrInterfaceDefinition>;
|
|
13
|
+
readonly target?: ShapeDefinition<ObjectOrInterfaceDefinition>;
|
|
14
|
+
readonly defer?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type ArrayElement<T> = T extends readonly (infer E)[] ? E : never;
|
|
17
|
+
export type InferInlineProps<
|
|
18
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
19
|
+
C extends InlineShapeConfig<BASE>
|
|
20
|
+
> = { [K in ArrayElement<C["require"]> & PropertyKeys<BASE>] : RequiredProperty<PropertyType<BASE, K>> } & { [K in ArrayElement<C["select"]> & PropertyKeys<BASE>] : PropertyType<BASE, K> } & { [K in ArrayElement<C["dropIfNull"]> & PropertyKeys<BASE>] : RequiredProperty<PropertyType<BASE, K>> } & { [K in keyof C["defaults"] & PropertyKeys<BASE>] : NonNullable<PropertyType<BASE, K>> } & { [K in keyof C["transforms"] & PropertyKeys<BASE>] : C["transforms"] extends Record<K, (v: PropertyType<BASE, K>) => infer R> ? R : never };
|
|
21
|
+
export type InferInlineLinks<
|
|
22
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
23
|
+
C extends InlineShapeConfig<BASE>
|
|
24
|
+
> = C["links"] extends Record<string, InlineLinkConfig<BASE>> ? { [K in keyof C["links"] & string] : C["links"][K]["target"] extends ShapeDefinition<ObjectOrInterfaceDefinition> ? C["links"][K]["target"] : ShapeDefinition<ObjectOrInterfaceDefinition> } : {};
|
|
25
|
+
export type InferShapeDefinition<
|
|
26
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
27
|
+
C extends InlineShapeConfig<BASE>
|
|
28
|
+
> = ShapeDefinition<BASE, InferInlineProps<BASE, C>, InferInlineLinks<BASE, C>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cACE,cACA,kBACA,iBACA,wBACK,sBAAuB;AAE9B,iBAAiB,kBACf,aAAa,6BACb;UACS,mBAAmB,aAAa;UAChC,kBAAkB,aAAa;UAC/B,sBAAsB,aAAa;UACnC,uBACG,KAAK,aAAa,UAAS,YAAY,aAAa,MAAM;UAE7D,yBACG,KAAK,aAAa,WAC1BA,OAAO,aAAa,MAAM;UAGrB,QAAQ,eAAe,iBAAiB;AAClD;AAED,iBAAiB,iBACf,eAAe,6BACf;UACS,MACPC,SAAS,iBAAiB,QAAQ,YAC/B,iBAAiB,QAAQ;UACrB,SAAS,gBAAgB;UACzB;AACV;KAII,aAAa,KAAK,0BAA0B,OAAO;AAExD,YAAY;CACV,aAAa;CACb,UAAU,kBAAkB;OAGzB,KAAK,aAAa,EAAE,cAAc,aAAa,SAAQ,iBACtD,aAAa,MAAM,WAIpB,KAAK,aAAa,EAAE,aAAa,aAAa,SAAQ,aACrD,MACA,UAID,KAAK,aAAa,EAAE,iBAAiB,aAAa,SAAQ,iBACzD,aAAa,MAAM,WAIpB,WAAW,EAAE,cAAc,aAAa,SAAQ,YAC/C,aAAa,MAAM,WAIpB,WAAW,EAAE,gBAAgB,aAAa,SAAQ,EAAE,sBACnD,OAAO,IAAIC,GAAG,aAAa,MAAM,aAAa,KAAK;AAGzD,YAAY;CACV,aAAa;CACb,UAAU,kBAAkB;IAC1B,EAAE,iBAAiB,eAAe,iBAAiB,YAClD,WAAW,EAAE,qBAAoB,EAAE,SAAS,GAAG,kBAC9C,gBAAgB,+BAA+B,EAAE,SAAS,GAAG,YAC3D,gBAAgB,iCAEpB,CAAE;AAEN,YAAY;CACV,aAAa;CACb,UAAU,kBAAkB;IAC1B,gBACF,MACA,iBAAiB,MAAM,IACvB,iBAAiB,MAAM","names":["value: PropertyType<BASE, K>","builder: ShapeLinkBuilder<SOURCE, SOURCE>","v: PropertyType<BASE, K>"],"sources":["../../../src/shapes/InlineShapeConfig.ts"],"version":3,"file":"InlineShapeConfig.d.ts"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { WhereClause } from "../aggregate/WhereClause.js";
|
|
2
|
+
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
3
|
+
import type { CompileTimeMetadata } from "../ontology/ObjectTypeDefinition.js";
|
|
4
|
+
import type { OsdkBase } from "../OsdkBase.js";
|
|
5
|
+
import type { LinkedType, LinkNames } from "../util/LinkUtils.js";
|
|
6
|
+
export declare const SourcePrimaryKeySymbol: unique symbol;
|
|
7
|
+
export declare function isSourcePkSymbol(value: unknown): value is symbol;
|
|
8
|
+
declare const ShapeDefinitionBrand: unique symbol;
|
|
9
|
+
declare const ShapeLinkResultBrand: unique symbol;
|
|
10
|
+
/** Configuration for how a derived link is loaded at runtime. */
|
|
11
|
+
export interface DerivedLinkConfig {
|
|
12
|
+
defer?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */
|
|
15
|
+
export interface ShapeLinkResult<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>> {
|
|
16
|
+
readonly __linkResultBrand: typeof ShapeLinkResultBrand;
|
|
17
|
+
readonly targetShape: TARGET_SHAPE;
|
|
18
|
+
readonly objectSetDef: ShapeLinkObjectSetDef;
|
|
19
|
+
readonly config: DerivedLinkConfig;
|
|
20
|
+
}
|
|
21
|
+
/** A single link traversal step in a derived link's object set definition. */
|
|
22
|
+
export interface ShapeLinkSegment {
|
|
23
|
+
readonly type: "pivotTo";
|
|
24
|
+
readonly linkName: string;
|
|
25
|
+
readonly sourceType?: string;
|
|
26
|
+
readonly targetType?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Sort clause for a derived link's result set. */
|
|
29
|
+
export interface ShapeLinkOrderBy {
|
|
30
|
+
readonly property: string;
|
|
31
|
+
readonly direction: "asc" | "desc";
|
|
32
|
+
}
|
|
33
|
+
/** A set operation (union/intersect/subtract) applied to a derived link's object set. */
|
|
34
|
+
export interface ShapeLinkSetOperation {
|
|
35
|
+
readonly type: "union" | "intersect" | "subtract";
|
|
36
|
+
readonly other: ShapeLinkObjectSetDef;
|
|
37
|
+
}
|
|
38
|
+
/** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */
|
|
39
|
+
export interface ShapeLinkObjectSetDef {
|
|
40
|
+
readonly segments: readonly ShapeLinkSegment[];
|
|
41
|
+
readonly where?: WhereClause<ObjectOrInterfaceDefinition>;
|
|
42
|
+
readonly orderBy?: readonly ShapeLinkOrderBy[];
|
|
43
|
+
readonly limit?: number;
|
|
44
|
+
readonly distinct?: boolean;
|
|
45
|
+
readonly setOperations?: readonly ShapeLinkSetOperation[];
|
|
46
|
+
}
|
|
47
|
+
/** How a shape handles null values for a selected property. */
|
|
48
|
+
export type NullabilityOp = {
|
|
49
|
+
type: "require"
|
|
50
|
+
} | {
|
|
51
|
+
type: "dropIfNull"
|
|
52
|
+
} | {
|
|
53
|
+
type: "withDefault"
|
|
54
|
+
defaultValue: unknown
|
|
55
|
+
} | {
|
|
56
|
+
type: "withTransform"
|
|
57
|
+
transform: (value: unknown) => unknown
|
|
58
|
+
} | {
|
|
59
|
+
type: "select"
|
|
60
|
+
};
|
|
61
|
+
/** Per-property configuration stored in a shape's `__props` map. */
|
|
62
|
+
export interface ShapePropertyConfig {
|
|
63
|
+
readonly nullabilityOp: NullabilityOp;
|
|
64
|
+
}
|
|
65
|
+
/** A derived link definition stored in a shape's `__derivedLinks` array. */
|
|
66
|
+
export interface ShapeDerivedLinkDef<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition> = ShapeDefinition<ObjectOrInterfaceDefinition>> {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly objectSetDef: ShapeLinkObjectSetDef;
|
|
69
|
+
readonly targetShape: TARGET_SHAPE;
|
|
70
|
+
readonly config: DerivedLinkConfig;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Type projection from an OSDK type. `__props` is the single source of truth for property config.
|
|
74
|
+
*
|
|
75
|
+
* @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition
|
|
76
|
+
* @typeParam SELECTED_PROPS - Record of selected properties and their transformed types
|
|
77
|
+
* @typeParam DERIVED_LINKS - Record of derived link names to their result types
|
|
78
|
+
*/
|
|
79
|
+
export interface ShapeDefinition<
|
|
80
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
81
|
+
SELECTED_PROPS extends Record<string, unknown> = {},
|
|
82
|
+
DERIVED_LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
|
|
83
|
+
> {
|
|
84
|
+
readonly [ShapeDefinitionBrand]: true;
|
|
85
|
+
readonly __shapeId: string;
|
|
86
|
+
readonly __debugName: string | undefined;
|
|
87
|
+
readonly __baseType: BASE;
|
|
88
|
+
readonly __baseTypeApiName: string;
|
|
89
|
+
readonly __props: Readonly<Record<string, unknown>>;
|
|
90
|
+
readonly __derivedLinks: readonly unknown[];
|
|
91
|
+
readonly __selectedPropsType: SELECTED_PROPS;
|
|
92
|
+
readonly __derivedLinksType: DERIVED_LINKS;
|
|
93
|
+
}
|
|
94
|
+
export type ShapeBaseType<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer _P, infer _L> ? BASE : never;
|
|
95
|
+
export type ShapeSelectedProps<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer PROPS, infer _L> ? PROPS : never;
|
|
96
|
+
export type ShapeDerivedLinks<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer _P, infer LINKS> ? LINKS : never;
|
|
97
|
+
export type ShapeInstance<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer PROPS, infer LINKS> ? OsdkBase<BASE> & {
|
|
98
|
+
readonly $rid: string
|
|
99
|
+
} & PROPS & { [K in keyof LINKS] : LINKS[K] extends ShapeDefinition<ObjectOrInterfaceDefinition> ? ShapeInstance<LINKS[K]>[] : never } : never;
|
|
100
|
+
export type PropertyType<
|
|
101
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
102
|
+
K extends PropertyKeys<BASE>
|
|
103
|
+
> = CompileTimeMetadata<BASE>["props"][K];
|
|
104
|
+
export type RequiredProperty<T> = NonNullable<T>;
|
|
105
|
+
export interface ShapeLinkBuilder<
|
|
106
|
+
SOURCE extends ObjectOrInterfaceDefinition,
|
|
107
|
+
CURRENT extends ObjectOrInterfaceDefinition
|
|
108
|
+
> {
|
|
109
|
+
pivotTo<L extends LinkNames<CURRENT>>(link: L): ShapeLinkBuilder<SOURCE, LinkedType<CURRENT, L>>;
|
|
110
|
+
where(clause: WhereClause<CURRENT>): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
111
|
+
union(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
112
|
+
intersect(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
113
|
+
subtract(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
114
|
+
orderBy<K extends PropertyKeys<CURRENT>>(property: K, direction?: "asc" | "desc"): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
115
|
+
limit(n: number): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
116
|
+
distinct(): ShapeLinkBuilder<SOURCE, CURRENT>;
|
|
117
|
+
as<TARGET_SHAPE extends ShapeDefinition<CURRENT>>(shape: TARGET_SHAPE, config?: DerivedLinkConfig): ShapeLinkResult<TARGET_SHAPE>;
|
|
118
|
+
readonly $primaryKey: symbol;
|
|
119
|
+
}
|
|
120
|
+
export interface ShapeLinkBuilderInternal extends ShapeLinkBuilder<ObjectOrInterfaceDefinition, ObjectOrInterfaceDefinition> {
|
|
121
|
+
toObjectSetDef(): ShapeLinkObjectSetDef;
|
|
122
|
+
}
|
|
123
|
+
export interface ShapeBuilder<
|
|
124
|
+
BASE extends ObjectOrInterfaceDefinition,
|
|
125
|
+
PROPS extends Record<string, unknown> = {},
|
|
126
|
+
LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
|
|
127
|
+
> {
|
|
128
|
+
select<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : PropertyType<BASE, P> }, LINKS>;
|
|
129
|
+
require<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
|
|
130
|
+
dropIfNull<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
|
|
131
|
+
withDefault<
|
|
132
|
+
K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
|
|
133
|
+
V extends NonNullable<PropertyType<BASE, K>>
|
|
134
|
+
>(prop: K, defaultValue: V): ShapeBuilder<BASE, PROPS & { [P in K] : NonNullable<PropertyType<BASE, P>> }, LINKS>;
|
|
135
|
+
withTransform<
|
|
136
|
+
K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
|
|
137
|
+
R
|
|
138
|
+
>(prop: K, transform: (value: PropertyType<BASE, K>) => R): ShapeBuilder<BASE, PROPS & { [P in K] : R }, LINKS>;
|
|
139
|
+
deriveLink<
|
|
140
|
+
NAME extends string,
|
|
141
|
+
TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>
|
|
142
|
+
>(name: NAME, builder: (linkBuilder: ShapeLinkBuilder<BASE, BASE>) => ShapeLinkResult<TARGET_SHAPE>): ShapeBuilder<BASE, PROPS, LINKS & { [K in NAME] : TARGET_SHAPE }>;
|
|
143
|
+
build(): ShapeDefinition<BASE, PROPS, LINKS>;
|
|
144
|
+
}
|
|
145
|
+
export interface LinkLoadConfig {
|
|
146
|
+
pageSize?: number;
|
|
147
|
+
autoFetchMore?: boolean | number;
|
|
148
|
+
streamUpdates?: boolean;
|
|
149
|
+
defer?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface LinkStatus {
|
|
152
|
+
isLoading: boolean;
|
|
153
|
+
error: Error | undefined;
|
|
154
|
+
hasMore: boolean;
|
|
155
|
+
fetchMore: () => Promise<void>;
|
|
156
|
+
}
|
|
157
|
+
export interface NullabilityViolation {
|
|
158
|
+
property: string;
|
|
159
|
+
primaryKey: unknown;
|
|
160
|
+
constraint: "require" | "dropIfNull" | "transformError";
|
|
161
|
+
}
|
|
162
|
+
export declare class ShapeNullabilityError extends Error {
|
|
163
|
+
readonly shape: ShapeDefinition<ObjectOrInterfaceDefinition>;
|
|
164
|
+
readonly violations: readonly NullabilityViolation[];
|
|
165
|
+
constructor(shape: ShapeDefinition<ObjectOrInterfaceDefinition>, violations: readonly NullabilityViolation[]);
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,gBAAgB,gBAAiB;AAC/C,cAAc,YAAY,iBAAiB,sBAA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WAAW,UAAU,QAAQ,aAAa,aAAa,QACrD,GAAG,OAAO,MACT,aACD,MACA,WAAW,KAAK,KAAI,iBAAiB,aAAa,MAAM,OACxD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C,UAAU,YAAY,aAAa,MAAM;GAEzCC,MAAM,GACNC,cAAc,IACb,aACD,MACA,WAAW,KAAK,KAAI,YAAY,aAAa,MAAM,OACnD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C;GAEAD,MAAM,GACNE,YAAYC,OAAO,aAAa,MAAM,OAAO,IAC5C,aAAa,MAAM,WAAW,KAAK,KAAI,KAAK;CAE/C;EACE;EACA,qBAAqB,gBAAgB;GAErCC,MAAM,MACNC,UACEC,aAAa,iBAAiB,MAAM,UACjC,gBAAgB,gBACpB,aAAa,MAAM,OAAO,WAAW,KAAK,QAAO;CAEpD,SAAS,gBAAgB,MAAM,OAAO;AACvC;AAED,iBAAiB,eAAe;CAC9B;CACA;CACA;CACA;AACD;AAED,iBAAiB,WAAW;CAC1B;CACA,OAAO;CACP;CACA,iBAAiB;AAClB;AAED,iBAAiB,qBAAqB;CACpC;CACA;CACA,YAAY,YAAY,eAAe;AACxC;AAED,OAAO,cAAM,8BAA8B,MAAM;CAE7C,gBAAuB,gBAAgB;CACvC,8BAAqC;CAFvC,YACkBC,OAAO,gBAAgB,8BACvBC,qBAAqB;AASxC","names":["SourcePrimaryKeySymbol: unique symbol","value: unknown","ShapeDefinitionBrand: unique symbol","ShapeLinkResultBrand: unique symbol","link: L","clause: WhereClause<CURRENT>","property: K","direction?: \"asc\" | \"desc\"","n: number","shape: TARGET_SHAPE","config?: DerivedLinkConfig","prop: K","defaultValue: V","transform: (value: PropertyType<BASE, K>) => R","value: PropertyType<BASE, K>","name: NAME","builder: (\n linkBuilder: ShapeLinkBuilder<BASE, BASE>,\n ) => ShapeLinkResult<TARGET_SHAPE>","linkBuilder: ShapeLinkBuilder<BASE, BASE>","shape: ShapeDefinition<ObjectOrInterfaceDefinition>","violations: readonly NullabilityViolation[]"],"sources":["../../../src/shapes/ShapeDefinition.ts"],"version":3,"file":"ShapeDefinition.d.ts"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ShapeDerivedLinkDef, ShapePropertyConfig } from "./ShapeDefinition.js";
|
|
2
|
+
interface ShapeIdInput {
|
|
3
|
+
baseTypeApiName: string;
|
|
4
|
+
props: Record<string, ShapePropertyConfig>;
|
|
5
|
+
derivedLinks: readonly ShapeDerivedLinkDef[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Computes a stable, deterministic identifier for a shape definition.
|
|
9
|
+
* The ID uniquely represents the combination of base type, property
|
|
10
|
+
* selections/nullability configs, and derived link definitions so
|
|
11
|
+
* that identical shapes produce the same ID across calls.
|
|
12
|
+
*/
|
|
13
|
+
export declare function computeShapeId(input: ShapeIdInput): string;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,qBAEA,2BACK,sBAAuB;UAEpB,aAAa;CACrB;CACA,OAAO,eAAe;CACtB,uBAAuB;AACxB;;;;;;;AAoBD,OAAO,iBAAS,eAAeA,OAAO","names":["input: ShapeIdInput"],"sources":["../../../src/shapes/computeShapeId.ts"],"version":3,"file":"computeShapeId.d.ts"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { LinkLoadConfig, LinkStatus, NullabilityViolation, PropertyType, RequiredProperty, ShapeBaseType, ShapeBuilder, ShapeDefinition, ShapeDerivedLinks, ShapeInstance, ShapeLinkBuilder, ShapeLinkResult } from "./ShapeDefinition.js";
|
|
2
|
+
export type { InferShapeDefinition, InlineLinkConfig, InlineShapeConfig } from "./InlineShapeConfig.js";
|
|
3
|
+
export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "./ShapeDefinition.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cACE,gBACA,YACA,sBACA,cACA,kBACA,eACA,cACA,iBACA,mBACA,eACA,kBACA,uBACK;AAGP,cACE,sBACA,kBACA,yBACK;AAGP,SACE,kBACA,uBACA,8BACK","names":[],"sources":["../../../src/shapes/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { DerivedLinkConfig, NullabilityOp, ShapeDerivedLinkDef, ShapeLinkObjectSetDef, ShapeLinkOrderBy, ShapeLinkSegment, ShapeLinkSetOperation, ShapePropertyConfig } from "./ShapeDefinition.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,mBACA,eACA,qBACA,uBACA,kBACA,kBACA,uBACA,2BACK","names":[],"sources":["../../../src/shapes/internal.ts"],"version":3,"file":"internal.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/api",
|
|
3
|
-
"version": "2.8.0-beta.
|
|
3
|
+
"version": "2.8.0-beta.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
"require": "./build/cjs/index.cjs",
|
|
19
19
|
"default": "./build/browser/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./shapes-internal": {
|
|
22
|
+
"browser": "./build/browser/public/shapes-internal.js",
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./build/types/public/shapes-internal.d.ts",
|
|
25
|
+
"default": "./build/esm/public/shapes-internal.js"
|
|
26
|
+
},
|
|
27
|
+
"require": "./build/cjs/public/shapes-internal.cjs",
|
|
28
|
+
"default": "./build/browser/public/shapes-internal.js"
|
|
29
|
+
},
|
|
21
30
|
"./unstable": {
|
|
22
31
|
"browser": "./build/browser/public/unstable.js",
|
|
23
32
|
"import": {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export * from "./build/cjs/public/shapes-internal.cjs";
|