@osdk/api 2.4.2 → 2.5.0-beta.10

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +26 -21
  2. package/build/browser/Definitions.js.map +1 -1
  3. package/build/browser/OsdkObjectFrom.js.map +1 -1
  4. package/build/browser/OsdkObjectFrom.test.js +7 -0
  5. package/build/browser/OsdkObjectFrom.test.js.map +1 -1
  6. package/build/browser/actions/Actions.js.map +1 -1
  7. package/build/browser/aggregate/AggregationResultsWithGroups.js.map +1 -1
  8. package/build/browser/definitions/LinkDefinitions.js.map +1 -1
  9. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  10. package/build/browser/experimental/fetchPageByRid.js.map +1 -1
  11. package/build/browser/index.js +4 -0
  12. package/build/browser/index.js.map +1 -1
  13. package/build/browser/mapping/DataValueMapping.js.map +1 -1
  14. package/build/browser/object/FetchPageArgs.js.map +1 -1
  15. package/build/browser/object/FetchPageResult.js.map +1 -1
  16. package/build/browser/object/Media.js.map +1 -1
  17. package/build/browser/objectSet/ObjectSet.js.map +1 -1
  18. package/build/browser/objectSet/ObjectSet.test.js +73 -0
  19. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  20. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  21. package/build/browser/public/unstable.js.map +1 -1
  22. package/build/cjs/{ObjectSet-BdIHDSBH.d.cts → ObjectSet-DKpF7Bpm.d.cts} +59 -32
  23. package/build/cjs/index.cjs +4 -0
  24. package/build/cjs/index.cjs.map +1 -1
  25. package/build/cjs/index.d.cts +33 -24
  26. package/build/cjs/public/unstable.d.cts +8 -5
  27. package/build/esm/Definitions.js.map +1 -1
  28. package/build/esm/OsdkObjectFrom.js.map +1 -1
  29. package/build/esm/OsdkObjectFrom.test.js +7 -0
  30. package/build/esm/OsdkObjectFrom.test.js.map +1 -1
  31. package/build/esm/actions/Actions.js.map +1 -1
  32. package/build/esm/aggregate/AggregationResultsWithGroups.js.map +1 -1
  33. package/build/esm/definitions/LinkDefinitions.js.map +1 -1
  34. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  35. package/build/esm/experimental/fetchPageByRid.js.map +1 -1
  36. package/build/esm/index.js +4 -0
  37. package/build/esm/index.js.map +1 -1
  38. package/build/esm/mapping/DataValueMapping.js.map +1 -1
  39. package/build/esm/object/FetchPageArgs.js.map +1 -1
  40. package/build/esm/object/FetchPageResult.js.map +1 -1
  41. package/build/esm/object/Media.js.map +1 -1
  42. package/build/esm/objectSet/ObjectSet.js.map +1 -1
  43. package/build/esm/objectSet/ObjectSet.test.js +73 -0
  44. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  45. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  46. package/build/esm/public/unstable.js.map +1 -1
  47. package/build/types/Definitions.d.ts +4 -0
  48. package/build/types/Definitions.d.ts.map +1 -1
  49. package/build/types/OsdkObjectFrom.d.ts +15 -4
  50. package/build/types/OsdkObjectFrom.d.ts.map +1 -1
  51. package/build/types/actions/Actions.d.ts +2 -0
  52. package/build/types/actions/Actions.d.ts.map +1 -1
  53. package/build/types/aggregate/AggregationResultsWithGroups.d.ts +2 -2
  54. package/build/types/aggregate/AggregationResultsWithGroups.d.ts.map +1 -1
  55. package/build/types/definitions/LinkDefinitions.d.ts +5 -4
  56. package/build/types/definitions/LinkDefinitions.d.ts.map +1 -1
  57. package/build/types/derivedProperties/DerivedProperty.d.ts +10 -1
  58. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  59. package/build/types/experimental/fetchPageByRid.d.ts +9 -2
  60. package/build/types/experimental/fetchPageByRid.d.ts.map +1 -1
  61. package/build/types/index.d.ts +5 -4
  62. package/build/types/index.d.ts.map +1 -1
  63. package/build/types/mapping/DataValueMapping.d.ts +2 -2
  64. package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
  65. package/build/types/object/FetchPageArgs.d.ts +21 -12
  66. package/build/types/object/FetchPageArgs.d.ts.map +1 -1
  67. package/build/types/object/FetchPageResult.d.ts +8 -6
  68. package/build/types/object/FetchPageResult.d.ts.map +1 -1
  69. package/build/types/object/Media.d.ts +7 -0
  70. package/build/types/object/Media.d.ts.map +1 -1
  71. package/build/types/objectSet/ObjectSet.d.ts +26 -18
  72. package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
  73. package/build/types/ontology/ObjectTypeDefinition.d.ts +2 -1
  74. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  75. package/build/types/public/unstable.d.ts +1 -1
  76. package/build/types/public/unstable.d.ts.map +1 -1
  77. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"OsdkObjectFrom.test.js","names":["describe","expectTypeOf","it","createMockObjectSet","toEqualTypeOf","branded","fauxObjectSet","fetchPage"],"sources":["OsdkObjectFrom.test.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { NullabilityAdherence } from \"./object/FetchPageArgs.js\";\nimport { createMockObjectSet } from \"./objectSet/ObjectSet.test.js\";\nimport type { ExtractOptions, Osdk } from \"./OsdkObjectFrom.js\";\n\ndescribe(\"ExtractOptions\", () => {\n describe(\"NullabilityAdherence Generic\", () => {\n it(\"does not add $notStrict for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for never\", () => {\n expectTypeOf<ExtractOptions<any, never>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for false\", () => {\n expectTypeOf<ExtractOptions<any, false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for throw\", () => {\n expectTypeOf<ExtractOptions<any, \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | false>>()\n .toEqualTypeOf<never>();\n });\n it(\"does not add $notStrict for false | throw\", () => {\n expectTypeOf<ExtractOptions<any, false | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\" | false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for NullabilityAdherence\", () => {\n expectTypeOf<ExtractOptions<any, NullabilityAdherence>>()\n .toEqualTypeOf<never>();\n });\n });\n\n describe(\"Rid Generic\", () => {\n it(\"does not add $rid for false\", () => {\n expectTypeOf<ExtractOptions<false, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does add $rid for true\", () => {\n expectTypeOf<ExtractOptions<true, any>>().toEqualTypeOf<\"$rid\">();\n });\n\n it(\"does not add $rid for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for never\", () => {\n expectTypeOf<ExtractOptions<never, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for boolean\", () => {\n expectTypeOf<ExtractOptions<boolean, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for true | false\", () => {\n expectTypeOf<ExtractOptions<true | false, any>>().toEqualTypeOf<never>();\n });\n });\n\n type quickAndDirty = {\n apiName: \"Foo\";\n type: \"object\";\n __DefinitionMetadata: {\n props: {\n name: string;\n foo: number | undefined;\n };\n strictProps: {\n name: string;\n foo: number;\n };\n apiName: \"Foo\";\n displayName: \"\";\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n primaryKeyType: \"string\";\n properties: {\n name: {\n type: \"string\";\n };\n foo: {\n type: \"integer\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"object\";\n icon: undefined;\n visibility: undefined;\n description: undefined;\n };\n };\n\n describe(\"Osdk.Instance\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk.Instance<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"Cannot use $notStrict\", () => {\n // @ts-expect-error\n type toCheck = Osdk.Instance<quickAndDirty, \"$notStrict\">;\n\n expectTypeOf<toCheck>().branded\n // @ts-expect-error\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, \"$notStrict\">>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, \"name\">>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n\n it(\"Is assignable to Record<string, unknown>\", () => {\n // We encountered a break where this stopped being assignable. We need to continue to support this assignment.\n const a = {} as Osdk.Instance<quickAndDirty>;\n a as Record<string, unknown>;\n });\n });\n\n describe(\"Osdk<>\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"returns $rid if only thing specified\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: $rid and name\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"name\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the strict type\n expectTypeOf<Pick<toCheck, \"name\">>().toEqualTypeOf<{\n name: quickAndDirty[\"__DefinitionMetadata\"][\"strictProps\"][\"name\"];\n }>();\n });\n\n it(\"handles legacy properly: $rid and $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\" | \"foo\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: just $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"Does not use $notStrict if requested with old type\", () => {\n type toCheck = Osdk<quickAndDirty, \"$notStrict\">;\n expectTypeOf<toCheck>().branded\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, never>>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, \"name\">>()\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n });\n\n describe(\"Inferred return types from fetchPage work\", () => {\n const fauxObjectSet = createMockObjectSet<quickAndDirty>();\n\n it(\"is not $notStrict\", async () => {\n const page = await fauxObjectSet.fetchPage();\n\n expectTypeOf<typeof page[\"data\"]>().branded\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AAC;;MAEH;MACAH,YAAY,CAAyB,CAAC,CAACG,aAAa,CAAQ,CAAC;IAC/D,CAAC,CAAC;IAEFF,EAAE,CAAC,oDAAoD,EAAE,MAAM;MAE7DD,YAAY,CAAU,CAAC,CAACI,OAAO,CAC5BD,aAAa,CAAsC,CAAC;MACvD;MACAH,YAAY,CAAgC,CAAC,CAACG,aAAa,CAEzD,CAAC;;MAEH;MACAH,YAAY,CAAyB,CAAC,CAACG,aAAa,CAAQ,CAAC;IAC/D,CAAC,CAAC;IAEFF,EAAE,CAAC,8CAA8C,EAAE,MAAM;MACvDD,YAAY,CAAoC,CAAC,CAACI,OAAO,CACtDD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;IAEFF,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,YAAY,CAAkC,CAAC,CAACI,OAAO,CACpDD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;IAEFF,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzDD,YAAY,CAAqC,CAAC,CAC/CG,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFJ,QAAQ,CAAC,2CAA2C,EAAE,MAAM;IAC1D,MAAMM,aAAa,GAAGH,mBAAmB,CAAgB,CAAC;IAE1DD,EAAE,CAAC,mBAAmB,EAAE,YAAY;MACrB,MAAMI,aAAa,CAACC,SAAS,CAAC,CAAC;MAE5CN,YAAY,CAAsB,CAAC,CAACI,OAAO,CACxCD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"OsdkObjectFrom.test.js","names":["describe","expectTypeOf","it","createMockObjectSet","toEqualTypeOf","branded","fauxObjectSet","fetchPage","toExtend"],"sources":["OsdkObjectFrom.test.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { NullabilityAdherence } from \"./object/FetchPageArgs.js\";\nimport { createMockObjectSet } from \"./objectSet/ObjectSet.test.js\";\nimport type { PropertyKeys } from \"./ontology/ObjectOrInterface.js\";\nimport type {\n ConvertProps,\n ExtractOptions,\n MapPropNamesToInterface,\n Osdk,\n} from \"./OsdkObjectFrom.js\";\n\ndescribe(\"ExtractOptions\", () => {\n describe(\"NullabilityAdherence Generic\", () => {\n it(\"does not add $notStrict for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for never\", () => {\n expectTypeOf<ExtractOptions<any, never>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for false\", () => {\n expectTypeOf<ExtractOptions<any, false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for throw\", () => {\n expectTypeOf<ExtractOptions<any, \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | false>>()\n .toEqualTypeOf<never>();\n });\n it(\"does not add $notStrict for false | throw\", () => {\n expectTypeOf<ExtractOptions<any, false | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\" | false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for NullabilityAdherence\", () => {\n expectTypeOf<ExtractOptions<any, NullabilityAdherence>>()\n .toEqualTypeOf<never>();\n });\n });\n\n describe(\"Rid Generic\", () => {\n it(\"does not add $rid for false\", () => {\n expectTypeOf<ExtractOptions<false, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does add $rid for true\", () => {\n expectTypeOf<ExtractOptions<true, any>>().toEqualTypeOf<\"$rid\">();\n });\n\n it(\"does not add $rid for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for never\", () => {\n expectTypeOf<ExtractOptions<never, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for boolean\", () => {\n expectTypeOf<ExtractOptions<boolean, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for true | false\", () => {\n expectTypeOf<ExtractOptions<true | false, any>>().toEqualTypeOf<never>();\n });\n });\n\n type quickAndDirty = {\n apiName: \"Foo\";\n type: \"object\";\n __DefinitionMetadata: {\n props: {\n name: string;\n foo: number | undefined;\n };\n strictProps: {\n name: string;\n foo: number;\n };\n apiName: \"Foo\";\n displayName: \"\";\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n primaryKeyType: \"string\";\n properties: {\n name: {\n type: \"string\";\n };\n foo: {\n type: \"integer\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"object\";\n icon: undefined;\n visibility: undefined;\n description: undefined;\n };\n };\n\n type quickerAndDirtier = {\n apiName: \"Bar\";\n type: \"object\";\n __DefinitionMetadata: {\n props: {\n name: string;\n foo: number | undefined;\n birthday: string;\n };\n strictProps: {\n name: string;\n foo: number;\n birthday: string;\n };\n apiName: \"Foo\";\n displayName: \"\";\n interfaceMap: {\n \"com.my.obscure.namespace.FooBarInterface\": {\n \"com.my.obscure.namespace.fooInterface\": \"foo\";\n \"com.my.obscure.namespace.id\": \"name\";\n \"com.my.even.more.obscure.namespace.originDate\": \"birthday\";\n };\n };\n inverseInterfaceMap: {\n \"com.my.obscure.namespace.FooBarInterface\": {\n \"foo\": \"com.my.obscure.namespace.fooInterface\";\n \"name\": \"com.my.obscure.namespace.id\";\n \"birthday\": \"com.my.even.more.obscure.namespace.originDate\";\n };\n };\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n primaryKeyType: \"string\";\n properties: {\n name: {\n type: \"string\";\n description: \"\";\n };\n foo: {\n type: \"integer\";\n description: \"\";\n };\n birthday: {\n type: \"string\";\n description: \"\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"object\";\n icon: undefined;\n visibility: undefined;\n description: \"\";\n };\n };\n\n type quickerAndDirtierInterface = {\n apiName: \"com.my.obscure.namespace.FooBarInterface\";\n type: \"interface\";\n __DefinitionMetadata: {\n props: {\n id: string;\n \"com.my.even.more.obscure.namespace.originDate\": string | undefined;\n fooInterface: number;\n };\n strictProps: {\n id: string;\n \"com.my.even.more.obscure.namespace.originDate\": string;\n fooInterface: number;\n };\n apiName: \"com.my.obscure.namespace.FooBarInterface\";\n displayName: \"\";\n implements: [];\n implementedBy: [\"Bar\"];\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n properties: {\n id: {\n type: \"string\";\n description: \"\";\n };\n \"com.my.even.more.obscure.namespace.originDate\": {\n type: \"string\";\n description: \"\";\n };\n fooInterface: {\n type: \"integer\";\n description: \"\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"interface\";\n icon: undefined;\n visibility: undefined;\n description: \"\";\n };\n };\n describe(\"Osdk.Instance\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk.Instance<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"Cannot use $notStrict\", () => {\n // @ts-expect-error\n type toCheck = Osdk.Instance<quickAndDirty, \"$notStrict\">;\n\n expectTypeOf<toCheck>().branded\n // @ts-expect-error\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, \"$notStrict\">>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, \"name\">>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n\n it(\"Is assignable to Record<string, unknown>\", () => {\n // We encountered a break where this stopped being assignable. We need to continue to support this assignment.\n const a = {} as Osdk.Instance<quickAndDirty>;\n a as Record<string, unknown>;\n });\n });\n\n describe(\"Osdk<>\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"returns $rid if only thing specified\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: $rid and name\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"name\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the strict type\n expectTypeOf<Pick<toCheck, \"name\">>().toEqualTypeOf<{\n name: quickAndDirty[\"__DefinitionMetadata\"][\"strictProps\"][\"name\"];\n }>();\n });\n\n it(\"handles legacy properly: $rid and $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\" | \"foo\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: just $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"Does not use $notStrict if requested with old type\", () => {\n type toCheck = Osdk<quickAndDirty, \"$notStrict\">;\n expectTypeOf<toCheck>().branded\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, never>>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, \"name\">>()\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n });\n\n describe(\"Inferred return types from fetchPage work\", () => {\n const fauxObjectSet = createMockObjectSet<quickAndDirty>();\n\n it(\"is not $notStrict\", async () => {\n const page = await fauxObjectSet.fetchPage();\n\n expectTypeOf<typeof page[\"data\"]>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty>[]\n >();\n });\n });\n\n describe(\"Interface casting works as intended\", () => {\n it(\"mapping as with fqn property names works\", async () => {\n expectTypeOf<\n MapPropNamesToInterface<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>\n >\n >().toEqualTypeOf<PropertyKeys<quickerAndDirtierInterface>>;\n\n expectTypeOf<\n ConvertProps<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>,\n never\n >\n >().toEqualTypeOf<PropertyKeys<quickerAndDirtierInterface>>;\n\n expectTypeOf<\n Osdk.Instance<\n quickerAndDirtierInterface,\n never,\n PropertyKeys<quickerAndDirtierInterface>,\n {}\n >\n >()\n .toExtend<\n Osdk.Instance<\n quickerAndDirtierInterface,\n never,\n ConvertProps<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>,\n never\n >\n >\n >();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEnD,SAASC,mBAAmB,QAAQ,+BAA+B;AASnEH,QAAQ,CAAC,gBAAgB,EAAE,MAAM;EAC/BA,QAAQ,CAAC,8BAA8B,EAAE,MAAM;IAC7CE,EAAE,CAAC,iCAAiC,EAAE,MAAM;MAC1CD,YAAY,CAA2B,CAAC,CACrCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA6B,CAAC,CACvCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA6B,CAAC,CACvCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA+B,CAAC,CACzCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,kCAAkC,EAAE,MAAM;MAC3CD,YAAY,CAA8B,CAAC,CACxCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,YAAY,CAAwC,CAAC,CAClDG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,YAAY,CAAsC,CAAC,CAChDG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IACFF,EAAE,CAAC,2CAA2C,EAAE,MAAM;MACpDD,YAAY,CAA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WP,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -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\";\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\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;AA0BA;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<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 +1 @@
1
- {"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.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 { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : MaybeNullable<\n G[P],\n OsdkObjectPropertyType<\n CompileTimeMetadata<Q>[\"properties\"][P],\n true\n >\n >;\n };\n }\n & AggregationResultsWithoutGroups<Q, A>\n)[];\n\ntype MaybeNullable<GROUP, VALUE> = GROUP extends {\n $exact: { $includeNullValue: true };\n} ? VALUE | null\n : VALUE;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"AggregationResultsWithGroups.js","names":[],"sources":["AggregationResultsWithGroups.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 { OsdkObjectPropertyTypeNotUndefined } from \"../Definitions.js\";\nimport type { GroupByClause, GroupByRange } from \"../groupby/GroupByClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { AggregationResultsWithoutGroups } from \"./AggregationResultsWithoutGroups.js\";\nimport type {\n OrderedAggregationClause,\n UnorderedAggregationClause,\n} from \"./AggregationsClause.js\";\n\nexport type AggregationResultsWithGroups<\n Q extends ObjectOrInterfaceDefinition,\n A extends UnorderedAggregationClause<Q> | OrderedAggregationClause<Q>,\n G extends GroupByClause<Q> | undefined,\n> = (\n & {\n $group: {\n [P in keyof G & PropertyKeys<Q>]: G[P] extends\n { $ranges: GroupByRange<infer T>[] } ? { startValue: T; endValue: T }\n : MaybeNullable<\n G[P],\n OsdkObjectPropertyTypeNotUndefined<\n CompileTimeMetadata<Q>[\"properties\"][P]\n >\n >;\n };\n }\n & AggregationResultsWithoutGroups<Q, A>\n)[];\n\ntype MaybeNullable<GROUP, VALUE> = GROUP extends {\n $exact: { $includeNullValue: true };\n} ? VALUE | null\n : VALUE;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { PropertyKeys } from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n ObjectTypeLinkKeysFrom2,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\n\n/** The $link container to get from one object type to its linked objects */\nexport type OsdkObjectLinksObject<\n O extends ObjectTypeDefinition,\n> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {\n readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;\n};\n\nexport type OsdkObjectLinksEntry<\n Q extends ObjectTypeDefinition,\n L extends ObjectTypeLinkKeysFrom2<Q>,\n> = CompileTimeMetadata<Q>[\"links\"][L] extends\n ObjectMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : never;\n\nexport type DefaultToFalse<B extends boolean | undefined> = false extends B\n ? false\n : undefined extends B ? false\n : true;\n\nexport interface SingleLinkAccessor<\n T extends ObjectTypeDefinition,\n> {\n /** Load the linked object\n */\n fetchOne: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>>\n : Osdk.Instance<T>\n >;\n\n /** Load the linked object, with a result wrapper\n */\n fetchOneWithErrors: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n Result<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L>\n : Osdk.Instance<T>\n >\n >;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"LinkDefinitions.js","names":[],"sources":["LinkDefinitions.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FetchPageArgs, SelectArg } from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type { ObjectSet } from \"../objectSet/ObjectSet.js\";\nimport type { InterfaceMetadata } from \"../ontology/InterfaceDefinition.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n ObjectTypeLinkKeysFrom2,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { ExtractOptions, Osdk } from \"../OsdkObjectFrom.js\";\n\n/** The $link container to get from one object type to its linked objects */\nexport type OsdkObjectLinksObject<\n O extends ObjectOrInterfaceDefinition,\n> = ObjectTypeLinkKeysFrom2<O> extends never ? never : {\n readonly [L in ObjectTypeLinkKeysFrom2<O>]: OsdkObjectLinksEntry<O, L>;\n};\n\nexport type OsdkObjectLinksEntry<\n Q extends ObjectOrInterfaceDefinition,\n L extends ObjectTypeLinkKeysFrom2<Q>,\n> = CompileTimeMetadata<Q>[\"links\"][L] extends\n ObjectMetadata.Link<infer T, infer M> ? (\n M extends false ? SingleLinkAccessor<T> : ObjectSet<T>\n )\n : CompileTimeMetadata<Q>[\"links\"][L] extends\n InterfaceMetadata.Link<infer T, infer M> ? ObjectSet<T>\n : never;\n\nexport type DefaultToFalse<B extends boolean | undefined> = false extends B\n ? false\n : undefined extends B ? false\n : true;\n\nexport interface SingleLinkAccessor<\n T extends ObjectTypeDefinition,\n> {\n /** Load the linked object\n */\n fetchOne: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L & PropertyKeys<T>>\n : Osdk.Instance<T>\n >;\n\n /** Load the linked object, with a result wrapper\n */\n fetchOneWithErrors: <\n const A extends SelectArg<\n T,\n PropertyKeys<T>,\n boolean\n >,\n >(\n options?: A,\n ) => Promise<\n Result<\n A extends FetchPageArgs<T, infer L, infer R, any, infer S>\n ? Osdk.Instance<T, ExtractOptions<R, S>, L>\n : Osdk.Instance<T>\n >\n >;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\nexport type DerivedPropertyCreator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n> = (\n baseObjectSet: DerivedProperty.Builder<Q, false>,\n) =>\n | DerivedProperty.Definition<T, Q>\n | DerivedProperty.NumericPropertyDefinition<T, Q>\n | DerivedProperty.DatetimePropertyDefinition<T, Q>;\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"DerivedProperty.js","names":["DerivedProperty"],"sources":["DerivedProperty.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ValidAggregationKeys } from \"../aggregate/AggregatableKeys.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type {\n DatetimeExpressions,\n DefinitionForType,\n NumericExpressions,\n} from \"./Expressions.js\";\nimport type {\n CollectWithPropAggregations,\n MinMaxWithPropAggregateOption,\n} from \"./WithPropertiesAggregationOptions.js\";\n\ndeclare const DerivedPropertyDefinitionBrand: unique symbol;\n\nexport namespace DerivedProperty {\n export interface Definition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > {\n readonly [DerivedPropertyDefinitionBrand]: true;\n }\n\n export interface NumericPropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, NumericExpressions<Q, T> {}\n\n export interface DatetimePropertyDefinition<\n T extends SimplePropertyDef,\n Q extends ObjectOrInterfaceDefinition,\n > extends Definition<T, Q>, DatetimeExpressions<Q, T> {}\n\n export type Clause<\n Q extends ObjectOrInterfaceDefinition,\n > = {\n [key: string]: DerivedPropertyCreator<Q, SimplePropertyDef>;\n };\n\n interface BaseBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends Filterable<Q, CONSTRAINED>, Pivotable<Q, CONSTRAINED> {\n }\n\n export interface Builder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Selectable<Q>, Constant<Q> {\n }\n\n export interface AggregateBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends BaseBuilder<Q, CONSTRAINED>, Aggregatable<Q> {\n }\n\n export interface SelectPropertyBuilder<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n > extends AggregateBuilder<Q, CONSTRAINED>, Selectable<Q> {\n }\n\n export type ValidParts = \"DAYS\" | \"MONTHS\" | \"QUARTERS\" | \"YEARS\";\n}\n\nexport type DerivedPropertyCreator<\n Q extends ObjectOrInterfaceDefinition,\n T extends SimplePropertyDef,\n> = (\n baseObjectSet: DerivedProperty.Builder<Q, false>,\n) =>\n | DerivedProperty.Definition<T, Q>\n | DerivedProperty.NumericPropertyDefinition<T, Q>\n | DerivedProperty.DatetimePropertyDefinition<T, Q>;\n\ntype BuilderTypeFromConstraint<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = CONSTRAINED extends true ? DerivedProperty.AggregateBuilder<Q, true>\n : DerivedProperty.SelectPropertyBuilder<Q, false>;\n\ntype Filterable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly where: (\n clause: WhereClause<Q>,\n ) => BuilderTypeFromConstraint<Q, CONSTRAINED>;\n};\n\ntype Pivotable<\n Q extends ObjectOrInterfaceDefinition,\n CONSTRAINED extends boolean,\n> = {\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => CONSTRAINED extends true\n ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : NonNullable<CompileTimeMetadata<Q>[\"links\"][L][\"multiplicity\"]> extends\n true ? DerivedProperty.AggregateBuilder<LinkedType<Q, L>, true>\n : DerivedProperty.SelectPropertyBuilder<LinkedType<Q, L>, false>;\n};\n\ntype Constant<Q extends ObjectOrInterfaceDefinition> = {\n readonly constant: {\n readonly double: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"double\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly integer: (\n value: number,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"integer\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly long: (\n value: string,\n ) => DerivedProperty.NumericPropertyDefinition<\n SimplePropertyDef.Make<\"long\", \"non-nullable\", \"single\">,\n Q\n >;\n\n readonly datetime: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"datetime\", \"non-nullable\", \"single\">,\n Q\n >;\n readonly timestamp: (\n value: string,\n ) => DerivedProperty.DatetimePropertyDefinition<\n SimplePropertyDef.Make<\"timestamp\", \"non-nullable\", \"single\">,\n Q\n >;\n };\n};\n\ntype Aggregatable<\n Q extends ObjectOrInterfaceDefinition,\n> = {\n readonly aggregate: <\n V extends ValidAggregationKeys<\n Q,\n \"withPropertiesAggregate\"\n >,\n >(\n aggregationSpecifier: V,\n opts?: V extends `${any}:${infer P}`\n ? P extends CollectWithPropAggregations ? { limit: number }\n : P extends \"approximatePercentile\" ? { percentile: number }\n : never\n : never,\n ) => DefinitionForType<\n Q,\n V extends `${infer N}:${infer P}`\n ? P extends CollectWithPropAggregations ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"array\"\n >\n : P extends MinMaxWithPropAggregateOption ? SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][N][\"type\"],\n \"nullable\",\n \"single\"\n >\n : P extends \"approximateDistinct\" | \"exactDistinct\"\n ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : SimplePropertyDef.Make<\n \"double\",\n \"nullable\",\n \"single\"\n >\n : V extends \"$count\" ? SimplePropertyDef.Make<\n \"integer\",\n \"non-nullable\",\n \"single\"\n >\n : never\n >;\n};\n\ntype Selectable<Q extends ObjectOrInterfaceDefinition> = {\n readonly selectProperty: <R extends PropertyKeys<Q>>(\n propertyName: R,\n ) => DefinitionForType<\n Q,\n SimplePropertyDef.Make<\n CompileTimeMetadata<Q>[\"properties\"][R][\"type\"],\n CompileTimeMetadata<Q>[\"properties\"][R][\"nullable\"] extends true\n ? \"nullable\"\n : \"non-nullable\",\n CompileTimeMetadata<Q>[\"properties\"][R][\"multiplicity\"] extends true\n ? \"array\"\n : \"single\"\n >\n >;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAqCiBA,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n const T extends boolean,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S, T>,\n) => Promise<FetchPageResult<Q, L, R, S, T>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchPageByRid.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","name","type","version"],"sources":["fetchPageByRid.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n FetchPageArgs,\n NullabilityAdherence,\n} from \"../object/FetchPageArgs.js\";\nimport type { FetchPageResult } from \"../object/FetchPageResult.js\";\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { Experiment } from \"./Experiment.js\";\n\ntype fetchPageByRidFn = <\n Q extends ObjectOrInterfaceDefinition,\n const L extends PropertyKeys<Q>,\n const R extends boolean,\n const S extends NullabilityAdherence,\n const T extends boolean,\n>(\n objectType: Q,\n rids: string[],\n options?: FetchPageArgs<Q, L, R, any, S, T>,\n) => Promise<FetchPageResult<Q, L, R, S, T>>;\n\nexport type FetchPageByRidPayload = {\n fetchPageByRid: fetchPageByRidFn;\n fetchPageByRidNoType: fetchPageByRidNoTypeFn;\n};\n\ntype fetchPageByRidNoTypeFn = <\n const R extends boolean,\n const S extends NullabilityAdherence,\n const T extends boolean,\n>(\n rids: readonly string[],\n options?: FetchPageArgs<ObjectOrInterfaceDefinition, any, R, any, S, T>,\n) => Promise<FetchPageResult<ObjectOrInterfaceDefinition, any, R, S, T>>;\n\nexport const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n FetchPageByRidPayload\n> = {\n name: \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n type: \"experiment\",\n version: \"2.2.0\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCA,OAAO,MAAMA,iDAIZ,GAAG;EACFC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
@@ -14,9 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ export { NULL_VALUE } from "./actions/NullValue.js";
17
18
  export { DistanceUnitMapping } from "./aggregate/WhereClause.js";
18
19
  export { DurationMapping } from "./groupby/GroupByClause.js";
19
20
  export { isOk } from "./object/Result.js";
21
+
22
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
23
+
20
24
  export { TimeseriesDurationMapping } from "./timeseries/timeseries.js";
21
25
  export {};
22
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.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\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type { Media, MediaMetadata, MediaReference } from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\nexport type { Logger } from \"./Logger.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,SAASA,mBAAmB,QAAQ,4BAA4B;AAgBhE,SAASC,eAAe,QAAQ,4BAA4B;AA8B5D,SAASC,IAAI,QAAQ,oBAAoB;AAwDzC,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["NULL_VALUE","DistanceUnitMapping","DurationMapping","isOk","TimeseriesDurationMapping"],"sources":["index.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\nexport type { ActionReturnTypeForOptions } from \"./actions/ActionReturnTypeForOptions.js\";\nexport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"./actions/Actions.js\";\nexport { NULL_VALUE } from \"./actions/NullValue.js\";\nexport type { ValidAggregationKeys } from \"./aggregate/AggregatableKeys.js\";\nexport type { AggregateOpts } from \"./aggregate/AggregateOpts.js\";\nexport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"./aggregate/AggregateOptsThatErrors.js\";\nexport type { AggregationResultsWithGroups } from \"./aggregate/AggregationResultsWithGroups.js\";\nexport type { AggregationResultsWithoutGroups } from \"./aggregate/AggregationResultsWithoutGroups.js\";\nexport type { AggregationClause } from \"./aggregate/AggregationsClause.js\";\nexport type { AggregationsResults } from \"./aggregate/AggregationsResults.js\";\nexport type { GeoFilterOptions } from \"./aggregate/GeoFilter.js\";\nexport { DistanceUnitMapping } from \"./aggregate/WhereClause.js\";\nexport type {\n GeoFilter_Intersects,\n GeoFilter_Within,\n PossibleWhereClauseFilters,\n WhereClause,\n} from \"./aggregate/WhereClause.js\";\nexport type {\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n} from \"./Definitions.js\";\nexport type {\n OsdkObjectLinksObject,\n SingleLinkAccessor,\n} from \"./definitions/LinkDefinitions.js\";\nexport type { DerivedProperty } from \"./derivedProperties/DerivedProperty.js\";\nexport { DurationMapping } from \"./groupby/GroupByClause.js\";\nexport type {\n AllGroupByValues,\n GroupByClause,\n GroupByRange,\n} from \"./groupby/GroupByClause.js\";\nexport type { Logger } from \"./Logger.js\";\nexport type {\n AllowedBucketKeyTypes,\n AllowedBucketTypes,\n DataValueClientToWire,\n DataValueWireToClient,\n} from \"./mapping/DataValueMapping.js\";\nexport type {\n PropertyValueWireToClient,\n} from \"./mapping/PropertyValueMapping.js\";\nexport type { Attachment, AttachmentUpload } from \"./object/Attachment.js\";\nexport type {\n AsyncIterArgs,\n Augment,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n SelectArgToKeys,\n} from \"./object/FetchPageArgs.js\";\nexport type {\n FetchPageResult,\n SingleOsdkResult,\n} from \"./object/FetchPageResult.js\";\nexport type {\n Media,\n MediaMetadata,\n MediaReference,\n MediaUpload,\n} from \"./object/Media.js\";\nexport { isOk } from \"./object/Result.js\";\nexport type { Result } from \"./object/Result.js\";\nexport type { BaseObjectSet } from \"./objectSet/BaseObjectSet.js\";\nexport type { ObjectSet } from \"./objectSet/ObjectSet.js\";\nexport type { ObjectSetSubscription } from \"./objectSet/ObjectSetListener.js\";\nexport type {\n ActionDefinition,\n ActionMetadata,\n} from \"./ontology/ActionDefinition.js\";\nexport type {\n InterfaceDefinition,\n InterfaceMetadata,\n} from \"./ontology/InterfaceDefinition.js\";\nexport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"./ontology/ObjectOrInterface.js\";\nexport type { ObjectSpecifier } from \"./ontology/ObjectSpecifier.js\";\nexport type {\n CompileTimeMetadata,\n ObjectMetadata,\n ObjectTypeDefinition,\n PropertyDef,\n VersionBound,\n} from \"./ontology/ObjectTypeDefinition.js\";\nexport type { OntologyMetadata } from \"./ontology/OntologyMetadata.js\";\nexport type { PrimaryKeyTypes } from \"./ontology/PrimaryKeyTypes.js\";\nexport type {\n InterfaceQueryDataType,\n ObjectQueryDataType,\n ObjectSetQueryDataType,\n QueryDataTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n QueryParameterDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"./ontology/QueryDefinition.js\";\nexport type {\n BaseWirePropertyTypes,\n WirePropertyTypes,\n} from \"./ontology/WirePropertyTypes.js\";\nexport type {\n ObjectIdentifiers,\n OsdkBase,\n PrimaryKeyType,\n} from \"./OsdkBase.js\";\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type { OsdkObject } from \"./OsdkObject.js\";\nexport type { ConvertProps, MaybeScore, Osdk } from \"./OsdkObjectFrom.js\";\nexport type { PageResult } from \"./PageResult.js\";\nexport type {\n Range,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"./queries/Aggregations.js\";\nexport type { QueryParam, QueryResult } from \"./queries/Queries.js\";\nexport { TimeseriesDurationMapping } from \"./timeseries/timeseries.js\";\nexport type {\n GeotimeSeriesProperty,\n TimeSeriesPoint,\n TimeSeriesProperty,\n TimeSeriesQuery,\n} from \"./timeseries/timeseries.js\";\nexport type { LinkedType, LinkNames } from \"./util/LinkUtils.js\";\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,SAASA,UAAU,QAAQ,wBAAwB;AASnD,SAASC,mBAAmB,QAAQ,4BAA4B;AAgBhE,SAASC,eAAe,QAAQ,4BAA4B;AAqC5D,SAASC,IAAI,QAAQ,oBAAoB;;AA+CzC;;AAUA,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DataValueMapping.js","names":[],"sources":["DataValueMapping.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { Attachment, AttachmentUpload } from \"../object/Attachment.js\";\nimport type { MediaReference } from \"../object/Media.js\";\n\n/**\n * Map from the DataValue type to the typescript type that we return\n */\nexport interface DataValueWireToClient {\n attachment: Attachment;\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string;\n float: number;\n double: number;\n integer: number;\n long: string;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n mediaReference: MediaReference;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n set: Set<any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\n/**\n * Map from the DataValue type to the typescript type that we accept\n */\nexport interface DataValueClientToWire {\n attachment: string | AttachmentUpload | Blob & { readonly name: string };\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string | number;\n float: number;\n double: number;\n integer: number;\n long: string | number;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n set: Set<any>;\n mediaReference: MediaReference;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\nexport type AllowedBucketTypes = string | number | boolean;\nexport type AllowedBucketKeyTypes =\n | AllowedBucketTypes\n | {\n startValue: AllowedBucketTypes;\n endValue: AllowedBucketTypes;\n };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"DataValueMapping.js","names":[],"sources":["DataValueMapping.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { Attachment, AttachmentUpload } from \"../object/Attachment.js\";\nimport type { MediaReference, MediaUpload } from \"../object/Media.js\";\n\n/**\n * Map from the DataValue type to the typescript type that we return\n */\nexport interface DataValueWireToClient {\n attachment: Attachment;\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string;\n float: number;\n double: number;\n integer: number;\n long: string;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n mediaReference: MediaReference;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n set: Set<any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\n/**\n * Map from the DataValue type to the typescript type that we accept\n */\nexport interface DataValueClientToWire {\n attachment: string | AttachmentUpload | Blob & { readonly name: string };\n boolean: boolean;\n byte: number;\n datetime: string;\n date: string;\n decimal: string | number;\n float: number;\n double: number;\n integer: number;\n long: string | number;\n marking: string;\n null: null;\n short: number;\n string: string;\n timestamp: string;\n set: Set<any>;\n mediaReference: MediaReference | MediaUpload;\n twoDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n value: AllowedBucketTypes;\n }[];\n threeDimensionalAggregation: {\n key: AllowedBucketKeyTypes;\n groups: { key: AllowedBucketKeyTypes; value: AllowedBucketTypes }[];\n }[];\n struct: Record<string, any>;\n objectType: string;\n geohash: GeoJSON.Point;\n geoshape: GeoJSON.GeoJSON;\n}\n\nexport type AllowedBucketTypes = string | number | boolean;\nexport type AllowedBucketKeyTypes =\n | AllowedBucketTypes\n | {\n startValue: AllowedBucketTypes;\n endValue: AllowedBucketTypes;\n };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export interface OrderBy<\n L extends string = never,\n > {\n $orderBy?: {\n [K in L]?: \"asc\" | \"desc\";\n };\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n > extends Select<K, RDP_KEYS>, OrderBy<K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n> extends ObjectSetArgs.OrderBy<L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n> extends\n SelectArg<Q, K, R, S, RDP_KEYS>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS>\n{\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageArgs.js","names":["NullabilityAdherence","ObjectSetArgs"],"sources":["FetchPageArgs.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { CompileTimeMetadata } from \"../ontology/ObjectTypeDefinition.js\";\n\nexport type NullabilityAdherence = false | \"throw\" | \"drop\";\nexport namespace NullabilityAdherence {\n export type Default = \"throw\";\n}\n\nexport namespace ObjectSetArgs {\n export interface Select<\n OBJECT_KEYS extends string = never,\n RDP_KEYS extends string = never,\n > {\n $select?: readonly (OBJECT_KEYS | RDP_KEYS)[];\n $includeRid?: boolean;\n }\n\n export type OrderByOptions<L extends string> =\n | {\n [K in L]?: \"asc\" | \"desc\";\n }\n | \"relevance\";\n\n export interface OrderBy<\n ORDER_BY_OPTIONS extends OrderByOptions<L>,\n L extends string = never,\n > {\n $orderBy?: ORDER_BY_OPTIONS;\n }\n\n export interface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends Select<K, RDP_KEYS>, OrderBy<ORDER_BY_OPTIONS, K> {\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n }\n\n export interface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n K extends PropertyKeys<Q> = never,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n > extends AsyncIter<Q, K, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n }\n}\n\nexport interface SelectArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n R extends boolean = false,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n RDP_KEYS extends string = never,\n> {\n $select?: readonly L[];\n $includeRid?: R;\n}\n\nexport interface OrderByArg<\n Q extends ObjectOrInterfaceDefinition,\n L extends string = PropertyKeys<Q>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = never,\n> extends ObjectSetArgs.OrderBy<ORDER_BY_OPTIONS, L> {\n}\n\nexport type SelectArgToKeys<\n Q extends ObjectOrInterfaceDefinition,\n A extends SelectArg<Q, any, any>,\n> = A extends SelectArg<Q, never> ? PropertyKeys<Q>\n : A[\"$select\"] extends readonly string[] ? A[\"$select\"][number]\n : PropertyKeys<Q>;\n\nexport interface FetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = {},\n> extends AsyncIterArgs<Q, K, R, A, S, T, RDP_KEYS, ORDER_BY_OPTIONS> {\n $nextPageToken?: string;\n $pageSize?: number;\n}\n\nexport interface AsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n K extends string = PropertyKeys<Q>,\n R extends boolean = false,\n A extends Augments = never,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n RDP_KEYS extends string = never,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<K> = never,\n> extends\n SelectArg<Q, K, R, S, RDP_KEYS>,\n OrderByArg<Q, PropertyKeys<Q> | RDP_KEYS, ORDER_BY_OPTIONS>\n{\n $__UNSTABLE_useOldInterfaceApis?: boolean;\n $includeAllBaseObjectProperties?: PropertyKeys<Q> extends K ? T : never;\n}\n\nexport type Augment<\n X extends ObjectOrInterfaceDefinition,\n T extends string,\n> = { [K in CompileTimeMetadata<X>[\"apiName\"]]: T[] };\n\nexport type Augments = Record<string, string[]>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,WAuBiBA,oBAAoB;AAAA,WAIpBC,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { ExtractOptions, IsNever, Osdk } from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean = false,\n> = PageResult<\n PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>>\n : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n> = Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FetchPageResult.js","names":[],"sources":["FetchPageResult.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type {\n ExtractOptions,\n IsNever,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { NullabilityAdherence, ObjectSetArgs } from \"./FetchPageArgs.js\";\n\n/** exposed for a test */\nexport type RespectNullability<S extends NullabilityAdherence> = S extends false\n ? false\n : true;\n\n/** exposed for a test */\nexport type UnionIfFalse<S extends string, JUST_S_IF_TRUE extends boolean, E> =\n IsNever<S> extends true ? never\n : JUST_S_IF_TRUE extends true ? S\n : S | E;\n\n/** exposed for a test */\nexport type UnionIfTrue<\n S extends string,\n UNION_IF_TRUE extends boolean,\n E extends string,\n> = IsNever<S> extends true ? never\n : UNION_IF_TRUE extends true ? S | E\n : S;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type FetchPageResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n R extends boolean,\n S extends NullabilityAdherence,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n> = PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? never : L\n >,\n ORDER_BY_OPTIONS\n >\n>;\n\n/**\n * Helper type for converting fetch options into an Osdk object\n */\nexport type SingleOsdkResult<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q> | (keyof RDPs & string),\n R extends boolean,\n S extends NullabilityAdherence,\n RDPs extends Record<string, SimplePropertyDef> = {},\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n> = MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L,\n { [K in Extract<keyof RDPs, L>]: RDPs[K] }\n >,\n ORDER_BY_OPTIONS\n>;\n\nexport type IsAny<T> = unknown extends T\n ? [keyof T] extends [never] ? false : true\n : false;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n readToken?: string;\n };\n };\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches content of a media reference property\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n */\n getMediaReference(): MediaReference;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly path: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedPropertyCreator } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs>,\n Where<Q, RDPs>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ): Promise<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T>,\n ): Promise<\n Result<\n PageResult<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T>,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedPropertyCreator<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n> extends\n MinimalObjectSet<Q, D>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSet.js","names":[],"sources":["ObjectSet.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 { AggregateOpts } from \"../aggregate/AggregateOpts.js\";\nimport type { AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy } from \"../aggregate/AggregateOptsThatErrors.js\";\nimport type { AggregationsResults } from \"../aggregate/AggregationsResults.js\";\nimport type { WhereClause } from \"../aggregate/WhereClause.js\";\nimport type { DerivedPropertyCreator } from \"../derivedProperties/DerivedProperty.js\";\nimport type {\n AsyncIterArgs,\n Augments,\n FetchPageArgs,\n NullabilityAdherence,\n ObjectSetArgs,\n SelectArg,\n} from \"../object/FetchPageArgs.js\";\nimport type { Result } from \"../object/Result.js\";\nimport type {\n DerivedObjectOrInterfaceDefinition,\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n} from \"../ontology/ObjectOrInterface.js\";\nimport type {\n CompileTimeMetadata,\n ObjectTypeDefinition,\n} from \"../ontology/ObjectTypeDefinition.js\";\nimport type { SimplePropertyDef } from \"../ontology/SimplePropertyDef.js\";\nimport type { PrimaryKeyType } from \"../OsdkBase.js\";\nimport type {\n ExtractAllPropertiesOption,\n ExtractOptions,\n ExtractRidOption,\n MaybeScore,\n Osdk,\n} from \"../OsdkObjectFrom.js\";\nimport type { PageResult } from \"../PageResult.js\";\nimport type { LinkedType, LinkNames } from \"../util/LinkUtils.js\";\nimport type { BaseObjectSet } from \"./BaseObjectSet.js\";\nimport type { ObjectSetSubscription } from \"./ObjectSetListener.js\";\n\ntype MergeObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef> = {},\n> = DerivedObjectOrInterfaceDefinition.WithDerivedProperties<Q, D>;\n\ntype ExtractRdp<\n D extends\n | BaseObjectSet<any>\n | Record<string, SimplePropertyDef>,\n> = [D] extends [never] ? {}\n : D extends BaseObjectSet<any> ? {}\n : D extends Record<string, SimplePropertyDef> ? D\n : {};\n\ntype MaybeSimplifyPropertyKeys<\n Q extends ObjectOrInterfaceDefinition,\n L extends PropertyKeys<Q>,\n> = PropertyKeys<Q> extends L ? PropertyKeys<Q> : L & PropertyKeys<Q>;\n\ntype SubSelectKeysHelper<\n Q extends ObjectOrInterfaceDefinition,\n L extends string,\n> = [L] extends [never] ? PropertyKeys<Q>\n : PropertyKeys<Q> extends L ? PropertyKeys<Q>\n : L & PropertyKeys<Q>;\n\ntype SubSelectKeys<\n Q extends ObjectOrInterfaceDefinition,\n X extends SelectArg<Q, PropertyKeys<Q>, any, any> = never,\n> = SubSelectKeysHelper<Q, Extract$Select<X>>;\n\ntype NOOP<T> = T extends (...args: any[]) => any ? T\n : T extends abstract new(...args: any[]) => any ? T\n : { [K in keyof T]: T[K] };\n\ntype SubSelectRDPsHelper<\n X extends ValidFetchPageArgs<any, any, any> | ValidAsyncIterArgs<any, any>,\n DEFAULT extends string,\n> = [X] extends [never] ? DEFAULT\n : (X[\"$select\"] & string[])[number] & DEFAULT;\n\ntype SubSelectRDPs<\n RDPs extends Record<string, SimplePropertyDef>,\n X extends ValidFetchPageArgs<any, RDPs, any> | ValidAsyncIterArgs<any, RDPs>,\n> = [RDPs] extends [never] ? never\n : NOOP<{ [K in SubSelectRDPsHelper<X, string & keyof RDPs>]: RDPs[K] }>;\n\nexport interface MinimalObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n BaseObjectSet<Q>,\n FetchPage<Q, RDPs>,\n AsyncIter<Q, RDPs, ORDER_BY_OPTIONS>,\n Where<Q, RDPs>\n{\n}\n\nexport type ExtractOptions2<\n X extends FetchPageArgs<any, any, any, any, any, any, any>,\n> = [X] extends [never] ? never\n :\n | ExtractRidOption<X[\"$includeRid\"] extends true ? true : false>\n | ExtractAllPropertiesOption<\n X[\"$includeAllBaseObjectProperties\"] extends true ? true : false\n >;\n\ntype Extract$Select<X extends FetchPageArgs<any, any>> = NonNullable<\n X[\"$select\"]\n>[number];\n\ninterface FetchPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly fetchPage: FetchPageSignature<Q, RDPs>;\n readonly fetchPageWithErrors: FetchPageWithErrorsSignature<Q, RDPs>;\n}\n\ntype ValidFetchPageArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>>,\n> = ObjectSetArgs.FetchPage<\n Q,\n PropertyKeys<Q>,\n boolean,\n string & keyof RDPs,\n ORDER_BY_OPTIONS\n>;\n\ntype ValidAsyncIterArgs<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> =\n | ObjectSetArgs.AsyncIter<\n Q,\n PropertyKeys<Q>,\n false,\n string & keyof RDPs\n >\n | AsyncIterArgs<\n Q,\n never,\n any,\n any,\n any,\n true,\n string & keyof RDPs\n >;\n\ninterface FetchPageSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n const myObjsResult = myObjs.data;\n\n * @returns a page of objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >;\n}\n\ninterface NearestNeighbors<Q extends ObjectOrInterfaceDefinition> {\n /**\n * Finds the nearest neighbors for a given text or vector within the object set.\n *\n * @param query - Queries support either a vector matching the embedding model defined on the property, or text that is\n automatically embedded.\n * @param numNeighbors - The number of objects to return. If the number of documents in the objectType is less than the provided\n value, all objects will be returned. This value is limited to 1 &le; numNeighbors &ge; 500.\n * @param property - The property key with a defined embedding model to search over.\n *\n * @returns An object set containing the `numNeighbors` nearest neighbors. To return the objects ordered by relevance and each\n * objects associated score, specify \"relevance\" in the orderBy.\n */\n\n readonly nearestNeighbors: (\n query: string | number[],\n numNeighbors: number,\n property: PropertyKeys.Filtered<Q, \"vector\">,\n ) => this;\n}\n\ninterface FetchPageWithErrorsSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Gets a page of objects of this type, with a result wrapper\n * @param args - Args to specify next page token and page size, if applicable\n * @example\n * const myObjs = await objectSet.fetchPage({\n $pageSize: 10,\n $nextPageToken: \"nextPage\"\n });\n\n if(isOk(myObjs)){\n const myObjsResult = myObjs.value.data;\n }\n * @returns a page of objects, wrapped in a result wrapper\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<L> = {},\n >(\n args?: FetchPageArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): Promise<\n Result<\n PageResult<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >\n >\n >;\n}\n\n// TODO MOVE THIS\ninterface Where<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n /**\n * Allows you to filter an object set with a given clause\n * @param clause - Takes a filter clause\n * @example\n * await client(Office).where({\n meetingRooms: { $contains: \"Grand Central\" },\n meetingRoomCapacities: { $contains: 30 },\n});\n* @returns an objectSet\n */\n readonly where: (\n clause: WhereClause<MergeObjectSet<Q, RDPs>>,\n ) => this;\n}\n\ninterface AsyncIterSignature<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <X extends ValidAsyncIterArgs<Q, RDPs> = never>(\n args?: X,\n ): AsyncIterableIterator<\n Osdk.Instance<\n Q,\n ExtractOptions2<X>,\n SubSelectKeys<Q, X>,\n SubSelectRDPs<RDPs, X>\n >\n >;\n\n /**\n * Returns an async iterator to load all objects of this type\n * @example\n * for await (const obj of myObjectSet.asyncIter()){\n * // Handle obj\n * }\n * @returns an async iterator to load all objects\n */\n <\n L extends PropertyKeys<Q> | (string & keyof RDPs),\n R extends boolean,\n const A extends Augments,\n S extends NullabilityAdherence = NullabilityAdherence.Default,\n T extends boolean = false,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n >(\n args?: AsyncIterArgs<Q, L, R, A, S, T, never, ORDER_BY_OPTIONS>,\n ): AsyncIterableIterator<\n MaybeScore<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S, T>,\n NoInfer<SubSelectKeys<Q, NonNullable<typeof args>>>,\n SubSelectRDPs<RDPs, NonNullable<typeof args>>\n >,\n ORDER_BY_OPTIONS\n >\n >;\n}\n\ninterface AsyncIter<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> {\n asyncIter: AsyncIterSignature<Q, RDPs, ORDER_BY_OPTIONS>;\n}\n\ninterface WithProperties<\n Q extends ObjectOrInterfaceDefinition = any,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> {\n readonly withProperties: <\n NEW extends Record<string, SimplePropertyDef>,\n >(\n clause: { [K in keyof NEW]: DerivedPropertyCreator<Q, NEW[K]> },\n ) => ObjectSet<\n Q,\n {\n [NN in keyof NEW | keyof RDPs]: NN extends keyof NEW ? NEW[NN]\n : NN extends keyof RDPs ? RDPs[NN]\n : never;\n }\n >;\n}\n\nexport interface ObjectSet<\n Q extends ObjectOrInterfaceDefinition = any,\n // Generated code has what is basically ObjectSet<Q> set in here\n // but we never used it so I am repurposing it for RDP\n UNUSED_OR_RDP extends\n | BaseObjectSet<Q>\n | Record<string, SimplePropertyDef> = never,\n> extends\n ObjectSetCleanedTypes<\n Q,\n ExtractRdp<UNUSED_OR_RDP>,\n MergeObjectSet<Q, ExtractRdp<UNUSED_OR_RDP>>\n >\n{\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Aggregate<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Aggregate on a field in an object type\n * @param req - an aggregation request where you can select fields and choose how to aggregate, e.g., max, min, avg, and also choose\n * whether or not you order your results. You can also specify a groupBy field to group your aggregations\n * @example\n * const testAggregateCountWithGroups = await client(BoundariesUsState)\n .aggregate({\n $select: {\n $count: \"unordered\",\n \"latitude:max\": \"unordered\",\n \"latitude:min\": \"unordered\",\n \"latitude:avg\": \"unordered\",\n },\n $groupBy: {\n usState: \"exact\",\n longitude: {\n $fixedWidth: 10,\n },\n },\n });\n\n * @returns aggregation results, sorted in the groups based on the groupBy clause (if applicable)\n */\n readonly aggregate: <AO extends AggregateOpts<Q>>(\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n ) => Promise<AggregationsResults<Q, AO>>;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface SetArithmetic<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Unions object sets together\n * @param objectSets - objectSets you want to union with\n * @example\n * const unionObjectSet = complexFilteredEmployeeObjectSet.union(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the unioned object set\n */\n readonly union: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the intersection of object sets\n * @param objectSets - objectSets you want to intersect with\n * @example\n * const intersectedObjectSet = complexFilteredEmployeeObjectSet.intersect(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the intersected object set\n */\n readonly intersect: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n\n /**\n * Computes the subtraction of object sets\n * @param objectSets - objectSets you want to subtract from\n * @example\n * const subtractObjectSet = complexFilteredEmployeeObjectSet.subtract(\n simpleFilteredEmployeeObjectSet,\n );\n * @returns the subtract object set\n */\n readonly subtract: (\n ...objectSets: ReadonlyArray<CompileTimeMetadata<Q>[\"objectSet\"]>\n ) => this;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface PivotTo<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Pivots the object set over to all its linked objects of the specified type\n * @param type - The linked object type you want to pivot to\n * @returns an object set of the specified linked type\n */\n readonly pivotTo: <L extends LinkNames<Q>>(\n type: L,\n ) => ObjectSet<LinkedType<Q, L>>;\n}\n\ninterface FetchOneSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, without a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >;\n}\n\ninterface FetchOneWithErrorsSignature<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n /**\n * Fetches one object with the specified primary key, with a result wrapper\n */\n <\n const L extends PropertyKeys<Q> | (string & keyof RDPs),\n const R extends boolean,\n const S extends false | \"throw\" = NullabilityAdherence.Default,\n >(\n primaryKey: PrimaryKeyType<Q>,\n options?: SelectArg<Q, L, R, S>,\n ): Promise<\n Result<\n Osdk.Instance<\n Q,\n ExtractOptions<R, S>,\n NoInfer<SubSelectKeys<Q, { $select: Array<L> }>>,\n SubSelectRDPs<RDPs, { $select: Array<L> }>\n >\n >\n >;\n}\n\ninterface FetchOne<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n> {\n fetchOne: Q extends ObjectTypeDefinition ? FetchOneSignature<Q, RDPs> : never;\n fetchOneWithErrors: Q extends ObjectTypeDefinition\n ? FetchOneWithErrorsSignature<Q, RDPs>\n : never;\n}\n\n// Q is the merged type here! Not renaming to keep diff small. Rename in follow up\ninterface Subscribe<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Request updates when the objects in an object set are added, updated, or removed.\n * @param listener - The handlers to be executed during the lifecycle of the subscription.\n * @param opts - Options to modify what properties are returned on subscription updates.\n * @returns an object containing a function to unsubscribe.\n */\n readonly subscribe: <\n const P extends PropertyKeys<Q>,\n >(\n listener: ObjectSetSubscription.Listener<Q, P>,\n opts?: ObjectSetSubscription.Options<Q, P>,\n ) => { unsubscribe: () => void };\n}\n\ninterface ObjectSetCleanedTypes<\n Q extends ObjectOrInterfaceDefinition,\n D extends Record<string, SimplePropertyDef>,\n MERGED extends ObjectOrInterfaceDefinition & Q,\n ORDER_BY_OPTIONS extends ObjectSetArgs.OrderByOptions<PropertyKeys<Q>> = {},\n> extends\n MinimalObjectSet<Q, D, ORDER_BY_OPTIONS>,\n WithProperties<Q, D>,\n Aggregate<MERGED>,\n SetArithmetic<MERGED>,\n PivotTo<Q>,\n FetchOne<Q, D>,\n Subscribe<MERGED>,\n NearestNeighbors<Q>\n{\n}\n"],"mappings":"","ignoreList":[]}
@@ -39,6 +39,9 @@ export function createMockObjectSet() {
39
39
  return fauxObjectSet;
40
40
  }),
41
41
  fetchPage: vi.fn(() => Promise.resolve(fauxResults)),
42
+ fetchPageWithErrors: vi.fn(() => Promise.resolve({
43
+ value: fauxResults
44
+ })),
42
45
  fetchOne: vi.fn(() => fauxObject),
43
46
  asyncIter: vi.fn(() => {
44
47
  return {};
@@ -485,6 +488,17 @@ describe("ObjectSet", () => {
485
488
  }
486
489
  });
487
490
  });
491
+ it("allows adding literals via base.constant", () => {
492
+ fauxObjectSet.withProperties({
493
+ "myProp1": base => {
494
+ const plus = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.double(1));
495
+ expectTypeOf(plus).toEqualTypeOf();
496
+ const intPlusIntReturnsInt = base.pivotTo("lead").selectProperty("employeeId").add(base.constant.integer(1));
497
+ expectTypeOf(intPlusIntReturnsInt).toEqualTypeOf();
498
+ return plus;
499
+ }
500
+ });
501
+ });
488
502
  it("allows correctly typed nested property definitions", () => {
489
503
  fauxObjectSet.withProperties({
490
504
  "myProp1": base => {
@@ -530,6 +544,17 @@ describe("ObjectSet", () => {
530
544
  }
531
545
  });
532
546
  });
547
+ it("allows adding literals via base.constant", () => {
548
+ fauxObjectSet.withProperties({
549
+ "myProp1": base => {
550
+ const dateAndDateReturnDate = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.datetime("2025-01-01T00:00:00Z"));
551
+ expectTypeOf(dateAndDateReturnDate).toEqualTypeOf();
552
+ const dateAndTimeReturnTime = base.pivotTo("lead").selectProperty("dateOfJoining").min(base.constant.timestamp("2025-01-01T00:00:00Z"));
553
+ expectTypeOf(dateAndTimeReturnTime).toEqualTypeOf();
554
+ return dateAndTimeReturnTime;
555
+ }
556
+ });
557
+ });
533
558
  it("allows correctly typed nested property definitions", () => {
534
559
  fauxObjectSet.withProperties({
535
560
  "myProp1": base => {
@@ -579,6 +604,54 @@ describe("ObjectSet", () => {
579
604
  // @ts-expect-error
580
605
  "skillSet");
581
606
  });
607
+ it("appropriately types fetchPage ordered by relevance", async () => {
608
+ const nearestNeighborsObjectSet = await fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding").fetchPage({
609
+ $orderBy: "relevance"
610
+ });
611
+ expectTypeOf(nearestNeighborsObjectSet.data[0]).toEqualTypeOf();
612
+ });
613
+ it("appropriately types fetchPageWithErrors ordered by relevance", async () => {
614
+ const nearestNeighborsObjectSetWithErrors = await fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding").fetchPageWithErrors({
615
+ $orderBy: "relevance"
616
+ });
617
+ expectTypeOf(nearestNeighborsObjectSetWithErrors.value.data[0]).toEqualTypeOf();
618
+ });
619
+ it("appropriately types asyncIters ordered by relevance", () => {
620
+ const asyncIter = fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding").asyncIter({
621
+ $orderBy: "relevance"
622
+ });
623
+ expectTypeOf(asyncIter).toEqualTypeOf();
624
+ });
625
+ it("no arbitrary order bys", () => {
626
+ const knn = fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding");
627
+
628
+ // @ts-expect-error
629
+ void knn.fetchPage({
630
+ $orderBy: "invalid"
631
+ });
632
+ // @ts-expect-error
633
+ void knn.fetchPageWithErrors({
634
+ $orderBy: "invalid"
635
+ });
636
+ // @ts-expect-error
637
+ void knn.asyncIter({
638
+ $orderBy: "random"
639
+ });
640
+ });
641
+ it("does not include score for property order by", async () => {
642
+ const nearestNeighborsObjectSet = await fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding").fetchPage({
643
+ $orderBy: {
644
+ "fullName": "desc"
645
+ }
646
+ });
647
+ expectTypeOf(nearestNeighborsObjectSet.data[0]).not.toHaveProperty("$score");
648
+ const nearestNeighborsObjectSetWithErrors = await fauxObjectSet.nearestNeighbors("textQuery", 3, "skillSetEmbedding").fetchPageWithErrors({
649
+ $orderBy: {
650
+ "fullName": "desc"
651
+ }
652
+ });
653
+ expectTypeOf(nearestNeighborsObjectSetWithErrors.value?.data[0]).not.toHaveProperty("$score");
654
+ });
582
655
  });
583
656
  });
584
657
  //# sourceMappingURL=ObjectSet.test.js.map