@osdk/api 2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0 → 2.34.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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @osdk/api
2
2
 
3
- ## 2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
3
+ ## 2.34.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - db028a0: Add optional struct param support for actions.
7
8
  - ab19740: Add `Media.fetchFullMetadata()` returning a `MediaFullMetadata` wrapper around the type-specific `MediaItemMetadata` discriminated union (parity with python-osdk's `get_media_full_metadata`).
8
9
 
9
10
  ## 2.33.0
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\nimport type { NULL_VALUE } from \"./NullValue.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n\n /**\n * Type of the symbol that indicates that a \"null\" value should be passed for the action parameter.\n * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.\n */\n export type NullValueType = typeof NULL_VALUE;\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\nimport type { NULL_VALUE } from \"./NullValue.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<\n string,\n keyof DataValueClientToWire | {\n type: keyof DataValueClientToWire;\n nullable: boolean;\n }\n >,\n > =\n & {\n [\n K in keyof T as T[K] extends { type: infer U; nullable: infer R }\n ? R extends true ? never : K\n : K\n ]: T[K] extends { type: infer U; nullable: infer R }\n ? U extends keyof DataValueClientToWire ? R extends true ? never\n : DataValueClientToWire[U]\n : never\n : T[K] extends keyof DataValueClientToWire ? DataValueClientToWire[T[K]]\n : never;\n }\n & {\n [\n K in keyof T as T[K] extends { type: infer U; nullable: infer R }\n ? R extends true ? K : never\n : never\n ]?: T[K] extends { type: infer U; nullable: infer R }\n ? U extends keyof DataValueClientToWire\n ? R extends true ? DataValueClientToWire[U] | undefined\n : never\n : never\n : never;\n };\n\n /**\n * Type of the symbol that indicates that a \"null\" value should be passed for the action parameter.\n * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.\n */\n export type NullValueType = typeof NULL_VALUE;\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionDefinition.js","names":["ActionMetadata"],"sources":["ActionDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {\n ObjectTypeDefinition,\n ReleaseStatus,\n} from \"./ObjectTypeDefinition.js\";\n\nexport interface ActionMetadata {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n description?: string;\n displayName?: string;\n parameters: Record<any, ActionMetadata.Parameter<any>>;\n modifiedEntities?: Partial<\n Record<any, {\n created: boolean;\n modified: boolean;\n }>\n >;\n status: ReleaseStatus | undefined;\n rid: string;\n}\n\nexport namespace ActionMetadata {\n export interface Parameter<\n T_Target extends ObjectTypeDefinition = never,\n > {\n type:\n | DataType.BaseActionParameterTypes\n | DataType.Object<any>\n | DataType.ObjectSet<any>\n | DataType.Interface<any>\n | DataType.Struct<any>;\n description?: string;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export namespace DataType {\n export type BaseActionParameterTypes =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"scenarioReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\";\n\n export interface Object<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"object\";\n object: T_Target[\"apiName\"];\n }\n\n export interface Interface<T_Target extends InterfaceDefinition = never> {\n __OsdkTargetType?: T_Target;\n type: \"interface\";\n interface: T_Target[\"apiName\"];\n }\n\n export interface ObjectSet<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"objectSet\";\n objectSet: T_Target[\"apiName\"];\n }\n\n export interface Struct<\n T extends Record<string, DataType.BaseActionParameterTypes>,\n > {\n type: \"struct\";\n struct: T;\n }\n }\n}\n\nexport interface ActionCompileTimeMetadata<T> {\n signatures: T;\n}\n\nexport interface ActionDefinition<\n T_signatures = never,\n> {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ActionCompileTimeMetadata<T_signatures>\n & ActionMetadata;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAwCiBA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"ActionDefinition.js","names":["ActionMetadata"],"sources":["ActionDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {\n ObjectTypeDefinition,\n ReleaseStatus,\n} from \"./ObjectTypeDefinition.js\";\n\nexport interface ActionMetadata {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n description?: string;\n displayName?: string;\n parameters: Record<any, ActionMetadata.Parameter<any>>;\n modifiedEntities?: Partial<\n Record<any, {\n created: boolean;\n modified: boolean;\n }>\n >;\n status: ReleaseStatus | undefined;\n rid: string;\n}\n\nexport namespace ActionMetadata {\n export interface Parameter<\n T_Target extends ObjectTypeDefinition = never,\n > {\n type:\n | DataType.BaseActionParameterTypes\n | DataType.Object<any>\n | DataType.ObjectSet<any>\n | DataType.Interface<any>\n | DataType.Struct<any>;\n description?: string;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export namespace DataType {\n export type BaseActionParameterTypes =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"scenarioReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\";\n\n export type StructFieldDefinition<\n T extends DataType.BaseActionParameterTypes,\n > = T | {\n type: T;\n nullable: boolean;\n };\n\n export interface Object<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"object\";\n object: T_Target[\"apiName\"];\n }\n\n export interface Interface<T_Target extends InterfaceDefinition = never> {\n __OsdkTargetType?: T_Target;\n type: \"interface\";\n interface: T_Target[\"apiName\"];\n }\n\n export interface ObjectSet<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"objectSet\";\n objectSet: T_Target[\"apiName\"];\n }\n\n export interface Struct<\n T extends Record<\n string,\n StructFieldDefinition<DataType.BaseActionParameterTypes>\n >,\n > {\n type: \"struct\";\n struct: T;\n }\n }\n}\n\nexport interface ActionCompileTimeMetadata<T> {\n signatures: T;\n}\n\nexport interface ActionDefinition<\n T_signatures = never,\n> {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ActionCompileTimeMetadata<T_signatures>\n & ActionMetadata;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAwCiBA,cAAc","ignoreList":[]}
@@ -219,8 +219,25 @@ declare namespace ActionParam {
219
219
  } ? (U extends ReadonlyArray<never> ? string : U extends ReadonlyArray<string> ? U[number] : string) : string;
220
220
  $primaryKey: string | number;
221
221
  };
222
- type StructType<T extends Record<string, keyof DataValueClientToWire>> = {
223
- [K in keyof T]: DataValueClientToWire[T[K]];
222
+ type StructType<T extends Record<string, keyof DataValueClientToWire | {
223
+ type: keyof DataValueClientToWire;
224
+ nullable: boolean;
225
+ }>> = {
226
+ [K in keyof T as T[K] extends {
227
+ type: infer U;
228
+ nullable: infer R;
229
+ } ? R extends true ? never : K : K]: T[K] extends {
230
+ type: infer U;
231
+ nullable: infer R;
232
+ } ? U extends keyof DataValueClientToWire ? R extends true ? never : DataValueClientToWire[U] : never : T[K] extends keyof DataValueClientToWire ? DataValueClientToWire[T[K]] : never;
233
+ } & {
234
+ [K in keyof T as T[K] extends {
235
+ type: infer U;
236
+ nullable: infer R;
237
+ } ? R extends true ? K : never : never]?: T[K] extends {
238
+ type: infer U;
239
+ nullable: infer R;
240
+ } ? U extends keyof DataValueClientToWire ? R extends true ? DataValueClientToWire[U] | undefined : never : never : never;
224
241
  };
225
242
  /**
226
243
  * Type of the symbol that indicates that a "null" value should be passed for the action parameter.
@@ -328,6 +345,10 @@ declare namespace ActionMetadata {
328
345
  }
329
346
  namespace DataType {
330
347
  type BaseActionParameterTypes = "boolean" | "string" | "integer" | "long" | "double" | "datetime" | "timestamp" | "attachment" | "marking" | "mediaReference" | "scenarioReference" | "objectType" | "geoshape" | "geohash";
348
+ type StructFieldDefinition<T extends DataType.BaseActionParameterTypes> = T | {
349
+ type: T;
350
+ nullable: boolean;
351
+ };
331
352
  interface Object<T_Target extends ObjectTypeDefinition = never> {
332
353
  __OsdkTargetType?: T_Target;
333
354
  type: "object";
@@ -343,7 +364,7 @@ declare namespace ActionMetadata {
343
364
  type: "objectSet";
344
365
  objectSet: T_Target["apiName"];
345
366
  }
346
- interface Struct<T extends Record<string, DataType.BaseActionParameterTypes>> {
367
+ interface Struct<T extends Record<string, StructFieldDefinition<DataType.BaseActionParameterTypes>>> {
347
368
  type: "struct";
348
369
  struct: T;
349
370
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\nimport type { NULL_VALUE } from \"./NullValue.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<string, keyof DataValueClientToWire>,\n > = { [K in keyof T]: DataValueClientToWire[T[K]] };\n\n /**\n * Type of the symbol that indicates that a \"null\" value should be passed for the action parameter.\n * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.\n */\n export type NullValueType = typeof NULL_VALUE;\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"Actions.js","names":["ActionParam"],"sources":["Actions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DataValueClientToWire } from \"../mapping/DataValueMapping.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceDefinition } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ObjectIdentifiers } from \"../OsdkBase.js\";\nimport type { OsdkObjectPrimaryKeyType } from \"../OsdkObjectPrimaryKeyType.js\";\n\nimport type {\n ActionResults,\n ValidateActionResponseV2,\n} from \"./ActionResults.js\";\nimport type { NULL_VALUE } from \"./NullValue.js\";\n\nexport type ApplyActionOptions =\n | { $returnEdits?: true; $validateOnly?: false }\n | {\n $validateOnly?: true;\n $returnEdits?: false;\n };\n\nexport type ApplyBatchActionOptions = { $returnEdits?: boolean };\n\n/**\n * Helper types for converting action definition parameter types to typescript types\n */\nexport namespace ActionParam {\n /**\n * Helper type to convert action definition parameter primitives to typescript types\n */\n export type PrimitiveType<T extends keyof DataValueClientToWire> =\n DataValueClientToWire[T];\n\n /**\n * Helper type to convert action definition parameter object types to typescript types\n */\n export type ObjectType<T extends ObjectTypeDefinition> =\n | ObjectIdentifiers<T>\n | OsdkObjectPrimaryKeyType<T>;\n\n /**\n * Helper type to convert action definition parameter object sets to typescript types\n */\n export type ObjectSetType<T extends ObjectTypeDefinition> = ObjectSet<T>;\n\n /**\n * Helper type to convert action definition parameter interface types to typescript types\n */\n export type InterfaceType<T extends InterfaceDefinition> = {\n $objectType: CompileTimeMetadata<T> extends { implementedBy: infer U }\n ? (U extends ReadonlyArray<never> ? string\n : U extends ReadonlyArray<string> ? U[number]\n : string)\n : string;\n $primaryKey: string | number;\n };\n\n export type StructType<\n T extends Record<\n string,\n keyof DataValueClientToWire | {\n type: keyof DataValueClientToWire;\n nullable: boolean;\n }\n >,\n > =\n & {\n [\n K in keyof T as T[K] extends { type: infer U; nullable: infer R }\n ? R extends true ? never : K\n : K\n ]: T[K] extends { type: infer U; nullable: infer R }\n ? U extends keyof DataValueClientToWire ? R extends true ? never\n : DataValueClientToWire[U]\n : never\n : T[K] extends keyof DataValueClientToWire ? DataValueClientToWire[T[K]]\n : never;\n }\n & {\n [\n K in keyof T as T[K] extends { type: infer U; nullable: infer R }\n ? R extends true ? K : never\n : never\n ]?: T[K] extends { type: infer U; nullable: infer R }\n ? U extends keyof DataValueClientToWire\n ? R extends true ? DataValueClientToWire[U] | undefined\n : never\n : never\n : never;\n };\n\n /**\n * Type of the symbol that indicates that a \"null\" value should be passed for the action parameter.\n * For any autogenerated modify actions, this will cause the action to clear the value of the parameter.\n */\n export type NullValueType = typeof NULL_VALUE;\n}\n\nexport type ActionEditResponse = ActionResults;\nexport type ActionValidationResponse = ValidateActionResponseV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AAFA,WAGiBA,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionDefinition.js","names":["ActionMetadata"],"sources":["ActionDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {\n ObjectTypeDefinition,\n ReleaseStatus,\n} from \"./ObjectTypeDefinition.js\";\n\nexport interface ActionMetadata {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n description?: string;\n displayName?: string;\n parameters: Record<any, ActionMetadata.Parameter<any>>;\n modifiedEntities?: Partial<\n Record<any, {\n created: boolean;\n modified: boolean;\n }>\n >;\n status: ReleaseStatus | undefined;\n rid: string;\n}\n\nexport namespace ActionMetadata {\n export interface Parameter<\n T_Target extends ObjectTypeDefinition = never,\n > {\n type:\n | DataType.BaseActionParameterTypes\n | DataType.Object<any>\n | DataType.ObjectSet<any>\n | DataType.Interface<any>\n | DataType.Struct<any>;\n description?: string;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export namespace DataType {\n export type BaseActionParameterTypes =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"scenarioReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\";\n\n export interface Object<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"object\";\n object: T_Target[\"apiName\"];\n }\n\n export interface Interface<T_Target extends InterfaceDefinition = never> {\n __OsdkTargetType?: T_Target;\n type: \"interface\";\n interface: T_Target[\"apiName\"];\n }\n\n export interface ObjectSet<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"objectSet\";\n objectSet: T_Target[\"apiName\"];\n }\n\n export interface Struct<\n T extends Record<string, DataType.BaseActionParameterTypes>,\n > {\n type: \"struct\";\n struct: T;\n }\n }\n}\n\nexport interface ActionCompileTimeMetadata<T> {\n signatures: T;\n}\n\nexport interface ActionDefinition<\n T_signatures = never,\n> {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ActionCompileTimeMetadata<T_signatures>\n & ActionMetadata;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAwCiBA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"ActionDefinition.js","names":["ActionMetadata"],"sources":["ActionDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { InterfaceDefinition } from \"./InterfaceDefinition.js\";\nimport type {\n ObjectTypeDefinition,\n ReleaseStatus,\n} from \"./ObjectTypeDefinition.js\";\n\nexport interface ActionMetadata {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n description?: string;\n displayName?: string;\n parameters: Record<any, ActionMetadata.Parameter<any>>;\n modifiedEntities?: Partial<\n Record<any, {\n created: boolean;\n modified: boolean;\n }>\n >;\n status: ReleaseStatus | undefined;\n rid: string;\n}\n\nexport namespace ActionMetadata {\n export interface Parameter<\n T_Target extends ObjectTypeDefinition = never,\n > {\n type:\n | DataType.BaseActionParameterTypes\n | DataType.Object<any>\n | DataType.ObjectSet<any>\n | DataType.Interface<any>\n | DataType.Struct<any>;\n description?: string;\n multiplicity?: boolean;\n nullable?: boolean;\n }\n\n export namespace DataType {\n export type BaseActionParameterTypes =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"scenarioReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\";\n\n export type StructFieldDefinition<\n T extends DataType.BaseActionParameterTypes,\n > = T | {\n type: T;\n nullable: boolean;\n };\n\n export interface Object<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"object\";\n object: T_Target[\"apiName\"];\n }\n\n export interface Interface<T_Target extends InterfaceDefinition = never> {\n __OsdkTargetType?: T_Target;\n type: \"interface\";\n interface: T_Target[\"apiName\"];\n }\n\n export interface ObjectSet<\n T_Target extends ObjectTypeDefinition = never,\n > {\n __OsdkTargetType?: T_Target;\n type: \"objectSet\";\n objectSet: T_Target[\"apiName\"];\n }\n\n export interface Struct<\n T extends Record<\n string,\n StructFieldDefinition<DataType.BaseActionParameterTypes>\n >,\n > {\n type: \"struct\";\n struct: T;\n }\n }\n}\n\nexport interface ActionCompileTimeMetadata<T> {\n signatures: T;\n}\n\nexport interface ActionDefinition<\n T_signatures = never,\n> {\n type: \"action\";\n apiName: string;\n unsanitizedApiName?: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & ActionCompileTimeMetadata<T_signatures>\n & ActionMetadata;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAwCiBA,cAAc","ignoreList":[]}
@@ -29,7 +29,22 @@ export declare namespace ActionParam {
29
29
  } ? (U extends ReadonlyArray<never> ? string : U extends ReadonlyArray<string> ? U[number] : string) : string
30
30
  $primaryKey: string | number
31
31
  };
32
- type StructType<T extends Record<string, keyof DataValueClientToWire>> = { [K in keyof T] : DataValueClientToWire[T[K]] };
32
+ type StructType<T extends Record<string, keyof DataValueClientToWire | {
33
+ type: keyof DataValueClientToWire
34
+ nullable: boolean
35
+ }>> = { [K in keyof T as T[K] extends {
36
+ type: infer U
37
+ nullable: infer R
38
+ } ? R extends true ? never : K : K] : T[K] extends {
39
+ type: infer U
40
+ nullable: infer R
41
+ } ? U extends keyof DataValueClientToWire ? R extends true ? never : DataValueClientToWire[U] : never : T[K] extends keyof DataValueClientToWire ? DataValueClientToWire[T[K]] : never } & { [K in keyof T as T[K] extends {
42
+ type: infer U
43
+ nullable: infer R
44
+ } ? R extends true ? K : never : never]? : T[K] extends {
45
+ type: infer U
46
+ nullable: infer R
47
+ } ? U extends keyof DataValueClientToWire ? R extends true ? DataValueClientToWire[U] | undefined : never : never : never };
33
48
  type NullValueType = typeof NULL_VALUE;
34
49
  }
35
50
  export type ActionEditResponse = ActionResults;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,6BAA6B,gCAAiC;AAC5E,cAAc,iBAAiB,2BAA4B;AAC3D,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,qBACA,4BACK,qCAAsC;AAC7C,cAAc,yBAAyB,gBAAiB;AACxD,cAAc,gCAAgC,gCAAiC;AAE/E,cACE,eACA,gCACK,oBAAqB;AAC5B,cAAc,kBAAkB,gBAAiB;AAEjD,YAAY,qBACR;CAAE,eAAe;CAAM,gBAAgB;AAAO,IAC9C;CACA,gBAAgB;CAChB,eAAe;AAChB;AAEH,YAAY,0BAA0B;CAAE;AAAwB;;;;AAKhE,yBAAiB;MAIH,cAAc,gBAAgB,yBACxC,sBAAsB;MAKZ,WAAW,UAAU,wBAC7B,kBAAkB,KAClB,yBAAyB;MAKjB,cAAc,UAAU,wBAAwB,UAAU;MAK1D,cAAc,UAAU,uBAAuB;EACzD,aAAa,oBAAoB,WAAW;GAAE,qBAAqB;EAAG,KACjE,UAAU,gCACT,UAAU,wBAAwB;EAGxC;CACD;MAEW,WACV,UAAU,qBAAqB,6BAC1B,WAAW,KAAI,sBAAsB,EAAE;MAMlC,uBAAuB;;AAGrC,YAAY,qBAAqB;AACjC,YAAY,2BAA2B","names":[],"sources":["../../../src/actions/Actions.ts"],"version":3,"file":"Actions.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,6BAA6B,gCAAiC;AAC5E,cAAc,iBAAiB,2BAA4B;AAC3D,cAAc,2BAA2B,oCAAqC;AAC9E,cACE,qBACA,4BACK,qCAAsC;AAC7C,cAAc,yBAAyB,gBAAiB;AACxD,cAAc,gCAAgC,gCAAiC;AAE/E,cACE,eACA,gCACK,oBAAqB;AAC5B,cAAc,kBAAkB,gBAAiB;AAEjD,YAAY,qBACR;CAAE,eAAe;CAAM,gBAAgB;AAAO,IAC9C;CACA,gBAAgB;CAChB,eAAe;AAChB;AAEH,YAAY,0BAA0B;CAAE;AAAwB;;;;AAKhE,yBAAiB;MAIH,cAAc,gBAAgB,yBACxC,sBAAsB;MAKZ,WAAW,UAAU,wBAC7B,kBAAkB,KAClB,yBAAyB;MAKjB,cAAc,UAAU,wBAAwB,UAAU;MAK1D,cAAc,UAAU,uBAAuB;EACzD,aAAa,oBAAoB,WAAW;GAAE,qBAAqB;EAAG,KACjE,UAAU,gCACT,UAAU,wBAAwB;EAGxC;CACD;MAEW,WACV,UAAU,qBAEF,wBAAwB;EAC5B,YAAY;EACZ;CACD,SAKC,WAAW,KAAK,EAAE,WAAW;EAAE,YAAY;EAAG,gBAAgB;CAAG,IAC7D,UAAU,eAAe,IACzB,KACH,EAAE,WAAW;EAAE,YAAY;EAAG,gBAAgB;CAAG,IAChD,gBAAgB,wBAAwB,UAAU,eAChD,sBAAsB,aAExB,EAAE,iBAAiB,wBAAwB,sBAAsB,EAAE,mBAKrE,WAAW,KAAK,EAAE,WAAW;EAAE,YAAY;EAAG,gBAAgB;CAAG,IAC7D,UAAU,OAAO,sBAEnB,EAAE,WAAW;EAAE,YAAY;EAAG,gBAAgB;CAAG,IACjD,gBAAgB,wBACd,UAAU,OAAO,sBAAsB;MAUrC,uBAAuB;;AAGrC,YAAY,qBAAqB;AACjC,YAAY,2BAA2B","names":[],"sources":["../../../src/actions/Actions.ts"],"version":3,"file":"Actions.d.ts"}
@@ -24,6 +24,10 @@ export declare namespace ActionMetadata {
24
24
  }
25
25
  namespace DataType {
26
26
  type BaseActionParameterTypes = "boolean" | "string" | "integer" | "long" | "double" | "datetime" | "timestamp" | "attachment" | "marking" | "mediaReference" | "scenarioReference" | "objectType" | "geoshape" | "geohash";
27
+ type StructFieldDefinition<T extends DataType.BaseActionParameterTypes> = T | {
28
+ type: T
29
+ nullable: boolean
30
+ };
27
31
  interface Object<T_Target extends ObjectTypeDefinition = never> {
28
32
  __OsdkTargetType?: T_Target;
29
33
  type: "object";
@@ -39,7 +43,7 @@ export declare namespace ActionMetadata {
39
43
  type: "objectSet";
40
44
  objectSet: T_Target["apiName"];
41
45
  }
42
- interface Struct<T extends Record<string, DataType.BaseActionParameterTypes>> {
46
+ interface Struct<T extends Record<string, StructFieldDefinition<DataType.BaseActionParameterTypes>>> {
43
47
  type: "struct";
44
48
  struct: T;
45
49
  }
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,oBAAoB,oBAAqB;AACvD,cAAc,2BAA2B,0BAA2B;AACpE,cACE,sBACA,qBACK,2BAA4B;AAEnC,iBAAiB,eAAe;CAC9B,MAAM;CACN;CACA;CACA;CACA;CACA,YAAY,YAAY,eAAe;CACvC,mBAAmB,QACjB,YAAY;EACV;EACA;CACD;CAEH,QAAQ;CACR;AACD;AAED,yBAAiB;WACE,UACf,iBAAiB,8BACjB;EACA,MACI,SAAS,2BACT,SAAS,cACT,SAAS,iBACT,SAAS,iBACT,SAAS;EACb;EACA;EACA;CACD;WAEgB;OACH,2BACR,YACA,WACA,YACA,SACA,WACA,aACA,cACA,eACA,YACA,mBACA,sBACA,eACA,aACA;YAEa,OACf,iBAAiB,8BACjB;GACA,mBAAmB;GACnB,MAAM;GACN,QAAQ,SAAS;EAClB;YAEgB,UAAU,iBAAiB,6BAA6B;GACvE,mBAAmB;GACnB,MAAM;GACN,WAAW,SAAS;EACrB;YAEgB,UACf,iBAAiB,8BACjB;GACA,mBAAmB;GACnB,MAAM;GACN,WAAW,SAAS;EACrB;YAEgB,OACf,UAAU,eAAe,SAAS,2BAClC;GACA,MAAM;GACN,QAAQ;EACT;;;AAIL,iBAAiB,0BAA0B,GAAG;CAC5C,YAAY;AACb;AAED,iBAAiB,iBACf,sBACA;CACA,MAAM;CACN;CACA;CACA,eAAe;CACf,uBACI,0BAA0B,gBAC1B;AACL","names":[],"sources":["../../../src/ontology/ActionDefinition.ts"],"version":3,"file":"ActionDefinition.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,oBAAoB,oBAAqB;AACvD,cAAc,2BAA2B,0BAA2B;AACpE,cACE,sBACA,qBACK,2BAA4B;AAEnC,iBAAiB,eAAe;CAC9B,MAAM;CACN;CACA;CACA;CACA;CACA,YAAY,YAAY,eAAe;CACvC,mBAAmB,QACjB,YAAY;EACV;EACA;CACD;CAEH,QAAQ;CACR;AACD;AAED,yBAAiB;WACE,UACf,iBAAiB,8BACjB;EACA,MACI,SAAS,2BACT,SAAS,cACT,SAAS,iBACT,SAAS,iBACT,SAAS;EACb;EACA;EACA;CACD;WAEgB;OACH,2BACR,YACA,WACA,YACA,SACA,WACA,aACA,cACA,eACA,YACA,mBACA,sBACA,eACA,aACA;OAEQ,sBACV,UAAU,SAAS,4BACjB,IAAI;GACN,MAAM;GACN;EACD;YAEgB,OACf,iBAAiB,8BACjB;GACA,mBAAmB;GACnB,MAAM;GACN,QAAQ,SAAS;EAClB;YAEgB,UAAU,iBAAiB,6BAA6B;GACvE,mBAAmB;GACnB,MAAM;GACN,WAAW,SAAS;EACrB;YAEgB,UACf,iBAAiB,8BACjB;GACA,mBAAmB;GACnB,MAAM;GACN,WAAW,SAAS;EACrB;YAEgB,OACf,UAAU,eAER,sBAAsB,SAAS,4BAEjC;GACA,MAAM;GACN,QAAQ;EACT;;;AAIL,iBAAiB,0BAA0B,GAAG;CAC5C,YAAY;AACb;AAED,iBAAiB,iBACf,sBACA;CACA,MAAM;CACN;CACA;CACA,eAAe;CACf,uBACI,0BAA0B,gBAC1B;AACL","names":[],"sources":["../../../src/ontology/ActionDefinition.ts"],"version":3,"file":"ActionDefinition.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0",
3
+ "version": "2.34.0",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",