@osdk/react 0.10.0-beta.9 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/build/browser/new/OsdkContext2.js +22 -2
  3. package/build/browser/new/OsdkContext2.js.map +1 -1
  4. package/build/browser/new/platform-apis/admin/useCbacBanner.js +63 -0
  5. package/build/browser/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  6. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  7. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  8. package/build/browser/new/platform-apis/admin/useMarkingCategories.js +46 -0
  9. package/build/browser/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  10. package/build/browser/new/platform-apis/admin/useMarkings.js +46 -0
  11. package/build/browser/new/platform-apis/admin/useMarkings.js.map +1 -0
  12. package/build/browser/new/platform-apis/admin/useUserMarkings.js +50 -0
  13. package/build/browser/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  14. package/build/browser/new/useOsdkAction.js +3 -6
  15. package/build/browser/new/useOsdkAction.js.map +1 -1
  16. package/build/browser/new/useOsdkFunctions.js +137 -0
  17. package/build/browser/new/useOsdkFunctions.js.map +1 -0
  18. package/build/browser/new/useOsdkObject.js +6 -2
  19. package/build/browser/new/useOsdkObject.js.map +1 -1
  20. package/build/browser/new/useOsdkObjects.js +6 -2
  21. package/build/browser/new/useOsdkObjects.js.map +1 -1
  22. package/build/browser/public/experimental/admin.js +5 -0
  23. package/build/browser/public/experimental/admin.js.map +1 -1
  24. package/build/browser/public/unstable-do-not-use.js +18 -0
  25. package/build/browser/public/unstable-do-not-use.js.map +1 -0
  26. package/build/cjs/chunk-2N32USW5.cjs +28 -0
  27. package/build/cjs/chunk-2N32USW5.cjs.map +1 -0
  28. package/build/cjs/chunk-R4FZ5MUH.cjs +34 -0
  29. package/build/cjs/chunk-R4FZ5MUH.cjs.map +1 -0
  30. package/build/cjs/{chunk-SVVMLSKN.cjs → chunk-ZUNR45SJ.cjs} +15 -4
  31. package/build/cjs/chunk-ZUNR45SJ.cjs.map +1 -0
  32. package/build/cjs/index.cjs +7 -6
  33. package/build/cjs/index.cjs.map +1 -1
  34. package/build/cjs/public/experimental/admin.cjs +154 -7
  35. package/build/cjs/public/experimental/admin.cjs.map +1 -1
  36. package/build/cjs/public/experimental/admin.d.cts +159 -2
  37. package/build/cjs/public/experimental.cjs +42 -36
  38. package/build/cjs/public/experimental.cjs.map +1 -1
  39. package/build/cjs/public/experimental.d.cts +12 -121
  40. package/build/cjs/public/unstable-do-not-use.cjs +114 -0
  41. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  42. package/build/cjs/public/unstable-do-not-use.d.cts +35 -0
  43. package/build/cjs/useOsdkFunction-B0s7lqgN.d.cts +121 -0
  44. package/build/esm/new/OsdkContext2.js +22 -2
  45. package/build/esm/new/OsdkContext2.js.map +1 -1
  46. package/build/esm/new/platform-apis/admin/useCbacBanner.js +63 -0
  47. package/build/esm/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  48. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  49. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  50. package/build/esm/new/platform-apis/admin/useMarkingCategories.js +46 -0
  51. package/build/esm/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  52. package/build/esm/new/platform-apis/admin/useMarkings.js +46 -0
  53. package/build/esm/new/platform-apis/admin/useMarkings.js.map +1 -0
  54. package/build/esm/new/platform-apis/admin/useUserMarkings.js +50 -0
  55. package/build/esm/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  56. package/build/esm/new/useOsdkAction.js +3 -6
  57. package/build/esm/new/useOsdkAction.js.map +1 -1
  58. package/build/esm/new/useOsdkFunctions.js +137 -0
  59. package/build/esm/new/useOsdkFunctions.js.map +1 -0
  60. package/build/esm/new/useOsdkObject.js +6 -2
  61. package/build/esm/new/useOsdkObject.js.map +1 -1
  62. package/build/esm/new/useOsdkObjects.js +6 -2
  63. package/build/esm/new/useOsdkObjects.js.map +1 -1
  64. package/build/esm/public/experimental/admin.js +5 -0
  65. package/build/esm/public/experimental/admin.js.map +1 -1
  66. package/build/esm/public/unstable-do-not-use.js +18 -0
  67. package/build/esm/public/unstable-do-not-use.js.map +1 -0
  68. package/build/types/new/OsdkContext2.d.ts +1 -0
  69. package/build/types/new/OsdkContext2.d.ts.map +1 -1
  70. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts +33 -0
  71. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts.map +1 -0
  72. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts +34 -0
  73. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts.map +1 -0
  74. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts +27 -0
  75. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts.map +1 -0
  76. package/build/types/new/platform-apis/admin/useMarkings.d.ts +27 -0
  77. package/build/types/new/platform-apis/admin/useMarkings.d.ts.map +1 -0
  78. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts +33 -0
  79. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts.map +1 -0
  80. package/build/types/new/useOsdkFunctions.d.ts +31 -0
  81. package/build/types/new/useOsdkFunctions.d.ts.map +1 -0
  82. package/build/types/new/useOsdkObject.d.ts +2 -1
  83. package/build/types/new/useOsdkObject.d.ts.map +1 -1
  84. package/build/types/new/useOsdkObjects.d.ts +6 -0
  85. package/build/types/new/useOsdkObjects.d.ts.map +1 -1
  86. package/build/types/public/experimental/admin.d.ts +8 -0
  87. package/build/types/public/experimental/admin.d.ts.map +1 -1
  88. package/build/types/public/unstable-do-not-use.d.ts +2 -0
  89. package/build/types/public/unstable-do-not-use.d.ts.map +1 -0
  90. package/package.json +19 -10
  91. package/unstable-do-not-use.d.ts +17 -0
  92. package/build/cjs/chunk-OVBG5VXE.cjs +0 -50
  93. package/build/cjs/chunk-OVBG5VXE.cjs.map +0 -1
  94. package/build/cjs/chunk-SVVMLSKN.cjs.map +0 -1
@@ -14,7 +14,12 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ export { useCbacBanner } from "../../new/platform-apis/admin/useCbacBanner.js";
18
+ export { useCbacMarkingRestrictions } from "../../new/platform-apis/admin/useCbacMarkingRestrictions.js";
17
19
  export { useCurrentFoundryUser } from "../../new/platform-apis/admin/useCurrentFoundryUser.js";
18
20
  export { useFoundryUser } from "../../new/platform-apis/admin/useFoundryUser.js";
19
21
  export { useFoundryUsersList } from "../../new/platform-apis/admin/useFoundryUsersList.js";
22
+ export { useMarkingCategories } from "../../new/platform-apis/admin/useMarkingCategories.js";
23
+ export { useMarkings } from "../../new/platform-apis/admin/useMarkings.js";
24
+ export { useUserViewMarkings } from "../../new/platform-apis/admin/useUserMarkings.js";
20
25
  //# sourceMappingURL=admin.js.map
@@ -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":[]}
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export { useOsdkFunctions } from "../new/useOsdkFunctions.js";
18
+ //# sourceMappingURL=unstable-do-not-use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unstable-do-not-use.js","names":["useOsdkFunctions"],"sources":["unstable-do-not-use.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\nexport { useOsdkFunctions } from \"../new/useOsdkFunctions.js\";\nexport type {\n FunctionQueryParams,\n UseOsdkFunctionsProps,\n UseOsdkFunctionsResult,\n} from \"../new/useOsdkFunctions.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,4BAA4B","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import type { Client } from "@osdk/client";
2
2
  import type { ObservableClient } from "@osdk/client/unstable-do-not-use";
3
3
  import React from "react";
4
+ export declare const MISSING_PROVIDER_MESSAGE = "No OsdkProvider2 found. Did you forget to wrap your component tree with <OsdkProvider2>?";
4
5
  interface OsdkContextContents {
5
6
  client: Client;
6
7
  observableClient: ObservableClient;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,cAAc,cAAe;AAC3C,cAAc,wBAAwB,kCAAmC;AACzE,OAAO,WAAW,OAAQ;UAYhB,oBAAoB;CAC5B,QAAQ;CAKR,kBAAkB;AACnB;AAED,OAAO,cAAMA,cAAc,MAAM,QAAQ","names":["OsdkContext2: React.Context<OsdkContextContents>"],"sources":["../../../src/new/OsdkContext2.ts"],"version":3,"file":"OsdkContext2.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,cAAc,cAAe;AAC3C,cAAc,wBAAwB,kCAAmC;AACzE,OAAO,WAAW,OAAQ;AAE1B,OAAO,cAAM,2BACX;UA6BQ,oBAAoB;CAC5B,QAAQ;CAKR,kBAAkB;AACnB;AAED,OAAO,cAAMA,cAAc,MAAM,QAAQ","names":["OsdkContext2: React.Context<OsdkContextContents>"],"sources":["../../../src/new/OsdkContext2.ts"],"version":3,"file":"OsdkContext2.d.ts"}
@@ -0,0 +1,33 @@
1
+ export interface CbacBannerData {
2
+ classificationString: string;
3
+ textColor: string;
4
+ backgroundColors: string[];
5
+ markingIds: string[];
6
+ }
7
+ export interface UseCbacBannerOptions {
8
+ markingIds: string[];
9
+ /**
10
+ * Enable or disable the query.
11
+ *
12
+ * When `false`, the query will not automatically execute.
13
+ *
14
+ * This is useful for:
15
+ * - Lazy/on-demand queries that should wait for user interaction
16
+ * - Dependent queries that need data from another query first
17
+ * - Conditional queries based on component state
18
+ *
19
+ * @default true
20
+ */
21
+ enabled?: boolean;
22
+ }
23
+ export interface UseCbacBannerResult {
24
+ banner: CbacBannerData | undefined;
25
+ isLoading: boolean;
26
+ error: Error | undefined;
27
+ refetch: () => void;
28
+ }
29
+ /**
30
+ * Get the CBAC banner data for the given marking IDs.
31
+ * @param options Options to control the query.
32
+ */
33
+ export declare function useCbacBanner({ markingIds, enabled: externalEnabled }: UseCbacBannerOptions): UseCbacBannerResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAqBA,iBAAiB,eAAe;CAC9B;CACA;CACA;CACA;AACD;AAED,iBAAiB,qBAAqB;CACpC;;;;;;;;;;;;;CAaA;AACD;AAED,iBAAiB,oBAAoB;CACnC,QAAQ;CACR;CAEA,OAAO;CAEP;AACD;;;;;AAMD,OAAO,iBAAS,cACd,EAAE,YAAY,SAAS,iBAA8C,EAApB,uBAChD","names":[],"sources":["../../../../../src/new/platform-apis/admin/useCbacBanner.ts"],"version":3,"file":"useCbacBanner.d.ts"}
@@ -0,0 +1,34 @@
1
+ export interface CbacMarkingRestrictionsData {
2
+ disallowedMarkings: string[];
3
+ impliedMarkings: string[];
4
+ requiredMarkings: string[][];
5
+ userSatisfiesMarkings: boolean;
6
+ isValid: boolean;
7
+ }
8
+ export interface UseCbacMarkingRestrictionsOptions {
9
+ markingIds: string[];
10
+ /**
11
+ * Enable or disable the query.
12
+ *
13
+ * When `false`, the query will not automatically execute.
14
+ *
15
+ * This is useful for:
16
+ * - Lazy/on-demand queries that should wait for user interaction
17
+ * - Dependent queries that need data from another query first
18
+ * - Conditional queries based on component state
19
+ *
20
+ * @default true
21
+ */
22
+ enabled?: boolean;
23
+ }
24
+ export interface UseCbacMarkingRestrictionsResult {
25
+ restrictions: CbacMarkingRestrictionsData | undefined;
26
+ isLoading: boolean;
27
+ error: Error | undefined;
28
+ refetch: () => void;
29
+ }
30
+ /**
31
+ * Get CBAC marking restrictions (implied, disallowed, required) for the given marking IDs.
32
+ * @param options Options to control the query.
33
+ */
34
+ export declare function useCbacMarkingRestrictions({ markingIds, enabled: externalEnabled }: UseCbacMarkingRestrictionsOptions): UseCbacMarkingRestrictionsResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAqBA,iBAAiB,4BAA4B;CAC3C;CACA;CACA;CACA;CACA;AACD;AAED,iBAAiB,kCAAkC;CACjD;;;;;;;;;;;;;CAaA;AACD;AAED,iBAAiB,iCAAiC;CAChD,cAAc;CACd;CAEA,OAAO;CAEP;AACD;;;;;AAMD,OAAO,iBAAS,2BACd,EAAE,YAAY,SAAS,iBACY,EAAjC,oCACD","names":[],"sources":["../../../../../src/new/platform-apis/admin/useCbacMarkingRestrictions.ts"],"version":3,"file":"useCbacMarkingRestrictions.d.ts"}
@@ -0,0 +1,27 @@
1
+ import type { MarkingCategory } from "@osdk/foundry.admin";
2
+ export interface UseMarkingCategoriesOptions {
3
+ /**
4
+ * Enable or disable the query.
5
+ *
6
+ * When `false`, the query will not automatically execute.
7
+ *
8
+ * This is useful for:
9
+ * - Lazy/on-demand queries that should wait for user interaction
10
+ * - Dependent queries that need data from another query first
11
+ * - Conditional queries based on component state
12
+ *
13
+ * @default true
14
+ */
15
+ enabled?: boolean;
16
+ }
17
+ export interface UseMarkingCategoriesResult {
18
+ categories: MarkingCategory[] | undefined;
19
+ isLoading: boolean;
20
+ error: Error | undefined;
21
+ refetch: () => void;
22
+ }
23
+ /**
24
+ * List all marking categories.
25
+ * @param options Options to control the query.
26
+ */
27
+ export declare function useMarkingCategories({ enabled }?: UseMarkingCategoriesOptions): UseMarkingCategoriesResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,uBAAuB,qBAAsB;AAM3D,iBAAiB,4BAA4B;;;;;;;;;;;;;CAa3C;AACD;AAED,iBAAiB,2BAA2B;CAC1C,YAAY;CACZ;CAEA,OAAO;CAEP;AACD;;;;;AAMD,OAAO,iBAAS,qBACd,EAAE,SAA6C,GAA3B,8BACnB","names":[],"sources":["../../../../../src/new/platform-apis/admin/useMarkingCategories.ts"],"version":3,"file":"useMarkingCategories.d.ts"}
@@ -0,0 +1,27 @@
1
+ import type { Marking } from "@osdk/foundry.admin";
2
+ export interface UseMarkingsOptions {
3
+ /**
4
+ * Enable or disable the query.
5
+ *
6
+ * When `false`, the query will not automatically execute.
7
+ *
8
+ * This is useful for:
9
+ * - Lazy/on-demand queries that should wait for user interaction
10
+ * - Dependent queries that need data from another query first
11
+ * - Conditional queries based on component state
12
+ *
13
+ * @default true
14
+ */
15
+ enabled?: boolean;
16
+ }
17
+ export interface UseMarkingsResult {
18
+ markings: Marking[] | undefined;
19
+ isLoading: boolean;
20
+ error: Error | undefined;
21
+ refetch: () => void;
22
+ }
23
+ /**
24
+ * List all markings.
25
+ * @param options Options to control the query.
26
+ */
27
+ export declare function useMarkings({ enabled }?: UseMarkingsOptions): UseMarkingsResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,eAAe,qBAAsB;AAMnD,iBAAiB,mBAAmB;;;;;;;;;;;;;CAalC;AACD;AAED,iBAAiB,kBAAkB;CACjC,UAAU;CACV;CAEA,OAAO;CAEP;AACD;;;;;AAMD,OAAO,iBAAS,YACd,EAAE,SAAoC,GAAlB,qBACnB","names":[],"sources":["../../../../../src/new/platform-apis/admin/useMarkings.ts"],"version":3,"file":"useMarkings.d.ts"}
@@ -0,0 +1,33 @@
1
+ export interface UseUserViewMarkingsOptions {
2
+ /**
3
+ * The user ID to fetch view markings for.
4
+ * When omitted, fetches markings for the current user.
5
+ */
6
+ userId?: string;
7
+ /**
8
+ * Enable or disable the query.
9
+ *
10
+ * When `false`, the query will not automatically execute.
11
+ *
12
+ * This is useful for:
13
+ * - Lazy/on-demand queries that should wait for user interaction
14
+ * - Dependent queries that need data from another query first
15
+ * - Conditional queries based on component state
16
+ *
17
+ * @default true
18
+ */
19
+ enabled?: boolean;
20
+ }
21
+ export interface UseUserViewMarkingsResult {
22
+ markingIds: string[] | undefined;
23
+ isLoading: boolean;
24
+ error: Error | undefined;
25
+ refetch: () => void;
26
+ }
27
+ /**
28
+ * Get view-accessible markings for a user.
29
+ * When `userId` is provided, fetches markings for that user.
30
+ * When omitted, fetches markings for the current user.
31
+ * @param options Options to control the query.
32
+ */
33
+ export declare function useUserViewMarkings({ userId, enabled }?: UseUserViewMarkingsOptions): UseUserViewMarkingsResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAqBA,iBAAiB,2BAA2B;;;;;CAK1C;;;;;;;;;;;;;CAaA;AACD;AAED,iBAAiB,0BAA0B;CACzC;CACA;CAEA,OAAO;CAEP;AACD;;;;;;;AAQD,OAAO,iBAAS,oBACd,EAAE,QAAQ,SAA4C,GAA1B,6BAC3B","names":[],"sources":["../../../../../src/new/platform-apis/admin/useUserMarkings.ts"],"version":3,"file":"useUserMarkings.d.ts"}
@@ -0,0 +1,31 @@
1
+ import type { QueryDefinition } from "@osdk/api";
2
+ import type { UseOsdkFunctionOptions, UseOsdkFunctionResult } from "./useOsdkFunction.js";
3
+ export interface FunctionQueryParams<Q extends QueryDefinition<unknown>> {
4
+ queryDefinition: Q;
5
+ /**
6
+ * Only allow params and enabled options at the query level,
7
+ * other options are not yet supported in this batch context
8
+ */
9
+ options?: Pick<UseOsdkFunctionOptions<Q>, "params" | "enabled">;
10
+ }
11
+ export interface UseOsdkFunctionsProps {
12
+ /**
13
+ * Array of query configurations to execute
14
+ */
15
+ queries: Array<FunctionQueryParams<QueryDefinition<unknown>>>;
16
+ /**
17
+ * Whether to enable all queries. When false, no queries will execute.
18
+ * Individual query enabled states are also respected.
19
+ * @default true
20
+ */
21
+ enabled?: boolean;
22
+ }
23
+ export type UseOsdkFunctionsResult = Array<Omit<UseOsdkFunctionResult<QueryDefinition<unknown>>, "refetch">>;
24
+ /**
25
+ * React hook for executing multiple OSDK function queries in parallel.
26
+ * Results are returned in the same order as the input queries.
27
+ *
28
+ * @param options - Configuration options containing the queries to execute
29
+ * @returns Array of results in the same order as input queries, each with the same shape as useOsdkFunction
30
+ */
31
+ export declare function useOsdkFunctions({ queries, enabled }: UseOsdkFunctionsProps): UseOsdkFunctionsResult;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAmC,uBAAuB,WAAY;AAItE,cACE,wBACA,6BACK,sBAAuB;AAE9B,iBAAiB,oBAAoB,UAAU,0BAA0B;CACvE,iBAAiB;;;;;CAKjB,UAAU,KAAK,uBAAuB,IAAI,WAAW;AACtD;AAED,iBAAiB,sBAAsB;;;;CAIrC,SAAS,MAAM,oBAAoB;;;;;;CAOnC;AACD;AAED,YAAY,yBAAyB,MACnC,KAAK,sBAAsB,2BAA2B;;;;;;;;AAUxD,OAAO,iBAAS,iBACd,EAAE,SAAS,SAAuC,EAArB,wBAC5B","names":[],"sources":["../../../src/new/useOsdkFunctions.ts"],"version":3,"file":"useOsdkFunctions.d.ts"}
@@ -27,9 +27,10 @@ export declare function useOsdkObject<Q extends ObjectOrInterfaceDefinition>(typ
27
27
  *
28
28
  * @param type The object type or interface definition
29
29
  * @param primaryKey The primary key of the object
30
- * @param options Options including $select and enabled
30
+ * @param options Options including $select, enabled, and $loadPropertySecurityMetadata
31
31
  */
32
32
  export declare function useOsdkObject<Q extends ObjectOrInterfaceDefinition>(type: Q, primaryKey: PrimaryKeyType<Q>, options?: {
33
33
  $select?: readonly PropertyKeys<Q>[]
34
34
  enabled?: boolean
35
+ $loadPropertySecurityMetadata?: boolean
35
36
  }): UseOsdkObjectResult<Q>;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,6BACA,MACA,gBACA,oBACK,WAAY;AAMnB,iBAAiB,oBACf,UAAU,6BACV;CACA,QAAQ,KAAK,SAAS;CACtB;CAEA,OAAO;;;;CAKP;CACA;AACD;;;;;AAMD,OAAO,iBAAS,cACd,UAAU,6BAEVA,KAAK,KAAK,SAAS,IACnBC,oBACC,oBAAoB;;;;;;;;AAQvB,OAAO,iBAAS,cACd,UAAU,6BAEVC,MAAM,GACNC,YAAY,eAAe,IAC3BF,oBACC,oBAAoB;;;;;;;;AAQvB,OAAO,iBAAS,cACd,UAAU,6BAEVC,MAAM,GACNC,YAAY,eAAe,IAC3BC,UAAU;CAAE,mBAAmB,aAAa;CAAM;AAAmB,IACpE,oBAAoB","names":["obj: Osdk.Instance<Q>","enabled?: boolean","type: Q","primaryKey: PrimaryKeyType<Q>","options?: { $select?: readonly PropertyKeys<Q>[]; enabled?: boolean }"],"sources":["../../../src/new/useOsdkObject.ts"],"version":3,"file":"useOsdkObject.d.ts"}
1
+ {"mappings":"AAgBA,cACE,6BACA,MACA,gBACA,oBACK,WAAY;AAMnB,iBAAiB,oBACf,UAAU,6BACV;CACA,QAAQ,KAAK,SAAS;CACtB;CAEA,OAAO;;;;CAKP;CACA;AACD;;;;;AAMD,OAAO,iBAAS,cACd,UAAU,6BAEVA,KAAK,KAAK,SAAS,IACnBC,oBACC,oBAAoB;;;;;;;;AAQvB,OAAO,iBAAS,cACd,UAAU,6BAEVC,MAAM,GACNC,YAAY,eAAe,IAC3BF,oBACC,oBAAoB;;;;;;;;AAQvB,OAAO,iBAAS,cACd,UAAU,6BAEVC,MAAM,GACNC,YAAY,eAAe,IAC3BC,UAAU;CACR,mBAAmB,aAAa;CAChC;CACA;AACD,IACA,oBAAoB","names":["obj: Osdk.Instance<Q>","enabled?: boolean","type: Q","primaryKey: PrimaryKeyType<Q>","options?: {\n $select?: readonly PropertyKeys<Q>[];\n enabled?: boolean;\n $loadPropertySecurityMetadata?: boolean;\n }"],"sources":["../../../src/new/useOsdkObject.ts"],"version":3,"file":"useOsdkObject.d.ts"}
@@ -89,6 +89,12 @@ export interface UseOsdkObjectsOptions<
89
89
  * useOsdkObjects(Employee, { $select: ["name", "status"] })
90
90
  */
91
91
  $select?: readonly PropertyKeys<T>[];
92
+ /**
93
+ * When true, loads per-property security metadata (marking requirements)
94
+ * alongside each object. The returned objects will have `$propertySecurities`
95
+ * populated with conjunctive/disjunctive marking requirements per property.
96
+ */
97
+ $loadPropertySecurityMetadata?: boolean;
92
98
  }
93
99
  export interface UseOsdkListResult<
94
100
  T extends ObjectOrInterfaceDefinition,
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,iBACA,YACA,WACA,6BACA,MACA,cACA,mBACA,mBACK,WAAY;AAMnB,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;;;;;;;CAiBA;;;;;;CAOA,QAAQ,YAAY,GAAG;;;;CAKvB,aACG,KAAK,aAAa,OAAM,QAAQ;;;;CAMnC;;;;;CAMA,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;;;;CAQtE;;;;;;;;;CAUA;;;;;;CAOA,gBAAgB,MAAM;EACpB,OAAO,YAAY,GAAG;CACvB;;;;;CAMD,UAAU,UAAU;;;;;;;;;;CAWpB;CAEA;;;;;;;;;;CAWA,mBAAmB,aAAa;AACjC;AAED,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,8BAA8B;EAC9B;;;;CAIA,kBAAkB;;;;CAKlB,MACI,KAAK,SACL,GACA,uBAAuB,eACvB,aAAa,IACb;;;;CAOJ;;;;CAKA,OAAO;;;;;;;;CASP;;;;CAKA;AACD;AAUD,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBA,MAAM,GACNC,SAAS,sBAAsB,KAAK;CAAE,SAAS;CAAG;AAAyB,IAC1E,kBAAkB,WAAW,GAAG,IAAI,CAAE,GAAE;AAE3C,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBD,MAAM,GACNE,SAAS,sBAAsB,KAAK;CAAE,SAAS;AAAG,IACjD,kBAAkB,WAAW,GAAG;AAEnC,OAAO,iBAAS;CACd,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EAEnDF,MAAM,GACNG,SAAS,sBAAsB,GAAG,QAAQ;CAAE;AAAyB,IACpE,kBAAkB,GAAG,MAAM;AAE9B,OAAO,iBAAS;CACd,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EAEnDH,MAAM,GACNI,UAAU,sBAAsB,GAAG,QAClC,kBAAkB,GAAG","names":["type: Q","options: UseOsdkObjectsOptions<Q> & { pivotTo: L; rids: readonly string[] }","options: UseOsdkObjectsOptions<Q> & { pivotTo: L }","options: UseOsdkObjectsOptions<Q, RDPs> & { rids: readonly string[] }","options?: UseOsdkObjectsOptions<Q, RDPs>"],"sources":["../../../src/new/useOsdkObjects.ts"],"version":3,"file":"useOsdkObjects.d.ts"}
1
+ {"mappings":"AAgBA,cACE,iBACA,YACA,WACA,6BACA,MACA,cACA,mBACA,mBACK,WAAY;AAMnB,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;;;;;;;;;;;;;;CAiBA;;;;;;CAOA,QAAQ,YAAY,GAAG;;;;CAKvB,aACG,KAAK,aAAa,OAAM,QAAQ;;;;CAMnC;;;;;CAMA,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;;;;CAQtE;;;;;;;;;CAUA;;;;;;CAOA,gBAAgB,MAAM;EACpB,OAAO,YAAY,GAAG;CACvB;;;;;CAMD,UAAU,UAAU;;;;;;;;;;CAWpB;CAEA;;;;;;;;;;CAWA,mBAAmB,aAAa;;;;;;CAOhC;AACD;AAED,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;CACnD,8BAA8B;EAC9B;;;;CAIA,kBAAkB;;;;CAKlB,MACI,KAAK,SACL,GACA,uBAAuB,eACvB,aAAa,IACb;;;;CAOJ;;;;CAKA,OAAO;;;;;;;;CASP;;;;CAKA;AACD;AAUD,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBA,MAAM,GACNC,SAAS,sBAAsB,KAAK;CAAE,SAAS;CAAG;AAAyB,IAC1E,kBAAkB,WAAW,GAAG,IAAI,CAAE,GAAE;AAE3C,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBD,MAAM,GACNE,SAAS,sBAAsB,KAAK;CAAE,SAAS;AAAG,IACjD,kBAAkB,WAAW,GAAG;AAEnC,OAAO,iBAAS;CACd,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EAEnDF,MAAM,GACNG,SAAS,sBAAsB,GAAG,QAAQ;CAAE;AAAyB,IACpE,kBAAkB,GAAG,MAAM;AAE9B,OAAO,iBAAS;CACd,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EAEnDH,MAAM,GACNI,UAAU,sBAAsB,GAAG,QAClC,kBAAkB,GAAG","names":["type: Q","options: UseOsdkObjectsOptions<Q> & { pivotTo: L; rids: readonly string[] }","options: UseOsdkObjectsOptions<Q> & { pivotTo: L }","options: UseOsdkObjectsOptions<Q, RDPs> & { rids: readonly string[] }","options?: UseOsdkObjectsOptions<Q, RDPs>"],"sources":["../../../src/new/useOsdkObjects.ts"],"version":3,"file":"useOsdkObjects.d.ts"}
@@ -1,3 +1,11 @@
1
+ export { useCbacBanner } from "../../new/platform-apis/admin/useCbacBanner.js";
2
+ export type { CbacBannerData, UseCbacBannerOptions, UseCbacBannerResult } from "../../new/platform-apis/admin/useCbacBanner.js";
3
+ export { useCbacMarkingRestrictions } from "../../new/platform-apis/admin/useCbacMarkingRestrictions.js";
4
+ export type { CbacMarkingRestrictionsData, UseCbacMarkingRestrictionsOptions, UseCbacMarkingRestrictionsResult } from "../../new/platform-apis/admin/useCbacMarkingRestrictions.js";
1
5
  export { useCurrentFoundryUser } from "../../new/platform-apis/admin/useCurrentFoundryUser.js";
2
6
  export { useFoundryUser } from "../../new/platform-apis/admin/useFoundryUser.js";
3
7
  export { useFoundryUsersList } from "../../new/platform-apis/admin/useFoundryUsersList.js";
8
+ export { useMarkingCategories } from "../../new/platform-apis/admin/useMarkingCategories.js";
9
+ export { useMarkings } from "../../new/platform-apis/admin/useMarkings.js";
10
+ export { useUserViewMarkings } from "../../new/platform-apis/admin/useUserMarkings.js";
11
+ export type { UseUserViewMarkingsOptions, UseUserViewMarkingsResult } from "../../new/platform-apis/admin/useUserMarkings.js";
@@ -1 +1 @@
1
- {"mappings":"AAgBA,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B","names":[],"sources":["../../../../src/public/experimental/admin.ts"],"version":3,"file":"admin.d.ts"}
1
+ {"mappings":"AAgBA,SAAS,qBAAqB;AAC9B,cACE,gBACA,sBACA,2BACK;AACP,SAAS,kCAAkC;AAC3C,cACE,6BACA,mCACA,wCACK;AACP,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,cACE,4BACA,iCACK","names":[],"sources":["../../../../src/public/experimental/admin.ts"],"version":3,"file":"admin.d.ts"}
@@ -0,0 +1,2 @@
1
+ export { useOsdkFunctions } from "../new/useOsdkFunctions.js";
2
+ export type { FunctionQueryParams, UseOsdkFunctionsProps, UseOsdkFunctionsResult } from "../new/useOsdkFunctions.js";
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,SAAS,wBAAwB;AACjC,cACE,qBACA,uBACA,8BACK","names":[],"sources":["../../../src/public/unstable-do-not-use.ts"],"version":3,"file":"unstable-do-not-use.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/react",
3
- "version": "0.10.0-beta.9",
3
+ "version": "0.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,6 +25,15 @@
25
25
  "require": "./build/cjs/public/experimental.cjs",
26
26
  "default": "./build/browser/public/experimental.js"
27
27
  },
28
+ "./unstable-do-not-use": {
29
+ "browser": "./build/browser/public/unstable-do-not-use.js",
30
+ "import": {
31
+ "types": "./build/types/public/unstable-do-not-use.d.ts",
32
+ "default": "./build/esm/public/unstable-do-not-use.js"
33
+ },
34
+ "require": "./build/cjs/public/unstable-do-not-use.cjs",
35
+ "default": "./build/browser/public/unstable-do-not-use.js"
36
+ },
28
37
  "./experimental/admin": {
29
38
  "browser": "./build/browser/public/experimental/admin.js",
30
39
  "import": {
@@ -45,8 +54,8 @@
45
54
  }
46
55
  },
47
56
  "peerDependencies": {
48
- "@osdk/api": "*",
49
- "@osdk/client": "*",
57
+ "@osdk/api": "^2.8.0",
58
+ "@osdk/client": "^2.8.0",
50
59
  "@osdk/foundry.admin": "*",
51
60
  "@osdk/foundry.core": "*",
52
61
  "@types/react": "^17 || ^18 || ^19",
@@ -62,8 +71,8 @@
62
71
  }
63
72
  },
64
73
  "devDependencies": {
65
- "@osdk/foundry.admin": "2.50.0",
66
- "@osdk/foundry.core": "2.50.0",
74
+ "@osdk/foundry.admin": "2.57.0",
75
+ "@osdk/foundry.core": "2.57.0",
67
76
  "@testing-library/react": "^16.3.0",
68
77
  "@types/react": "^18.3.24",
69
78
  "find-up": "^8.0.0",
@@ -76,11 +85,11 @@
76
85
  "react": "^18.3.1",
77
86
  "tiny-invariant": "^1.3.3",
78
87
  "typescript": "~5.5.4",
79
- "@osdk/api": "2.8.0-beta.21",
80
- "@osdk/client": "2.8.0-beta.21",
81
- "@osdk/client.test.ontology": "2.8.0-beta.21",
82
- "@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
83
- "@osdk/monorepo.tsconfig": "~0.7.0-beta.1"
88
+ "@osdk/api": "2.8.0",
89
+ "@osdk/client.test.ontology": "2.8.0",
90
+ "@osdk/client": "2.8.0",
91
+ "@osdk/monorepo.api-extractor": "~0.7.0",
92
+ "@osdk/monorepo.tsconfig": "~0.7.0"
84
93
  },
85
94
  "publishConfig": {
86
95
  "access": "public"
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export * from "./build/cjs/public/unstable-do-not-use.cjs";
@@ -1,50 +0,0 @@
1
- 'use strict';
2
-
3
- var React3 = require('react');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var React3__default = /*#__PURE__*/_interopDefault(React3);
8
-
9
- // src/useOsdkClient.ts
10
- function fakeClientFn(..._args) {
11
- throw new Error("This is not a real client. Did you forget to <OsdkContext.Provider>?");
12
- }
13
- var fakeClient = Object.assign(fakeClientFn, {
14
- fetchMetadata: fakeClientFn
15
- });
16
- var OsdkContext = /* @__PURE__ */ React3__default.default.createContext({
17
- client: fakeClient
18
- });
19
-
20
- // src/useOsdkClient.ts
21
- function useOsdkClient() {
22
- return React3__default.default.useContext(OsdkContext).client;
23
- }
24
- function useOsdkMetadata(type) {
25
- const client = useOsdkClient();
26
- const [metadata, setMetadata] = React3__default.default.useState(void 0);
27
- const [error, setError] = React3__default.default.useState();
28
- if (!metadata && !error) {
29
- client.fetchMetadata(type).then((fetchedMetadata) => {
30
- setMetadata(fetchedMetadata);
31
- }).catch((error2) => {
32
- const errorMessage = error2 instanceof Error ? error2.message : String(error2);
33
- setError(errorMessage);
34
- });
35
- return {
36
- loading: true
37
- };
38
- }
39
- return {
40
- loading: false,
41
- metadata,
42
- error
43
- };
44
- }
45
-
46
- exports.OsdkContext = OsdkContext;
47
- exports.useOsdkClient = useOsdkClient;
48
- exports.useOsdkMetadata = useOsdkMetadata;
49
- //# sourceMappingURL=chunk-OVBG5VXE.cjs.map
50
- //# sourceMappingURL=chunk-OVBG5VXE.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/OsdkContext.ts","../../src/useOsdkClient.ts","../../src/useOsdkMetadata.ts"],"names":["React","error"],"mappings":";;;;;;;;;AAiBA,SAAS,gBAAgB,KAAO,EAAA;AAC9B,EAAM,MAAA,IAAI,MAAM,sEAAsE,CAAA;AACxF;AACA,IAAM,UAAA,GAAa,MAAO,CAAA,MAAA,CAAO,YAAc,EAAA;AAAA,EAC7C,aAAe,EAAA;AACjB,CAAC,CAAA;AACY,IAAA,WAAA,2CAAiC,aAAc,CAAA;AAAA,EAC1D,MAAQ,EAAA;AACV,CAAC;;;ACPM,SAAS,aAAgB,GAAA;AAC9B,EAAOA,OAAAA,uBAAAA,CAAM,UAAW,CAAA,WAAW,CAAE,CAAA,MAAA;AACvC;ACFO,SAAS,gBAAgB,IAAM,EAAA;AACpC,EAAA,MAAM,SAAS,aAAc,EAAA;AAC7B,EAAA,MAAM,CAAC,QAAU,EAAA,WAAW,CAAIA,GAAAA,uBAAAA,CAAM,SAAS,MAAS,CAAA;AACxD,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAIA,wBAAM,QAAS,EAAA;AACzC,EAAI,IAAA,CAAC,QAAY,IAAA,CAAC,KAAO,EAAA;AACvB,IAAA,MAAA,CAAO,aAAc,CAAA,IAAI,CAAE,CAAA,IAAA,CAAK,CAAmB,eAAA,KAAA;AACjD,MAAA,WAAA,CAAY,eAAe,CAAA;AAAA,KAC5B,CAAA,CAAE,KAAM,CAAA,CAAAC,MAAS,KAAA;AAChB,MAAA,MAAM,eAAeA,MAAiB,YAAA,KAAA,GAAQA,MAAM,CAAA,OAAA,GAAU,OAAOA,MAAK,CAAA;AAC1E,MAAA,QAAA,CAAS,YAAY,CAAA;AAAA,KACtB,CAAA;AACD,IAAO,OAAA;AAAA,MACL,OAAS,EAAA;AAAA,KACX;AAAA;AAEF,EAAO,OAAA;AAAA,IACL,OAAS,EAAA,KAAA;AAAA,IACT,QAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-OVBG5VXE.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nfunction fakeClientFn(..._args) {\n throw new Error(\"This is not a real client. Did you forget to <OsdkContext.Provider>?\");\n}\nconst fakeClient = Object.assign(fakeClientFn, {\n fetchMetadata: fakeClientFn\n});\nexport const OsdkContext = /*#__PURE__*/React.createContext({\n client: fakeClient\n});","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { OsdkContext } from \"./OsdkContext.js\";\nexport function useOsdkClient() {\n return React.useContext(OsdkContext).client;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { useOsdkClient } from \"./useOsdkClient.js\";\nexport function useOsdkMetadata(type) {\n const client = useOsdkClient();\n const [metadata, setMetadata] = React.useState(undefined);\n const [error, setError] = React.useState();\n if (!metadata && !error) {\n client.fetchMetadata(type).then(fetchedMetadata => {\n setMetadata(fetchedMetadata);\n }).catch(error => {\n const errorMessage = error instanceof Error ? error.message : String(error);\n setError(errorMessage);\n });\n return {\n loading: true\n };\n }\n return {\n loading: false,\n metadata,\n error\n };\n}"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/new/OsdkContext2.ts","../../src/new/makeExternalStore.ts"],"names":[],"mappings":"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","file":"chunk-SVVMLSKN.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nfunction fakeClientFn(..._args) {\n throw new Error(\"This is not a real client. Did you forget to <OsdkContext.Provider>?\");\n}\nconst fakeClient = Object.assign(fakeClientFn, {\n fetchMetadata: fakeClientFn\n});\nexport const OsdkContext2 = /*#__PURE__*/React.createContext({\n client: fakeClient,\n observableClient: undefined\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\nexport function makeExternalStore(createObservation, _name, initialValue) {\n let lastResult = initialValue;\n function getSnapShot() {\n return lastResult;\n }\n function subscribe(notifyUpdate) {\n const obs = createObservation({\n next: payload => {\n lastResult = payload;\n notifyUpdate();\n },\n error: error => {\n lastResult = {\n ...(lastResult ?? {}),\n error: error instanceof Error ? error : new Error(String(error))\n };\n notifyUpdate();\n },\n complete: () => {}\n });\n return () => {\n obs.unsubscribe();\n };\n }\n return {\n subscribe,\n getSnapShot\n };\n}\n\n/**\n * Like makeExternalStore but for async subscription creation.\n *\n * Uses an isActive flag to handle race conditions:\n * If cleanup runs before promise resolves, the stale subscription is\n * immediately unsubscribed when it eventually resolves\n */\nexport function makeExternalStoreAsync(createObservation, _name, initialValue) {\n let lastResult = initialValue;\n function getSnapShot() {\n return lastResult;\n }\n function subscribe(notifyUpdate) {\n let isActive = true;\n let currentSubscription;\n const subscriptionPromise = createObservation({\n next: payload => {\n if (isActive) {\n lastResult = payload;\n notifyUpdate();\n }\n },\n error: error => {\n if (isActive) {\n lastResult = {\n ...(lastResult ?? {}),\n error: error instanceof Error ? error : new Error(String(error))\n };\n notifyUpdate();\n }\n },\n complete: () => {}\n });\n subscriptionPromise.then(sub => {\n if (isActive) {\n currentSubscription = sub;\n } else {\n sub.unsubscribe();\n }\n }).catch(error => {\n if (isActive) {\n lastResult = {\n ...(lastResult ?? {}),\n error: error instanceof Error ? error : new Error(String(error))\n };\n notifyUpdate();\n }\n });\n return () => {\n isActive = false;\n if (currentSubscription) {\n currentSubscription.unsubscribe();\n }\n };\n }\n return {\n subscribe,\n getSnapShot\n };\n}"]}