@osdk/client 2.8.0-beta.24 → 2.8.0-beta.26

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 (97) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/build/browser/actions/applyAction.js +4 -4
  3. package/build/browser/actions/applyAction.js.map +1 -1
  4. package/build/browser/fetchMetadata.js +1 -1
  5. package/build/browser/fetchMetadata.js.map +1 -1
  6. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +11 -0
  7. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  8. package/build/browser/internal/conversions/toIntervalQuery.js +56 -0
  9. package/build/browser/internal/conversions/toIntervalQuery.js.map +1 -0
  10. package/build/browser/observable/ObservableClient.js.map +1 -1
  11. package/build/browser/observable/internal/BulkObjectLoader.js +16 -11
  12. package/build/browser/observable/internal/BulkObjectLoader.js.map +1 -1
  13. package/build/browser/observable/internal/evaluateFilter.js +1 -0
  14. package/build/browser/observable/internal/evaluateFilter.js.map +1 -1
  15. package/build/browser/observable/internal/list/ListCacheKey.js +1 -0
  16. package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
  17. package/build/browser/observable/internal/list/ListQuery.js +3 -0
  18. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  19. package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
  20. package/build/browser/observable/internal/list/ListsHelper.js +3 -2
  21. package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
  22. package/build/browser/observable/internal/object/ObjectQuery.js +6 -3
  23. package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
  24. package/build/browser/observable/internal/object/ObjectsHelper.js +3 -2
  25. package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
  26. package/build/browser/observable/internal/objectset/ObjectSetCacheKey.js.map +1 -1
  27. package/build/browser/observable/internal/objectset/ObjectSetHelper.js +3 -0
  28. package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  29. package/build/browser/observable/internal/objectset/ObjectSetQuery.js +3 -0
  30. package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  31. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  32. package/build/browser/util/UserAgent.js +2 -2
  33. package/build/cjs/{chunk-R7OP6A6S.cjs → chunk-BWOPPEUP.cjs} +82 -34
  34. package/build/cjs/chunk-BWOPPEUP.cjs.map +1 -0
  35. package/build/cjs/{chunk-3C3ITRZO.cjs → chunk-YKQ5QTEF.cjs} +44 -44
  36. package/build/cjs/chunk-YKQ5QTEF.cjs.map +1 -0
  37. package/build/cjs/index.cjs +10 -10
  38. package/build/cjs/public/internal.cjs +8 -8
  39. package/build/cjs/public/unstable-do-not-use.cjs +106 -86
  40. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  41. package/build/cjs/public/unstable-do-not-use.d.cts +12 -0
  42. package/build/esm/actions/applyAction.js +4 -4
  43. package/build/esm/actions/applyAction.js.map +1 -1
  44. package/build/esm/fetchMetadata.js +1 -1
  45. package/build/esm/fetchMetadata.js.map +1 -1
  46. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +11 -0
  47. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  48. package/build/esm/internal/conversions/toIntervalQuery.js +56 -0
  49. package/build/esm/internal/conversions/toIntervalQuery.js.map +1 -0
  50. package/build/esm/observable/ObservableClient.js.map +1 -1
  51. package/build/esm/observable/internal/BulkObjectLoader.js +16 -11
  52. package/build/esm/observable/internal/BulkObjectLoader.js.map +1 -1
  53. package/build/esm/observable/internal/evaluateFilter.js +1 -0
  54. package/build/esm/observable/internal/evaluateFilter.js.map +1 -1
  55. package/build/esm/observable/internal/list/ListCacheKey.js +1 -0
  56. package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
  57. package/build/esm/observable/internal/list/ListQuery.js +3 -0
  58. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  59. package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
  60. package/build/esm/observable/internal/list/ListsHelper.js +3 -2
  61. package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
  62. package/build/esm/observable/internal/object/ObjectQuery.js +6 -3
  63. package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
  64. package/build/esm/observable/internal/object/ObjectsHelper.js +3 -2
  65. package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
  66. package/build/esm/observable/internal/objectset/ObjectSetCacheKey.js.map +1 -1
  67. package/build/esm/observable/internal/objectset/ObjectSetHelper.js +3 -0
  68. package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
  69. package/build/esm/observable/internal/objectset/ObjectSetQuery.js +3 -0
  70. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  71. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  72. package/build/esm/util/UserAgent.js +2 -2
  73. package/build/types/actions/applyAction.d.ts.map +1 -1
  74. package/build/types/internal/conversions/toIntervalQuery.d.ts +7 -0
  75. package/build/types/internal/conversions/toIntervalQuery.d.ts.map +1 -0
  76. package/build/types/observable/ObservableClient.d.ts +7 -0
  77. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  78. package/build/types/observable/internal/BulkObjectLoader.d.ts +1 -1
  79. package/build/types/observable/internal/BulkObjectLoader.d.ts.map +1 -1
  80. package/build/types/observable/internal/list/ListCacheKey.d.ts +2 -1
  81. package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
  82. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  83. package/build/types/observable/internal/list/ListQueryOptions.d.ts +1 -0
  84. package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
  85. package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
  86. package/build/types/observable/internal/object/ObjectQuery.d.ts +1 -1
  87. package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
  88. package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
  89. package/build/types/observable/internal/objectset/ObjectSetCacheKey.d.ts +1 -0
  90. package/build/types/observable/internal/objectset/ObjectSetCacheKey.d.ts.map +1 -1
  91. package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -1
  92. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  93. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +6 -0
  94. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  95. package/package.json +8 -8
  96. package/build/cjs/chunk-3C3ITRZO.cjs.map +0 -1
  97. package/build/cjs/chunk-R7OP6A6S.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSetHelper.js","names":["getWireObjectSet","AbstractHelper","ObjectSetQuery","ObjectSetHelper","constructor","store","cacheKeys","whereCanonicalizer","orderByCanonicalizer","rdpCanonicalizer","selectCanonicalizer","observe","options","subFn","ret","streamUpdates","query","registerStreamUpdates","subscription","getQuery","baseObjectSet","baseObjectSetWire","JSON","stringify","operations","buildCanonicalizedOperations","objectSetCacheKey","get","queries","subjects","where","canonicalize","withProperties","union","length","map","os","intersect","subtract","pivotTo","orderBy","select","pageSize"],"sources":["ObjectSetHelper.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 { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Observer } from \"../../ObservableClient/common.js\";\nimport { AbstractHelper } from \"../AbstractHelper.js\";\nimport type { CacheKeys } from \"../CacheKeys.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { KnownCacheKey } from \"../KnownCacheKey.js\";\nimport type { OrderByCanonicalizer } from \"../OrderByCanonicalizer.js\";\nimport type { QuerySubscription } from \"../QuerySubscription.js\";\nimport type { RdpCanonicalizer } from \"../RdpCanonicalizer.js\";\nimport type { SelectCanonicalizer } from \"../SelectCanonicalizer.js\";\nimport type { Store } from \"../Store.js\";\nimport type { WhereClauseCanonicalizer } from \"../WhereClauseCanonicalizer.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport { ObjectSetQuery } from \"./ObjectSetQuery.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetHelper extends AbstractHelper<\n ObjectSetQuery,\n ObjectSetQueryOptions\n> {\n whereCanonicalizer: WhereClauseCanonicalizer;\n orderByCanonicalizer: OrderByCanonicalizer;\n rdpCanonicalizer: RdpCanonicalizer;\n selectCanonicalizer: SelectCanonicalizer;\n\n constructor(\n store: Store,\n cacheKeys: CacheKeys<KnownCacheKey>,\n whereCanonicalizer: WhereClauseCanonicalizer,\n orderByCanonicalizer: OrderByCanonicalizer,\n rdpCanonicalizer: RdpCanonicalizer,\n selectCanonicalizer: SelectCanonicalizer,\n ) {\n super(store, cacheKeys);\n\n this.whereCanonicalizer = whereCanonicalizer;\n this.orderByCanonicalizer = orderByCanonicalizer;\n this.rdpCanonicalizer = rdpCanonicalizer;\n this.selectCanonicalizer = selectCanonicalizer;\n }\n\n observe(\n options: ObjectSetQueryOptions,\n subFn: Observer<ObjectSetPayload>,\n ): QuerySubscription<ObjectSetQuery> {\n const ret = super.observe(options, subFn);\n\n if (options.streamUpdates) {\n ret.query.registerStreamUpdates(ret.subscription);\n }\n return ret;\n }\n\n getQuery(options: ObjectSetQueryOptions): ObjectSetQuery {\n const { baseObjectSet } = options;\n const baseObjectSetWire = JSON.stringify(getWireObjectSet(baseObjectSet));\n const operations = this.buildCanonicalizedOperations(options);\n\n const objectSetCacheKey = this.cacheKeys.get<ObjectSetCacheKey>(\n \"objectSet\",\n baseObjectSetWire,\n operations,\n );\n\n return this.store.queries.get(objectSetCacheKey, () => {\n return new ObjectSetQuery(\n this.store,\n this.store.subjects.get(objectSetCacheKey),\n baseObjectSetWire,\n operations,\n objectSetCacheKey,\n options,\n );\n });\n }\n\n private buildCanonicalizedOperations(\n options: ObjectSetQueryOptions,\n ): Canonical<ObjectSetOperations> {\n const operations: ObjectSetOperations = {};\n\n if (options.where) {\n operations.where = this.whereCanonicalizer.canonicalize(options.where);\n }\n\n if (options.withProperties) {\n operations.withProperties = this.rdpCanonicalizer.canonicalize(\n options.withProperties,\n );\n }\n\n if (options.union && options.union.length > 0) {\n operations.union = options.union.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.intersect && options.intersect.length > 0) {\n operations.intersect = options.intersect.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.subtract && options.subtract.length > 0) {\n operations.subtract = options.subtract.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.pivotTo) {\n operations.pivotTo = options.pivotTo as string;\n }\n\n if (options.orderBy) {\n operations.orderBy = this.orderByCanonicalizer.canonicalize(\n options.orderBy,\n );\n }\n\n if (options.select && options.select.length > 0) {\n operations.select = this.selectCanonicalizer.canonicalize(options.select);\n }\n\n if (options.pageSize) {\n operations.pageSize = options.pageSize;\n }\n\n return operations as Canonical<ObjectSetOperations>;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,uCAAuC;AAGxE,SAASC,cAAc,QAAQ,sBAAsB;AAcrD,SAASC,cAAc,QAAQ,qBAAqB;AAGpD,OAAO,MAAMC,eAAe,SAASF,cAAc,C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,CAAC4B,OAAO,EAAE;MACnBhB,UAAU,CAACgB,OAAO,GAAG,IAAI,CAAChC,oBAAoB,CAACuB,YAAY,CACzDnB,OAAO,CAAC4B,OACV,CAAC;IACH;IAEA,IAAI5B,OAAO,CAAC6B,MAAM,IAAI7B,OAAO,CAAC6B,MAAM,CAACP,MAAM,GAAG,CAAC,EAAE;MAC/CV,UAAU,CAACiB,MAAM,GAAG,IAAI,CAAC/B,mBAAmB,CAACqB,YAAY,CAACnB,OAAO,CAAC6B,MAAM,CAAC;IAC3E;IAEA,IAAI7B,OAAO,CAAC8B,QAAQ,EAAE;MACpBlB,UAAU,CAACkB,QAAQ,GAAG9B,OAAO,CAAC8B,QAAQ;IACxC;IAEA,OAAOlB,UAAU;EACnB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSetHelper.js","names":["getWireObjectSet","AbstractHelper","ObjectSetQuery","ObjectSetHelper","constructor","store","cacheKeys","whereCanonicalizer","orderByCanonicalizer","rdpCanonicalizer","selectCanonicalizer","observe","options","subFn","ret","streamUpdates","query","registerStreamUpdates","subscription","getQuery","baseObjectSet","baseObjectSetWire","JSON","stringify","operations","buildCanonicalizedOperations","objectSetCacheKey","get","queries","subjects","where","canonicalize","withProperties","union","length","map","os","intersect","subtract","pivotTo","orderBy","select","pageSize","$loadPropertySecurityMetadata","loadPropertySecurity"],"sources":["ObjectSetHelper.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 { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Observer } from \"../../ObservableClient/common.js\";\nimport { AbstractHelper } from \"../AbstractHelper.js\";\nimport type { CacheKeys } from \"../CacheKeys.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { KnownCacheKey } from \"../KnownCacheKey.js\";\nimport type { OrderByCanonicalizer } from \"../OrderByCanonicalizer.js\";\nimport type { QuerySubscription } from \"../QuerySubscription.js\";\nimport type { RdpCanonicalizer } from \"../RdpCanonicalizer.js\";\nimport type { SelectCanonicalizer } from \"../SelectCanonicalizer.js\";\nimport type { Store } from \"../Store.js\";\nimport type { WhereClauseCanonicalizer } from \"../WhereClauseCanonicalizer.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport { ObjectSetQuery } from \"./ObjectSetQuery.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetHelper extends AbstractHelper<\n ObjectSetQuery,\n ObjectSetQueryOptions\n> {\n whereCanonicalizer: WhereClauseCanonicalizer;\n orderByCanonicalizer: OrderByCanonicalizer;\n rdpCanonicalizer: RdpCanonicalizer;\n selectCanonicalizer: SelectCanonicalizer;\n\n constructor(\n store: Store,\n cacheKeys: CacheKeys<KnownCacheKey>,\n whereCanonicalizer: WhereClauseCanonicalizer,\n orderByCanonicalizer: OrderByCanonicalizer,\n rdpCanonicalizer: RdpCanonicalizer,\n selectCanonicalizer: SelectCanonicalizer,\n ) {\n super(store, cacheKeys);\n\n this.whereCanonicalizer = whereCanonicalizer;\n this.orderByCanonicalizer = orderByCanonicalizer;\n this.rdpCanonicalizer = rdpCanonicalizer;\n this.selectCanonicalizer = selectCanonicalizer;\n }\n\n observe(\n options: ObjectSetQueryOptions,\n subFn: Observer<ObjectSetPayload>,\n ): QuerySubscription<ObjectSetQuery> {\n const ret = super.observe(options, subFn);\n\n if (options.streamUpdates) {\n ret.query.registerStreamUpdates(ret.subscription);\n }\n return ret;\n }\n\n getQuery(options: ObjectSetQueryOptions): ObjectSetQuery {\n const { baseObjectSet } = options;\n const baseObjectSetWire = JSON.stringify(getWireObjectSet(baseObjectSet));\n const operations = this.buildCanonicalizedOperations(options);\n\n const objectSetCacheKey = this.cacheKeys.get<ObjectSetCacheKey>(\n \"objectSet\",\n baseObjectSetWire,\n operations,\n );\n\n return this.store.queries.get(objectSetCacheKey, () => {\n return new ObjectSetQuery(\n this.store,\n this.store.subjects.get(objectSetCacheKey),\n baseObjectSetWire,\n operations,\n objectSetCacheKey,\n options,\n );\n });\n }\n\n private buildCanonicalizedOperations(\n options: ObjectSetQueryOptions,\n ): Canonical<ObjectSetOperations> {\n const operations: ObjectSetOperations = {};\n\n if (options.where) {\n operations.where = this.whereCanonicalizer.canonicalize(options.where);\n }\n\n if (options.withProperties) {\n operations.withProperties = this.rdpCanonicalizer.canonicalize(\n options.withProperties,\n );\n }\n\n if (options.union && options.union.length > 0) {\n operations.union = options.union.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.intersect && options.intersect.length > 0) {\n operations.intersect = options.intersect.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.subtract && options.subtract.length > 0) {\n operations.subtract = options.subtract.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.pivotTo) {\n operations.pivotTo = options.pivotTo as string;\n }\n\n if (options.orderBy) {\n operations.orderBy = this.orderByCanonicalizer.canonicalize(\n options.orderBy,\n );\n }\n\n if (options.select && options.select.length > 0) {\n operations.select = this.selectCanonicalizer.canonicalize(options.select);\n }\n\n if (options.pageSize) {\n operations.pageSize = options.pageSize;\n }\n\n if (options.$loadPropertySecurityMetadata) {\n operations.loadPropertySecurity = true;\n }\n\n return operations as Canonical<ObjectSetOperations>;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAA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IAEA,IAAIxB,OAAO,CAAC2B,OAAO,EAAE;MACnBf,UAAU,CAACe,OAAO,GAAG3B,OAAO,CAAC2B,OAAiB;IAChD;IAEA,IAAI3B,OAAO,CAAC4B,OAAO,EAAE;MACnBhB,UAAU,CAACgB,OAAO,GAAG,IAAI,CAAChC,oBAAoB,CAACuB,YAAY,CACzDnB,OAAO,CAAC4B,OACV,CAAC;IACH;IAEA,IAAI5B,OAAO,CAAC6B,MAAM,IAAI7B,OAAO,CAAC6B,MAAM,CAACP,MAAM,GAAG,CAAC,EAAE;MAC/CV,UAAU,CAACiB,MAAM,GAAG,IAAI,CAAC/B,mBAAmB,CAACqB,YAAY,CAACnB,OAAO,CAAC6B,MAAM,CAAC;IAC3E;IAEA,IAAI7B,OAAO,CAAC8B,QAAQ,EAAE;MACpBlB,UAAU,CAACkB,QAAQ,GAAG9B,OAAO,CAAC8B,QAAQ;IACxC;IAEA,IAAI9B,OAAO,CAAC+B,6BAA6B,EAAE;MACzCnB,UAAU,CAACoB,oBAAoB,GAAG,IAAI;IACxC;IAEA,OAAOpB,UAAU;EACnB;AACF","ignoreList":[]}
@@ -135,6 +135,9 @@ export class ObjectSetQuery extends BaseListQuery {
135
135
  // OrderBy is already applied in the composed ObjectSet
136
136
  ...(this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 ? {
137
137
  $orderBy: this.#operations.orderBy
138
+ } : {}),
139
+ ...(this.options.$loadPropertySecurityMetadata ? {
140
+ $loadPropertySecurityMetadata: true
138
141
  } : {})
139
142
  });
140
143
  if (signal?.aborted) {
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSetQuery.js","names":["additionalContext","getWireObjectSet","BaseListQuery","getObjectTypesThatInvalidate","OrderBySortingStrategy","ObjectSetQuery","baseObjectSetWire","operations","composedObjectSet","objectTypes","constructor","store","subject","cacheKey","opts","process","env","NODE_ENV","client","logger","child","msgPrefix","otherKeys","map","x","JSON","stringify","join","undefined","composeObjectSet","extractObjectTypes","autoFetchMore","minResultsToLoad","Number","MAX_SAFE_INTEGER","Math","max","pageSize","rdpConfig","withProperties","selectFields","select","rawSelect","#composeObjectSet","result","baseObjectSet","where","union","length","intersect","subtract","pivotTo","#extractObjectTypes","types","Set","baseWire","parse","type","add","os","wire","registerCacheChanges","batch","changes","registerObjectSet","fetchPageData","signal","orderBy","Object","keys","sortingStrategy","wireObjectSet","resultType","apiName","resp","fetchPage","$nextPageToken","nextPageToken","$pageSize","getEffectiveFetchPageSize","$includeRid","$select","$orderBy","aborted","Error","handleFetchError","error","_status","subjects","get","existingTotalCount","read","value","totalCount","writeToStore","data","registerStreamUpdates","sub","createWebsocketSubscription","invalidateObjectType","objectType","has","modified","revalidate","Promise","resolve","createPayload","params","resolvedList","resolvedData","isOptimistic","fetchMore","hasMore","status","lastUpdated","objectSet"],"sources":["ObjectSetQuery.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { ObjectSet, Osdk, PageResult } from \"@osdk/api\";\nimport type { Observable, Subscription } from \"rxjs\";\nimport { additionalContext } from \"../../../Client.js\";\nimport { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Status } from \"../../ObservableClient/common.js\";\nimport { BaseListQuery } from \"../base-list/BaseListQuery.js\";\nimport type { BatchContext } from \"../BatchContext.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { Changes } from \"../Changes.js\";\nimport { getObjectTypesThatInvalidate } from \"../getObjectTypesThatInvalidate.js\";\nimport type { Entry } from \"../Layer.js\";\nimport type { Rdp } from \"../RdpCanonicalizer.js\";\nimport { OrderBySortingStrategy } from \"../sorting/SortingStrategy.js\";\nimport type { Store } from \"../Store.js\";\nimport type { SubjectPayload } from \"../SubjectPayload.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetQuery extends BaseListQuery<\n ObjectSetCacheKey,\n ObjectSetPayload,\n ObjectSetQueryOptions\n> {\n #baseObjectSetWire: string;\n #operations: Canonical<ObjectSetOperations>;\n #composedObjectSet: ObjectSet<any, any>;\n #objectTypes: Set<string>;\n\n constructor(\n store: Store,\n subject: Observable<SubjectPayload<ObjectSetCacheKey>>,\n baseObjectSetWire: string,\n operations: Canonical<ObjectSetOperations>,\n cacheKey: ObjectSetCacheKey,\n opts: ObjectSetQueryOptions,\n ) {\n super(\n store,\n subject,\n opts,\n cacheKey,\n process.env.NODE_ENV !== \"production\"\n ? (\n store.client[additionalContext].logger?.child({}, {\n msgPrefix: `ObjectSetQuery<${\n cacheKey.otherKeys.map(x => JSON.stringify(x)).join(\", \")\n }>`,\n })\n )\n : undefined,\n );\n\n this.#baseObjectSetWire = baseObjectSetWire;\n this.#operations = operations;\n this.#composedObjectSet = this.#composeObjectSet(opts);\n this.#objectTypes = this.#extractObjectTypes(opts);\n if (opts.autoFetchMore === true) {\n this.minResultsToLoad = Number.MAX_SAFE_INTEGER;\n } else if (typeof opts.autoFetchMore === \"number\") {\n this.minResultsToLoad = Math.max(0, opts.autoFetchMore);\n } else {\n this.minResultsToLoad = opts.pageSize || 0;\n }\n }\n\n public override get rdpConfig(): Canonical<Rdp> | null {\n return this.#operations.withProperties ?? null;\n }\n\n public get selectFields(): Canonical<readonly string[]> | undefined {\n return this.#operations.select;\n }\n\n protected get rawSelect(): Canonical<readonly string[]> | undefined {\n return this.#operations.select;\n }\n\n #composeObjectSet(opts: ObjectSetQueryOptions): ObjectSet<any, any> {\n let result = opts.baseObjectSet;\n\n if (opts.withProperties) {\n result = result.withProperties(opts.withProperties);\n }\n if (opts.where) {\n result = result.where(opts.where);\n }\n if (opts.union && opts.union.length > 0) {\n result = result.union(...opts.union);\n }\n if (opts.intersect && opts.intersect.length > 0) {\n result = result.intersect(...opts.intersect);\n }\n if (opts.subtract && opts.subtract.length > 0) {\n result = result.subtract(...opts.subtract);\n }\n if (opts.pivotTo) {\n result = result.pivotTo(opts.pivotTo);\n }\n\n return result;\n }\n\n #extractObjectTypes(opts: ObjectSetQueryOptions): Set<string> {\n const types = new Set<string>();\n const baseWire = JSON.parse(this.#baseObjectSetWire);\n if (baseWire.type) {\n types.add(baseWire.type);\n }\n\n if (opts.union) {\n for (const os of opts.union) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.intersect) {\n for (const os of opts.intersect) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.subtract) {\n for (const os of opts.subtract) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n return types;\n }\n\n /**\n * Register changes to the cache specific to ObjectSetQuery\n */\n protected registerCacheChanges(batch: BatchContext): void {\n batch.changes.registerObjectSet(this.cacheKey);\n }\n\n /**\n * Implements fetchPageData from BaseListQuery template method\n * Fetches a page of data from the composed ObjectSet\n */\n protected async fetchPageData(\n signal: AbortSignal | undefined,\n ): Promise<PageResult<Osdk.Instance<any>>> {\n if (\n this.#operations.orderBy\n && Object.keys(this.#operations.orderBy).length > 0\n && !(this.sortingStrategy instanceof OrderBySortingStrategy)\n ) {\n const wireObjectSet = getWireObjectSet(this.#composedObjectSet);\n const { resultType } = await getObjectTypesThatInvalidate(\n this.store.client[additionalContext],\n wireObjectSet,\n );\n this.sortingStrategy = new OrderBySortingStrategy(\n resultType.apiName,\n this.#operations.orderBy,\n );\n }\n\n // Fetch the data with pagination\n const resp = await this.#composedObjectSet.fetchPage({\n $nextPageToken: this.nextPageToken,\n $pageSize: this.getEffectiveFetchPageSize(),\n $includeRid: true,\n ...(this.#operations.select && this.#operations.select.length > 0\n ? { $select: this.#operations.select }\n : {}),\n // OrderBy is already applied in the composed ObjectSet\n ...(this.#operations.orderBy\n && Object.keys(this.#operations.orderBy).length > 0\n ? { $orderBy: this.#operations.orderBy }\n : {}),\n });\n\n if (signal?.aborted) {\n throw new Error(\"Aborted\");\n }\n\n this.nextPageToken = resp.nextPageToken;\n\n return resp;\n }\n\n protected handleFetchError(\n error: unknown,\n _status: Status,\n batch: BatchContext,\n ): Entry<ObjectSetCacheKey> {\n this.logger?.error(\"error\", error);\n this.store.subjects.get(this.cacheKey).error(error);\n\n const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;\n return this.writeToStore(\n { data: [], totalCount: existingTotalCount },\n \"error\",\n batch,\n );\n }\n\n registerStreamUpdates(sub: Subscription): void {\n this.createWebsocketSubscription(\n this.#composedObjectSet,\n sub,\n \"observeObjectSet\",\n );\n }\n\n invalidateObjectType = async (\n objectType: string,\n changes: Changes | undefined,\n ): Promise<void> => {\n if (this.#objectTypes.has(objectType)) {\n changes?.modified.add(this.cacheKey);\n return this.revalidate(true);\n }\n return Promise.resolve();\n };\n\n protected createPayload(\n params: {\n resolvedData: any[] | undefined;\n isOptimistic: boolean;\n status: Status;\n lastUpdated: number;\n totalCount?: string;\n },\n ): ObjectSetPayload {\n return {\n resolvedList: params.resolvedData,\n isOptimistic: params.isOptimistic,\n fetchMore: this.fetchMore,\n hasMore: this.nextPageToken != null,\n status: params.status,\n lastUpdated: params.lastUpdated,\n objectSet: this.#composedObjectSet,\n totalCount: params.totalCount,\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,QAAQ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EAAEuC,QAAQ,CAAC5C,GAAG,CAAC,IAAI,CAAC7C,QAAQ,CAAC;MACpC,OAAO,IAAI,CAAC0F,UAAU,CAAC,IAAI,CAAC;IAC9B;IACA,OAAOC,OAAO,CAACC,OAAO,CAAC,CAAC;EAC1B,CAAC;EAESC,aAAaA,CACrBC,MAMC,EACiB;IAClB,OAAO;MACLC,YAAY,EAAED,MAAM,CAACE,YAAY;MACjCC,YAAY,EAAEH,MAAM,CAACG,YAAY;MACjCC,SAAS,EAAE,IAAI,CAACA,SAAS;MACzBC,OAAO,EAAE,IAAI,CAACnC,aAAa,IAAI,IAAI;MACnCoC,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,WAAW,EAAEP,MAAM,CAACO,WAAW;MAC/BC,SAAS,EAAE,IAAI,CAAC,CAAC3G,iBAAiB;MAClCqF,UAAU,EAAEc,MAAM,CAACd;IACrB,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSetQuery.js","names":["additionalContext","getWireObjectSet","BaseListQuery","getObjectTypesThatInvalidate","OrderBySortingStrategy","ObjectSetQuery","baseObjectSetWire","operations","composedObjectSet","objectTypes","constructor","store","subject","cacheKey","opts","process","env","NODE_ENV","client","logger","child","msgPrefix","otherKeys","map","x","JSON","stringify","join","undefined","composeObjectSet","extractObjectTypes","autoFetchMore","minResultsToLoad","Number","MAX_SAFE_INTEGER","Math","max","pageSize","rdpConfig","withProperties","selectFields","select","rawSelect","#composeObjectSet","result","baseObjectSet","where","union","length","intersect","subtract","pivotTo","#extractObjectTypes","types","Set","baseWire","parse","type","add","os","wire","registerCacheChanges","batch","changes","registerObjectSet","fetchPageData","signal","orderBy","Object","keys","sortingStrategy","wireObjectSet","resultType","apiName","resp","fetchPage","$nextPageToken","nextPageToken","$pageSize","getEffectiveFetchPageSize","$includeRid","$select","$orderBy","options","$loadPropertySecurityMetadata","aborted","Error","handleFetchError","error","_status","subjects","get","existingTotalCount","read","value","totalCount","writeToStore","data","registerStreamUpdates","sub","createWebsocketSubscription","invalidateObjectType","objectType","has","modified","revalidate","Promise","resolve","createPayload","params","resolvedList","resolvedData","isOptimistic","fetchMore","hasMore","status","lastUpdated","objectSet"],"sources":["ObjectSetQuery.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { ObjectSet, Osdk, PageResult } from \"@osdk/api\";\nimport type { Observable, Subscription } from \"rxjs\";\nimport { additionalContext } from \"../../../Client.js\";\nimport { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Status } from \"../../ObservableClient/common.js\";\nimport { BaseListQuery } from \"../base-list/BaseListQuery.js\";\nimport type { BatchContext } from \"../BatchContext.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { Changes } from \"../Changes.js\";\nimport { getObjectTypesThatInvalidate } from \"../getObjectTypesThatInvalidate.js\";\nimport type { Entry } from \"../Layer.js\";\nimport type { Rdp } from \"../RdpCanonicalizer.js\";\nimport { OrderBySortingStrategy } from \"../sorting/SortingStrategy.js\";\nimport type { Store } from \"../Store.js\";\nimport type { SubjectPayload } from \"../SubjectPayload.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetQuery extends BaseListQuery<\n ObjectSetCacheKey,\n ObjectSetPayload,\n ObjectSetQueryOptions\n> {\n #baseObjectSetWire: string;\n #operations: Canonical<ObjectSetOperations>;\n #composedObjectSet: ObjectSet<any, any>;\n #objectTypes: Set<string>;\n\n constructor(\n store: Store,\n subject: Observable<SubjectPayload<ObjectSetCacheKey>>,\n baseObjectSetWire: string,\n operations: Canonical<ObjectSetOperations>,\n cacheKey: ObjectSetCacheKey,\n opts: ObjectSetQueryOptions,\n ) {\n super(\n store,\n subject,\n opts,\n cacheKey,\n process.env.NODE_ENV !== \"production\"\n ? (\n store.client[additionalContext].logger?.child({}, {\n msgPrefix: `ObjectSetQuery<${\n cacheKey.otherKeys.map(x => JSON.stringify(x)).join(\", \")\n }>`,\n })\n )\n : undefined,\n );\n\n this.#baseObjectSetWire = baseObjectSetWire;\n this.#operations = operations;\n this.#composedObjectSet = this.#composeObjectSet(opts);\n this.#objectTypes = this.#extractObjectTypes(opts);\n if (opts.autoFetchMore === true) {\n this.minResultsToLoad = Number.MAX_SAFE_INTEGER;\n } else if (typeof opts.autoFetchMore === \"number\") {\n this.minResultsToLoad = Math.max(0, opts.autoFetchMore);\n } else {\n this.minResultsToLoad = opts.pageSize || 0;\n }\n }\n\n public override get rdpConfig(): Canonical<Rdp> | null {\n return this.#operations.withProperties ?? null;\n }\n\n public get selectFields(): Canonical<readonly string[]> | undefined {\n return this.#operations.select;\n }\n\n protected get rawSelect(): Canonical<readonly string[]> | undefined {\n return this.#operations.select;\n }\n\n #composeObjectSet(opts: ObjectSetQueryOptions): ObjectSet<any, any> {\n let result = opts.baseObjectSet;\n\n if (opts.withProperties) {\n result = result.withProperties(opts.withProperties);\n }\n if (opts.where) {\n result = result.where(opts.where);\n }\n if (opts.union && opts.union.length > 0) {\n result = result.union(...opts.union);\n }\n if (opts.intersect && opts.intersect.length > 0) {\n result = result.intersect(...opts.intersect);\n }\n if (opts.subtract && opts.subtract.length > 0) {\n result = result.subtract(...opts.subtract);\n }\n if (opts.pivotTo) {\n result = result.pivotTo(opts.pivotTo);\n }\n\n return result;\n }\n\n #extractObjectTypes(opts: ObjectSetQueryOptions): Set<string> {\n const types = new Set<string>();\n const baseWire = JSON.parse(this.#baseObjectSetWire);\n if (baseWire.type) {\n types.add(baseWire.type);\n }\n\n if (opts.union) {\n for (const os of opts.union) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.intersect) {\n for (const os of opts.intersect) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.subtract) {\n for (const os of opts.subtract) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n return types;\n }\n\n /**\n * Register changes to the cache specific to ObjectSetQuery\n */\n protected registerCacheChanges(batch: BatchContext): void {\n batch.changes.registerObjectSet(this.cacheKey);\n }\n\n /**\n * Implements fetchPageData from BaseListQuery template method\n * Fetches a page of data from the composed ObjectSet\n */\n protected async fetchPageData(\n signal: AbortSignal | undefined,\n ): Promise<PageResult<Osdk.Instance<any>>> {\n if (\n this.#operations.orderBy\n && Object.keys(this.#operations.orderBy).length > 0\n && !(this.sortingStrategy instanceof OrderBySortingStrategy)\n ) {\n const wireObjectSet = getWireObjectSet(this.#composedObjectSet);\n const { resultType } = await getObjectTypesThatInvalidate(\n this.store.client[additionalContext],\n wireObjectSet,\n );\n this.sortingStrategy = new OrderBySortingStrategy(\n resultType.apiName,\n this.#operations.orderBy,\n );\n }\n\n // Fetch the data with pagination\n const resp = await this.#composedObjectSet.fetchPage({\n $nextPageToken: this.nextPageToken,\n $pageSize: this.getEffectiveFetchPageSize(),\n $includeRid: true,\n ...(this.#operations.select && this.#operations.select.length > 0\n ? { $select: this.#operations.select }\n : {}),\n // OrderBy is already applied in the composed ObjectSet\n ...(this.#operations.orderBy\n && Object.keys(this.#operations.orderBy).length > 0\n ? { $orderBy: this.#operations.orderBy }\n : {}),\n ...(this.options.$loadPropertySecurityMetadata\n ? { $loadPropertySecurityMetadata: true }\n : {}),\n });\n\n if (signal?.aborted) {\n throw new Error(\"Aborted\");\n }\n\n this.nextPageToken = resp.nextPageToken;\n\n return resp;\n }\n\n protected handleFetchError(\n error: unknown,\n _status: Status,\n batch: BatchContext,\n ): Entry<ObjectSetCacheKey> {\n this.logger?.error(\"error\", error);\n this.store.subjects.get(this.cacheKey).error(error);\n\n const existingTotalCount = batch.read(this.cacheKey)?.value?.totalCount;\n return this.writeToStore(\n { data: [], totalCount: existingTotalCount },\n \"error\",\n batch,\n );\n }\n\n registerStreamUpdates(sub: Subscription): void {\n this.createWebsocketSubscription(\n this.#composedObjectSet,\n sub,\n \"observeObjectSet\",\n );\n }\n\n invalidateObjectType = async (\n objectType: string,\n changes: Changes | undefined,\n ): Promise<void> => {\n if (this.#objectTypes.has(objectType)) {\n changes?.modified.add(this.cacheKey);\n return this.revalidate(true);\n }\n return Promise.resolve();\n };\n\n protected createPayload(\n params: {\n resolvedData: any[] | undefined;\n isOptimistic: boolean;\n status: Status;\n lastUpdated: number;\n totalCount?: string;\n },\n ): ObjectSetPayload {\n return {\n resolvedList: params.resolvedData,\n isOptimistic: params.isOptimistic,\n fetchMore: this.fetchMore,\n hasMore: this.nextPageToken != null,\n status: params.status,\n lastUpdated: params.lastUpdated,\n objectSet: this.#composedObjectSet,\n totalCount: params.totalCount,\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,QAAQ,uCAAuC;AAGxE,SAASC,aAAa,QAAQ,+BAA+B;AAI7D,SAASC,4BAA4B,QAAQ,oCAAoC;AAGjF,SAASC,sBAAsB,QAAQ,+BAA+B;AAStE,OAAO,MAAMC,cAAc,SAASH,aAAa,CAI/C;EACA,CAACI,iBAAiB;EAClB,CAACC,UAAU;EACX,CAACC,iBAAiB;EAClB,CAACC,WAAW;EAEZC,WAAWA,CACTC,KAAY,EACZC,OAAsD,EACtDN,iBAAyB,EACzBC,UAA0C,EAC1CM,QA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B;IAClB,OAAO;MACLC,YAAY,EAAED,MAAM,CAACE,YAAY;MACjCC,YAAY,EAAEH,MAAM,CAACG,YAAY;MACjCC,SAAS,EAAE,IAAI,CAACA,SAAS;MACzBC,OAAO,EAAE,IAAI,CAACrC,aAAa,IAAI,IAAI;MACnCsC,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,WAAW,EAAEP,MAAM,CAACO,WAAW;MAC/BC,SAAS,EAAE,IAAI,CAAC,CAAC7G,iBAAiB;MAClCuF,UAAU,EAAEc,MAAM,CAACd;IACrB,CAAC;EACH;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectSetQueryOptions.js","names":[],"sources":["ObjectSetQueryOptions.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 DerivedProperty,\n LinkNames,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PropertyKeys,\n WhereClause,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type { CommonObserveOptions } from \"../../ObservableClient/common.js\";\n\nexport interface ObserveObjectSetOptions<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<\n string,\n WirePropertyTypes | undefined | Array<WirePropertyTypes>\n > = {},\n> extends CommonObserveOptions {\n where?: WhereClause<Q>;\n withProperties?: { [K in keyof RDPs]: DerivedProperty.Creator<Q, RDPs[K]> };\n union?: ObjectSet<Q>[];\n intersect?: ObjectSet<Q>[];\n subtract?: ObjectSet<Q>[];\n pivotTo?: LinkNames<Q>;\n pageSize?: number;\n orderBy?: { [K in PropertyKeys<Q>]?: \"asc\" | \"desc\" };\n\n /**\n * Restrict which properties are returned for each object.\n * When provided, only the specified properties will be fetched,\n * reducing payload sizes for list views.\n */\n select?: readonly PropertyKeys<Q>[];\n\n /**\n * Automatically fetch additional pages on initial load.\n *\n * - `true`: Fetch all available pages automatically\n * - `number`: Fetch pages until at least this many items are loaded\n * - `undefined` (default): Only fetch the first page, user must call fetchMore()\n */\n autoFetchMore?: boolean | number;\n\n /**\n * Enable streaming updates via websocket subscription.\n * When true, the object set will automatically update when matching objects are\n * added, updated, or removed.\n *\n * @default false\n */\n streamUpdates?: boolean;\n}\n\nexport interface ObjectSetQueryOptions\n extends ObserveObjectSetOptions<any, any>\n{\n baseObjectSet: ObjectSet<any>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectSetQueryOptions.js","names":[],"sources":["ObjectSetQueryOptions.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 DerivedProperty,\n LinkNames,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PropertyKeys,\n WhereClause,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type { CommonObserveOptions } from \"../../ObservableClient/common.js\";\n\nexport interface ObserveObjectSetOptions<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<\n string,\n WirePropertyTypes | undefined | Array<WirePropertyTypes>\n > = {},\n> extends CommonObserveOptions {\n where?: WhereClause<Q>;\n withProperties?: { [K in keyof RDPs]: DerivedProperty.Creator<Q, RDPs[K]> };\n union?: ObjectSet<Q>[];\n intersect?: ObjectSet<Q>[];\n subtract?: ObjectSet<Q>[];\n pivotTo?: LinkNames<Q>;\n pageSize?: number;\n orderBy?: { [K in PropertyKeys<Q>]?: \"asc\" | \"desc\" };\n\n /**\n * Restrict which properties are returned for each object.\n * When provided, only the specified properties will be fetched,\n * reducing payload sizes for list views.\n */\n select?: readonly PropertyKeys<Q>[];\n\n /**\n * Automatically fetch additional pages on initial load.\n *\n * - `true`: Fetch all available pages automatically\n * - `number`: Fetch pages until at least this many items are loaded\n * - `undefined` (default): Only fetch the first page, user must call fetchMore()\n */\n autoFetchMore?: boolean | number;\n\n /**\n * Enable streaming updates via websocket subscription.\n * When true, the object set will automatically update when matching objects are\n * added, updated, or removed.\n *\n * @default false\n */\n streamUpdates?: boolean;\n\n /**\n * When true, loads per-property security metadata (marking requirements)\n * alongside each object. The returned objects will have `$propertySecurities`\n * populated with conjunctive/disjunctive marking requirements per property.\n */\n $loadPropertySecurityMetadata?: boolean;\n}\n\nexport interface ObjectSetQueryOptions\n extends ObserveObjectSetOptions<any, any>\n{\n baseObjectSet: ObjectSet<any>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.8.0-beta.24"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.24"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.8.0-beta.26"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.26"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkD26YLHTV_cjs = require('./chunk-D26YLHTV.cjs');
4
- var invariant4 = require('tiny-invariant');
4
+ var invariant5 = require('tiny-invariant');
5
5
  var shared_net_fetch = require('@osdk/shared.net.fetch');
6
6
  var api = require('@osdk/api');
7
7
  var shared_net_errors = require('@osdk/shared.net.errors');
8
8
 
9
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
 
11
- var invariant4__default = /*#__PURE__*/_interopDefault(invariant4);
11
+ var invariant5__default = /*#__PURE__*/_interopDefault(invariant5);
12
12
 
13
13
  // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
14
14
  var _get = [0, "/v2/ontologies/{0}/interfaceTypes/{1}", 2];
@@ -67,7 +67,7 @@ async function extractObjectOrInterfaceType(clientCtx, objectSet) {
67
67
  }
68
68
  const objOrInterfaceDef2 = def2.type === "object" ? await clientCtx.ontologyProvider.getObjectDefinition(def2.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def2.apiName);
69
69
  const linkDef2 = objOrInterfaceDef2.links[objectSet.link];
70
- !linkDef2 ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant4__default.default(false) : void 0;
70
+ !linkDef2 ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant5__default.default(false) : void 0;
71
71
  return objOrInterfaceDef2.type === "object" ? {
72
72
  apiName: objOrInterfaceDef2.links[objectSet.link].targetType,
73
73
  type: "object"
@@ -105,7 +105,7 @@ async function extractObjectOrInterfaceType(clientCtx, objectSet) {
105
105
  const objectSetTypes2 = await Promise.all(objectSets2.map((os) => extractObjectOrInterfaceType(clientCtx, os)));
106
106
  const filteredObjectTypes2 = objectSetTypes2.filter(Boolean);
107
107
  const firstInterfaceType = filteredObjectTypes2.find((val) => val?.type === "interface");
108
- !firstInterfaceType ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Missing interface type in intersect objectset scope'`) : invariant4__default.default(false) : void 0;
108
+ !firstInterfaceType ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Missing interface type in intersect objectset scope'`) : invariant5__default.default(false) : void 0;
109
109
  return firstInterfaceType;
110
110
  }
111
111
  case "subtract":
@@ -116,7 +116,7 @@ async function extractObjectOrInterfaceType(clientCtx, objectSet) {
116
116
  const firstObjectType = filteredObjectTypes[0];
117
117
  !filteredObjectTypes.every((val) => {
118
118
  return val?.apiName === firstObjectType?.apiName && val?.type === firstObjectType?.type;
119
- }) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Can only have one object type when doing subtract, union") : invariant4__default.default(false) : void 0;
119
+ }) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Can only have one object type when doing subtract, union") : invariant5__default.default(false) : void 0;
120
120
  return filteredObjectTypes[0];
121
121
  case "static":
122
122
  case "reference":
@@ -128,7 +128,7 @@ async function extractObjectOrInterfaceType(clientCtx, objectSet) {
128
128
  }
129
129
  const objOrInterfaceDef = def.type === "object" ? await clientCtx.ontologyProvider.getObjectDefinition(def.apiName) : await clientCtx.ontologyProvider.getInterfaceDefinition(def.apiName);
130
130
  const linkDef = objOrInterfaceDef.links[objectSet.interfaceLink];
131
- !linkDef ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Missing link definition for '${objectSet.interfaceLink}'`) : invariant4__default.default(false) : void 0;
131
+ !linkDef ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Missing link definition for '${objectSet.interfaceLink}'`) : invariant5__default.default(false) : void 0;
132
132
  return objOrInterfaceDef.type === "object" ? {
133
133
  apiName: objOrInterfaceDef.links[objectSet.interfaceLink].targetType,
134
134
  type: "object"
@@ -138,7 +138,7 @@ async function extractObjectOrInterfaceType(clientCtx, objectSet) {
138
138
  };
139
139
  // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.
140
140
  default:
141
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Unsupported object set type for deriving object or interface type,`) : invariant4__default.default(false) ;
141
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Unsupported object set type for deriving object or interface type,`) : invariant5__default.default(false) ;
142
142
  }
143
143
  }
144
144
  async function extractRdpDefinition(clientCtx, objectSet) {
@@ -158,7 +158,7 @@ async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObj
158
158
  }
159
159
  const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);
160
160
  const linkDef = objDef.links[objectSet.link];
161
- !linkDef ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant4__default.default(false) : void 0;
161
+ !linkDef ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant5__default.default(false) : void 0;
162
162
  return {
163
163
  definitions: definitions2,
164
164
  childObjectType: objDef.links[objectSet.link].targetType
@@ -244,13 +244,13 @@ async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObj
244
244
  ...acc,
245
245
  ...definitions2
246
246
  }), {});
247
- !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Object sets combined using intersect, subtract, or union must not contain any derived property definitions") : invariant4__default.default(false) : void 0;
247
+ !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Object sets combined using intersect, subtract, or union must not contain any derived property definitions") : invariant5__default.default(false) : void 0;
248
248
  const firstValidChildObjectType = objectSetTypes.find(({
249
249
  childObjectType
250
250
  }) => childObjectType != null)?.childObjectType;
251
251
  !objectSetTypes.every(({
252
252
  childObjectType
253
- }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "All object sets in an intersect, subtract, or union must have the same child object type") : invariant4__default.default(false) : void 0;
253
+ }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "All object sets in an intersect, subtract, or union must have the same child object type") : invariant5__default.default(false) : void 0;
254
254
  return {
255
255
  definitions: {},
256
256
  childObjectType: firstValidChildObjectType
@@ -262,9 +262,9 @@ async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObj
262
262
  };
263
263
  // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.
264
264
  case "interfaceLinkSearchAround":
265
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant4__default.default(false) ;
265
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant5__default.default(false) ;
266
266
  default:
267
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant4__default.default(false) ;
267
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant5__default.default(false) ;
268
268
  }
269
269
  }
270
270
 
@@ -345,7 +345,7 @@ async function fetchStaticRidPage(client, rids, args, useSnapshot = false) {
345
345
  }
346
346
  async function fetchInterfacePage(client, interfaceType, args, objectSet, useSnapshot = false) {
347
347
  if (args.$__UNSTABLE_useOldInterfaceApis) {
348
- !(args.$loadPropertySecurityMetadata === false || args.$loadPropertySecurityMetadata === void 0) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "`$loadPropertySecurityMetadata` is not supported with old interface APIs") : invariant4__default.default(false) : void 0;
348
+ !(args.$loadPropertySecurityMetadata === false || args.$loadPropertySecurityMetadata === void 0) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "`$loadPropertySecurityMetadata` is not supported with old interface APIs") : invariant5__default.default(false) : void 0;
349
349
  const baseRequestBody = {
350
350
  augmentedProperties: {},
351
351
  augmentedSharedPropertyTypes: {},
@@ -601,6 +601,44 @@ function makeGeoFilterWithin(withinBody, propertyIdentifier, field) {
601
601
  return makeGeoFilterPolygon(coordinates, "withinPolygon", propertyIdentifier, field);
602
602
  }
603
603
  }
604
+ function toIntervalQueryRule(rule) {
605
+ if (rule.$match != null) {
606
+ if (rule.$prefixOnLastTerm) {
607
+ return {
608
+ type: "prefixOnLastToken",
609
+ query: rule.$match
610
+ };
611
+ }
612
+ return {
613
+ type: "match",
614
+ query: rule.$match,
615
+ ordered: rule.$ordered,
616
+ maxGaps: rule.$maxGaps
617
+ };
618
+ }
619
+ if (rule.$and != null) {
620
+ return {
621
+ type: "allOf",
622
+ rules: rule.$and.map(toIntervalQueryRule),
623
+ ordered: rule.$ordered,
624
+ maxGaps: rule.$maxGaps
625
+ };
626
+ }
627
+ if (rule.$or != null) {
628
+ return {
629
+ type: "anyOf",
630
+ rules: rule.$or.map(toIntervalQueryRule)
631
+ };
632
+ }
633
+ if (rule.$fuzzy != null) {
634
+ return {
635
+ type: "fuzzy",
636
+ term: rule.$fuzzy,
637
+ fuzziness: rule.$fuzziness
638
+ };
639
+ }
640
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Unknown interval rule type") : invariant5__default.default(false) ;
641
+ }
604
642
 
605
643
  // src/internal/conversions/modernToLegacyWhereClause.ts
606
644
  function isAndClause(whereClause) {
@@ -626,7 +664,7 @@ function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {
626
664
  }
627
665
  function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames) {
628
666
  const parts = Object.entries(whereClause);
629
- !(parts.length === 1) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Invalid where clause provided.") : invariant4__default.default(false) : void 0;
667
+ !(parts.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Invalid where clause provided.") : invariant5__default.default(false) : void 0;
630
668
  if (isAndClause(whereClause)) {
631
669
  return {
632
670
  type: "and",
@@ -646,7 +684,7 @@ function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames
646
684
  return handleWherePair(parts[0], objectOrInterface, void 0, rdpNames);
647
685
  }
648
686
  function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {
649
- !(filter != null) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Cannot filter on property "${fieldName}" with an undefined or null value. If the value might be undefined, check it before adding to the where clause.`) : invariant4__default.default(false) : void 0;
687
+ !(filter != null) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Cannot filter on property "${fieldName}" with an undefined or null value. If the value might be undefined, check it before adding to the where clause.`) : invariant5__default.default(false) : void 0;
650
688
  const isRdp = !structFieldSelector && rdpNames?.has(fieldName);
651
689
  const propertyIdentifier = isRdp ? {
652
690
  type: "property",
@@ -657,7 +695,7 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
657
695
  propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
658
696
  } : void 0;
659
697
  const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : void 0;
660
- !(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Encountered error constructing where clause: field and propertyIdentifier cannot both be defined") : invariant4__default.default(false) : void 0;
698
+ !(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Encountered error constructing where clause: field and propertyIdentifier cannot both be defined") : invariant5__default.default(false) : void 0;
661
699
  if (typeof filter === "string" || typeof filter === "number" || typeof filter === "boolean") {
662
700
  return {
663
701
  type: "eq",
@@ -670,10 +708,10 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
670
708
  }
671
709
  const keysOfFilter = Object.keys(filter);
672
710
  const hasDollarSign = keysOfFilter.some((key) => key.startsWith("$"));
673
- !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.") : invariant4__default.default(false) : void 0;
711
+ !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.") : invariant5__default.default(false) : void 0;
674
712
  if (!hasDollarSign) {
675
713
  const structFilter = Object.entries(filter);
676
- !(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant4__default.default(false) : void 0;
714
+ !(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant5__default.default(false) : void 0;
677
715
  const structFieldApiName = keysOfFilter[0];
678
716
  return handleWherePair(Object.entries(filter)[0], objectOrInterface, {
679
717
  propertyApiName: fieldName,
@@ -681,7 +719,7 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
681
719
  }, rdpNames);
682
720
  }
683
721
  const firstKey = keysOfFilter[0];
684
- !(filter[firstKey] != null) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false) : invariant4__default.default(false) : void 0;
722
+ !(filter[firstKey] != null) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false) : invariant5__default.default(false) : void 0;
685
723
  if (firstKey === "$contains" && filter[firstKey] instanceof Object) {
686
724
  const containsValue = filter[firstKey];
687
725
  const containsKeys = Object.keys(containsValue);
@@ -690,7 +728,7 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
690
728
  return handleWherePair([fieldName, containsValue], objectOrInterface, structFieldSelector, rdpNames);
691
729
  } else {
692
730
  const structFilter = Object.entries(containsValue);
693
- !(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant4__default.default(false) : void 0;
731
+ !(structFilter.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Cannot filter on more than one struct field in the same clause, need to use an and clause") : invariant5__default.default(false) : void 0;
694
732
  const structFieldApiName = structFilter[0][0];
695
733
  return handleWherePair(structFilter[0], objectOrInterface, {
696
734
  propertyApiName: fieldName,
@@ -728,6 +766,16 @@ function handleWherePair([fieldName, filter], objectOrInterface, structFieldSele
728
766
  fuzzy: typeof filter[firstKey] === "string" ? false : filter[firstKey]["fuzzySearch"] ?? false
729
767
  };
730
768
  }
769
+ if (firstKey === "$interval") {
770
+ return {
771
+ type: "interval",
772
+ ...propertyIdentifier != null && {
773
+ propertyIdentifier
774
+ },
775
+ field,
776
+ rule: toIntervalQueryRule(filter[firstKey])
777
+ };
778
+ }
731
779
  return {
732
780
  type: firstKey.substring(1),
733
781
  ...propertyIdentifier != null && {
@@ -803,12 +851,12 @@ function derivedPropertyDefinitionFactory(wireDefinition, definitionMap) {
803
851
  var getDefinitionFromMap = (arg, definitionMap) => {
804
852
  if (typeof arg === "object") {
805
853
  const definition = definitionMap.get(arg);
806
- !definition ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived Property is not defined") : invariant4__default.default(false) : void 0;
854
+ !definition ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Derived Property is not defined") : invariant5__default.default(false) : void 0;
807
855
  return definition;
808
856
  } else if (typeof arg === "number") {
809
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Literals for derived properties are not yet supported") : invariant4__default.default(false) ;
857
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Literals for derived properties are not yet supported") : invariant5__default.default(false) ;
810
858
  }
811
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Invalid argument type for a derived property") : invariant4__default.default(false) ;
859
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Invalid argument type for a derived property") : invariant5__default.default(false) ;
812
860
  };
813
861
 
814
862
  // src/derivedProperties/createWithPropertiesObjectSet.ts
@@ -831,7 +879,7 @@ function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fro
831
879
  },
832
880
  aggregate: (aggregation, opt) => {
833
881
  const splitAggregation = aggregation.split(":");
834
- !(splitAggregation.length === 2 || splitAggregation[0] === "$count") ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Invalid aggregation format") : invariant4__default.default(false) : void 0;
882
+ !(splitAggregation.length === 2 || splitAggregation[0] === "$count") ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Invalid aggregation format") : invariant5__default.default(false) : void 0;
835
883
  const [aggregationPropertyName, aggregationOperation] = splitAggregation;
836
884
  let aggregationOperationDefinition;
837
885
  switch (aggregationOperation) {
@@ -869,7 +917,7 @@ function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fro
869
917
  break;
870
918
  }
871
919
  default:
872
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Invalid aggregation operation " + aggregationOperation) : invariant4__default.default(false) ;
920
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Invalid aggregation operation " + aggregationOperation) : invariant5__default.default(false) ;
873
921
  }
874
922
  const wrappedObjectSet = {
875
923
  type: "selection",
@@ -904,19 +952,19 @@ function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fro
904
952
  },
905
953
  constant: {
906
954
  double: (value) => {
907
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Not supported") : invariant4__default.default(false) ;
955
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Not supported") : invariant5__default.default(false) ;
908
956
  },
909
957
  integer: (value) => {
910
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Not supported") : invariant4__default.default(false) ;
958
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Not supported") : invariant5__default.default(false) ;
911
959
  },
912
960
  long: (value) => {
913
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Not supported") : invariant4__default.default(false) ;
961
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Not supported") : invariant5__default.default(false) ;
914
962
  },
915
963
  datetime: (value) => {
916
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Not supported") : invariant4__default.default(false) ;
964
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Not supported") : invariant5__default.default(false) ;
917
965
  },
918
966
  timestamp: (value) => {
919
- process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Not supported") : invariant4__default.default(false) ;
967
+ process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Not supported") : invariant5__default.default(false) ;
920
968
  }
921
969
  }
922
970
  };
@@ -1057,7 +1105,7 @@ async function aggregate2(clientCtx, objectType, objectSet = resolveBaseObjectSe
1057
1105
  throw new Error(`Aggregation request failed: ${JSON.stringify(result)}`);
1058
1106
  }
1059
1107
  if (!req.$groupBy) {
1060
- !(result.data.length === 1) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "no group by clause should mean only one data result") : invariant4__default.default(false) : void 0;
1108
+ !(result.data.length === 1) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "no group by clause should mean only one data result") : invariant5__default.default(false) : void 0;
1061
1109
  return {
1062
1110
  ...aggregationToCountResult(result.data[0]),
1063
1111
  ...legacyToModernSingleAggregationResult(result.data[0], req.$select)
@@ -1281,7 +1329,7 @@ function createObjectSet(objectType, clientCtx, objectSet = resolveBaseObjectSet
1281
1329
  },
1282
1330
  narrowToType: (objectTypeDef) => {
1283
1331
  const existingMapping = clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName];
1284
- !(!existingMapping || existingMapping === objectTypeDef.type) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `${objectTypeDef.apiName} was previously used as an ${existingMapping}, but now used as a ${objectTypeDef.type}.`) : invariant4__default.default(false) : void 0;
1332
+ !(!existingMapping || existingMapping === objectTypeDef.type) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `${objectTypeDef.apiName} was previously used as an ${existingMapping}, but now used as a ${objectTypeDef.type}.`) : invariant5__default.default(false) : void 0;
1285
1333
  clientCtx.narrowTypeInterfaceOrObjectMapping[objectTypeDef.apiName] = objectTypeDef.type;
1286
1334
  return clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
1287
1335
  type: "asType",
@@ -1469,5 +1517,5 @@ exports.hydrateAttachmentFromRidInternal = hydrateAttachmentFromRidInternal;
1469
1517
  exports.isObjectSet = isObjectSet;
1470
1518
  exports.isWireObjectSet = isWireObjectSet;
1471
1519
  exports.upload = upload;
1472
- //# sourceMappingURL=chunk-R7OP6A6S.cjs.map
1473
- //# sourceMappingURL=chunk-R7OP6A6S.cjs.map
1520
+ //# sourceMappingURL=chunk-BWOPPEUP.cjs.map
1521
+ //# sourceMappingURL=chunk-BWOPPEUP.cjs.map