@osdk/api 1.2.0 → 1.3.0

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.
@@ -1,7 +1,7 @@
1
1
  export type { ActionDefinition, ActionModifiedEntity, ActionParameterDefinition, ObjectActionDataType, ObjectSetActionDataType, ValidActionParameterTypes, } from "./ontology/ActionDefinition";
2
2
  export type { InterfaceDefinition, InterfaceDefinitionFrom, InterfaceKeysFrom, InterfacePropertyDefinitionFrom, InterfacePropertyDefinitionsFrom, InterfacePropertyKeysFrom, InterfacePropertyKeysFrom2, } from "./ontology/InterfaceDefinition";
3
3
  export type { ObjectOrInterfaceDefinition, ObjectOrInterfaceDefinitionFrom, ObjectOrInterfaceKeysFrom, ObjectOrInterfacePropertyKeysFrom, ObjectOrInterfacePropertyKeysFrom2, } from "./ontology/ObjectOrInterface";
4
- export type { ObjectTypeDefinition, ObjectTypeDefinitionFrom, ObjectTypeKeysFrom, ObjectTypeLinkDefinition, ObjectTypeLinkDefinitionFrom, ObjectTypeLinkKeysFrom, ObjectTypeLinkKeysFrom2, ObjectTypeLinkTargetTypeFrom, ObjectTypePropertyDefinition, ObjectTypePropertyDefinitionFrom, ObjectTypePropertyDefinitionFrom2, ObjectTypePropertyDefinitionsFrom, ObjectTypePropertyKeysFrom, } from "./ontology/ObjectTypeDefinition";
4
+ export type { ObjectTypeDefinition, ObjectTypeDefinitionFrom, ObjectTypeKeysFrom, ObjectTypeLinkDefinition, ObjectTypeLinkDefinitionFrom, ObjectTypeLinkKeysFrom, ObjectTypeLinkKeysFrom2, ObjectTypeLinkTargetTypeFrom, ObjectTypePropertyDefinition, ObjectTypePropertyDefinitionFrom, ObjectTypePropertyDefinitionFrom2, ObjectTypePropertyDefinitionsFrom, ObjectTypePropertyKeysFrom, PropertyDef, } from "./ontology/ObjectTypeDefinition";
5
5
  export type { OntologyDefinition } from "./ontology/OntologyDefinition";
6
6
  export type { AggregationKeyDataType, ObjectQueryDataType, ObjectSetQueryDataType, PrimitiveDataType, QueryDataTypeDefinition, QueryDefinition, QueryParameterDefinition, RangeAggregationKeyDataType, SetQueryDataType, SimpleAggregationKeyDataType, StructQueryDataType, ThreeDimensionalAggregationDataType, ThreeDimensionalQueryAggregationDefinition, TwoDimensionalAggregationDataType, TwoDimensionalQueryAggregationDefinition, UnionQueryDataType, WireQueryDataTypes, } from "./ontology/QueryDefinition";
7
7
  export type { WirePropertyTypes } from "./ontology/WirePropertyTypes";
@@ -1,4 +1,4 @@
1
- import type { ObjectTypeLinkDefinition, ObjectTypePropertyDefinition } from "./ObjectTypeDefinition";
1
+ import type { ObjectInterfaceBaseDefinition } from "./ObjectTypeDefinition";
2
2
  import type { OntologyDefinition } from "./OntologyDefinition";
3
3
  export type InterfaceDefinitionFrom<O extends OntologyDefinition<any>, K extends InterfaceKeysFrom<O>> = O["interfaces"] extends {} ? O["interfaces"][K] : never;
4
4
  export type InterfaceKeysFrom<O extends OntologyDefinition<string>> = keyof O["interfaces"];
@@ -6,10 +6,6 @@ export type InterfacePropertyKeysFrom<O extends OntologyDefinition<any>, K exten
6
6
  export type InterfacePropertyKeysFrom2<I extends InterfaceDefinition<any, any>> = keyof I["properties"] & string;
7
7
  export type InterfacePropertyDefinitionsFrom<O extends OntologyDefinition<any>, K extends InterfaceKeysFrom<O>> = InterfaceDefinitionFrom<O, K>["properties"];
8
8
  export type InterfacePropertyDefinitionFrom<O extends OntologyDefinition<any>, K extends InterfaceKeysFrom<O>, P extends InterfacePropertyKeysFrom<O, K>> = InterfacePropertyDefinitionsFrom<O, K>[P];
9
- export interface InterfaceDefinition<K extends string, _L extends string> {
9
+ export interface InterfaceDefinition<K extends string, N = unknown> extends ObjectInterfaceBaseDefinition<K, N> {
10
10
  type: "interface";
11
- apiName: K;
12
- description?: string;
13
- properties: Record<string, ObjectTypePropertyDefinition>;
14
- links: Record<string, ObjectTypeLinkDefinition<any, any>>;
15
11
  }
@@ -4,5 +4,5 @@ import type { OntologyDefinition } from "./OntologyDefinition";
4
4
  export type ObjectOrInterfaceKeysFrom<O extends OntologyDefinition<any, any>> = ObjectTypeKeysFrom<O> | InterfaceKeysFrom<O>;
5
5
  export type ObjectOrInterfaceDefinition<K extends string = any, L extends string = any> = ObjectTypeDefinition<K> | InterfaceDefinition<K, L>;
6
6
  export type ObjectOrInterfacePropertyKeysFrom<O extends OntologyDefinition<any, any>, K extends ObjectOrInterfaceKeysFrom<O>> = K extends InterfaceKeysFrom<O> ? InterfacePropertyKeysFrom<O, K> : ObjectTypePropertyKeysFrom<O, K>;
7
- export type ObjectOrInterfacePropertyKeysFrom2<O extends ObjectTypeDefinition<any> | InterfaceDefinition<any, any>> = keyof O["properties"] & string;
7
+ export type ObjectOrInterfacePropertyKeysFrom2<O extends ObjectTypeDefinition<any, any> | InterfaceDefinition<any, any>> = keyof O["properties"] & string;
8
8
  export type ObjectOrInterfaceDefinitionFrom<O extends OntologyDefinition<any, any>, K extends ObjectOrInterfaceKeysFrom<O>> = K extends InterfaceKeysFrom<O> ? InterfaceDefinitionFrom<O, K> : ObjectTypeDefinitionFrom<O, K>;
@@ -7,18 +7,24 @@ export type ObjectTypePropertyKeysFrom<O extends OntologyDefinition<any>, K exte
7
7
  export type ObjectTypePropertyDefinitionsFrom<O extends OntologyDefinition<any>, K extends ObjectTypeKeysFrom<O>> = ObjectTypeDefinitionFrom<O, K>["properties"];
8
8
  export type ObjectTypePropertyDefinitionFrom<O extends OntologyDefinition<any>, K extends ObjectTypeKeysFrom<O>, P extends ObjectTypePropertyKeysFrom<O, K>> = ObjectTypePropertyDefinitionsFrom<O, K>[P];
9
9
  export type ObjectTypePropertyDefinitionFrom2<Q extends ObjectOrInterfaceDefinition<any, any>, P extends keyof Q["properties"] & string> = Q["properties"][P];
10
- export interface ObjectTypeDefinition<K extends string> {
11
- type: "object";
12
- apiName: K;
10
+ export interface ObjectInterfaceBaseDefinition<K extends string, N = unknown> {
11
+ type: "object" | "interface";
12
+ apiName: K & {
13
+ __OsdkType?: N;
14
+ };
13
15
  description?: string;
14
- primaryKeyType: keyof WirePropertyTypes;
15
16
  properties: Record<string, ObjectTypePropertyDefinition>;
16
17
  links: Record<string, ObjectTypeLinkDefinition<any, any>>;
17
18
  }
19
+ export interface ObjectTypeDefinition<K extends string, N = unknown> extends ObjectInterfaceBaseDefinition<K, N> {
20
+ type: "object";
21
+ primaryKeyApiName: keyof this["properties"];
22
+ primaryKeyType: keyof WirePropertyTypes;
23
+ }
18
24
  export type ObjectTypeLinkKeysFrom<O extends OntologyDefinition<any>, K extends ObjectTypeKeysFrom<O>> = keyof ObjectTypeDefinitionFrom<O, K>["links"];
19
25
  export type ObjectTypeLinkKeysFrom2<O extends ObjectTypeDefinition<any>> = keyof O["links"] & string;
20
- export interface ObjectTypeLinkDefinition<O extends ObjectTypeDefinition<any>, M extends boolean> {
21
- __Mark?: O;
26
+ export interface ObjectTypeLinkDefinition<O extends ObjectTypeDefinition<any, any>, M extends boolean> {
27
+ __OsdkLinkTargetType?: O;
22
28
  targetType: O["apiName"];
23
29
  multiplicity: M;
24
30
  }
@@ -32,3 +38,8 @@ export interface ObjectTypePropertyDefinition {
32
38
  multiplicity?: boolean;
33
39
  nullable?: boolean;
34
40
  }
41
+ export type PropertyDef<T extends keyof WirePropertyTypes, N extends "nullable" | "non-nullable" = "nullable", M extends "array" | "single" = "single", E extends Record<string, any> = {}> = {
42
+ type: T;
43
+ multiplicity: M extends "array" ? true : false;
44
+ nullable: N extends "nullable" ? true : false;
45
+ } & E & ObjectTypePropertyDefinition;
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Finish future client types
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/67
@@ -0,0 +1,5 @@
1
+ type: feature
2
+ feature:
3
+ description: Add new client invocation syntax
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/83
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Add ObjectSet .get(pk) syntax for 2.0
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/88
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "fetch-retry": "^5.0.6",
26
26
  "tiny-invariant": "^1.3.1",
27
27
  "@osdk/gateway": "1.2.0",
28
- "@osdk/shared.net": "1.3.0"
28
+ "@osdk/shared.net": "1.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "ts-expect": "^1.3.0",
@@ -1,3 +0,0 @@
1
- export type OsdkObject<N extends string> = {
2
- __apiName: N;
3
- };