@osdk/react 0.10.0-beta.10 → 0.10.0-beta.12

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 (60) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/build/browser/new/platform-apis/admin/useCbacBanner.js +63 -0
  3. package/build/browser/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  4. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  5. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  6. package/build/browser/new/platform-apis/admin/useMarkingCategories.js +46 -0
  7. package/build/browser/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  8. package/build/browser/new/platform-apis/admin/useMarkings.js +46 -0
  9. package/build/browser/new/platform-apis/admin/useMarkings.js.map +1 -0
  10. package/build/browser/new/platform-apis/admin/useUserMarkings.js +50 -0
  11. package/build/browser/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  12. package/build/browser/new/useOsdkAction.js +1 -0
  13. package/build/browser/new/useOsdkAction.js.map +1 -1
  14. package/build/browser/new/useOsdkObject.js +6 -2
  15. package/build/browser/new/useOsdkObject.js.map +1 -1
  16. package/build/browser/new/useOsdkObjects.js +6 -2
  17. package/build/browser/new/useOsdkObjects.js.map +1 -1
  18. package/build/browser/public/experimental/admin.js +5 -0
  19. package/build/browser/public/experimental/admin.js.map +1 -1
  20. package/build/cjs/public/experimental/admin.cjs +148 -1
  21. package/build/cjs/public/experimental/admin.cjs.map +1 -1
  22. package/build/cjs/public/experimental/admin.d.cts +159 -2
  23. package/build/cjs/public/experimental.cjs +12 -3
  24. package/build/cjs/public/experimental.cjs.map +1 -1
  25. package/build/cjs/public/experimental.d.cts +8 -1
  26. package/build/esm/new/platform-apis/admin/useCbacBanner.js +63 -0
  27. package/build/esm/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  28. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  29. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  30. package/build/esm/new/platform-apis/admin/useMarkingCategories.js +46 -0
  31. package/build/esm/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  32. package/build/esm/new/platform-apis/admin/useMarkings.js +46 -0
  33. package/build/esm/new/platform-apis/admin/useMarkings.js.map +1 -0
  34. package/build/esm/new/platform-apis/admin/useUserMarkings.js +50 -0
  35. package/build/esm/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  36. package/build/esm/new/useOsdkAction.js +1 -0
  37. package/build/esm/new/useOsdkAction.js.map +1 -1
  38. package/build/esm/new/useOsdkObject.js +6 -2
  39. package/build/esm/new/useOsdkObject.js.map +1 -1
  40. package/build/esm/new/useOsdkObjects.js +6 -2
  41. package/build/esm/new/useOsdkObjects.js.map +1 -1
  42. package/build/esm/public/experimental/admin.js +5 -0
  43. package/build/esm/public/experimental/admin.js.map +1 -1
  44. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts +33 -0
  45. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts.map +1 -0
  46. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts +34 -0
  47. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts.map +1 -0
  48. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts +27 -0
  49. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts.map +1 -0
  50. package/build/types/new/platform-apis/admin/useMarkings.d.ts +27 -0
  51. package/build/types/new/platform-apis/admin/useMarkings.d.ts.map +1 -0
  52. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts +33 -0
  53. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts.map +1 -0
  54. package/build/types/new/useOsdkObject.d.ts +2 -1
  55. package/build/types/new/useOsdkObject.d.ts.map +1 -1
  56. package/build/types/new/useOsdkObjects.d.ts +6 -0
  57. package/build/types/new/useOsdkObjects.d.ts.map +1 -1
  58. package/build/types/public/experimental/admin.d.ts +8 -0
  59. package/build/types/public/experimental/admin.d.ts.map +1 -1
  60. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","names":["useCurrentFoundryUser","useFoundryUser","useFoundryUsersList"],"sources":["admin.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\nexport { useCurrentFoundryUser } from \"../../new/platform-apis/admin/useCurrentFoundryUser.js\";\nexport { useFoundryUser } from \"../../new/platform-apis/admin/useFoundryUser.js\";\nexport { useFoundryUsersList } from \"../../new/platform-apis/admin/useFoundryUsersList.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,qBAAqB,QAAQ,wDAAwD;AAC9F,SAASC,cAAc,QAAQ,iDAAiD;AAChF,SAASC,mBAAmB,QAAQ,sDAAsD","ignoreList":[]}
1
+ {"version":3,"file":"admin.js","names":["useCbacBanner","useCbacMarkingRestrictions","useCurrentFoundryUser","useFoundryUser","useFoundryUsersList","useMarkingCategories","useMarkings","useUserViewMarkings"],"sources":["admin.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\nexport { useCbacBanner } from \"../../new/platform-apis/admin/useCbacBanner.js\";\nexport type {\n CbacBannerData,\n UseCbacBannerOptions,\n UseCbacBannerResult,\n} from \"../../new/platform-apis/admin/useCbacBanner.js\";\nexport { useCbacMarkingRestrictions } from \"../../new/platform-apis/admin/useCbacMarkingRestrictions.js\";\nexport type {\n CbacMarkingRestrictionsData,\n UseCbacMarkingRestrictionsOptions,\n UseCbacMarkingRestrictionsResult,\n} from \"../../new/platform-apis/admin/useCbacMarkingRestrictions.js\";\nexport { useCurrentFoundryUser } from \"../../new/platform-apis/admin/useCurrentFoundryUser.js\";\nexport { useFoundryUser } from \"../../new/platform-apis/admin/useFoundryUser.js\";\nexport { useFoundryUsersList } from \"../../new/platform-apis/admin/useFoundryUsersList.js\";\nexport { useMarkingCategories } from \"../../new/platform-apis/admin/useMarkingCategories.js\";\nexport { useMarkings } from \"../../new/platform-apis/admin/useMarkings.js\";\nexport { useUserViewMarkings } from \"../../new/platform-apis/admin/useUserMarkings.js\";\nexport type {\n UseUserViewMarkingsOptions,\n UseUserViewMarkingsResult,\n} from \"../../new/platform-apis/admin/useUserMarkings.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,gDAAgD;AAM9E,SAASC,0BAA0B,QAAQ,6DAA6D;AAMxG,SAASC,qBAAqB,QAAQ,wDAAwD;AAC9F,SAASC,cAAc,QAAQ,iDAAiD;AAChF,SAASC,mBAAmB,QAAQ,sDAAsD;AAC1F,SAASC,oBAAoB,QAAQ,uDAAuD;AAC5F,SAASC,WAAW,QAAQ,8CAA8C;AAC1E,SAASC,mBAAmB,QAAQ,kDAAkD","ignoreList":[]}
@@ -65,7 +65,84 @@ function usePlatformQuery({
65
65
  };
66
66
  }
67
67
 
68
- // src/new/platform-apis/admin/useCurrentFoundryUser.ts
68
+ // src/new/platform-apis/admin/useCbacBanner.ts
69
+ function useCbacBanner({
70
+ markingIds,
71
+ enabled: externalEnabled = true
72
+ }) {
73
+ const {
74
+ client
75
+ } = React__default.default.useContext(chunkSVVMLSKN_cjs.OsdkContext2);
76
+ const stableMarkingIds = React__default.default.useMemo(() => markingIds, [JSON.stringify(markingIds)]);
77
+ const enabled = stableMarkingIds.length > 0 && externalEnabled;
78
+ const handleQuery = React__default.default.useCallback(() => {
79
+ return foundry_admin.CbacBanners.get(client, {
80
+ markingIds: stableMarkingIds,
81
+ preview: true
82
+ });
83
+ }, [client, stableMarkingIds]);
84
+ const query = usePlatformQuery({
85
+ query: handleQuery,
86
+ enabled,
87
+ queryName: "cbac-banner"
88
+ });
89
+ const banner = React__default.default.useMemo(() => {
90
+ if (query.data == null) {
91
+ return void 0;
92
+ }
93
+ return {
94
+ classificationString: query.data.classificationString,
95
+ textColor: query.data.textColor,
96
+ backgroundColors: query.data.backgroundColors,
97
+ markingIds: query.data.markings
98
+ };
99
+ }, [query.data]);
100
+ return {
101
+ banner,
102
+ isLoading: query.isLoading,
103
+ error: query.error,
104
+ refetch: query.refetch
105
+ };
106
+ }
107
+ function useCbacMarkingRestrictions({
108
+ markingIds,
109
+ enabled: externalEnabled = true
110
+ }) {
111
+ const {
112
+ client
113
+ } = React__default.default.useContext(chunkSVVMLSKN_cjs.OsdkContext2);
114
+ const stableMarkingIds = React__default.default.useMemo(() => markingIds, [JSON.stringify(markingIds)]);
115
+ const enabled = stableMarkingIds.length > 0 && externalEnabled;
116
+ const handleQuery = React__default.default.useCallback(() => {
117
+ return foundry_admin.CbacMarkingRestrictionsObjects.get(client, {
118
+ markingIds: stableMarkingIds,
119
+ preview: true
120
+ });
121
+ }, [client, stableMarkingIds]);
122
+ const query = usePlatformQuery({
123
+ query: handleQuery,
124
+ enabled,
125
+ queryName: "cbac-marking-restrictions"
126
+ });
127
+ const restrictions = React__default.default.useMemo(() => {
128
+ if (query.data == null) {
129
+ return void 0;
130
+ }
131
+ return {
132
+ disallowedMarkings: query.data.disallowedMarkings.map(String),
133
+ impliedMarkings: query.data.impliedMarkings.map(String),
134
+ requiredMarkings: query.data.requiredMarkings.map((group) => group.map(String)),
135
+ userSatisfiesMarkings: query.data.userSatisfiesMarkings,
136
+ isValid: query.data.isValid
137
+ };
138
+ }, [query.data]);
139
+ return {
140
+ restrictions,
141
+ isLoading: query.isLoading,
142
+ error: query.error,
143
+ refetch: query.refetch
144
+ };
145
+ }
69
146
  function useCurrentFoundryUser({
70
147
  enabled = true
71
148
  } = {}) {
@@ -138,9 +215,79 @@ function useFoundryUsersList({
138
215
  refetch: query.refetch
139
216
  };
140
217
  }
218
+ function useMarkingCategories({
219
+ enabled = true
220
+ } = {}) {
221
+ const {
222
+ client
223
+ } = React__default.default.useContext(chunkSVVMLSKN_cjs.OsdkContext2);
224
+ const handleQuery = React__default.default.useCallback(() => {
225
+ return foundry_admin.MarkingCategories.list(client);
226
+ }, [client]);
227
+ const query = usePlatformQuery({
228
+ query: handleQuery,
229
+ enabled,
230
+ queryName: "marking-categories"
231
+ });
232
+ return {
233
+ categories: query.data?.data,
234
+ isLoading: query.isLoading,
235
+ error: query.error,
236
+ refetch: query.refetch
237
+ };
238
+ }
239
+ function useMarkings({
240
+ enabled = true
241
+ } = {}) {
242
+ const {
243
+ client
244
+ } = React__default.default.useContext(chunkSVVMLSKN_cjs.OsdkContext2);
245
+ const handleQuery = React__default.default.useCallback(() => {
246
+ return foundry_admin.Markings.list(client);
247
+ }, [client]);
248
+ const query = usePlatformQuery({
249
+ query: handleQuery,
250
+ enabled,
251
+ queryName: "markings"
252
+ });
253
+ return {
254
+ markings: query.data?.data,
255
+ isLoading: query.isLoading,
256
+ error: query.error,
257
+ refetch: query.refetch
258
+ };
259
+ }
260
+ function useUserViewMarkings({
261
+ userId,
262
+ enabled = true
263
+ } = {}) {
264
+ const {
265
+ client
266
+ } = React__default.default.useContext(chunkSVVMLSKN_cjs.OsdkContext2);
267
+ const handleQuery = React__default.default.useCallback(async () => {
268
+ const resolvedUserId = userId ?? (await foundry_admin.Users.getCurrent(client)).id;
269
+ return foundry_admin.Users.getMarkings(client, resolvedUserId);
270
+ }, [client, userId]);
271
+ const query = usePlatformQuery({
272
+ query: handleQuery,
273
+ enabled,
274
+ queryName: "user-view-markings"
275
+ });
276
+ return {
277
+ markingIds: query.data?.view,
278
+ isLoading: query.isLoading,
279
+ error: query.error,
280
+ refetch: query.refetch
281
+ };
282
+ }
141
283
 
284
+ exports.useCbacBanner = useCbacBanner;
285
+ exports.useCbacMarkingRestrictions = useCbacMarkingRestrictions;
142
286
  exports.useCurrentFoundryUser = useCurrentFoundryUser;
143
287
  exports.useFoundryUser = useFoundryUser;
144
288
  exports.useFoundryUsersList = useFoundryUsersList;
289
+ exports.useMarkingCategories = useMarkingCategories;
290
+ exports.useMarkings = useMarkings;
291
+ exports.useUserViewMarkings = useUserViewMarkings;
145
292
  //# sourceMappingURL=admin.cjs.map
146
293
  //# sourceMappingURL=admin.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/utils/usePlatformQuery.ts","../../../../src/new/platform-apis/admin/useCurrentFoundryUser.ts","../../../../src/new/platform-apis/admin/useFoundryUser.ts","../../../../src/new/platform-apis/admin/useFoundryUsersList.ts"],"names":["React","makeExternalStore","OsdkContext2","Users"],"mappings":";;;;;;;;;;AAkBO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,KAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAU,GAAA;AACZ,CAAG,EAAA;AACD,EAAM,MAAA,WAAA,GAAcA,uBAAM,MAAO,EAAA;AACjC,EAAM,MAAA,WAAA,GAAcA,sBAAM,CAAA,WAAA,CAAY,MAAM;AAC1C,IAAA,MAAM,WAAW,WAAY,CAAA,OAAA;AAC7B,IAAA,IAAI,YAAY,IAAM,EAAA;AACtB,IAAA,QAAA,CAAS,IAAK,CAAA;AAAA,MACZ,MAAQ,EAAA,SAAA;AAAA,MACR,IAAM,E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B;AACF","file":"admin.cjs","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 React from \"react\";\nimport { makeExternalStore } from \"../new/makeExternalStore.js\";\nexport function usePlatformQuery({\n query,\n queryName,\n enabled = true\n}) {\n const observerRef = React.useRef();\n const handleQuery = React.useCallback(() => {\n const observer = observerRef.current;\n if (observer == null) return;\n observer.next({\n status: \"loading\",\n data: undefined\n });\n query().then(data => {\n observer.next({\n status: \"success\",\n data\n });\n }).catch(err => {\n observer.error(err);\n });\n }, [query]);\n const {\n subscribe,\n getSnapShot\n } = React.useMemo(() => {\n if (!enabled) {\n return makeExternalStore(() => ({\n unsubscribe: () => {}\n }), process.env.NODE_ENV !== \"production\" ? `${queryName} Query [DISABLED]` : undefined);\n }\n return makeExternalStore(observer => {\n observerRef.current = observer;\n handleQuery();\n return {\n unsubscribe: () => {\n observerRef.current = undefined;\n }\n };\n }, queryName);\n }, [enabled, queryName, handleQuery]);\n const payload = React.useSyncExternalStore(subscribe, getSnapShot);\n let error;\n if (payload && \"error\" in payload && payload.error != null) {\n error = payload.error;\n } else if (payload?.status === \"error\") {\n error = new Error(`Failed to query platform API: ${queryName}`);\n }\n return {\n data: payload?.data,\n isLoading: enabled ? payload?.status === \"loading\" || !payload : false,\n error,\n refetch: handleQuery\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get the currently signed in User.\n * @param options Options to control the query.\n */\nexport function useCurrentFoundryUser({\n enabled = true\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => Users.getCurrent(client), [client]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-current-user\"\n });\n return {\n currentUser: query.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get the User with the specified id.\n * @param userId A Foundry User ID.\n * @param options Options to control the query.\n */\nexport function useFoundryUser(userId, {\n enabled = true,\n status = \"ACTIVE\"\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return Users.get(client, userId, {\n status\n });\n }, [client, userId, status]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-user\"\n });\n return {\n user: query.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Lists all Users. This is a paged endpoint. Each page may be smaller or larger than the requested page size.\n * @param options Options to control the query.\n */\nexport function useFoundryUsersList({\n enabled = true,\n include = \"ACTIVE\",\n pageSize = 1000,\n pageToken\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return Users.list(client, {\n include,\n pageSize,\n pageToken\n });\n }, [client, include, pageSize, pageToken]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-users-list\"\n });\n return {\n users: query.data?.data,\n nextPageToken: query.data?.nextPageToken,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}"]}
1
+ {"version":3,"sources":["../../../../src/utils/usePlatformQuery.ts","../../../../src/new/platform-apis/admin/useCbacBanner.ts","../../../../src/new/platform-apis/admin/useCbacMarkingRestrictions.ts","../../../../src/new/platform-apis/admin/useCurrentFoundryUser.ts","../../../../src/new/platform-apis/admin/useFoundryUser.ts","../../../../src/new/platform-apis/admin/useFoundryUsersList.ts","../../../../src/new/platform-apis/admin/useMarkingCategories.ts","../../../../src/new/platform-apis/admin/useMarkings.ts","../../../../src/new/platform-apis/admin/useUserMarkings.ts"],"names":["React","makeExtern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G,EAAA,EAAA;AAClE,IAAOA,OAAAA,mBAAAA,CAAM,WAAY,CAAA,MAAA,EAAQ,cAAc,CAAA;AAAA,GAC9C,EAAA,CAAC,MAAQ,EAAA,MAAM,CAAC,CAAA;AACnB,EAAA,MAAM,QAAQ,gBAAiB,CAAA;AAAA,IAC7B,KAAO,EAAA,WAAA;AAAA,IACP,OAAA;AAAA,IACA,SAAW,EAAA;AAAA,GACZ,CAAA;AACD,EAAO,OAAA;AAAA,IACL,UAAA,EAAY,MAAM,IAAM,EAAA,IAAA;AAAA,IACxB,WAAW,KAAM,CAAA,SAAA;AAAA,IACjB,OAAO,KAAM,CAAA,KAAA;AAAA,IACb,SAAS,KAAM,CAAA;AAAA,GACjB;AACF","file":"admin.cjs","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 React from \"react\";\nimport { makeExternalStore } from \"../new/makeExternalStore.js\";\nexport function usePlatformQuery({\n query,\n queryName,\n enabled = true\n}) {\n const observerRef = React.useRef();\n const handleQuery = React.useCallback(() => {\n const observer = observerRef.current;\n if (observer == null) return;\n observer.next({\n status: \"loading\",\n data: undefined\n });\n query().then(data => {\n observer.next({\n status: \"success\",\n data\n });\n }).catch(err => {\n observer.error(err);\n });\n }, [query]);\n const {\n subscribe,\n getSnapShot\n } = React.useMemo(() => {\n if (!enabled) {\n return makeExternalStore(() => ({\n unsubscribe: () => {}\n }), process.env.NODE_ENV !== \"production\" ? `${queryName} Query [DISABLED]` : undefined);\n }\n return makeExternalStore(observer => {\n observerRef.current = observer;\n handleQuery();\n return {\n unsubscribe: () => {\n observerRef.current = undefined;\n }\n };\n }, queryName);\n }, [enabled, queryName, handleQuery]);\n const payload = React.useSyncExternalStore(subscribe, getSnapShot);\n let error;\n if (payload && \"error\" in payload && payload.error != null) {\n error = payload.error;\n } else if (payload?.status === \"error\") {\n error = new Error(`Failed to query platform API: ${queryName}`);\n }\n return {\n data: payload?.data,\n isLoading: enabled ? payload?.status === \"loading\" || !payload : false,\n error,\n refetch: handleQuery\n };\n}","/*\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 { CbacBanners } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get the CBAC banner data for the given marking IDs.\n * @param options Options to control the query.\n */\nexport function useCbacBanner({\n markingIds,\n enabled: externalEnabled = true\n}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const stableMarkingIds = React.useMemo(() => markingIds, [JSON.stringify(markingIds)]);\n const enabled = stableMarkingIds.length > 0 && externalEnabled;\n const handleQuery = React.useCallback(() => {\n return CbacBanners.get(client, {\n markingIds: stableMarkingIds,\n preview: true\n });\n }, [client, stableMarkingIds]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"cbac-banner\"\n });\n const banner = React.useMemo(() => {\n if (query.data == null) {\n return undefined;\n }\n return {\n classificationString: query.data.classificationString,\n textColor: query.data.textColor,\n backgroundColors: query.data.backgroundColors,\n markingIds: query.data.markings\n };\n }, [query.data]);\n return {\n banner,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { CbacMarkingRestrictionsObjects } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get CBAC marking restrictions (implied, disallowed, required) for the given marking IDs.\n * @param options Options to control the query.\n */\nexport function useCbacMarkingRestrictions({\n markingIds,\n enabled: externalEnabled = true\n}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const stableMarkingIds = React.useMemo(() => markingIds, [JSON.stringify(markingIds)]);\n const enabled = stableMarkingIds.length > 0 && externalEnabled;\n const handleQuery = React.useCallback(() => {\n return CbacMarkingRestrictionsObjects.get(client, {\n markingIds: stableMarkingIds,\n preview: true\n });\n }, [client, stableMarkingIds]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"cbac-marking-restrictions\"\n });\n const restrictions = React.useMemo(() => {\n if (query.data == null) {\n return undefined;\n }\n return {\n disallowedMarkings: query.data.disallowedMarkings.map(String),\n impliedMarkings: query.data.impliedMarkings.map(String),\n requiredMarkings: query.data.requiredMarkings.map(group => group.map(String)),\n userSatisfiesMarkings: query.data.userSatisfiesMarkings,\n isValid: query.data.isValid\n };\n }, [query.data]);\n return {\n restrictions,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get the currently signed in User.\n * @param options Options to control the query.\n */\nexport function useCurrentFoundryUser({\n enabled = true\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => Users.getCurrent(client), [client]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-current-user\"\n });\n return {\n currentUser: query.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get the User with the specified id.\n * @param userId A Foundry User ID.\n * @param options Options to control the query.\n */\nexport function useFoundryUser(userId, {\n enabled = true,\n status = \"ACTIVE\"\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return Users.get(client, userId, {\n status\n });\n }, [client, userId, status]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-user\"\n });\n return {\n user: query.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Lists all Users. This is a paged endpoint. Each page may be smaller or larger than the requested page size.\n * @param options Options to control the query.\n */\nexport function useFoundryUsersList({\n enabled = true,\n include = \"ACTIVE\",\n pageSize = 1000,\n pageToken\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return Users.list(client, {\n include,\n pageSize,\n pageToken\n });\n }, [client, include, pageSize, pageToken]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"foundry-users-list\"\n });\n return {\n users: query.data?.data,\n nextPageToken: query.data?.nextPageToken,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { MarkingCategories } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * List all marking categories.\n * @param options Options to control the query.\n */\nexport function useMarkingCategories({\n enabled = true\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return MarkingCategories.list(client);\n }, [client]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"marking-categories\"\n });\n return {\n categories: query.data?.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Markings } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * List all markings.\n * @param options Options to control the query.\n */\nexport function useMarkings({\n enabled = true\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(() => {\n return Markings.list(client);\n }, [client]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"markings\"\n });\n return {\n markings: query.data?.data,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}","/*\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 { Users } from \"@osdk/foundry.admin\";\nimport React from \"react\";\nimport { usePlatformQuery } from \"../../../utils/usePlatformQuery.js\";\nimport { OsdkContext2 } from \"../../OsdkContext2.js\";\n/**\n * Get view-accessible markings for a user.\n * When `userId` is provided, fetches markings for that user.\n * When omitted, fetches markings for the current user.\n * @param options Options to control the query.\n */\nexport function useUserViewMarkings({\n userId,\n enabled = true\n} = {}) {\n const {\n client\n } = React.useContext(OsdkContext2);\n const handleQuery = React.useCallback(async () => {\n const resolvedUserId = userId ?? (await Users.getCurrent(client)).id;\n return Users.getMarkings(client, resolvedUserId);\n }, [client, userId]);\n const query = usePlatformQuery({\n query: handleQuery,\n enabled,\n queryName: \"user-view-markings\"\n });\n return {\n markingIds: query.data?.view,\n isLoading: query.isLoading,\n error: query.error,\n refetch: query.refetch\n };\n}"]}
@@ -1,6 +1,75 @@
1
- import { User, ListUsersResponse } from '@osdk/foundry.admin';
1
+ import { User, ListUsersResponse, MarkingCategory, Marking } from '@osdk/foundry.admin';
2
2
  import { UserStatus } from '@osdk/foundry.core';
3
3
 
4
+ interface CbacBannerData {
5
+ classificationString: string;
6
+ textColor: string;
7
+ backgroundColors: string[];
8
+ markingIds: string[];
9
+ }
10
+ interface UseCbacBannerOptions {
11
+ markingIds: string[];
12
+ /**
13
+ * Enable or disable the query.
14
+ *
15
+ * When `false`, the query will not automatically execute.
16
+ *
17
+ * This is useful for:
18
+ * - Lazy/on-demand queries that should wait for user interaction
19
+ * - Dependent queries that need data from another query first
20
+ * - Conditional queries based on component state
21
+ *
22
+ * @default true
23
+ */
24
+ enabled?: boolean;
25
+ }
26
+ interface UseCbacBannerResult {
27
+ banner: CbacBannerData | undefined;
28
+ isLoading: boolean;
29
+ error: Error | undefined;
30
+ refetch: () => void;
31
+ }
32
+ /**
33
+ * Get the CBAC banner data for the given marking IDs.
34
+ * @param options Options to control the query.
35
+ */
36
+ declare function useCbacBanner({ markingIds, enabled: externalEnabled }: UseCbacBannerOptions): UseCbacBannerResult;
37
+
38
+ interface CbacMarkingRestrictionsData {
39
+ disallowedMarkings: string[];
40
+ impliedMarkings: string[];
41
+ requiredMarkings: string[][];
42
+ userSatisfiesMarkings: boolean;
43
+ isValid: boolean;
44
+ }
45
+ interface UseCbacMarkingRestrictionsOptions {
46
+ markingIds: string[];
47
+ /**
48
+ * Enable or disable the query.
49
+ *
50
+ * When `false`, the query will not automatically execute.
51
+ *
52
+ * This is useful for:
53
+ * - Lazy/on-demand queries that should wait for user interaction
54
+ * - Dependent queries that need data from another query first
55
+ * - Conditional queries based on component state
56
+ *
57
+ * @default true
58
+ */
59
+ enabled?: boolean;
60
+ }
61
+ interface UseCbacMarkingRestrictionsResult {
62
+ restrictions: CbacMarkingRestrictionsData | undefined;
63
+ isLoading: boolean;
64
+ error: Error | undefined;
65
+ refetch: () => void;
66
+ }
67
+ /**
68
+ * Get CBAC marking restrictions (implied, disallowed, required) for the given marking IDs.
69
+ * @param options Options to control the query.
70
+ */
71
+ declare function useCbacMarkingRestrictions({ markingIds, enabled: externalEnabled }: UseCbacMarkingRestrictionsOptions): UseCbacMarkingRestrictionsResult;
72
+
4
73
  interface UseCurrentFoundryUserOptions {
5
74
  /**
6
75
  * Enable or disable the query.
@@ -115,4 +184,92 @@ interface UseFoundryUsersListResult {
115
184
  */
116
185
  declare function useFoundryUsersList({ enabled, include, pageSize, pageToken }?: UseFoundryUsersListOptions): UseFoundryUsersListResult;
117
186
 
118
- export { useCurrentFoundryUser, useFoundryUser, useFoundryUsersList };
187
+ interface UseMarkingCategoriesOptions {
188
+ /**
189
+ * Enable or disable the query.
190
+ *
191
+ * When `false`, the query will not automatically execute.
192
+ *
193
+ * This is useful for:
194
+ * - Lazy/on-demand queries that should wait for user interaction
195
+ * - Dependent queries that need data from another query first
196
+ * - Conditional queries based on component state
197
+ *
198
+ * @default true
199
+ */
200
+ enabled?: boolean;
201
+ }
202
+ interface UseMarkingCategoriesResult {
203
+ categories: MarkingCategory[] | undefined;
204
+ isLoading: boolean;
205
+ error: Error | undefined;
206
+ refetch: () => void;
207
+ }
208
+ /**
209
+ * List all marking categories.
210
+ * @param options Options to control the query.
211
+ */
212
+ declare function useMarkingCategories({ enabled }?: UseMarkingCategoriesOptions): UseMarkingCategoriesResult;
213
+
214
+ interface UseMarkingsOptions {
215
+ /**
216
+ * Enable or disable the query.
217
+ *
218
+ * When `false`, the query will not automatically execute.
219
+ *
220
+ * This is useful for:
221
+ * - Lazy/on-demand queries that should wait for user interaction
222
+ * - Dependent queries that need data from another query first
223
+ * - Conditional queries based on component state
224
+ *
225
+ * @default true
226
+ */
227
+ enabled?: boolean;
228
+ }
229
+ interface UseMarkingsResult {
230
+ markings: Marking[] | undefined;
231
+ isLoading: boolean;
232
+ error: Error | undefined;
233
+ refetch: () => void;
234
+ }
235
+ /**
236
+ * List all markings.
237
+ * @param options Options to control the query.
238
+ */
239
+ declare function useMarkings({ enabled }?: UseMarkingsOptions): UseMarkingsResult;
240
+
241
+ interface UseUserViewMarkingsOptions {
242
+ /**
243
+ * The user ID to fetch view markings for.
244
+ * When omitted, fetches markings for the current user.
245
+ */
246
+ userId?: string;
247
+ /**
248
+ * Enable or disable the query.
249
+ *
250
+ * When `false`, the query will not automatically execute.
251
+ *
252
+ * This is useful for:
253
+ * - Lazy/on-demand queries that should wait for user interaction
254
+ * - Dependent queries that need data from another query first
255
+ * - Conditional queries based on component state
256
+ *
257
+ * @default true
258
+ */
259
+ enabled?: boolean;
260
+ }
261
+ interface UseUserViewMarkingsResult {
262
+ markingIds: string[] | undefined;
263
+ isLoading: boolean;
264
+ error: Error | undefined;
265
+ refetch: () => void;
266
+ }
267
+ /**
268
+ * Get view-accessible markings for a user.
269
+ * When `userId` is provided, fetches markings for that user.
270
+ * When omitted, fetches markings for the current user.
271
+ * @param options Options to control the query.
272
+ */
273
+ declare function useUserViewMarkings({ userId, enabled }?: UseUserViewMarkingsOptions): UseUserViewMarkingsResult;
274
+
275
+ export { type CbacBannerData, type CbacMarkingRestrictionsData, type UseCbacBannerOptions, type UseCbacBannerResult, type UseCbacMarkingRestrictionsOptions, type UseCbacMarkingRestrictionsResult, type UseUserViewMarkingsOptions, type UseUserViewMarkingsResult, useCbacBanner, useCbacMarkingRestrictions, useCurrentFoundryUser, useFoundryUser, useFoundryUsersList, useMarkingCategories, useMarkings, useUserViewMarkings };
@@ -234,6 +234,7 @@ function useOsdkAction(actionDef) {
234
234
  unknown: e
235
235
  });
236
236
  }
237
+ throw e;
237
238
  } finally {
238
239
  setPending(false);
239
240
  }
@@ -417,6 +418,7 @@ function useOsdkObject(...args) {
417
418
  const optionsArg = !isInstanceSignature && args[2] != null && typeof args[2] === "object" ? args[2] : void 0;
418
419
  const enabled = isInstanceSignature ? typeof args[1] === "boolean" ? args[1] : true : optionsArg ? optionsArg.enabled ?? true : typeof args[2] === "boolean" ? args[2] : true;
419
420
  const selectArg = optionsArg?.$select;
421
+ const loadPropertySecurityMetadata = optionsArg?.$loadPropertySecurityMetadata;
420
422
  const mode = isInstanceSignature ? "offline" : void 0;
421
423
  const typeOrApiName = isInstanceSignature ? args[0].$objectType : args[0];
422
424
  const primaryKey = isInstanceSignature ? args[0].$primaryKey : args[1];
@@ -436,9 +438,12 @@ function useOsdkObject(...args) {
436
438
  mode,
437
439
  ...stableSelect ? {
438
440
  select: stableSelect
441
+ } : {},
442
+ ...loadPropertySecurityMetadata ? {
443
+ $loadPropertySecurityMetadata: loadPropertySecurityMetadata
439
444
  } : {}
440
445
  }, observer), `object ${apiNameString} ${primaryKey}`);
441
- }, [enabled, observableClient, typeOrApiName, apiNameString, primaryKey, mode, stableSelect]);
446
+ }, [enabled, observableClient, typeOrApiName, apiNameString, primaryKey, mode, stableSelect, loadPropertySecurityMetadata]);
442
447
  const payload = React4__default.default.useSyncExternalStore(subscribe, getSnapShot);
443
448
  const forceUpdate = React4__default.default.useCallback(() => {
444
449
  throw new Error("not implemented");
@@ -476,7 +481,8 @@ function useOsdkObjects(type, options) {
476
481
  autoFetchMore,
477
482
  intersectWith,
478
483
  pivotTo,
479
- $select
484
+ $select,
485
+ $loadPropertySecurityMetadata
480
486
  } = options ?? {};
481
487
  const canonWhere = observableClient.canonicalizeWhereClause(where ?? EMPTY_WHERE2);
482
488
  const stableCanonWhere = React4__default.default.useMemo(() => canonWhere, [JSON.stringify(canonWhere)]);
@@ -513,9 +519,12 @@ function useOsdkObjects(type, options) {
513
519
  } : {},
514
520
  ...stableSelect ? {
515
521
  select: stableSelect
522
+ } : {},
523
+ ...$loadPropertySecurityMetadata ? {
524
+ $loadPropertySecurityMetadata
516
525
  } : {}
517
526
  }, observer), process.env.NODE_ENV !== "production" ? `list ${type.apiName} ${stableRids ? `[${stableRids.length} rids]` : ""} ${JSON.stringify(stableCanonWhere)}` : void 0);
518
- }, [enabled, observableClient, type.apiName, type.type, stableRids, stableCanonWhere, dedupeIntervalMs, pageSize, stableOrderBy, streamUpdates, stableWithProperties, autoFetchMore, stableIntersectWith, pivotTo, stableSelect]);
527
+ }, [enabled, observableClient, type.apiName, type.type, stableRids, stableCanonWhere, dedupeIntervalMs, pageSize, stableOrderBy, streamUpdates, stableWithProperties, autoFetchMore, stableIntersectWith, pivotTo, stableSelect, $loadPropertySecurityMetadata]);
519
528
  const listPayload = React4__default.default.useSyncExternalStore(subscribe, getSnapShot);
520
529
  return React4__default.default.useMemo(() => {
521
530
  let error;