@osdk/api 2.2.0-beta.9 → 2.3.0-beta.1
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 +136 -0
- package/build/browser/Logger.js +17 -0
- package/build/browser/Logger.js.map +1 -0
- 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/aggregate/AggregatableKeys.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/derivedProperties/WithPropertiesAggregationOptions.js.map +1 -1
- package/build/browser/experimental/createMediaReference.js.map +1 -1
- package/build/browser/experimental/fetchPageByRid.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/object/FetchPageResult.js.map +1 -1
- package/build/browser/objectSet/BulkLinkResult.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +400 -6
- 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/QueryDefinition.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-qAMesbuN.d.cts → ObjectSet-6WzPM-IC.d.cts} +202 -63
- package/build/cjs/index.d.cts +33 -7
- package/build/cjs/public/unstable.d.cts +5 -5
- package/build/esm/Logger.js +17 -0
- package/build/esm/Logger.js.map +1 -0
- 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/aggregate/AggregatableKeys.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/derivedProperties/WithPropertiesAggregationOptions.js.map +1 -1
- package/build/esm/experimental/createMediaReference.js.map +1 -1
- package/build/esm/experimental/fetchPageByRid.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/object/FetchPageResult.js.map +1 -1
- package/build/esm/objectSet/BulkLinkResult.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +400 -6
- 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/QueryDefinition.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 +19 -0
- package/build/types/Logger.d.ts.map +1 -0
- package/build/types/OsdkBase.d.ts +9 -7
- package/build/types/OsdkBase.d.ts.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +2 -0
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/actions/Actions.d.ts +4 -4
- package/build/types/actions/Actions.d.ts.map +1 -1
- package/build/types/aggregate/AggregatableKeys.d.ts +10 -8
- package/build/types/aggregate/AggregatableKeys.d.ts.map +1 -1
- package/build/types/derivedProperties/DerivedProperty.d.ts +44 -16
- 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/derivedProperties/WithPropertiesAggregationOptions.d.ts +6 -3
- package/build/types/derivedProperties/WithPropertiesAggregationOptions.d.ts.map +1 -1
- package/build/types/experimental/createMediaReference.d.ts +2 -3
- package/build/types/experimental/createMediaReference.d.ts.map +1 -1
- package/build/types/experimental/fetchPageByRid.d.ts +1 -1
- package/build/types/experimental/fetchPageByRid.d.ts.map +1 -1
- package/build/types/index.d.ts +43 -43
- 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 +37 -7
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/object/FetchPageResult.d.ts +1 -1
- package/build/types/object/FetchPageResult.d.ts.map +1 -1
- package/build/types/objectSet/BulkLinkResult.d.ts +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +138 -32
- 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/QueryDefinition.d.ts +2 -0
- package/build/types/ontology/QueryDefinition.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/public/unstable.d.ts +3 -3
- package/build/types/public/unstable.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 +25 -3
- 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 +4 -4
- 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
|
@@ -56,10 +56,13 @@ interface MediaMetadata {
|
|
|
56
56
|
mediaType: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
type DistinctWithPropAggregateOption = "approximateDistinct" | "exactDistinct";
|
|
59
60
|
type CollectWithPropAggregations = "collectSet" | "collectList";
|
|
60
|
-
type BaseWithPropAggregations =
|
|
61
|
-
type
|
|
62
|
-
type
|
|
61
|
+
type BaseWithPropAggregations = DistinctWithPropAggregateOption | CollectWithPropAggregations;
|
|
62
|
+
type MinMaxWithPropAggregateOption = "min" | "max";
|
|
63
|
+
type DatetimeWithPropAggregateOption = MinMaxWithPropAggregateOption | BaseWithPropAggregations;
|
|
64
|
+
type NumericWithPropAggregateOption = "sum" | "avg" | "approximatePercentile" | MinMaxWithPropAggregateOption | BaseWithPropAggregations;
|
|
65
|
+
type ValidCollectPropertyKeysForSpecialTypes = "attachment" | "geopoint" | "geoshape" | "boolean";
|
|
63
66
|
|
|
64
67
|
type TimeSeriesQuery = {
|
|
65
68
|
$before: number;
|
|
@@ -244,11 +247,15 @@ type GetWirePropertyValueFromClient<T extends keyof PropertyValueClientToWire |
|
|
|
244
247
|
[K in keyof T]: PropertyValueClientToWire[T[K]];
|
|
245
248
|
} : never;
|
|
246
249
|
|
|
250
|
+
type IncludeValuesExtending<T extends Record<keyof any, any>, M> = {
|
|
251
|
+
[K in keyof T as T[K] extends M ? K : never]: T[K];
|
|
252
|
+
};
|
|
253
|
+
|
|
247
254
|
interface OsdkMetadata {
|
|
248
255
|
extraUserAgent: string;
|
|
249
256
|
}
|
|
250
257
|
|
|
251
|
-
type PrimaryKeyTypes = "string" | "datetime" | "double" | "
|
|
258
|
+
type PrimaryKeyTypes = "string" | "datetime" | "double" | "integer" | "timestamp" | "short" | "long" | "byte";
|
|
252
259
|
|
|
253
260
|
type VersionString<Major extends number, Minor extends number, Patch extends number> = `${Major}.${Minor}.${Patch}`;
|
|
254
261
|
|
|
@@ -344,8 +351,8 @@ interface InterfaceDefinition {
|
|
|
344
351
|
|
|
345
352
|
type SimplePropertyDef = WirePropertyTypes | undefined | Array<WirePropertyTypes>;
|
|
346
353
|
declare namespace SimplePropertyDef {
|
|
347
|
-
type Make<T extends WirePropertyTypes, N extends
|
|
348
|
-
type FromPropertyMetadata<P extends ObjectMetadata.Property> = Make<P["type"], P["nullable"], P["multiplicity"]>;
|
|
354
|
+
type Make<T extends WirePropertyTypes, N extends "nullable" | "non-nullable", M extends "array" | "single"> = M extends "array" ? N extends "nullable" ? Array<T> | undefined : Array<T> : N extends "nullable" ? T | undefined : T;
|
|
355
|
+
type FromPropertyMetadata<P extends ObjectMetadata.Property> = Make<P["type"], P["nullable"] extends true ? "nullable" : "non-nullable", P["multiplicity"] extends true ? "array" : "single">;
|
|
349
356
|
type ExtractMultiplicity<T extends WirePropertyTypes | undefined | Array<WirePropertyTypes>> = NonNullable<T> extends Array<any> ? "array" : "single";
|
|
350
357
|
type ExtractWirePropertyType<T extends SimplePropertyDef> = T extends Array<infer Z> ? NonNullable<Z> : NonNullable<T>;
|
|
351
358
|
type ExtractNullable<T extends SimplePropertyDef> = [undefined] extends [T] ? "nullable" : [[undefined]] extends [T] ? "nullable" : "non-nullable";
|
|
@@ -367,13 +374,22 @@ declare namespace DerivedObjectOrInterfaceDefinition {
|
|
|
367
374
|
};
|
|
368
375
|
} & K;
|
|
369
376
|
}
|
|
370
|
-
type PropertyKeys<O extends ObjectOrInterfaceDefinition
|
|
377
|
+
type PropertyKeys<O extends ObjectOrInterfaceDefinition> = (keyof CompileTimeMetadata<O>["properties"]) & string;
|
|
378
|
+
declare namespace PropertyKeys {
|
|
379
|
+
type Filtered<Q extends ObjectOrInterfaceDefinition, T extends WirePropertyTypes> = keyof IncludeValuesExtending<CompileTimeMetadata<Q>["properties"], {
|
|
380
|
+
type: T;
|
|
381
|
+
}>;
|
|
382
|
+
}
|
|
371
383
|
|
|
372
|
-
type
|
|
373
|
-
type
|
|
374
|
-
type
|
|
384
|
+
type BaseAggregateOptions = "approximateDistinct" | "exactDistinct";
|
|
385
|
+
type MinMaxAggregateOption = "min" | "max";
|
|
386
|
+
type DatetimeAggregateOption = MinMaxAggregateOption | BaseAggregateOptions;
|
|
387
|
+
type NumericAggregateOption = "sum" | "avg" | "approximateDistinct" | "exactDistinct" | MinMaxAggregateOption;
|
|
388
|
+
type AGG_FOR_TYPE<WIRE_TYPE extends WirePropertyTypes> = number extends GetWirePropertyValueFromClient<WIRE_TYPE> ? NumericAggregateOption : WIRE_TYPE extends "datetime" | "timestamp" ? DatetimeAggregateOption : BaseAggregateOptions;
|
|
389
|
+
type WITH_PROPERTIES_AGG_FOR_TYPE<WIRE_TYPE extends WirePropertyTypes> = number extends GetWirePropertyValueFromClient<WIRE_TYPE> ? NumericWithPropAggregateOption : WIRE_TYPE extends "datetime" | "timestamp" ? DatetimeWithPropAggregateOption : WIRE_TYPE extends "string" ? BaseWithPropAggregations : WITH_PROPERTIES_AGG_FOR_SPECIAL_WIRE_TYPE<WIRE_TYPE>;
|
|
390
|
+
type WITH_PROPERTIES_AGG_FOR_SPECIAL_WIRE_TYPE<WIRE_TYPE extends WirePropertyTypes> = WIRE_TYPE extends ValidCollectPropertyKeysForSpecialTypes ? BaseWithPropAggregations : DistinctWithPropAggregateOption;
|
|
375
391
|
type ValidAggregationKeys<Q extends ObjectOrInterfaceDefinition, R extends "aggregate" | "withPropertiesAggregate" = "aggregate"> = keyof ({
|
|
376
|
-
[KK in AggregatableKeys<Q> as `${KK & string}:${AGG_FOR_TYPE<
|
|
392
|
+
[KK in AggregatableKeys<Q> as `${KK & string}:${R extends "aggregate" ? AGG_FOR_TYPE<CompileTimeMetadata<Q>["properties"][KK]["type"]> : WITH_PROPERTIES_AGG_FOR_TYPE<CompileTimeMetadata<Q>["properties"][KK]["type"]>}`]?: any;
|
|
377
393
|
} & {
|
|
378
394
|
$count?: any;
|
|
379
395
|
});
|
|
@@ -527,23 +543,39 @@ type NullabilityAdherence = false | "throw" | "drop";
|
|
|
527
543
|
declare namespace NullabilityAdherence {
|
|
528
544
|
type Default = "throw";
|
|
529
545
|
}
|
|
546
|
+
declare namespace ObjectSetArgs {
|
|
547
|
+
interface Select<OBJECT_KEYS extends string = never, RDP_KEYS extends string = never> {
|
|
548
|
+
$select?: readonly (OBJECT_KEYS | RDP_KEYS)[];
|
|
549
|
+
$includeRid?: boolean;
|
|
550
|
+
}
|
|
551
|
+
interface OrderBy<L extends string = never> {
|
|
552
|
+
$orderBy?: {
|
|
553
|
+
[K in L]?: "asc" | "desc";
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
interface AsyncIter<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends Select<K, RDP_KEYS>, OrderBy<K> {
|
|
557
|
+
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
558
|
+
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
559
|
+
}
|
|
560
|
+
interface FetchPage<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = never, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIter<Q, K, T, RDP_KEYS> {
|
|
561
|
+
$nextPageToken?: string;
|
|
562
|
+
$pageSize?: number;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
530
565
|
interface SelectArg<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, S extends NullabilityAdherence = NullabilityAdherence.Default> {
|
|
531
566
|
$select?: readonly L[];
|
|
532
567
|
$includeRid?: R;
|
|
533
568
|
}
|
|
534
|
-
interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q> = PropertyKeys<Q>> {
|
|
535
|
-
$orderBy?: {
|
|
536
|
-
[K in L]?: "asc" | "desc";
|
|
537
|
-
};
|
|
569
|
+
interface OrderByArg<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q> = PropertyKeys<Q>> extends ObjectSetArgs.OrderBy<L> {
|
|
538
570
|
}
|
|
539
571
|
type SelectArgToKeys<Q extends ObjectOrInterfaceDefinition, A extends SelectArg<Q, any, any>> = A extends SelectArg<Q, never> ? PropertyKeys<Q> : A["$select"] extends readonly string[] ? A["$select"][number] : PropertyKeys<Q>;
|
|
540
|
-
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false> extends AsyncIterArgs<Q, K, R, A, S, T> {
|
|
572
|
+
interface FetchPageArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS> {
|
|
541
573
|
$nextPageToken?: string;
|
|
542
574
|
$pageSize?: number;
|
|
543
575
|
}
|
|
544
|
-
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
|
|
576
|
+
interface AsyncIterArgs<Q extends ObjectOrInterfaceDefinition, K extends PropertyKeys<Q> = PropertyKeys<Q>, R extends boolean = false, A extends Augments = never, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false, RDP_KEYS extends string = never> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
|
|
545
577
|
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
546
|
-
$includeAllBaseObjectProperties?: T;
|
|
578
|
+
$includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;
|
|
547
579
|
}
|
|
548
580
|
type Augment<X extends ObjectOrInterfaceDefinition, T extends string> = {
|
|
549
581
|
[K in CompileTimeMetadata<X>["apiName"]]: T[];
|
|
@@ -592,7 +624,7 @@ type UnionIfTrue<S extends string, UNION_IF_TRUE extends boolean, E extends stri
|
|
|
592
624
|
/**
|
|
593
625
|
* Helper type for converting fetch options into an Osdk object
|
|
594
626
|
*/
|
|
595
|
-
type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
|
|
627
|
+
type FetchPageResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>, R extends boolean, S extends NullabilityAdherence, T extends boolean = false> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
|
|
596
628
|
/**
|
|
597
629
|
* Helper type for converting fetch options into an Osdk object
|
|
598
630
|
*/
|
|
@@ -601,18 +633,20 @@ type SingleOsdkResult<Q extends ObjectOrInterfaceDefinition, L extends PropertyK
|
|
|
601
633
|
}>;
|
|
602
634
|
|
|
603
635
|
type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
|
|
604
|
-
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ?
|
|
636
|
+
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ? CompileTimeMetadata<Q> extends InterfaceMetadata ? NonNullable<CompileTimeMetadata<Q>["implementedBy"]>[number] : never : never);
|
|
605
637
|
};
|
|
606
638
|
|
|
607
639
|
type OsdkObjectPrimaryKeyType<Q extends ObjectTypeDefinition> = PropertyValueWireToClient[CompileTimeMetadata<Q>["primaryKeyType"]];
|
|
608
640
|
|
|
609
|
-
|
|
641
|
+
interface ObjectIdentifiers<Q extends ObjectOrInterfaceDefinition> {
|
|
610
642
|
readonly $apiName: Q["apiName"];
|
|
611
|
-
readonly $objectType: string;
|
|
612
643
|
readonly $primaryKey: PrimaryKeyType<Q>;
|
|
613
|
-
|
|
644
|
+
}
|
|
645
|
+
interface OsdkBase<Q extends ObjectOrInterfaceDefinition> extends ObjectIdentifiers<Q> {
|
|
614
646
|
readonly $objectSpecifier: ObjectSpecifier<Q>;
|
|
615
|
-
|
|
647
|
+
readonly $objectType: string;
|
|
648
|
+
readonly $title: string | undefined;
|
|
649
|
+
}
|
|
616
650
|
type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q> : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
|
|
617
651
|
|
|
618
652
|
type SpecialOsdkPropParams = "$all" | "$rid" | "$strict" | "$notStrict";
|
|
@@ -624,6 +658,8 @@ type MapPropNamesToObjectType<FROM extends ObjectOrInterfaceDefinition, TO exten
|
|
|
624
658
|
type PropMapToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition> = NonNullable<CompileTimeMetadata<FROM>["inverseInterfaceMap"]>[ApiNameAsString<TO>];
|
|
625
659
|
type MapPropNamesToInterface<FROM extends ObjectTypeDefinition, TO extends InterfaceDefinition, P extends ValidOsdkPropParams<FROM>> = PropMapToInterface<FROM, TO>[JustProps<FROM, P> & keyof PropMapToInterface<FROM, TO>];
|
|
626
660
|
/**
|
|
661
|
+
* Older version of this helper that allows for `$rid` and co in
|
|
662
|
+
* the properties field.
|
|
627
663
|
* @param FROM - the interface or object type to convert from
|
|
628
664
|
* @param TO - the interface or object type to convert to
|
|
629
665
|
* @param P - the property(s) to convert
|
|
@@ -910,21 +946,55 @@ type WhereClause<T extends ObjectOrInterfaceDefinition> = OrWhereClause<T> | And
|
|
|
910
946
|
type LinkNames<Q extends ObjectOrInterfaceDefinition> = keyof CompileTimeMetadata<Q>["links"] & string;
|
|
911
947
|
type LinkedType<Q extends ObjectOrInterfaceDefinition, L extends LinkNames<Q>> = NonNullable<CompileTimeMetadata<Q>["links"][L]["__OsdkLinkTargetType"]>;
|
|
912
948
|
|
|
949
|
+
type WithPropertiesNumerics = "integer" | "double" | "float" | "short" | "long";
|
|
950
|
+
type WithPropertiesDatetime = "datetime" | "timestamp";
|
|
951
|
+
type DefinitionForType<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = 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>;
|
|
952
|
+
type NumericExpressionArg<Q extends ObjectOrInterfaceDefinition> = number | DerivedProperty.NumericPropertyDefinition<any, Q>;
|
|
953
|
+
type ReturnTypeForNumericMethod<Q extends ObjectOrInterfaceDefinition, LEFT extends WirePropertyTypes, RIGHT extends WirePropertyTypes> = "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>;
|
|
954
|
+
type ReturnTypeForDatetimeMethod<Q extends ObjectOrInterfaceDefinition, LEFT extends WirePropertyTypes, RIGHT extends WirePropertyTypes> = "timestamp" extends (LEFT | RIGHT) ? DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q> : DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
955
|
+
type ExtractWirePropertyTypeFromNumericArg<Q extends ObjectOrInterfaceDefinition, ARG extends NumericExpressionArg<Q>> = 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;
|
|
956
|
+
type NumericExpressions<Q extends ObjectOrInterfaceDefinition, LEFT_PROPERTY_TYPE extends SimplePropertyDef> = {
|
|
957
|
+
readonly add: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
958
|
+
readonly subtract: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
959
|
+
readonly multiply: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
960
|
+
readonly divide: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
961
|
+
readonly abs: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>;
|
|
962
|
+
readonly negate: () => DerivedProperty.NumericPropertyDefinition<LEFT_PROPERTY_TYPE, Q>;
|
|
963
|
+
readonly max: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
964
|
+
readonly min: <A extends NumericExpressionArg<Q>>(value: A) => ReturnTypeForNumericMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractWirePropertyTypeFromNumericArg<Q, A>>;
|
|
965
|
+
};
|
|
966
|
+
type DatetimeExpressionArg<Q extends ObjectOrInterfaceDefinition> = DerivedProperty.DatetimePropertyDefinition<any, Q>;
|
|
967
|
+
type ExtractPropertyTypeFromDatetimeArg<Q extends ObjectOrInterfaceDefinition, ARG extends DatetimeExpressionArg<Q>> = 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;
|
|
968
|
+
type DatetimeExpressions<Q extends ObjectOrInterfaceDefinition, LEFT_PROPERTY_TYPE extends SimplePropertyDef> = {
|
|
969
|
+
readonly min: <A extends DatetimeExpressionArg<Q>>(value: A) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, A>>;
|
|
970
|
+
readonly max: (value: DatetimeExpressionArg<Q>) => ReturnTypeForDatetimeMethod<Q, SimplePropertyDef.ExtractWirePropertyType<LEFT_PROPERTY_TYPE>, ExtractPropertyTypeFromDatetimeArg<Q, typeof value>>;
|
|
971
|
+
readonly extractPart: (value: DerivedProperty.ValidParts) => DerivedProperty.Definition<SimplePropertyDef.Make<"string", "non-nullable", "single">, Q>;
|
|
972
|
+
};
|
|
973
|
+
|
|
974
|
+
declare const DerivedPropertyDefinitionBrand: unique symbol;
|
|
913
975
|
declare namespace DerivedProperty {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
|
|
976
|
+
export interface Definition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> {
|
|
977
|
+
readonly [DerivedPropertyDefinitionBrand]: true;
|
|
978
|
+
}
|
|
979
|
+
export interface NumericPropertyDefinition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> extends Definition<T, Q>, NumericExpressions<Q, T> {
|
|
980
|
+
}
|
|
981
|
+
export interface DatetimePropertyDefinition<T extends SimplePropertyDef, Q extends ObjectOrInterfaceDefinition> extends Definition<T, Q>, DatetimeExpressions<Q, T> {
|
|
982
|
+
}
|
|
983
|
+
export type Clause<Q extends ObjectOrInterfaceDefinition> = {
|
|
984
|
+
[key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;
|
|
919
985
|
};
|
|
920
|
-
|
|
921
|
-
|
|
986
|
+
interface BaseBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {
|
|
987
|
+
}
|
|
988
|
+
export interface Builder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {
|
|
922
989
|
}
|
|
923
|
-
interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends
|
|
990
|
+
export interface AggregateBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {
|
|
924
991
|
}
|
|
925
|
-
interface SelectPropertyBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
992
|
+
export interface SelectPropertyBuilder<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {
|
|
926
993
|
}
|
|
994
|
+
export type ValidParts = "DAYS" | "MONTHS" | "QUARTERS" | "YEARS";
|
|
995
|
+
export { };
|
|
927
996
|
}
|
|
997
|
+
type DerivedPropertyCreator<Q extends ObjectOrInterfaceDefinition, T extends SimplePropertyDef> = (baseObjectSet: DerivedProperty.Builder<Q, false>) => DerivedProperty.Definition<T, Q> | DerivedProperty.NumericPropertyDefinition<T, Q> | DerivedProperty.DatetimePropertyDefinition<T, Q>;
|
|
928
998
|
type BuilderTypeFromConstraint<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true> : DerivedProperty.SelectPropertyBuilder<Q, false>;
|
|
929
999
|
type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
930
1000
|
readonly where: (clause: WhereClause<Q>) => BuilderTypeFromConstraint<Q, CONSTRAINED>;
|
|
@@ -932,15 +1002,24 @@ type Filterable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boole
|
|
|
932
1002
|
type Pivotable<Q extends ObjectOrInterfaceDefinition, CONSTRAINED extends boolean> = {
|
|
933
1003
|
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>;
|
|
934
1004
|
};
|
|
1005
|
+
type Constant<Q extends ObjectOrInterfaceDefinition> = {
|
|
1006
|
+
readonly constant: {
|
|
1007
|
+
readonly double: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"double", "non-nullable", "single">, Q>;
|
|
1008
|
+
readonly integer: (value: number) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"integer", "non-nullable", "single">, Q>;
|
|
1009
|
+
readonly long: (value: string) => DerivedProperty.NumericPropertyDefinition<SimplePropertyDef.Make<"long", "non-nullable", "single">, Q>;
|
|
1010
|
+
readonly datetime: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"datetime", "non-nullable", "single">, Q>;
|
|
1011
|
+
readonly timestamp: (value: string) => DerivedProperty.DatetimePropertyDefinition<SimplePropertyDef.Make<"timestamp", "non-nullable", "single">, Q>;
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
935
1014
|
type Aggregatable<Q extends ObjectOrInterfaceDefinition> = {
|
|
936
1015
|
readonly aggregate: <V extends ValidAggregationKeys<Q, "withPropertiesAggregate">>(aggregationSpecifier: V, opts?: V extends `${any}:${infer P}` ? P extends CollectWithPropAggregations ? {
|
|
937
1016
|
limit: number;
|
|
938
1017
|
} : P extends "approximatePercentile" ? {
|
|
939
1018
|
percentile: number;
|
|
940
|
-
} : never : never) =>
|
|
1019
|
+
} : 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>;
|
|
941
1020
|
};
|
|
942
1021
|
type Selectable<Q extends ObjectOrInterfaceDefinition> = {
|
|
943
|
-
readonly selectProperty: <R extends PropertyKeys<Q>>(propertyName: R) =>
|
|
1022
|
+
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">>;
|
|
944
1023
|
};
|
|
945
1024
|
|
|
946
1025
|
interface BaseObjectSet<Q extends ObjectOrInterfaceDefinition> {
|
|
@@ -987,11 +1066,42 @@ type ObjectUpdate<O extends ObjectOrInterfaceDefinition, P extends PropertyKeys<
|
|
|
987
1066
|
state: "ADDED_OR_UPDATED" | "REMOVED";
|
|
988
1067
|
};
|
|
989
1068
|
|
|
990
|
-
type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends
|
|
991
|
-
type ExtractRdp<D extends
|
|
1069
|
+
type MergeObjectSet<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef> = {}> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;
|
|
1070
|
+
type ExtractRdp<D extends BaseObjectSet<any> | Record<string, SimplePropertyDef>> = [D] extends [never] ? {} : D extends BaseObjectSet<any> ? {} : D extends Record<string, SimplePropertyDef> ? D : {};
|
|
1071
|
+
type MaybeSimplifyPropertyKeys<Q extends ObjectOrInterfaceDefinition, L extends PropertyKeys<Q>> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L;
|
|
1072
|
+
type SubSelectKeysHelper<Q extends ObjectOrInterfaceDefinition, L extends string> = [L] extends [never] ? PropertyKeys<Q> : PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;
|
|
1073
|
+
type SubSelectKeys<Q extends ObjectOrInterfaceDefinition, X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never> = SubSelectKeysHelper<Q, Extract$Select<X>>;
|
|
1074
|
+
type NOOP<T> = T extends (...args: any[]) => any ? T : T extends abstract new (...args: any[]) => any ? T : {
|
|
1075
|
+
[K in keyof T]: T[K];
|
|
1076
|
+
};
|
|
1077
|
+
type SubSelectRDPsHelper<X extends ValidFetchPageArgs<any, any> | ValidAsyncIterArgs<any, any>, DEFAULT extends string> = [X] extends [never] ? DEFAULT : (X["$select"] & string[])[number] & DEFAULT;
|
|
1078
|
+
type SubSelectRDPs<RDPs extends Record<string, SimplePropertyDef>, X extends ValidFetchPageArgs<any, RDPs> | ValidAsyncIterArgs<any, RDPs>> = [RDPs] extends [never] ? never : NOOP<{
|
|
1079
|
+
[K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K];
|
|
1080
|
+
}>;
|
|
992
1081
|
interface MinimalObjectSet<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> extends BaseObjectSet<Q>, FetchPage<Q, RDPs>, AsyncIter<Q, RDPs>, Where<Q, RDPs> {
|
|
993
1082
|
}
|
|
1083
|
+
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>;
|
|
1084
|
+
type Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<X["$select"]>[number];
|
|
994
1085
|
interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1086
|
+
readonly fetchPage: FetchPageSignature<Q, RDPs>;
|
|
1087
|
+
readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;
|
|
1088
|
+
}
|
|
1089
|
+
type ValidFetchPageArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.FetchPage<Q, PropertyKeys<Q>, false, string & keyof RDPs> | ObjectSetArgs.FetchPage<Q, never, true, string & keyof RDPs>;
|
|
1090
|
+
type ValidAsyncIterArgs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> = ObjectSetArgs.AsyncIter<Q, PropertyKeys<Q>, false, string & keyof RDPs> | AsyncIterArgs<Q, never, any, any, any, true, string & keyof RDPs>;
|
|
1091
|
+
interface FetchPageSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1092
|
+
/**
|
|
1093
|
+
* Gets a page of objects of this type, with a result wrapper
|
|
1094
|
+
* @param args - Args to specify next page token and page size, if applicable
|
|
1095
|
+
* @example
|
|
1096
|
+
* const myObjs = await objectSet.fetchPage({
|
|
1097
|
+
$pageSize: 10,
|
|
1098
|
+
$nextPageToken: "nextPage"
|
|
1099
|
+
});
|
|
1100
|
+
const myObjsResult = myObjs.data;
|
|
1101
|
+
|
|
1102
|
+
* @returns a page of objects
|
|
1103
|
+
*/
|
|
1104
|
+
<const X extends ValidFetchPageArgs<Q, RDPs> = never>(args?: X): Promise<PageResult<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>>;
|
|
995
1105
|
/**
|
|
996
1106
|
* Gets a page of objects of this type, with a result wrapper
|
|
997
1107
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -1004,9 +1114,9 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1004
1114
|
|
|
1005
1115
|
* @returns a page of objects
|
|
1006
1116
|
*/
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1117
|
+
<L extends PropertyKeys<Q>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>>;
|
|
1118
|
+
}
|
|
1119
|
+
interface FetchPageWithErrorsSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1010
1120
|
/**
|
|
1011
1121
|
* Gets a page of objects of this type, with a result wrapper
|
|
1012
1122
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -1021,9 +1131,22 @@ interface FetchPage<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1021
1131
|
}
|
|
1022
1132
|
* @returns a page of objects, wrapped in a result wrapper
|
|
1023
1133
|
*/
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1134
|
+
<X extends ValidFetchPageArgs<Q, RDPs> = never>(args?: X): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>>>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Gets a page of objects of this type, with a result wrapper
|
|
1137
|
+
* @param args - Args to specify next page token and page size, if applicable
|
|
1138
|
+
* @example
|
|
1139
|
+
* const myObjs = await objectSet.fetchPage({
|
|
1140
|
+
$pageSize: 10,
|
|
1141
|
+
$nextPageToken: "nextPage"
|
|
1142
|
+
});
|
|
1143
|
+
|
|
1144
|
+
if(isOk(myObjs)){
|
|
1145
|
+
const myObjsResult = myObjs.value.data;
|
|
1146
|
+
}
|
|
1147
|
+
* @returns a page of objects, wrapped in a result wrapper
|
|
1148
|
+
*/
|
|
1149
|
+
<L extends PropertyKeys<Q>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: FetchPageArgs<Q, L, R, A, S, T>): Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>>>;
|
|
1027
1150
|
}
|
|
1028
1151
|
interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1029
1152
|
/**
|
|
@@ -1038,7 +1161,7 @@ interface Where<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<strin
|
|
|
1038
1161
|
*/
|
|
1039
1162
|
readonly where: (clause: WhereClause<MergeObjectSet<Q, RDPs>>) => this;
|
|
1040
1163
|
}
|
|
1041
|
-
interface
|
|
1164
|
+
interface AsyncIterSignature<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1042
1165
|
/**
|
|
1043
1166
|
* Returns an async iterator to load all objects of this type
|
|
1044
1167
|
* @example
|
|
@@ -1047,18 +1170,28 @@ interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<s
|
|
|
1047
1170
|
* }
|
|
1048
1171
|
* @returns an async iterator to load all objects
|
|
1049
1172
|
*/
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1173
|
+
<X extends ValidAsyncIterArgs<Q, RDPs> = never>(args?: X): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions2<X>, SubSelectKeys<Q, X>, SubSelectRDPs<RDPs, X>>>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Returns an async iterator to load all objects of this type
|
|
1176
|
+
* @example
|
|
1177
|
+
* for await (const obj of myObjectSet.asyncIter()){
|
|
1178
|
+
* // Handle obj
|
|
1179
|
+
* }
|
|
1180
|
+
* @returns an async iterator to load all objects
|
|
1181
|
+
*/
|
|
1182
|
+
<L extends PropertyKeys<Q>, R extends boolean, const A extends Augments, S extends NullabilityAdherence = NullabilityAdherence.Default, T extends boolean = false>(args?: AsyncIterArgs<Q, L, R, A, S, T>): AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, MaybeSimplifyPropertyKeys<Q, L>>>;
|
|
1183
|
+
}
|
|
1184
|
+
interface AsyncIter<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1185
|
+
asyncIter: AsyncIterSignature<Q, RDPs>;
|
|
1053
1186
|
}
|
|
1054
1187
|
interface WithProperties<Q extends ObjectOrInterfaceDefinition = any, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1055
1188
|
readonly withProperties: <NEW extends Record<string, SimplePropertyDef>>(clause: {
|
|
1056
|
-
[K in keyof NEW]:
|
|
1189
|
+
[K in keyof NEW]: DerivedPropertyCreator<Q, NEW[K]>;
|
|
1057
1190
|
}) => ObjectSet<Q, {
|
|
1058
1191
|
[NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN] : NN extends keyof RDPs ? RDPs[NN] : never;
|
|
1059
1192
|
}>;
|
|
1060
1193
|
}
|
|
1061
|
-
interface ObjectSet<Q extends ObjectOrInterfaceDefinition = any, UNUSED_OR_RDP extends
|
|
1194
|
+
interface ObjectSet<Q extends ObjectOrInterfaceDefinition = any, UNUSED_OR_RDP extends BaseObjectSet<Q> | Record<string, SimplePropertyDef> = never> extends ObjectSetCleanedTypes<Q, ExtractRdp<UNUSED_OR_RDP>, MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>> {
|
|
1062
1195
|
}
|
|
1063
1196
|
interface Aggregate<Q extends ObjectOrInterfaceDefinition> {
|
|
1064
1197
|
/**
|
|
@@ -1124,21 +1257,31 @@ interface PivotTo<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1124
1257
|
* @param type - The linked object type you want to pivot to
|
|
1125
1258
|
* @returns an object set of the specified linked type
|
|
1126
1259
|
*/
|
|
1127
|
-
readonly pivotTo: <L extends LinkNames<Q>>(type: L) =>
|
|
1260
|
+
readonly pivotTo: <L extends LinkNames<Q>>(type: L) => ObjectSet<LinkedType<Q, L>>;
|
|
1128
1261
|
}
|
|
1129
|
-
interface
|
|
1262
|
+
interface FetchOneSignature<Q extends ObjectTypeDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1130
1263
|
/**
|
|
1131
1264
|
* Fetches one object with the specified primary key, without a result wrapper
|
|
1132
1265
|
*/
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1266
|
+
<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>>>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Fetches one object with the specified primary key, without a result wrapper
|
|
1269
|
+
*/
|
|
1270
|
+
<const L extends PropertyKeys<Q>, const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Osdk.Instance<Q, ExtractOptions<R, S>, MaybeSimplifyPropertyKeys<Q, L>>>;
|
|
1271
|
+
}
|
|
1272
|
+
interface FetchOneWithErrorsSignature<Q extends ObjectTypeDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1273
|
+
/**
|
|
1274
|
+
* Fetches one object with the specified primary key, with a result wrapper
|
|
1275
|
+
*/
|
|
1276
|
+
<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>>>>;
|
|
1136
1277
|
/**
|
|
1137
1278
|
* Fetches one object with the specified primary key, with a result wrapper
|
|
1138
1279
|
*/
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1280
|
+
<const L extends PropertyKeys<Q>, const R extends boolean, const S extends false | "throw" = NullabilityAdherence.Default>(primaryKey: PrimaryKeyType<Q>, options?: SelectArg<Q, L, R, S>): Promise<Result<Osdk.Instance<Q, ExtractOptions<R, S>, MaybeSimplifyPropertyKeys<Q, L>>>>;
|
|
1281
|
+
}
|
|
1282
|
+
interface FetchOne<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>> {
|
|
1283
|
+
fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;
|
|
1284
|
+
fetchOneWithErrors: Q extends ObjectTypeDefinition ? FetchOneWithErrorsSignature<Q, RDPs> : never;
|
|
1142
1285
|
}
|
|
1143
1286
|
interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
1144
1287
|
/**
|
|
@@ -1151,11 +1294,7 @@ interface Subscribe<Q extends ObjectOrInterfaceDefinition> {
|
|
|
1151
1294
|
unsubscribe: () => void;
|
|
1152
1295
|
};
|
|
1153
1296
|
}
|
|
1154
|
-
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<
|
|
1297
|
+
interface ObjectSetCleanedTypes<Q extends ObjectOrInterfaceDefinition, D extends Record<string, SimplePropertyDef>, MERGED extends ObjectOrInterfaceDefinition & Q> extends MinimalObjectSet<Q, D>, WithProperties<Q, D>, Aggregate<MERGED>, SetArithmetic<MERGED>, PivotTo<Q>, FetchOne<Q, D>, Subscribe<MERGED> {
|
|
1155
1298
|
}
|
|
1156
1299
|
|
|
1157
|
-
type
|
|
1158
|
-
[K in keyof NonNullable<O["__DefinitionMetadata"]>["properties"]]: NonNullable<O["__DefinitionMetadata"]>["properties"][K]["type"] extends T ? K : never;
|
|
1159
|
-
}[keyof NonNullable<O["__DefinitionMetadata"]>["properties"]];
|
|
1160
|
-
|
|
1161
|
-
export { type CompileTimeMetadata as $, type Attachment as A, type SelectArgToKeys as B, type FetchPageResult as C, DistanceUnitMapping as D, type SingleOsdkResult as E, type FetchPageArgs as F, type GeoFilterOptions as G, type Media as H, type InterfaceDefinition as I, type MediaMetadata as J, isOk as K, type Result as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, type BaseObjectSet as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, ObjectSetSubscription as T, type FilteredPropertyKeys as U, type ValidAggregationKeys as V, type WhereClause as W, type InterfaceMetadata as X, type ObjectOrInterfaceDefinition as Y, type PropertyKeys as Z, type ObjectSpecifier as _, type AttachmentUpload as a, ObjectMetadata as a0, type PropertyDef as a1, type VersionBound as a2, type BaseWirePropertyTypes as a3, type WirePropertyTypes as a4, type PrimaryKeyType as a5, type ConvertProps as a6, Osdk as a7, type PageResult as a8, TimeseriesDurationMapping as a9, type GeotimeSeriesProperty as aa, type TimeSeriesPoint as ab, type TimeSeriesProperty as ac, type TimeSeriesQuery as ad, type LinkedType as ae, type LinkNames as af, type ExtractOptions as ag, type MinimalObjectSet as ah, type OsdkBase as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type AggregateOpts as g, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as h, type AggregationResultsWithGroups as i, type AggregationResultsWithoutGroups as j, type AggregationClause as k, type AggregationsResults as l, type GeoFilter_Intersects as m, type GeoFilter_Within as n, type PossibleWhereClauseFilters as o, type OsdkObjectPropertyType as p, type OsdkObjectLinksObject as q, DerivedProperty as r, DurationMapping as s, type AllGroupByValues as t, type GroupByClause as u, type GroupByRange as v, type AsyncIterArgs as w, type Augment as x, type Augments as y, type SelectArg as z };
|
|
1300
|
+
export { type ObjectSpecifier as $, type AttachmentUpload as A, type SelectArg as B, type CompileTimeMetadata as C, DistanceUnitMapping as D, type SelectArgToKeys as E, type FetchPageArgs as F, type GeoFilterOptions as G, type FetchPageResult as H, type InterfaceDefinition as I, type SingleOsdkResult as J, type Media as K, type MediaMetadata as L, type MediaReference as M, NullabilityAdherence as N, type ObjectTypeDefinition as O, type PropertyValueWireToClient as P, isOk as Q, type ReleaseStatus as R, type SingleLinkAccessor as S, type Result as T, type BaseObjectSet as U, type ValidAggregationKeys as V, type WhereClause as W, ObjectSetSubscription as X, type InterfaceMetadata as Y, type ObjectOrInterfaceDefinition as Z, PropertyKeys as _, type Attachment as a, ObjectMetadata as a0, type PropertyDef as a1, type VersionBound as a2, type BaseWirePropertyTypes as a3, type WirePropertyTypes as a4, type PrimaryKeyType as a5, type ConvertProps as a6, Osdk as a7, type PageResult as a8, TimeseriesDurationMapping as a9, type GeotimeSeriesProperty as aa, type TimeSeriesPoint as ab, type TimeSeriesProperty as ac, type TimeSeriesQuery as ad, type LinkedType as ae, type LinkNames as af, type ExtractOptions as ag, type MinimalObjectSet as ah, type ObjectIdentifiers as b, type OsdkObjectPrimaryKeyType as c, type ObjectSet as d, type OsdkMetadata as e, type PrimaryKeyTypes as f, type OsdkBase as g, type AggregateOpts as h, type AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as i, type AggregationResultsWithGroups as j, type AggregationResultsWithoutGroups as k, type AggregationClause as l, type AggregationsResults as m, type GeoFilter_Intersects as n, type GeoFilter_Within as o, type PossibleWhereClauseFilters as p, type OsdkObjectPropertyType as q, type OsdkObjectLinksObject as r, DerivedProperty as s, DurationMapping as t, type AllGroupByValues as u, type GroupByClause as v, type GroupByRange as w, type AsyncIterArgs as x, type Augment as y, type Augments as z };
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export {
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, a as Attachment, O as ObjectTypeDefinition, b as ObjectIdentifiers, c as OsdkObjectPrimaryKeyType, d as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, e as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, f as PrimaryKeyTypes, g as OsdkBase } from './ObjectSet-6WzPM-IC.cjs';
|
|
2
|
+
export { h as AggregateOpts, i as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, l as AggregationClause, j as AggregationResultsWithGroups, k as AggregationResultsWithoutGroups, m as AggregationsResults, u as AllGroupByValues, x as AsyncIterArgs, y as Augment, z as Augments, U as BaseObjectSet, a3 as BaseWirePropertyTypes, a6 as ConvertProps, s as DerivedProperty, D as DistanceUnitMapping, t as DurationMapping, F as FetchPageArgs, H as FetchPageResult, G as GeoFilterOptions, n as GeoFilter_Intersects, o as GeoFilter_Within, aa as GeotimeSeriesProperty, v as GroupByClause, w as GroupByRange, Y as InterfaceMetadata, af as LinkNames, ae as LinkedType, K as Media, L as MediaMetadata, N as NullabilityAdherence, a0 as ObjectMetadata, Z as ObjectOrInterfaceDefinition, X as ObjectSetSubscription, $ as ObjectSpecifier, a7 as Osdk, r as OsdkObjectLinksObject, q as OsdkObjectPropertyType, a8 as PageResult, p as PossibleWhereClauseFilters, a5 as PrimaryKeyType, a1 as PropertyDef, _ as PropertyKeys, T as Result, B as SelectArg, E as SelectArgToKeys, S as SingleLinkAccessor, J as SingleOsdkResult, ab as TimeSeriesPoint, ac as TimeSeriesProperty, ad as TimeSeriesQuery, a9 as TimeseriesDurationMapping, V as ValidAggregationKeys, a2 as VersionBound, W as WhereClause, a4 as WirePropertyTypes, Q as isOk } from './ObjectSet-6WzPM-IC.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -37,6 +37,8 @@ interface DataValueWireToClient {
|
|
|
37
37
|
struct: Record<string, any>;
|
|
38
38
|
set: Set<any>;
|
|
39
39
|
objectType: string;
|
|
40
|
+
geohash: GeoJSON.Point;
|
|
41
|
+
geoshape: GeoJSON.GeoJSON;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* Map from the DataValue type to the typescript type that we accept
|
|
@@ -74,6 +76,8 @@ interface DataValueClientToWire {
|
|
|
74
76
|
}[];
|
|
75
77
|
struct: Record<string, any>;
|
|
76
78
|
objectType: string;
|
|
79
|
+
geohash: GeoJSON.Point;
|
|
80
|
+
geoshape: GeoJSON.GeoJSON;
|
|
77
81
|
}
|
|
78
82
|
type AllowedBucketTypes$1 = string | number | boolean;
|
|
79
83
|
type AllowedBucketKeyTypes$1 = AllowedBucketTypes$1 | {
|
|
@@ -186,7 +190,7 @@ declare namespace ActionParam {
|
|
|
186
190
|
/**
|
|
187
191
|
* Helper type to convert action definition parameter object types to typescript types
|
|
188
192
|
*/
|
|
189
|
-
type ObjectType<T extends ObjectTypeDefinition> =
|
|
193
|
+
type ObjectType<T extends ObjectTypeDefinition> = ObjectIdentifiers<T> | OsdkObjectPrimaryKeyType<T>;
|
|
190
194
|
/**
|
|
191
195
|
* Helper type to convert action definition parameter object sets to typescript types
|
|
192
196
|
*/
|
|
@@ -195,7 +199,7 @@ declare namespace ActionParam {
|
|
|
195
199
|
* Helper type to convert action definition parameter interface types to typescript types
|
|
196
200
|
*/
|
|
197
201
|
type InterfaceType<T extends InterfaceDefinition> = {
|
|
198
|
-
$objectType:
|
|
202
|
+
$objectType: CompileTimeMetadata<T> extends {
|
|
199
203
|
implementedBy: infer U;
|
|
200
204
|
} ? (U extends ReadonlyArray<never> ? string : U extends ReadonlyArray<string> ? U[number] : string) : string;
|
|
201
205
|
$primaryKey: string | number;
|
|
@@ -234,7 +238,7 @@ declare namespace ActionMetadata {
|
|
|
234
238
|
nullable?: boolean;
|
|
235
239
|
}
|
|
236
240
|
namespace DataType {
|
|
237
|
-
type BaseActionParameterTypes = "boolean" | "string" | "integer" | "long" | "double" | "datetime" | "timestamp" | "attachment" | "marking" | "mediaReference" | "objectType";
|
|
241
|
+
type BaseActionParameterTypes = "boolean" | "string" | "integer" | "long" | "double" | "datetime" | "timestamp" | "attachment" | "marking" | "mediaReference" | "objectType" | "geoshape" | "geohash";
|
|
238
242
|
interface Object<T_Target extends ObjectTypeDefinition = never> {
|
|
239
243
|
__OsdkTargetType?: T_Target;
|
|
240
244
|
type: "object";
|
|
@@ -289,6 +293,8 @@ interface QueryCompileTimeMetadata<T> {
|
|
|
289
293
|
interface QueryDefinition<T = any> {
|
|
290
294
|
type: "query";
|
|
291
295
|
apiName: string;
|
|
296
|
+
version?: string;
|
|
297
|
+
isFixedVersion?: boolean;
|
|
292
298
|
osdkMetadata?: OsdkMetadata;
|
|
293
299
|
__DefinitionMetadata?: QueryCompileTimeMetadata<T> & QueryMetadata;
|
|
294
300
|
}
|
|
@@ -391,7 +397,7 @@ declare namespace QueryParam {
|
|
|
391
397
|
/**
|
|
392
398
|
* Helper type to convert action definition parameter object types to typescript types
|
|
393
399
|
*/
|
|
394
|
-
type ObjectType<T extends ObjectTypeDefinition> =
|
|
400
|
+
type ObjectType<T extends ObjectTypeDefinition> = ObjectIdentifiers<T> | OsdkObjectPrimaryKeyType<T>;
|
|
395
401
|
/**
|
|
396
402
|
* Helper type to convert action definition parameter object sets to typescript types
|
|
397
403
|
*/
|
|
@@ -421,4 +427,24 @@ declare namespace QueryResult {
|
|
|
421
427
|
type ThreeDimensionalAggregationType<OUT extends AggregationKeyTypes | RangeKey<any>, IN extends AggregationKeyTypes | RangeKey<any>, V extends AggregationValueTypes> = ThreeDimensionalAggregation<OUT extends AggregationKeyTypes ? AggKeyWireToClient<OUT> : OUT, IN extends AggregationKeyTypes ? AggKeyWireToClient<IN> : IN, AggValueWireToClient<V>>;
|
|
422
428
|
}
|
|
423
429
|
|
|
424
|
-
|
|
430
|
+
interface Logger {
|
|
431
|
+
trace: Logger.LogFn;
|
|
432
|
+
debug: Logger.LogFn;
|
|
433
|
+
fatal: Logger.LogFn;
|
|
434
|
+
error: Logger.LogFn;
|
|
435
|
+
warn: Logger.LogFn;
|
|
436
|
+
info: Logger.LogFn;
|
|
437
|
+
isLevelEnabled(level: string): boolean;
|
|
438
|
+
child(bindings: Record<string, any>, options?: {
|
|
439
|
+
level?: string;
|
|
440
|
+
msgPrefix?: string;
|
|
441
|
+
}): Logger;
|
|
442
|
+
}
|
|
443
|
+
declare namespace Logger {
|
|
444
|
+
interface LogFn {
|
|
445
|
+
(obj: unknown, msg?: string, ...args: any[]): void;
|
|
446
|
+
(msg: string, ...args: any[]): void;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export { type ActionDefinition, type ActionEditResponse, ActionMetadata, ActionParam, type ActionReturnTypeForOptions, type ActionValidationResponse, type AllowedBucketKeyTypes$1 as AllowedBucketKeyTypes, type AllowedBucketTypes$1 as AllowedBucketTypes, type ApplyActionOptions, type ApplyBatchActionOptions, Attachment, AttachmentUpload, CompileTimeMetadata, type DataValueClientToWire, type DataValueWireToClient, InterfaceDefinition, Logger, MediaReference, type ObjectQueryDataType, type ObjectSet, type ObjectSetQueryDataType, ObjectTypeDefinition, type OntologyMetadata, OsdkBase, type OsdkObject, PrimaryKeyTypes, PropertyValueWireToClient, type QueryDataTypeDefinition, type QueryDefinition, type QueryMetadata, QueryParam, type QueryParameterDefinition, QueryResult, type Range, type ThreeDimensionalAggregation, type ThreeDimensionalQueryAggregationDefinition, type TwoDimensionalAggregation, type TwoDimensionalQueryAggregationDefinition };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ah as MinimalObjectSet } from '../
|
|
1
|
+
import { Z as ObjectOrInterfaceDefinition, _ as PropertyKeys, M as MediaReference, O as ObjectTypeDefinition, N as NullabilityAdherence, B as SelectArg, a7 as Osdk, ag as ExtractOptions, F as FetchPageArgs, H as FetchPageResult, g as OsdkBase } from '../ObjectSet-6WzPM-IC.cjs';
|
|
2
|
+
export { ah as MinimalObjectSet } from '../ObjectSet-6WzPM-IC.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
5
5
|
|
|
@@ -23,7 +23,7 @@ type ExperimentFns<B extends Experiment<string, string>> = NonNullable<B["brande
|
|
|
23
23
|
*
|
|
24
24
|
* @returns media reference of the uploaded media item.
|
|
25
25
|
*/
|
|
26
|
-
type createMediaReference = <Q extends ObjectOrInterfaceDefinition, const L extends
|
|
26
|
+
type createMediaReference = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys.Filtered<Q, "mediaReference">>(args: {
|
|
27
27
|
data: Blob;
|
|
28
28
|
fileName: string;
|
|
29
29
|
objectType: Q;
|
|
@@ -38,7 +38,7 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid: Experiment<"2.1.
|
|
|
38
38
|
fetchOneByRid: fetchOneByRidFn;
|
|
39
39
|
}>;
|
|
40
40
|
|
|
41
|
-
type fetchPageByRidFn = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys<Q>, const R extends boolean, const S extends NullabilityAdherence, const T extends boolean>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S, T>>;
|
|
41
|
+
type fetchPageByRidFn = <Q extends ObjectOrInterfaceDefinition, const L extends PropertyKeys<Q>, const R extends boolean, const S extends NullabilityAdherence, const T extends boolean>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S, T>) => Promise<FetchPageResult<Q, L, R, S, T>>;
|
|
42
42
|
declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
|
|
43
43
|
fetchPageByRid: fetchPageByRidFn;
|
|
44
44
|
}>;
|
|
@@ -46,7 +46,7 @@ declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2
|
|
|
46
46
|
interface EXPERIMENTAL_BulkLinkResult {
|
|
47
47
|
object: OsdkBase<any>;
|
|
48
48
|
linkApiName: string;
|
|
49
|
-
otherObjectApiName: string | undefined;
|
|
49
|
+
otherObjectApiName: string | null | undefined;
|
|
50
50
|
otherObjectPk: unknown;
|
|
51
51
|
}
|
|
52
52
|
|