@osdk/api 2.2.0-beta.7 → 2.2.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/build/browser/OsdkBase.js.map +1 -1
- package/build/browser/OsdkObjectFrom.js.map +1 -1
- package/build/browser/aggregate/AggregatableKeys.js.map +1 -1
- package/build/browser/experimental/fetchPageByRid.js +22 -0
- package/build/browser/experimental/fetchPageByRid.js.map +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/object/FetchPageArgs.js.map +1 -1
- package/build/browser/object/FetchPageResult.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +2 -6
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/ontology/ObjectSpecifier.js +2 -0
- package/build/browser/ontology/ObjectSpecifier.js.map +1 -0
- package/build/browser/ontology/ObjectSpecifier.test.js +53 -0
- package/build/browser/ontology/ObjectSpecifier.test.js.map +1 -0
- package/build/browser/ontology/QueryDefinition.js.map +1 -1
- package/build/browser/public/unstable.js +1 -0
- package/build/browser/public/unstable.js.map +1 -1
- package/build/browser/test/EmployeeApiTest.js +21 -0
- package/build/browser/test/EmployeeApiTest.js.map +1 -0
- package/build/browser/test/FooInterfaceApiTest.js +22 -0
- package/build/browser/test/FooInterfaceApiTest.js.map +1 -0
- package/build/cjs/{FilteredPropertyKeys-DQJEjgBE.d.cts → FilteredPropertyKeys-qAMesbuN.d.cts} +21 -14
- package/build/cjs/index.d.cts +8 -4
- package/build/cjs/public/unstable.cjs +8 -0
- package/build/cjs/public/unstable.cjs.map +1 -1
- package/build/cjs/public/unstable.d.cts +8 -3
- package/build/esm/OsdkBase.js.map +1 -1
- package/build/esm/OsdkObjectFrom.js.map +1 -1
- package/build/esm/aggregate/AggregatableKeys.js.map +1 -1
- package/build/esm/experimental/fetchPageByRid.js +22 -0
- package/build/esm/experimental/fetchPageByRid.js.map +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/object/FetchPageArgs.js.map +1 -1
- package/build/esm/object/FetchPageResult.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +2 -6
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/ontology/ObjectSpecifier.js +2 -0
- package/build/esm/ontology/ObjectSpecifier.js.map +1 -0
- package/build/esm/ontology/ObjectSpecifier.test.js +53 -0
- package/build/esm/ontology/ObjectSpecifier.test.js.map +1 -0
- package/build/esm/ontology/QueryDefinition.js.map +1 -1
- package/build/esm/public/unstable.js +1 -0
- package/build/esm/public/unstable.js.map +1 -1
- package/build/esm/test/EmployeeApiTest.js +21 -0
- package/build/esm/test/EmployeeApiTest.js.map +1 -0
- package/build/esm/test/FooInterfaceApiTest.js +22 -0
- package/build/esm/test/FooInterfaceApiTest.js.map +1 -0
- package/build/types/OsdkBase.d.ts +2 -0
- package/build/types/OsdkBase.d.ts.map +1 -1
- package/build/types/OsdkObjectFrom.d.ts +12 -8
- package/build/types/OsdkObjectFrom.d.ts.map +1 -1
- package/build/types/aggregate/AggregatableKeys.d.ts +1 -1
- package/build/types/aggregate/AggregatableKeys.d.ts.map +1 -1
- package/build/types/experimental/fetchPageByRid.d.ts +15 -0
- package/build/types/experimental/fetchPageByRid.d.ts.map +1 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/object/FetchPageArgs.d.ts +6 -3
- package/build/types/object/FetchPageArgs.d.ts.map +1 -1
- package/build/types/object/FetchPageResult.d.ts +6 -4
- package/build/types/object/FetchPageResult.d.ts.map +1 -1
- package/build/types/objectSet/ObjectSet.d.ts +9 -6
- package/build/types/objectSet/ObjectSet.d.ts.map +1 -1
- package/build/types/ontology/ObjectSpecifier.d.ts +5 -0
- package/build/types/ontology/ObjectSpecifier.d.ts.map +1 -0
- package/build/types/ontology/ObjectSpecifier.test.d.ts +1 -0
- package/build/types/ontology/ObjectSpecifier.test.d.ts.map +1 -0
- package/build/types/ontology/QueryDefinition.d.ts +5 -1
- package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
- package/build/types/public/unstable.d.ts +1 -0
- package/build/types/public/unstable.d.ts.map +1 -1
- package/build/types/test/EmployeeApiTest.d.ts +64 -0
- package/build/types/test/EmployeeApiTest.d.ts.map +1 -0
- package/build/types/test/FooInterfaceApiTest.d.ts +50 -0
- package/build/types/test/FooInterfaceApiTest.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","Employee","type","apiName","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 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, test, vi } from \"vitest\";\n\nimport type {\n ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n Osdk,\n PropertyDef as $PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nnamespace Employee {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<Employee>;\n readonly peeps: Employee.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Employee, Employee.ObjectSet> {}\n}\n\ninterface Employee extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: Employee.ObjectSet;\n props: Employee.Props;\n linksType: Employee.Links;\n strictProps: Employee.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<Employee, false>;\n peeps: $ObjectMetadata.Link<Employee, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nconst Employee: Employee = {\n type: \"object\",\n apiName: \"Employee\",\n};\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as Employee.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<Employee, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"string\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }>\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, PropertyKeys<Employee>, {}>\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<Employee, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n Employee,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<Employee, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n Employee,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\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,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAiF7D,MAAMC,QAAkB,GAAG;EACzBC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC;AAEDP,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMQ,aAAa,GAAG;IACpBC,KAAK,EAAEL,EAAE,CAACM,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEP,EAAE,CAACM,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAER,EAAE,CAACM,EAAE,CAAC,MAAMG,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC;IACzCC,SAAS,EAAEX,EAAE,CAACM,EAAE,CAAC,MAAM;MACrB,OAAO,CAAC,CAAC;IACX,CAAC;EACH,CAA8B;EAE9BV,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACvBG,IAAI,CAAC,aAAa,EAAE,YAAY;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AACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFlB,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BM,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ObjectSet.test.js","names":["describe","expectTypeOf","it","test","vi","fauxObjectSet","where","fn","withProperties","fetchPage","Promise","resolve","asyncIter","toEqualTypeOf","withA","base","pivotTo","aggregate","withFamily","selectProperty","withMom","withParents","todo","withAggregations","$select"],"sources":["ObjectSet.test.ts"],"sourcesContent":["/*\n * Copyright 2025 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, test, vi } from \"vitest\";\n\nimport type { ObjectSet as $ObjectSet, Osdk, PropertyKeys } from \"../index.js\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\n\ndescribe(\"ObjectSet\", () => {\n const fauxObjectSet = {\n where: vi.fn(() => {\n return fauxObjectSet;\n }),\n withProperties: vi.fn(() => {\n return fauxObjectSet;\n }),\n fetchPage: vi.fn(() => Promise.resolve()),\n asyncIter: vi.fn(() => {\n return {};\n }),\n } as any as EmployeeApiTest.ObjectSet;\n\n describe(\"normal\", () => {\n test(\"select none\", async () => {\n const result = await fauxObjectSet.fetchPage();\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never>\n >();\n });\n\n test(\"select one\", async () => {\n const result = await fauxObjectSet.fetchPage({ \"$select\": [\"fullName\"] });\n expectTypeOf<typeof result.data[0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"fullName\">\n >();\n });\n });\n\n describe(\".withProperties\", () => {\n test(\"single property\", async () => {\n const withA = fauxObjectSet.withProperties({\n \"a\": (base) => {\n return base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\");\n },\n });\n\n expectTypeOf(withA).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n a: \"integer\";\n }>\n >();\n\n const withAResults = await withA.fetchPage();\n\n expectTypeOf<typeof withAResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n a: \"integer\";\n }>\n >();\n\n expectTypeOf<typeof withAResults[\"data\"][0][\"a\"]>()\n .toEqualTypeOf<number>();\n });\n\n test(\"multiple properties\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n expectTypeOf(withFamily).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"dad\"]>()\n .toEqualTypeOf<string | undefined>();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"sister\"]>()\n .toEqualTypeOf<string[] | undefined>();\n });\n\n describe(\"called in succession\", () => {\n test(\"independently\", () => {\n const withMom = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n const withParents = withMom.withProperties({\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n });\n\n expectTypeOf(withParents).toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n }>\n >();\n });\n\n test.todo(\"with calculated properties\");\n });\n\n describe(\"nullability\", () => {\n it(\"count, exactDistinct, and approximateDistinct aren't nullable\", async () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:exactDistinct\"),\n \"sis\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:approximateDistinct\"),\n });\n\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>().toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, PropertyKeys<EmployeeApiTest>, {\n mom: \"integer\";\n dad: \"integer\";\n sis: \"integer\";\n }>\n >();\n });\n\n it(\n \"collectToSet, collectToList, selectProperty, and numeric aggregations are nullable\",\n async () => {\n const withAggregations = fauxObjectSet.withProperties({\n \"collectSet\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"class:collectSet\"),\n \"select\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"collectList\": (base) =>\n base.pivotTo(\"lead\").aggregate(\"booleanProp:collectSet\"),\n \"min\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:max\"),\n \"max\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:min\"),\n \"sum\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:sum\"),\n \"avg\": (base) => base.pivotTo(\"lead\").aggregate(\"employeeId:avg\"),\n \"approximatePercentile\": (base) =>\n base.pivotTo(\"lead\").aggregate(\n \"employeeId:approximatePercentile\",\n ),\n });\n\n const withAggregationResults = await withAggregations.fetchPage();\n\n expectTypeOf<typeof withAggregationResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n collectSet: \"string\"[] | undefined;\n select: \"string\" | undefined;\n collectList: \"boolean\"[] | undefined;\n min: \"double\" | undefined;\n max: \"double\" | undefined;\n sum: \"double\" | undefined;\n avg: \"double\" | undefined;\n approximatePercentile: \"double\" | undefined;\n }\n >\n >();\n },\n );\n });\n\n describe(\"fetch functions return correct Osdk.Instance\", () => {\n const withFamily = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n \"dad\": (base) => base.pivotTo(\"lead\").selectProperty(\"fullName\"),\n \"sister\": (base) => base.pivotTo(\"lead\").aggregate(\"class:collectList\"),\n });\n\n it(\"works with .where\", async () => {\n const where = withFamily.where({ \"mom\": 1 });\n const whereResults = await where.fetchPage();\n\n expectTypeOf<typeof where>().toEqualTypeOf<typeof withFamily>();\n expectTypeOf<typeof whereResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"works with .async\", () => {\n const asyncIter = withFamily.asyncIter();\n expectTypeOf<typeof asyncIter>().toEqualTypeOf<\n AsyncIterableIterator<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >\n >();\n });\n\n it(\"Works with no select\", async () => {\n const withFamilyResults = await withFamily.fetchPage();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }\n >\n >();\n });\n\n it(\"Works with selecting all RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\", \"dad\", \"sister\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n dad: \"string\" | undefined;\n sister: \"string\"[] | undefined;\n }>\n >();\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"mom\"]>()\n .toEqualTypeOf<number>();\n });\n\n it(\"Works with selecting some RDPs\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, never, {\n mom: \"integer\";\n }>\n >();\n });\n\n it(\"Works with selecting all non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"fullName\", \"employeeId\", \"booleanProp\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n PropertyKeys<EmployeeApiTest>,\n {}\n >\n >();\n expectTypeOf<typeof withFamilyResults[\"data\"][0][\"class\"]>()\n .toEqualTypeOf<\n string | undefined\n >();\n });\n\n it(\"Works with selecting some non-RDP's\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<EmployeeApiTest, never, \"class\", {}>\n >();\n });\n\n it(\"Works with selecting a mix\", async () => {\n const withFamilyResults = await withFamily.fetchPage({\n $select: [\"class\", \"mom\"],\n });\n\n expectTypeOf<typeof withFamilyResults[\"data\"][0]>()\n .toEqualTypeOf<\n Osdk.Instance<\n EmployeeApiTest,\n never,\n \"class\",\n { mom: \"integer\" }\n >\n >();\n });\n });\n\n it(\"allows extracting the type\", () => {\n const objectSet = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n });\n\n type ObjectSetType = typeof objectSet;\n\n expectTypeOf<ObjectSetType>().toEqualTypeOf<\n $ObjectSet<EmployeeApiTest, {\n mom: \"integer\";\n }>\n >();\n\n const objectSet2 = fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\n });\n\n it(\"Defining the Type\", () => {\n type ObjectSetType = $ObjectSet<\n EmployeeApiTest,\n {\n mom: \"integer\" | undefined;\n }\n >;\n\n fauxObjectSet.withProperties({\n \"mom\": (base) => base.pivotTo(\"lead\").aggregate(\"$count\"),\n }) satisfies ObjectSetType;\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,EAAEC,IAAI,EAAEC,EAAE,QAAQ,QAAQ;AAK7DJ,QAAQ,CAAC,WAAW,EAAE,MAAM;EAC1B,MAAMK,aAAa,GAAG;IACpBC,KAAK,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAM;MACjB,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFG,cAAc,EAAEJ,EAAE,CAACG,EAAE,CAAC,MAAM;MAC1B,OAAOF,aAAa;IACtB,CAAC,CAAC;IACFI,SAAS,EAAEL,EAAE,CAACG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AC,4BAA4B,EAAE,MAAM;MACnBG,aAAa,CAACG,cAAc,CAAC;QAC7C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;MAIFhB,YAAY,CAAgB,CAAC,CAACY,aAAa,CAIzC,CAAC;MAEgBR,aAAa,CAACG,cAAc,CAAC;QAC9C,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFf,EAAE,CAAC,mBAAmB,EAAE,MAAM;MAQ5BG,aAAa,CAACG,cAAc,CAAC;QAC3B,KAAK,EAAGO,IAAI,IAAKA,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC,CAACC,SAAS,CAAC,QAAQ;MAC1D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectSpecifier.js","names":[],"sources":["ObjectSpecifier.ts"],"sourcesContent":["/*\n * Copyright 2025 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 InterfaceDefinition,\n InterfaceMetadata,\n} from \"./InterfaceDefinition.js\";\nimport type { ObjectOrInterfaceDefinition } from \"./ObjectOrInterface.js\";\n\nexport type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {\n __apiName:\n | Q[\"apiName\"]\n | (Q extends InterfaceDefinition\n ? NonNullable<Q[\"__DefinitionMetadata\"]> extends InterfaceMetadata\n ? NonNullable<\n NonNullable<Q[\"__DefinitionMetadata\"]>[\"implementedBy\"]\n >[number]\n : never\n : never);\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expectTypeOf, it, vi } from "vitest";
|
|
18
|
+
describe("ObjectSpecifier", () => {
|
|
19
|
+
const fauxObjectSet = {
|
|
20
|
+
fetchOne: vi.fn(() => Promise.resolve(() => ""))
|
|
21
|
+
};
|
|
22
|
+
it("should only work with same Object Specifier", async () => {
|
|
23
|
+
expectTypeOf().toMatchTypeOf();
|
|
24
|
+
const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
|
|
25
|
+
const specifier = EmployeeApiTest.$objectSpecifier;
|
|
26
|
+
expectTypeOf(specifier).toMatchTypeOf();
|
|
27
|
+
expectTypeOf().toMatchTypeOf();
|
|
28
|
+
});
|
|
29
|
+
describe("interfaces", () => {
|
|
30
|
+
const fauxInterfaceObjectSet = {
|
|
31
|
+
fetchPage: vi.fn(() => Promise.resolve({
|
|
32
|
+
data: [""]
|
|
33
|
+
}))
|
|
34
|
+
};
|
|
35
|
+
it("should work with loaded interfaces", async () => {
|
|
36
|
+
expectTypeOf().toMatchTypeOf();
|
|
37
|
+
const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();
|
|
38
|
+
const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;
|
|
39
|
+
expectTypeOf(specifier).toMatchTypeOf();
|
|
40
|
+
});
|
|
41
|
+
it("should only work with known object types", async () => {
|
|
42
|
+
const EmployeeApiTest = await fauxObjectSet.fetchOne(123);
|
|
43
|
+
const specifier = EmployeeApiTest.$objectSpecifier;
|
|
44
|
+
expectTypeOf(specifier).toMatchTypeOf();
|
|
45
|
+
const FooInterfaceApiTest = (await fauxInterfaceObjectSet.fetchPage()).data[0];
|
|
46
|
+
FooInterfaceApiTest.$objectSpecifier;
|
|
47
|
+
expectTypeOf().toMatchTypeOf();
|
|
48
|
+
expectTypeOf().toMatchTypeOf // @ts-expect-error
|
|
49
|
+
();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=ObjectSpecifier.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectSpecifier.test.js","names":["describe","expectTypeOf","it","vi","fauxObjectSet","fetchOne","fn","Promise","resolve","toMatchTypeOf","EmployeeApiTest","specifier","$objectSpecifier","fauxInterfaceObjectSet","fetchPage","data","FooInterfaceApiTest"],"sources":["ObjectSpecifier.test.ts"],"sourcesContent":["/*\n * Copyright 2025 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, vi } from \"vitest\";\nimport type { EmployeeApiTest } from \"../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../test/FooInterfaceApiTest.js\";\nimport type { ObjectSpecifier } from \"./ObjectSpecifier.js\";\n\ndescribe(\"ObjectSpecifier\", () => {\n const fauxObjectSet = {\n fetchOne: vi.fn(() => Promise.resolve(() => \"\")),\n } as any as EmployeeApiTest.ObjectSet;\n\n it(\"should only work with same Object Specifier\", async () => {\n type EmployeeObjectSpecifier = ObjectSpecifier<EmployeeApiTest>;\n\n expectTypeOf<EmployeeObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier: EmployeeObjectSpecifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSpecifier>().toMatchTypeOf<\n // @ts-expect-error\n EmployeeObjectId\n >();\n });\n\n describe(\"interfaces\", () => {\n const fauxInterfaceObjectSet = {\n fetchPage: vi.fn(() => Promise.resolve({ data: [\"\"] })),\n } as any as FooInterfaceApiTest.ObjectSet;\n\n it(\"should work with loaded interfaces\", async () => {\n type FooInterfaceObjectSpecifier = ObjectSpecifier<FooInterfaceApiTest>;\n\n expectTypeOf<FooInterfaceObjectSpecifier>().toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n\n const FooInterfaceApiTest = await fauxInterfaceObjectSet.fetchPage();\n\n const specifier = FooInterfaceApiTest.data[0].$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"FooInterface\" | \"Employee\" }\n >();\n });\n\n it(\"should only work with known object types\", async () => {\n const EmployeeApiTest = await fauxObjectSet.fetchOne(123);\n\n const specifier = EmployeeApiTest.$objectSpecifier;\n\n expectTypeOf(specifier).toMatchTypeOf<\n string & { __apiName: \"Employee\" }\n >();\n\n const FooInterfaceApiTest =\n (await fauxInterfaceObjectSet.fetchPage()).data[0];\n\n const fooInterfaceObjectSpecifier = FooInterfaceApiTest.$objectSpecifier;\n\n expectTypeOf<typeof specifier>().toMatchTypeOf<\n typeof fooInterfaceObjectSpecifier\n >();\n\n type NonEmployeeObjectSpecifier = ObjectSpecifier<\n { apiName: \"NotEmployee\"; osdkMetadata: any; type: \"object\" }\n >;\n\n expectTypeOf<NonEmployeeObjectSpecifier>().toMatchTypeOf // @ts-expect-error\n <typeof fooInterfaceObjectSpecifier>();\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,EAAEC,EAAE,QAAQ,QAAQ;AAKvDH,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAChC,MAAMI,aAAa,GAAG;IACpBC,QAAQ,EAAEF,EAAE,CAACG,EAAE,CAAC,MAAMC,OAAO,CAACC,OAAO,CAAC,MAAM,EAAE,CAAC;EACjD,CAAqC;EAErCN,EAAE,CAAC,6CAA6C,EAAE,YAAY;IAG5DD,YAAY,CAA0B,CAAC,CAACQ,aAAa,CAEnD,CAAC;IAEH,MAAMC,eAAe,GAAG,MAAMN,aAAa,CAACC,QAAQ,CAAC,GAAG,CAAC;IAEzD,MAAMM,SAAkC,GAAGD,eAAe,CAACE,gBAAgB;IAE3EX,YAAY,CAACU,SAAS,CAAC,CAACF,aAAa,CAEnC,CAAC;IAMHR,YAAY,CAA6B,CAAC,CAACQ,aAAa,CAGtD,CAAC;EACL,CAAC,CAAC;EAEFT,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC3B,MAAMa,sBAAsB,GAAG;MAC7BC,SAAS,EAAEX,EAAE,CAACG,EAAE,CAAC,MAAMC,OAAO,CAACC,OAAO,CAAC;QAAEO,IAAI,EAAE,CAAC,EAAE;MAAE,CAAC,CAAC;IACxD,CAAyC;IAEzCb,EAAE,CAAC,oCAAoC,EAAE,YAAY;MAGnDD,YAAY,CAA8B,CAAC,CAACQ,aAAa,CAEvD,CAAC;MAEH,MAAMO,mBAAmB,GAAG,MAAMH,sBAAsB,CAACC,SAAS,CAAC,CAAC;MAEpE,MAAMH,SAAS,GAAGK,mBAAmB,CAACD,IAAI,CAAC,CAAC,CAAC,CAACH,gBAAgB;MAE9DX,YAAY,CAACU,SAAS,CAAC,CAACF,aAAa,CAEnC,CAAC;IACL,CAAC,CAAC;IAEFP,EAAE,CAAC,0CAA0C,EAAE,YAAY;MACzD,MAAMQ,eAAe,GAAG,MAAMN,aAAa,CAACC,QAAQ,CAAC,GAAG,CAAC;MAEzD,MAAMM,SAAS,GAAGD,eAAe,CAACE,gBAAgB;MAElDX,YAAY,CAACU,SAAS,CAAC,CAACF,aAAa,CAEnC,CAAC;MAEH,MAAMO,mBAAmB,GACvB,CAAC,MAAMH,sBAAsB,CAACC,SAAS,CAAC,CAAC,EAAEC,IAAI,CAAC,CAAC,CAAC;MAEhBC,mBAAmB,CAACJ,gBAAgB;MAExEX,YAAY,CAAmB,CAAC,CAACQ,aAAa,CAE5C,CAAC;MAMHR,YAAY,CAA6B,CAAC,CAACQ,aAAa,CAAC;MAAA,CACpB,CAAC;IACxC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"QueryDefinition.js","names":[],"sources":["QueryDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OsdkMetadata } from \"../OsdkMetadata.js\";\nimport type { ObjectTypeDefinition } from \"./ObjectTypeDefinition.js\";\n\nexport interface QueryMetadata {\n type: \"query\";\n apiName: string;\n description?: string;\n displayName?: string;\n version: string;\n parameters: Record<string, QueryParameterDefinition<any>>;\n output: QueryDataTypeDefinition;\n rid: string;\n}\n\nexport interface QueryCompileTimeMetadata<T> {\n signature: T;\n}\n\nexport interface QueryDefinition<T = any> {\n type: \"query\";\n apiName: string;\n osdkMetadata?: OsdkMetadata;\n __DefinitionMetadata?:\n & QueryCompileTimeMetadata<T>\n & QueryMetadata;\n}\n\nexport type QueryParameterDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> = {\n description?: string;\n} & QueryDataTypeDefinition<T_Target>;\n\nexport type QueryDataTypeDefinition<\n T_Target extends ObjectTypeDefinition = any,\n> =\n | PrimitiveDataType\n | ObjectQueryDataType<T_Target>\n | ObjectSetQueryDataType<T_Target>\n | SetQueryDataType\n | UnionQueryDataType\n | StructQueryDataType\n | TwoDimensionalAggregationDataType\n | ThreeDimensionalAggregationDataType\n | MapDataType;\n\nexport type BaseQueryDataTypeDefinition<T extends string> = {\n multiplicity?: boolean;\n nullable?: boolean;\n type: T;\n};\n\nexport type WireQueryDataTypes =\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"timestamp\"\n | \"attachment\";\n\nexport type PrimitiveDataType<\n Q extends WireQueryDataTypes = WireQueryDataTypes,\n> = BaseQueryDataTypeDefinition<Q>;\n\nexport interface ObjectQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"object\"> {\n object: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface ObjectSetQueryDataType<\n T_Target extends ObjectTypeDefinition = never,\n> extends BaseQueryDataTypeDefinition<\"objectSet\"> {\n objectSet: string;\n __OsdkTargetType?: T_Target;\n}\n\nexport interface SetQueryDataType extends BaseQueryDataTypeDefinition<\"set\"> {\n set: QueryDataTypeDefinition;\n}\n\nexport interface UnionQueryDataType\n extends BaseQueryDataTypeDefinition<\"union\">\n{\n union: ReadonlyArray<QueryDataTypeDefinition>;\n}\n\nexport interface StructQueryDataType\n extends BaseQueryDataTypeDefinition<\"struct\">\n{\n struct: Record<string, QueryDataTypeDefinition>;\n}\n\nexport interface TwoDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"twoDimensionalAggregation\">\n{\n twoDimensionalAggregation: TwoDimensionalQueryAggregationDefinition;\n}\n\nexport interface ThreeDimensionalAggregationDataType\n extends BaseQueryDataTypeDefinition<\"threeDimensionalAggregation\">\n{\n threeDimensionalAggregation: ThreeDimensionalQueryAggregationDefinition;\n}\n\nexport interface MapDataType extends BaseQueryDataTypeDefinition<\"map\"> {\n keyType: QueryDataTypeDefinition;\n valueType: QueryDataTypeDefinition;\n}\n\nexport type AggregationKeyDataType<V = any> =\n | SimpleAggregationKeyDataType<V>\n | RangeAggregationKeyDataType<V>;\n\nexport interface SimpleAggregationKeyDataType<V = any> {\n keyType: Exclude<AggregationKeyTypes, \"range\">;\n valueType: V;\n}\nexport interface RangeAggregationKeyDataType<V = any> {\n keyType: \"range\";\n keySubtype: AggregationRangeKeyTypes;\n valueType: V;\n}\n\nexport type TwoDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n AggregationValueTypes\n>;\n\nexport type ThreeDimensionalQueryAggregationDefinition = AggregationKeyDataType<\n TwoDimensionalQueryAggregationDefinition\n>;\n\nexport type AggregationKeyTypes =\n | \"boolean\"\n | \"string\"\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\"\n | \"range\";\n\nexport type AggregationRangeKeyTypes =\n | \"date\"\n | \"double\"\n | \"integer\"\n | \"timestamp\";\n\nexport type AggregationValueTypes = \"date\" | \"double\" | \"timestamp\";\n"],"mappings":"","ignoreList":[]}
|
|
@@ -16,5 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from "../experimental/createMediaReference.js";
|
|
18
18
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from "../experimental/fetchOneByRid.js";
|
|
19
|
+
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from "../experimental/fetchPageByRid.js";
|
|
19
20
|
export { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from "../experimental/getBulkLinks.js";
|
|
20
21
|
//# sourceMappingURL=unstable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.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 type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"unstable.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid","__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks"],"sources":["unstable.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 type { Experiment, ExperimentFns } from \"../experimental/Experiment.js\";\n\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference } from \"../experimental/createMediaReference.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid } from \"../experimental/fetchOneByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid } from \"../experimental/fetchPageByRid.js\";\nexport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks } from \"../experimental/getBulkLinks.js\";\n\nexport type { EXPERIMENTAL_BulkLinkResult } from \"../objectSet/BulkLinkResult.js\";\nexport type { MinimalObjectSet } from \"../objectSet/ObjectSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,uDAAuD,QAAQ,yCAAyC;AACjH,SAASC,gDAAgD,QAAQ,kCAAkC;AACnG,SAASC,iDAAiD,QAAQ,mCAAmC;AACrG,SAASC,+CAA+C,QAAQ,iCAAiC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const EmployeeApiTest = {
|
|
18
|
+
type: "object",
|
|
19
|
+
apiName: "Employee"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=EmployeeApiTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmployeeApiTest.js","names":["EmployeeApiTest","type","apiName"],"sources":["EmployeeApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 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 ObjectMetadata as $ObjectMetadata,\n ObjectSet as $ObjectSet,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n} from \"../index.js\";\n\nexport namespace EmployeeApiTest {\n export type PropertyKeys =\n | \"employeeId\"\n | \"fullName\"\n | \"class\"\n | \"booleanProp\";\n\n export interface Links {\n readonly lead: $SingleLinkAccessor<EmployeeApiTest>;\n readonly peeps: EmployeeApiTest.ObjectSet;\n }\n\n export interface Props {\n readonly class: $PropType[\"string\"] | undefined;\n readonly fullName: $PropType[\"string\"] | undefined;\n readonly employeeId: $PropType[\"integer\"] | undefined;\n readonly booleanProp: $PropType[\"boolean\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<EmployeeApiTest, EmployeeApiTest.ObjectSet>\n {}\n}\n\nexport interface EmployeeApiTest extends $ObjectTypeDefinition {\n type: \"object\";\n apiName: \"Employee\";\n __DefinitionMetadata?: {\n objectSet: EmployeeApiTest.ObjectSet;\n props: EmployeeApiTest.Props;\n linksType: EmployeeApiTest.Links;\n strictProps: EmployeeApiTest.StrictProps;\n apiName: \"Employee\";\n description: \"A full-time or part-time \\n\\n employee of our firm\";\n displayName: \"Employee\";\n icon: {\n type: \"blueprint\";\n color: \"blue\";\n name: \"person\";\n };\n implements: [\"FooInterface\"];\n interfaceMap: {\n FooInterface: {\n fooSpt: \"fullName\";\n };\n };\n inverseInterfaceMap: {\n FooInterface: {\n fullName: \"fooSpt\";\n };\n };\n links: {\n lead: $ObjectMetadata.Link<EmployeeApiTest, false>;\n peeps: $ObjectMetadata.Link<EmployeeApiTest, true>;\n };\n pluralDisplayName: \"Employees\";\n primaryKeyApiName: \"employeeId\";\n primaryKeyType: \"integer\";\n properties: {\n class: $PropertyDef<\"string\", \"nullable\", \"single\">;\n fullName: $PropertyDef<\"string\", \"nullable\", \"single\">;\n employeeId: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n booleanProp: $PropertyDef<\"boolean\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\";\n status: \"ACTIVE\";\n titleProperty: \"fullName\";\n type: \"object\";\n visibility: \"NORMAL\";\n };\n}\n\nexport const EmployeeApiTest: EmployeeApiTest = {\n type: \"object\",\n apiName: \"Employee\",\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoFA,OAAO,MAAMA,eAAgC,GAAG;EAC9CC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const FooInterfaceApiTest = {
|
|
18
|
+
type: "interface",
|
|
19
|
+
apiName: "FooInterface",
|
|
20
|
+
osdkMetadata: {}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=FooInterfaceApiTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooInterfaceApiTest.js","names":["FooInterfaceApiTest","type","apiName","osdkMetadata"],"sources":["FooInterfaceApiTest.ts"],"sourcesContent":["/*\n * Copyright 2025 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 InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyDef as $PropertyDef,\n PropertyValueWireToClient as $PropType,\n} from \"../index.js\";\n\nexport type OsdkObjectLinks$FooInterface = {};\n\nexport namespace FooInterfaceApiTest {\n export type PropertyKeys = \"name\" | \"description\";\n\n export interface Props {\n readonly description: $PropType[\"string\"] | undefined;\n readonly name: $PropType[\"string\"] | undefined;\n }\n export type StrictProps = Props;\n\n export interface ObjectSet\n extends $ObjectSet<FooInterfaceApiTest, FooInterfaceApiTest.ObjectSet>\n {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = $Osdk.Instance<FooInterfaceApiTest, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof FooInterfaceApiTest.Props = keyof FooInterfaceApiTest.Props,\n > = OsdkInstance<OPTIONS, K>;\n}\n\nexport interface FooInterfaceApiTest extends $InterfaceDefinition {\n osdkMetadata: any;\n type: \"interface\";\n apiName: \"FooInterface\";\n __DefinitionMetadata?: {\n objectSet: FooInterfaceApiTest.ObjectSet;\n props: FooInterfaceApiTest.Props;\n linksType: OsdkObjectLinks$FooInterface;\n strictProps: FooInterfaceApiTest.StrictProps;\n apiName: \"FooInterface\";\n description: \"Its a Foo.\";\n displayName: \"Foo interface\";\n links: {};\n properties: {\n /**\n * display name: 'Description',\n * description: Description of Description\n */\n description: $PropertyDef<\"string\", \"nullable\", \"single\">;\n /**\n * display name: 'Name',\n * description: Name of Foo\n */\n name: $PropertyDef<\"string\", \"nullable\", \"single\">;\n };\n rid: \"ri.ontology.main.interface-type.1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b\";\n type: \"interface\";\n implementedBy: [\"Employee\"];\n };\n}\n\nexport const FooInterfaceApiTest: FooInterfaceApiTest = {\n type: \"interface\",\n apiName: \"FooInterface\",\n osdkMetadata: {},\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoEA,OAAO,MAAMA,mBAAwC,GAAG;EACtDC,IAAI,EAAE,WAAW;EACjBC,OAAO,EAAE,cAAc;EACvBC,YAAY,EAAE,CAAC;AACjB,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropertyValueWireToClient } from "./mapping/PropertyValueMapping.js";
|
|
2
2
|
import type { ObjectOrInterfaceDefinition } from "./ontology/ObjectOrInterface.js";
|
|
3
|
+
import type { ObjectSpecifier } from "./ontology/ObjectSpecifier.js";
|
|
3
4
|
import type { ObjectTypeDefinition } from "./ontology/ObjectTypeDefinition.js";
|
|
4
5
|
import type { PrimaryKeyTypes } from "./ontology/PrimaryKeyTypes.js";
|
|
5
6
|
import type { OsdkObjectPrimaryKeyType } from "./OsdkObjectPrimaryKeyType.js";
|
|
@@ -8,5 +9,6 @@ export type OsdkBase<Q extends ObjectOrInterfaceDefinition> = {
|
|
|
8
9
|
readonly $objectType: string
|
|
9
10
|
readonly $primaryKey: PrimaryKeyType<Q>
|
|
10
11
|
readonly $title: string | undefined
|
|
12
|
+
readonly $objectSpecifier: ObjectSpecifier<Q>
|
|
11
13
|
};
|
|
12
14
|
export type PrimaryKeyType<Q extends ObjectOrInterfaceDefinition> = (Q extends ObjectTypeDefinition ? OsdkObjectPrimaryKeyType<Q> : unknown) & PropertyValueWireToClient[PrimaryKeyTypes];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,iCAAiC,mCAAoC;AACnF,cAAc,mCAAmC,iCAAkC;AACnF,cAAc,4BAA4B,oCAAqC;AAC/E,cAAc,uBAAuB,+BAAgC;AACrE,cAAc,gCAAgC,+BAAgC;AAE9E,YAAY,SACV,UAAU,+BACR;UACO,UAAU,EAAE;UAEZ;UAEA,aAAa,eAAe;UAE5B;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,iCAAiC,mCAAoC;AACnF,cAAc,mCAAmC,iCAAkC;AACnF,cAAc,uBAAuB,+BAAgC;AACrE,cAAc,4BAA4B,oCAAqC;AAC/E,cAAc,uBAAuB,+BAAgC;AACrE,cAAc,gCAAgC,+BAAgC;AAE9E,YAAY,SACV,UAAU,+BACR;UACO,UAAU,EAAE;UAEZ;UAEA,aAAa,eAAe;UAE5B;UAEA,kBAAkB,gBAAgB;AAC5C;AAED,YAAY,eAAe,UAAU,gCAChC,UAAU,uBAAuB,yBAAyB,gBAI3D,0BAA0B","names":[],"sources":["../../src/OsdkBase.ts"],"version":3,"file":"OsdkBase.d.ts"}
|
|
@@ -20,8 +20,9 @@ export type PropMapToObject<
|
|
|
20
20
|
export type MapPropNamesToObjectType<
|
|
21
21
|
FROM extends ObjectOrInterfaceDefinition,
|
|
22
22
|
TO extends ObjectTypeDefinition,
|
|
23
|
-
P extends ValidOsdkPropParams<FROM
|
|
24
|
-
|
|
23
|
+
P extends ValidOsdkPropParams<FROM>,
|
|
24
|
+
OPTIONS extends never | "$rid" | "$allBaseProperties" = never
|
|
25
|
+
> = "$allBaseProperties" extends OPTIONS ? PropertyKeys<FROM> extends P ? PropertyKeys<TO> : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>] : PropMapToObject<FROM, TO>[JustProps<FROM, P> & keyof PropMapToObject<FROM, TO>];
|
|
25
26
|
export type PropMapToInterface<
|
|
26
27
|
FROM extends ObjectTypeDefinition,
|
|
27
28
|
TO extends InterfaceDefinition
|
|
@@ -39,8 +40,9 @@ export type MapPropNamesToInterface<
|
|
|
39
40
|
export type ConvertProps<
|
|
40
41
|
FROM extends ObjectOrInterfaceDefinition,
|
|
41
42
|
TO extends ValidToFrom<FROM>,
|
|
42
|
-
P extends ValidOsdkPropParams<FROM
|
|
43
|
-
|
|
43
|
+
P extends ValidOsdkPropParams<FROM>,
|
|
44
|
+
OPTIONS extends never | "$rid" | "$allBaseProperties" = never
|
|
45
|
+
> = TO extends FROM ? P : TO extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToObjectType<FROM, TO, P, OPTIONS>, P extends "$rid" ? true : false, "$rid">) : TO extends InterfaceDefinition ? FROM extends ObjectTypeDefinition ? (UnionIfTrue<MapPropNamesToInterface<FROM, TO, P>, P extends "$rid" ? true : false, "$rid">) : never : never;
|
|
44
46
|
/** DO NOT EXPORT FROM PACKAGE */
|
|
45
47
|
export type ValidToFrom<FROM extends ObjectOrInterfaceDefinition> = FROM extends InterfaceDefinition ? ObjectOrInterfaceDefinition : InterfaceDefinition;
|
|
46
48
|
export type IsNever<T> = [T] extends [never] ? true : false;
|
|
@@ -65,14 +67,14 @@ export type Osdk<
|
|
|
65
67
|
export declare namespace Osdk {
|
|
66
68
|
type Instance<
|
|
67
69
|
Q extends ObjectOrInterfaceDefinition,
|
|
68
|
-
OPTIONS extends never | "$rid" = never,
|
|
70
|
+
OPTIONS extends never | "$rid" | "$allBaseProperties" = never,
|
|
69
71
|
P extends PropertyKeys<Q> = PropertyKeys<Q>,
|
|
70
72
|
R extends Record<string, SimplePropertyDef> = {}
|
|
71
73
|
> = OsdkBase<Q> & Pick<CompileTimeMetadata<Q>["props"], GetPropsKeys<Q, P, [R] extends [{}] ? false : true>> & ([R] extends [never] ? {} : { [A in keyof R] : SimplePropertyDef.ToRuntimeProperty<R[A]> }) & {
|
|
72
74
|
readonly $link: Q extends {
|
|
73
75
|
linksType?: any
|
|
74
76
|
} ? Q["linksType"] : Q extends ObjectTypeDefinition ? OsdkObjectLinksObject<Q> : never
|
|
75
|
-
readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P>>
|
|
77
|
+
readonly $as: <NEW_Q extends ValidToFrom<Q>>(type: NEW_Q | string) => Osdk.Instance<NEW_Q, OPTIONS, ConvertProps<Q, NEW_Q, P, OPTIONS>>
|
|
76
78
|
readonly $clone: <NEW_PROPS extends PropertyKeys<Q>>(updatedObject?: Osdk.Instance<Q, any, NEW_PROPS> | { [K in NEW_PROPS]? : CompileTimeMetadata<Q>["props"][K] }) => Osdk.Instance<Q, OPTIONS, P | NEW_PROPS>
|
|
77
79
|
} & (IsNever<OPTIONS> extends true ? {} : IsAny<OPTIONS> extends true ? {} : "$rid" extends OPTIONS ? {
|
|
78
80
|
readonly $rid: string
|
|
@@ -92,8 +94,10 @@ export type ExtractStrictOption<S extends NullabilityAdherence> = IsNever<S> ext
|
|
|
92
94
|
* Anything you throw at this that is not exactly `true` should always be `never`.
|
|
93
95
|
*/
|
|
94
96
|
export type ExtractRidOption<R extends boolean> = IsNever<R> extends true ? never : DefaultToFalse<R> extends false ? never : "$rid";
|
|
97
|
+
export type ExtractAllPropertiesOption<T extends boolean> = IsNever<T> extends true ? never : DefaultToFalse<T> extends false ? never : "$allBaseProperties";
|
|
95
98
|
export type ExtractOptions<
|
|
96
99
|
R extends boolean,
|
|
97
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
98
|
-
|
|
100
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
101
|
+
T extends boolean = false
|
|
102
|
+
> = ExtractRidOption<R> | ExtractAllPropertiesOption<T>;
|
|
99
103
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,gBACA,6BACK,kCAAmC;AAC1C,cAAc,4BAA4B,2BAA4B;AACtE,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,2BAA2B,mCAAoC;AAC7E,cACE,6BACA,oBACK,iCAAkC;AACzC,cACE,qBACA,4BACK,oCAAqC;AAC5C,cAAc,yBAAyB,iCAAkC;AACzE,cAAc,gBAAgB,eAAgB;KAYzC,wBACD,SACA,SACA,YACA;KAEC,oBAAoB,UAAU,+BAC/B,wBACA,aAAa;AAEjB,YAAY,gBACV,UAAU,+BACR,oBAAoB,GAAG;AAE3B,YAAY;CACV,UAAU;CACV,UAAU,oBAAoB;IAC5B,UAAU,SAAS,aAAa,KAChC,QAAQ,GAAG;AAEf,YAAY;CACV,aAAa;CACb,WAAW;IACT,YAAY,oBAAoB,IAAI,iBAAiB,gBAAgB;AAEzE,YAAY;CACV,aAAa;CACb,WAAW;CACX,UAAU,oBAAoB;
|
|
1
|
+
{"mappings":"AAgBA,cACE,gBACA,6BACK,kCAAmC;AAC1C,cAAc,4BAA4B,2BAA4B;AACtE,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,2BAA2B,mCAAoC;AAC7E,cACE,6BACA,oBACK,iCAAkC;AACzC,cACE,qBACA,4BACK,oCAAqC;AAC5C,cAAc,yBAAyB,iCAAkC;AACzE,cAAc,gBAAgB,eAAgB;KAYzC,wBACD,SACA,SACA,YACA;KAEC,oBAAoB,UAAU,+BAC/B,wBACA,aAAa;AAEjB,YAAY,gBACV,UAAU,+BACR,oBAAoB,GAAG;AAE3B,YAAY;CACV,UAAU;CACV,UAAU,oBAAoB;IAC5B,UAAU,SAAS,a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_Q | string","updatedObject?:\n | Osdk.Instance<Q, any, NEW_PROPS>\n | {\n [K in NEW_PROPS]?: CompileTimeMetadata<\n Q\n >[\"props\"][K];\n }"],"sources":["../../src/OsdkObjectFrom.ts"],"version":3,"file":"OsdkObjectFrom.d.ts"}
|
|
@@ -7,7 +7,7 @@ export type NumericAggregateOption = "min" | "max" | "sum" | "avg" | "approximat
|
|
|
7
7
|
type AGG_FOR_TYPE<
|
|
8
8
|
T,
|
|
9
9
|
U extends boolean
|
|
10
|
-
> = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : never;
|
|
10
|
+
> = number extends T ? U extends true ? NumericAggregateOption : NumericWithPropAggregateOption : string extends T ? U extends true ? StringAggregateOption : StringWithPropAggregateOption : boolean extends T ? U extends true ? never : StringWithPropAggregateOption : never;
|
|
11
11
|
export type ValidAggregationKeys<
|
|
12
12
|
Q extends ObjectOrInterfaceDefinition,
|
|
13
13
|
R extends "aggregate" | "withPropertiesAggregate" = "aggregate"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,gCACA,qCACK,0DAA2D;AAClE,cACE,sCACK,oCAAqC;AAC5C,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,wBAAwB,wBAAwB;AAC5D,YAAY,yBACR,QACA,QACA,QACA,QACA,wBACA;KAEC;CAAa;CAAG;mBAAoC,IACrD,UAAU,OAAO,yBAAyB,gDAC3B,IACb,UAAU,OAAO,wBAAwB;
|
|
1
|
+
{"mappings":"AAgBA,cACE,gCACA,qCACK,0DAA2D;AAClE,cACE,sCACK,oCAAqC;AAC5C,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,wBAAwB,wBAAwB;AAC5D,YAAY,yBACR,QACA,QACA,QACA,QACA,wBACA;KAEC;CAAa;CAAG;mBAAoC,IACrD,UAAU,OAAO,yBAAyB,gDAC3B,IACb,UAAU,OAAO,wBAAwB,gDAC3B,IAAI,UAAU,eAAe;AAGjD,YAAY;CACV,UAAU;CACV,UAAU,cAAc,4BAA4B;cAIhD,MAAM,iBAAiB,SAAS,eAAe,aAC7C,+BACE,oBAAoB,GAAG,cAAc,IAAI,UAE3C,UAAU,cAAc,OAAO,qBAInC;CAAE;AAAc;AAGpB,YAAY,iBACV,UAAU,wCAET,KAAK,aAAa","names":[],"sources":["../../../src/aggregate/AggregatableKeys.ts"],"version":3,"file":"AggregatableKeys.d.ts"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FetchPageArgs, NullabilityAdherence } from "../object/FetchPageArgs.js";
|
|
2
|
+
import type { FetchPageResult } from "../object/FetchPageResult.js";
|
|
3
|
+
import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
|
|
4
|
+
import type { Experiment } from "./Experiment.js";
|
|
5
|
+
type fetchPageByRidFn = <
|
|
6
|
+
Q extends ObjectOrInterfaceDefinition,
|
|
7
|
+
const L extends PropertyKeys<Q>,
|
|
8
|
+
const R extends boolean,
|
|
9
|
+
const S extends NullabilityAdherence,
|
|
10
|
+
const T extends boolean
|
|
11
|
+
>(objectType: Q, rids: string[], options?: FetchPageArgs<Q, L, R, any, S>) => Promise<FetchPageResult<Q, L, R, S, T>>;
|
|
12
|
+
export declare const __EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<"2.2.0", "__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid", {
|
|
13
|
+
fetchPageByRid: fetchPageByRidFn
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,eACA,4BACK,4BAA6B;AACpC,cAAc,uBAAuB,8BAA+B;AAEpE,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,kBAAkB,iBAAkB;KAE7C;CACH,UAAU;OACJ,UAAU,aAAa;OACvB;OACA,UAAU;OACV;EAENA,YAAY,GACZC,gBACAC,UAAU,cAAc,GAAG,GAAG,QAAQ,OACnC,QAAQ,gBAAgB,GAAG,GAAG,GAAG,GAAG;AAEzC,OAAO,cAAMC,mDAAmD,WAC9D,SACA,qDACA;CAAE,gBAAgB;AAAkB","names":["objectType: Q","rids: string[]","options?: FetchPageArgs<Q, L, R, any, S>","__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid: Experiment<\n \"2.2.0\",\n \"__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid\",\n { fetchPageByRid: fetchPageByRidFn }\n>"],"sources":["../../../src/experimental/fetchPageByRid.ts"],"version":3,"file":"fetchPageByRid.d.ts"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type { ActionDefinition, ActionMetadata } from "./ontology/ActionDefinit
|
|
|
30
30
|
export type { FilteredPropertyKeys } from "./ontology/FilteredPropertyKeys.js";
|
|
31
31
|
export type { InterfaceDefinition, InterfaceMetadata } from "./ontology/InterfaceDefinition.js";
|
|
32
32
|
export type { ObjectOrInterfaceDefinition, PropertyKeys } from "./ontology/ObjectOrInterface.js";
|
|
33
|
+
export type { ObjectSpecifier } from "./ontology/ObjectSpecifier.js";
|
|
33
34
|
export type { CompileTimeMetadata, ObjectMetadata, ObjectTypeDefinition, PropertyDef, VersionBound } from "./ontology/ObjectTypeDefinition.js";
|
|
34
35
|
export type { OntologyMetadata } from "./ontology/OntologyMetadata.js";
|
|
35
36
|
export type { PrimaryKeyTypes } from "./ontology/PrimaryKeyTypes.js";
|
|
@@ -39,6 +40,7 @@ export type { OsdkBase, PrimaryKeyType } from "./OsdkBase.js";
|
|
|
39
40
|
export type { OsdkObject } from "./OsdkObject.js";
|
|
40
41
|
export type { ConvertProps, Osdk } from "./OsdkObjectFrom.js";
|
|
41
42
|
export type { PageResult } from "./PageResult.js";
|
|
43
|
+
export type { Range, ThreeDimensionalAggregation, TwoDimensionalAggregation } from "./queries/Aggregations.js";
|
|
42
44
|
export type { QueryParam, QueryResult } from "./queries/Queries.js";
|
|
43
45
|
export { TimeseriesDurationMapping } from "./timeseries/timeseries.js";
|
|
44
46
|
export type { GeotimeSeriesProperty, TimeSeriesPoint, TimeSeriesProperty, TimeSeriesQuery } from "./timeseries/timeseries.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,eAAc,kCAAkC;AAChD,eACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,eAAc,4BAA4B;AAC1C,eAAc,qBAAqB;AACnC,eAAc,sEAAsE;AACpF,eAAc,oCAAoC;AAClD,eAAc,uCAAuC;AACrD,eAAc,yBAAyB;AACvC,eAAc,2BAA2B;AACzC,eAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,eACE,sBACA,kBACA,4BACA,mBACK;AACP,eAAc,8BAA8B;AAC5C,eACE,uBACA,0BACK;AACP,eAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,eACE,kBACA,eACA,oBACK;AACP,eACE,uBACA,oBACA,uBACA,6BACK;AACP,eACE,iCACK;AACP,eAAc,YAAY,wBAAwB;AAClD,eACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,eACE,iBACA,wBACK;AACP,eAAc,OAAO,eAAe,sBAAsB;AAC1D,SAAS,YAAY;AACrB,eAAc,cAAc;AAC5B,eAAc,qBAAqB;AACnC,eAAc,iBAAiB;AAC/B,eAAc,6BAA6B;AAC3C,eACE,kBACA,sBACK;AACP,eAAc,4BAA4B;AAC1C,eACE,qBACA,yBACK;AACP,eACE,6BACA,oBACK;AACP,eACE,qBACA,gBACA,sBACA,aACA,oBACK;AACP,eAAc,wBAAwB;AACtC,eAAc,uBAAuB;AACrC,eACE,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,eACE,uBACA,yBACK;AACP,eAAc,UAAU,sBAAsB;AAC9C,eAAc,kBAAkB;AAChC,eAAc,cAAc,YAAY;AACxC,eAAc,kBAAkB;AAChC,eAAc,YAAY,mBAAmB;AAC7C,SAAS,iCAAiC;AAC1C,eACE,uBACA,iBACA,oBACA,uBACK;AACP,eAAc,YAAY,iBAAiB;AAC3C","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,eAAc,kCAAkC;AAChD,eACE,oBACA,aACA,0BACA,oBACA,+BACK;AACP,eAAc,4BAA4B;AAC1C,eAAc,qBAAqB;AACnC,eAAc,sEAAsE;AACpF,eAAc,oCAAoC;AAClD,eAAc,uCAAuC;AACrD,eAAc,yBAAyB;AACvC,eAAc,2BAA2B;AACzC,eAAc,wBAAwB;AACtC,SAAS,2BAA2B;AACpC,eACE,sBACA,kBACA,4BACA,mBACK;AACP,eAAc,8BAA8B;AAC5C,eACE,uBACA,0BACK;AACP,eAAc,uBAAuB;AACrC,SAAS,uBAAuB;AAChC,eACE,kBACA,eACA,oBACK;AACP,eACE,uBACA,oBACA,uBACA,6BACK;AACP,eACE,iCACK;AACP,eAAc,YAAY,wBAAwB;AAClD,eACE,eACA,SACA,UACA,eACA,sBACA,WACA,uBACK;AACP,eACE,iBACA,wBACK;AACP,eAAc,OAAO,eAAe,sBAAsB;AAC1D,SAAS,YAAY;AACrB,eAAc,cAAc;AAC5B,eAAc,qBAAqB;AACnC,eAAc,iBAAiB;AAC/B,eAAc,6BAA6B;AAC3C,eACE,kBACA,sBACK;AACP,eAAc,4BAA4B;AAC1C,eACE,qBACA,yBACK;AACP,eACE,6BACA,oBACK;AACP,eAAc,uBAAuB;AACrC,eACE,qBACA,gBACA,sBACA,aACA,oBACK;AACP,eAAc,wBAAwB;AACtC,eAAc,uBAAuB;AACrC,eACE,qBACA,wBACA,yBACA,iBACA,eACA,0BACA,4CACA,gDACK;AACP,eACE,uBACA,yBACK;AACP,eAAc,UAAU,sBAAsB;AAC9C,eAAc,kBAAkB;AAChC,eAAc,cAAc,YAAY;AACxC,eAAc,kBAAkB;AAChC,eACE,OACA,6BACA,iCACK;AACP,eAAc,YAAY,mBAAmB;AAC7C,SAAS,iCAAiC;AAC1C,eACE,uBACA,iBACA,oBACA,uBACK;AACP,eAAc,YAAY,iBAAiB;AAC3C","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -28,8 +28,9 @@ export interface FetchPageArgs<
|
|
|
28
28
|
K extends PropertyKeys<Q> = PropertyKeys<Q>,
|
|
29
29
|
R extends boolean = false,
|
|
30
30
|
A extends Augments = never,
|
|
31
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
32
|
-
|
|
31
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
32
|
+
T extends boolean = false
|
|
33
|
+
> extends AsyncIterArgs<Q, K, R, A, S, T> {
|
|
33
34
|
$nextPageToken?: string;
|
|
34
35
|
$pageSize?: number;
|
|
35
36
|
}
|
|
@@ -38,9 +39,11 @@ export interface AsyncIterArgs<
|
|
|
38
39
|
K extends PropertyKeys<Q> = PropertyKeys<Q>,
|
|
39
40
|
R extends boolean = false,
|
|
40
41
|
A extends Augments = never,
|
|
41
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
42
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
43
|
+
T extends boolean = false
|
|
42
44
|
> extends SelectArg<Q, K, R, S>, OrderByArg<Q, PropertyKeys<Q>> {
|
|
43
45
|
$__UNSTABLE_useOldInterfaceApis?: boolean;
|
|
46
|
+
$includeAllBaseObjectProperties?: T;
|
|
44
47
|
}
|
|
45
48
|
export type Augment<
|
|
46
49
|
X extends ObjectOrInterfaceDefinition,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAE/E,YAAY,uBAAuB,QAAQ,UAAU;AACrD,yBAAiB;MACH,UAAU;;AAGxB,iBAAiB;CACf,UAAU;CACV,UAAU,aA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AG,IAAI,WAAW,GAAG,aAAa,IAAI;CAC9D;CACA,kCAAkC;AACnC;AAED,YAAY;CACV,UAAU;CACV;OACK,KAAK,oBAAoB,GAAG,cAAa;AAEhD,YAAY,WAAW","names":[],"sources":["../../../src/object/FetchPageArgs.ts"],"version":3,"file":"FetchPageArgs.d.ts"}
|
|
@@ -24,8 +24,9 @@ export type FetchPageResult<
|
|
|
24
24
|
Q extends ObjectOrInterfaceDefinition,
|
|
25
25
|
L extends PropertyKeys<Q>,
|
|
26
26
|
R extends boolean,
|
|
27
|
-
S extends NullabilityAdherence
|
|
28
|
-
|
|
27
|
+
S extends NullabilityAdherence,
|
|
28
|
+
T extends boolean
|
|
29
|
+
> = PageResult<PropertyKeys<Q> extends L ? Osdk.Instance<Q, ExtractOptions<R, S, T>> : Osdk.Instance<Q, ExtractOptions<R, S, T>, L>>;
|
|
29
30
|
/**
|
|
30
31
|
* Helper type for converting fetch options into an Osdk object
|
|
31
32
|
*/
|
|
@@ -34,6 +35,7 @@ export type SingleOsdkResult<
|
|
|
34
35
|
L extends PropertyKeys<Q> | (keyof RDPs & string),
|
|
35
36
|
R extends boolean,
|
|
36
37
|
S extends NullabilityAdherence,
|
|
37
|
-
RDPs extends Record<string, SimplePropertyDef> = {}
|
|
38
|
-
|
|
38
|
+
RDPs extends Record<string, SimplePropertyDef> = {},
|
|
39
|
+
T extends boolean = false
|
|
40
|
+
> = Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>;
|
|
39
41
|
export type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,gBAAgB,SAAS,YAAY,sBAAuB;AAC1E,cAAc,kBAAkB,kBAAmB;AACnD,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Result.d.ts"}
|
|
@@ -43,8 +43,9 @@ interface FetchPage<
|
|
|
43
43
|
L extends PropertyKeys<Q, RDPs>,
|
|
44
44
|
R extends boolean,
|
|
45
45
|
const A extends Augments,
|
|
46
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
47
|
-
|
|
46
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
47
|
+
T extends boolean = false
|
|
48
|
+
>(args?: FetchPageArgs<Q, L, R, A, S, T>) => Promise<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>;
|
|
48
49
|
/**
|
|
49
50
|
* Gets a page of objects of this type, with a result wrapper
|
|
50
51
|
* @param args - Args to specify next page token and page size, if applicable
|
|
@@ -63,8 +64,9 @@ interface FetchPage<
|
|
|
63
64
|
L extends PropertyKeys<Q, RDPs>,
|
|
64
65
|
R extends boolean,
|
|
65
66
|
const A extends Augments,
|
|
66
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
67
|
-
|
|
67
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
68
|
+
T extends boolean = false
|
|
69
|
+
>(args?: FetchPageArgs<Q, L, R, A, S, T>) => Promise<Result<PageResult<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>>>;
|
|
68
70
|
}
|
|
69
71
|
interface Where<
|
|
70
72
|
Q extends ObjectOrInterfaceDefinition,
|
|
@@ -98,8 +100,9 @@ interface AsyncIter<
|
|
|
98
100
|
L extends PropertyKeys<Q, RDPs>,
|
|
99
101
|
R extends boolean,
|
|
100
102
|
const A extends Augments,
|
|
101
|
-
S extends NullabilityAdherence = NullabilityAdherence.Default
|
|
102
|
-
|
|
103
|
+
S extends NullabilityAdherence = NullabilityAdherence.Default,
|
|
104
|
+
T extends boolean = false
|
|
105
|
+
>(args?: AsyncIterArgs<Q, L, R, A, S, T>) => AsyncIterableIterator<Osdk.Instance<Q, ExtractOptions<R, S, T>, PropertyKeys<Q> extends L ? PropertyKeys<Q> : PropertyKeys<Q> & L, { [K in Extract<keyof RDPs, L>] : RDPs[K] }>>;
|
|
103
106
|
}
|
|
104
107
|
interface WithProperties<
|
|
105
108
|
Q extends ObjectOrInterfaceDefinition = any,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,qBAAqB,+BAAgC;AACnE,cAAc,sEAAsE,yCAA0C;AAC9H,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,uBAAuB,yCAA0C;AAC/E,cACE,eACA,UACA,eACA,sBACA,iBACK,4BAA6B;AACpC,cAAc,cAAc,qBAAsB;AAElD,cACE,oCACA,6BACA,oBACK,kCAAmC;AAC1C,cACE,qBACA,4BACK,qCAAsC;AAC7C,cAAc,yBAAyB,kCAAmC;AAC1E,cAAc,sBAAsB,gBAAiB;AACrD,cAAc,gBAAgB,YAAY,sBAAuB;AACjE,cAAc,kBAAkB,kBAAmB;AACnD,cAAc,YAAY,iBAAiB,sBAAuB;AAClE,cAAc,qBAAqB,oBAAqB;AACxD,cAAc,6BAA6B,wBAAyB;KAE/D;CACH,UAAU;CACV,UAAU,UAAU,KAAK,eAAe,qBAAqB,CAAE;IAC7D,UAAU,eAAe,qBACzB,mCAAmC,sBAAsB,GAAG,KAC5D;KAEC,WACH,UAAU,sBAAsB,eAAe,sBAC7C,UAAU,eAAe,qBAAqB,IAAI,CAAE;AAExD,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;UAEnD,cAAc,IACd,UAAU,GAAG,OACb,UAAU,GAAG,OACb,MAAM,GAAG,MACX,CACC;UAGS;CACR,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;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,UAAU,QACZ,CACC","names":["args?: FetchPageArgs<Q, L, R, A, S, T>","clause: WhereClause<MergeObjectSet<Q, RDPs>>","args?: AsyncIterArgs<Q, L, R, A, S, T>","clause: { [K in keyof NEW]: DerivedProperty.Selector<Q, NEW[K]> }","req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>","type: L","primaryKey: PrimaryKeyType<Q>","options?: SelectArg<Q, L, R, S>","listener: ObjectSetSubscription.Listener<Q, P>","opts?: ObjectSetSubscription.Options<Q, P>"],"sources":["../../../src/objectSet/ObjectSet.ts"],"version":3,"file":"ObjectSet.d.ts"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InterfaceDefinition, InterfaceMetadata } from "./InterfaceDefinition.js";
|
|
2
|
+
import type { ObjectOrInterfaceDefinition } from "./ObjectOrInterface.js";
|
|
3
|
+
export type ObjectSpecifier<Q extends ObjectOrInterfaceDefinition> = string & {
|
|
4
|
+
__apiName: Q["apiName"] | (Q extends InterfaceDefinition ? NonNullable<Q["__DefinitionMetadata"]> extends InterfaceMetadata ? NonNullable<NonNullable<Q["__DefinitionMetadata"]>["implementedBy"]>[number] : never : never)
|
|
5
|
+
};
|