@osdk/react 0.10.0-beta.9 → 0.10.1-main-20260406220320

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 (117) hide show
  1. package/CHANGELOG.md +109 -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/hookUtils.js +32 -0
  5. package/build/browser/new/hookUtils.js.map +1 -0
  6. package/build/browser/new/platform-apis/admin/useCbacBanner.js +63 -0
  7. package/build/browser/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  8. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  9. package/build/browser/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  10. package/build/browser/new/platform-apis/admin/useMarkingCategories.js +46 -0
  11. package/build/browser/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  12. package/build/browser/new/platform-apis/admin/useMarkings.js +46 -0
  13. package/build/browser/new/platform-apis/admin/useMarkings.js.map +1 -0
  14. package/build/browser/new/platform-apis/admin/useUserMarkings.js +50 -0
  15. package/build/browser/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  16. package/build/browser/new/useLinks.js +13 -10
  17. package/build/browser/new/useLinks.js.map +1 -1
  18. package/build/browser/new/useObjectSet.js +45 -26
  19. package/build/browser/new/useObjectSet.js.map +1 -1
  20. package/build/browser/new/useOsdkAction.js +3 -6
  21. package/build/browser/new/useOsdkAction.js.map +1 -1
  22. package/build/browser/new/useOsdkAggregation.js +32 -38
  23. package/build/browser/new/useOsdkAggregation.js.map +1 -1
  24. package/build/browser/new/useOsdkFunctions.js +137 -0
  25. package/build/browser/new/useOsdkFunctions.js.map +1 -0
  26. package/build/browser/new/useOsdkObject.js +6 -2
  27. package/build/browser/new/useOsdkObject.js.map +1 -1
  28. package/build/browser/new/useOsdkObjects.js +36 -33
  29. package/build/browser/new/useOsdkObjects.js.map +1 -1
  30. package/build/browser/public/experimental/admin.js +5 -0
  31. package/build/browser/public/experimental/admin.js.map +1 -1
  32. package/build/browser/public/unstable-do-not-use.js +18 -0
  33. package/build/browser/public/unstable-do-not-use.js.map +1 -0
  34. package/build/cjs/chunk-2N32USW5.cjs +28 -0
  35. package/build/cjs/chunk-2N32USW5.cjs.map +1 -0
  36. package/build/cjs/chunk-R4FZ5MUH.cjs +34 -0
  37. package/build/cjs/chunk-R4FZ5MUH.cjs.map +1 -0
  38. package/build/cjs/{chunk-SVVMLSKN.cjs → chunk-ZUNR45SJ.cjs} +15 -4
  39. package/build/cjs/chunk-ZUNR45SJ.cjs.map +1 -0
  40. package/build/cjs/index.cjs +7 -6
  41. package/build/cjs/index.cjs.map +1 -1
  42. package/build/cjs/public/experimental/admin.cjs +154 -7
  43. package/build/cjs/public/experimental/admin.cjs.map +1 -1
  44. package/build/cjs/public/experimental/admin.d.cts +159 -2
  45. package/build/cjs/public/experimental.cjs +170 -135
  46. package/build/cjs/public/experimental.cjs.map +1 -1
  47. package/build/cjs/public/experimental.d.cts +21 -124
  48. package/build/cjs/public/unstable-do-not-use.cjs +114 -0
  49. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -0
  50. package/build/cjs/public/unstable-do-not-use.d.cts +35 -0
  51. package/build/cjs/useOsdkFunction-B0s7lqgN.d.cts +121 -0
  52. package/build/esm/new/OsdkContext2.js +22 -2
  53. package/build/esm/new/OsdkContext2.js.map +1 -1
  54. package/build/esm/new/hookUtils.js +32 -0
  55. package/build/esm/new/hookUtils.js.map +1 -0
  56. package/build/esm/new/platform-apis/admin/useCbacBanner.js +63 -0
  57. package/build/esm/new/platform-apis/admin/useCbacBanner.js.map +1 -0
  58. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js +64 -0
  59. package/build/esm/new/platform-apis/admin/useCbacMarkingRestrictions.js.map +1 -0
  60. package/build/esm/new/platform-apis/admin/useMarkingCategories.js +46 -0
  61. package/build/esm/new/platform-apis/admin/useMarkingCategories.js.map +1 -0
  62. package/build/esm/new/platform-apis/admin/useMarkings.js +46 -0
  63. package/build/esm/new/platform-apis/admin/useMarkings.js.map +1 -0
  64. package/build/esm/new/platform-apis/admin/useUserMarkings.js +50 -0
  65. package/build/esm/new/platform-apis/admin/useUserMarkings.js.map +1 -0
  66. package/build/esm/new/useLinks.js +13 -10
  67. package/build/esm/new/useLinks.js.map +1 -1
  68. package/build/esm/new/useObjectSet.js +45 -26
  69. package/build/esm/new/useObjectSet.js.map +1 -1
  70. package/build/esm/new/useOsdkAction.js +3 -6
  71. package/build/esm/new/useOsdkAction.js.map +1 -1
  72. package/build/esm/new/useOsdkAggregation.js +32 -38
  73. package/build/esm/new/useOsdkAggregation.js.map +1 -1
  74. package/build/esm/new/useOsdkFunctions.js +137 -0
  75. package/build/esm/new/useOsdkFunctions.js.map +1 -0
  76. package/build/esm/new/useOsdkObject.js +6 -2
  77. package/build/esm/new/useOsdkObject.js.map +1 -1
  78. package/build/esm/new/useOsdkObjects.js +36 -33
  79. package/build/esm/new/useOsdkObjects.js.map +1 -1
  80. package/build/esm/public/experimental/admin.js +5 -0
  81. package/build/esm/public/experimental/admin.js.map +1 -1
  82. package/build/esm/public/unstable-do-not-use.js +18 -0
  83. package/build/esm/public/unstable-do-not-use.js.map +1 -0
  84. package/build/types/new/OsdkContext2.d.ts +1 -0
  85. package/build/types/new/OsdkContext2.d.ts.map +1 -1
  86. package/build/types/new/hookUtils.d.ts +7 -0
  87. package/build/types/new/hookUtils.d.ts.map +1 -0
  88. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts +33 -0
  89. package/build/types/new/platform-apis/admin/useCbacBanner.d.ts.map +1 -0
  90. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts +34 -0
  91. package/build/types/new/platform-apis/admin/useCbacMarkingRestrictions.d.ts.map +1 -0
  92. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts +27 -0
  93. package/build/types/new/platform-apis/admin/useMarkingCategories.d.ts.map +1 -0
  94. package/build/types/new/platform-apis/admin/useMarkings.d.ts +27 -0
  95. package/build/types/new/platform-apis/admin/useMarkings.d.ts.map +1 -0
  96. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts +33 -0
  97. package/build/types/new/platform-apis/admin/useUserMarkings.d.ts.map +1 -0
  98. package/build/types/new/useLinks.d.ts.map +1 -1
  99. package/build/types/new/useObjectSet.d.ts +5 -2
  100. package/build/types/new/useObjectSet.d.ts.map +1 -1
  101. package/build/types/new/useOsdkAggregation.d.ts +1 -1
  102. package/build/types/new/useOsdkAggregation.d.ts.map +1 -1
  103. package/build/types/new/useOsdkFunctions.d.ts +31 -0
  104. package/build/types/new/useOsdkFunctions.d.ts.map +1 -0
  105. package/build/types/new/useOsdkObject.d.ts +2 -1
  106. package/build/types/new/useOsdkObject.d.ts.map +1 -1
  107. package/build/types/new/useOsdkObjects.d.ts +10 -1
  108. package/build/types/new/useOsdkObjects.d.ts.map +1 -1
  109. package/build/types/public/experimental/admin.d.ts +8 -0
  110. package/build/types/public/experimental/admin.d.ts.map +1 -1
  111. package/build/types/public/unstable-do-not-use.d.ts +2 -0
  112. package/build/types/public/unstable-do-not-use.d.ts.map +1 -0
  113. package/package.json +19 -10
  114. package/unstable-do-not-use.d.ts +17 -0
  115. package/build/cjs/chunk-OVBG5VXE.cjs +0 -50
  116. package/build/cjs/chunk-OVBG5VXE.cjs.map +0 -1
  117. package/build/cjs/chunk-SVVMLSKN.cjs.map +0 -1
@@ -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"}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,YACA,WACA,mCACK,WAAY;AACnB,cAAc,MAAM,cAAc,mBAAmB,cAAe;AAMpE,iBAAiB,gBACf,UAAU,6BACV;;;;CAIA,QAAQ,YAAY;;;;CAKpB;;CAGA,aACG,KAAK,aAAa,OAAM,QAAQ;;;;;;CAQnC,mBAAmB,aAAa;;;;;;;CAQhC,OAAO,UAAU;;;;;;;CAQjB;;;;;;;;;;;;;;;;;;;;CAqBA;AACD;AAED,iBAAiB,eACf,UAAU,6BACV;CACA,OAAO,KAAK,SAAS;;;;;;CAOrB,iCAAiC,6BAE/B,cAAc,KAAK,SAAS;CAG9B;CACA,OAAO;;;;CAKP;;;;CAKA,kBAAkB;;;;CAKlB;AACD;;;;;;;;;AAaD,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBA,SAAS,KAAK,SAAS,KAAK,MAAM,KAAK,SAAS,iBAChDC,UAAU,GACVC,UAAS,gBAAgB,WAAW,GAAG,MACtC,eAAe,WAAW,GAAG","names":["objects: Osdk.Instance<T> | Array<Osdk.Instance<T>> | undefined","linkName: L","options: UseLinksOptions<LinkedType<T, L>>"],"sources":["../../../src/new/useLinks.ts"],"version":3,"file":"useLinks.d.ts"}
1
+ {"mappings":"AAgBA,cACE,YACA,WACA,mCACK,WAAY;AACnB,cAAc,MAAM,cAAc,mBAAmB,cAAe;AAOpE,iBAAiB,gBACf,UAAU,6BACV;;;;CAIA,QAAQ,YAAY;;;;CAKpB;;CAGA,aACG,KAAK,aAAa,OAAM,QAAQ;;;;;;CAQnC,mBAAmB,aAAa;;;;;;;CAQhC,OAAO,UAAU;;;;;;;CAQjB;;;;;;;;;;;;;;;;;;;;CAqBA;AACD;AAED,iBAAiB,eACf,UAAU,6BACV;CACA,OAAO,KAAK,SAAS;;;;;;CAOrB,iCAAiC,6BAE/B,cAAc,KAAK,SAAS;CAG9B;CACA,OAAO;;;;CAKP;;;;CAKA,kBAAkB;;;;CAKlB;AACD;;;;;;;;;AAaD,OAAO,iBAAS;CACd,UAAU;CACV,UAAU,UAAU;EAEpBA,SAAS,KAAK,SAAS,KAAK,MAAM,KAAK,SAAS,iBAChDC,UAAU,GACVC,UAAS,gBAAgB,WAAW,GAAG,MACtC,eAAe,WAAW,GAAG","names":["objects: Osdk.Instance<T> | Array<Osdk.Instance<T>> | undefined","linkName: L","options: UseLinksOptions<LinkedType<T, L>>"],"sources":["../../../src/new/useLinks.ts"],"version":3,"file":"useLinks.d.ts"}
@@ -98,18 +98,21 @@ export interface UseObjectSetResult<
98
98
  * Any error that occurred during fetching
99
99
  */
100
100
  error: Error | undefined;
101
+ isOptimistic: boolean;
101
102
  /**
102
103
  * Function to fetch more pages (undefined if no more pages)
103
104
  */
104
105
  fetchMore: (() => Promise<void>) | undefined;
106
+ hasMore: boolean;
105
107
  /**
106
108
  * The final ObjectSet after all transformations
107
109
  */
108
- objectSet: ObjectSet<Q, RDPs>;
110
+ objectSet: ObjectSet<Q, RDPs> | undefined;
109
111
  /**
110
112
  * The total count of objects matching the query (if available from the API)
111
113
  */
112
114
  totalCount?: string;
115
+ refetch: () => Promise<void>;
113
116
  }
114
117
  /**
115
118
  * React hook for observing and interacting with OSDK object sets.
@@ -126,4 +129,4 @@ export declare function useObjectSet<
126
129
  Q extends ObjectOrInterfaceDefinition,
127
130
  BaseRDPs extends Record<string, SimplePropertyDef> = never,
128
131
  RDPs extends Record<string, SimplePropertyDef> = {}
129
- >(baseObjectSet: ObjectSet<Q, BaseRDPs>, options?: UseObjectSetOptions<Q, RDPs>): UseObjectSetResult<Q, RDPs>;
132
+ >(baseObjectSet: ObjectSet<Q, BaseRDPs> | undefined, options?: UseObjectSetOptions<Q, RDPs>): UseObjectSetResult<Q, RDPs>;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,iBACA,WACA,6BACA,WACA,MACA,cACA,mBACA,mBACK,WAAY;AAUnB,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,QAAQ,YAAY,GAAG;;;;CAKvB,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;CAKtE,QAAQ,UAAU;;;;CAKlB,YAAY,UAAU;;;;CAKtB,WAAW,UAAU;;;;CAKrB,UAAU,UAAU;;;;CAKpB;;;;CAKA,aACG,KAAK,aAAa,OAAM,QAAQ;;;;CAMnC;;;;;;;;CASA;;;;;;;;CASA;;;;;;CAOA,mBAAmB,aAAa;;;;;;;;;;;;;;;;;;;;CAqBhC;AACD;AAED,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,MACI,KAAK,SAAS,GAAG,sBAAsB,aAAa,IAAI;;;;CAM5D;;;;CAKA,OAAO;;;;CAKP,kBAAkB;;;;CAKlB,WAAW,UAAU,GAAG;;;;CAKxB;AACD;;;;;;;;;;;;AAoBD,OAAO,iBAAS;CACd,UAAU;CACV,iBAAiB,eAAe;CAChC,aAAa,eAAe,qBAAqB,CAAE;EAEnDA,eAAe,UAAU,GAAG,WAC5BC,UAAS,oBAAoB,GAAG,QAC/B,mBAAmB,GAAG","names":["baseObjectSet: ObjectSet<Q, BaseRDPs>","options: UseObjectSetOptions<Q, RDPs>"],"sources":["../../../src/new/useObjectSet.tsx"],"version":3,"file":"useObjectSet.d.ts"}
1
+ {"mappings":"AAgBA,cACE,iBACA,WACA,6BACA,WACA,MACA,cACA,mBACA,mBACK,WAAY;AAWnB,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,QAAQ,YAAY,GAAG;;;;CAKvB,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;CAKtE,QAAQ,UAAU;;;;CAKlB,YAAY,UAAU;;;;CAKtB,WAAW,UAAU;;;;CAKrB,UAAU,UAAU;;;;CAKpB;;;;CAKA,aACG,KAAK,aAAa,OAAM,QAAQ;;;;CAMnC;;;;;;;;CASA;;;;;;;;CASA;;;;;;CAOA,mBAAmB,aAAa;;;;;;;;;;;;;;;;;;;;CAqBhC;AACD;AAED,iBAAiB;CACf,UAAU;CACV,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,MACI,KAAK,SAAS,GAAG,sBAAsB,aAAa,IAAI;;;;CAM5D;;;;CAKA,OAAO;CAEP;;;;CAKA,kBAAkB;CAElB;;;;CAKA,WAAW,UAAU,GAAG;;;;CAKxB;CAEA,eAAe;AAChB;;;;;;;;;;;;AAoBD,OAAO,iBAAS;CACd,UAAU;CACV,iBAAiB,eAAe;CAChC,aAAa,eAAe,qBAAqB,CAAE;EAEnDA,eAAe,UAAU,GAAG,uBAC5BC,UAAS,oBAAoB,GAAG,QAC/B,mBAAmB,GAAG","names":["baseObjectSet: ObjectSet<Q, BaseRDPs> | undefined","options: UseObjectSetOptions<Q, RDPs>"],"sources":["../../../src/new/useObjectSet.tsx"],"version":3,"file":"useObjectSet.d.ts"}
@@ -56,7 +56,7 @@ export interface UseOsdkAggregationResult<
56
56
  data: AggregationsResults<T, A> | undefined;
57
57
  isLoading: boolean;
58
58
  error: Error | undefined;
59
- refetch: () => void;
59
+ refetch: () => Promise<void>;
60
60
  }
61
61
  /**
62
62
  * React hook for performing aggregations on OSDK object sets.
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,eACA,qBACA,iBACA,6BACA,WACA,mBACA,mBACK,WAAY;AACnB,cAAc,4BAA4B,cAAe;UAU/C;CACR,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,QAAQ,YAAY,GAAG;;;;;CAMvB,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;;;CAOtE,gBAAgB,MAAM;EACpB,OAAO,YAAY,GAAG;CACvB;;;;CAKD,WAAW;;;;;;;CAQX;AACD;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;UAC3C,8BAA8B,GAAG,GAAG,MAAM,CAAE;AAEtD,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;UAC3C,8BAA8B,GAAG,GAAG,MAAM;;;;CAIlD,WAAW,UAAU;AACtB;AAID,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;EACxB;CACA,MAAM,oBAAoB,GAAG;CAC7B;CACA,OAAO;CACP;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCD,OAAO,iBAAS;CACd,UAAU;OACJ,UAAU,cAAc;CAC9B,aAAa,eAAe,qBAAqB,CAAE;EAEnDA,MAAM,GACNC,SAAS,0BAA0B,GAAG,GAAG,QACxC,yBAAyB,GAAG;AAC/B,OAAO,iBAAS;CACd,UAAU;OACJ,UAAU,cAAc;CAC9B,aAAa,eAAe,qBAAqB,CAAE;EAEnDD,MAAM,GACNE,SAAS,uCAAuC,GAAG,GAAG,QACrD,yBAAyB,GAAG","names":["type: Q","options: UseOsdkAggregationOptions<Q, A, RDPs>","options: UseOsdkAggregationOptionsWithObjectSet<Q, A, RDPs>"],"sources":["../../../src/new/useOsdkAggregation.ts"],"version":3,"file":"useOsdkAggregation.d.ts"}
1
+ {"mappings":"AAgBA,cACE,eACA,qBACA,iBACA,6BACA,WACA,mBACA,mBACK,WAAY;AACnB,cAAc,4BAA4B,cAAe;UAa/C;CACR,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;EACnD;;;;CAIA,QAAQ,YAAY,GAAG;;;;;CAMvB,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;;;;;;CAOtE,gBAAgB,MAAM;EACpB,OAAO,YAAY,GAAG;CACvB;;;;CAKD,WAAW;;;;;;;CAQX;AACD;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;UAC3C,8BAA8B,GAAG,GAAG,MAAM,CAAE;AAEtD,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;CACxB,aAAa,eAAe,qBAAqB,CAAE;UAC3C,8BAA8B,GAAG,GAAG,MAAM;;;;CAIlD,WAAW,UAAU;AACtB;AAED,iBAAiB;CACf,UAAU;CACV,UAAU,cAAc;EACxB;CACA,MAAM,oBAAoB,GAAG;CAC7B;CACA,OAAO;CACP,eAAe;AAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCD,OAAO,iBAAS;CACd,UAAU;OACJ,UAAU,cAAc;CAC9B,aAAa,eAAe,qBAAqB,CAAE;EAEnDA,MAAM,GACNC,SAAS,0BAA0B,GAAG,GAAG,QACxC,yBAAyB,GAAG;AAC/B,OAAO,iBAAS;CACd,UAAU;OACJ,UAAU,cAAc;CAC9B,aAAa,eAAe,qBAAqB,CAAE;EAEnDD,MAAM,GACNE,SAAS,uCAAuC,GAAG,GAAG,QACrD,yBAAyB,GAAG","names":["type: Q","options: UseOsdkAggregationOptions<Q, A, RDPs>","options: UseOsdkAggregationOptionsWithObjectSet<Q, A, RDPs>"],"sources":["../../../src/new/useOsdkAggregation.ts"],"version":3,"file":"useOsdkAggregation.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"}
@@ -1,4 +1,4 @@
1
- import type { DerivedProperty, LinkedType, LinkNames, ObjectOrInterfaceDefinition, Osdk, PropertyKeys, SimplePropertyDef, WhereClause } from "@osdk/api";
1
+ import type { DerivedProperty, LinkedType, LinkNames, ObjectOrInterfaceDefinition, ObjectSet, Osdk, PropertyKeys, SimplePropertyDef, WhereClause } from "@osdk/api";
2
2
  export interface UseOsdkObjectsOptions<
3
3
  T extends ObjectOrInterfaceDefinition,
4
4
  RDPs extends Record<string, SimplePropertyDef> = {}
@@ -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,
@@ -123,6 +129,9 @@ export interface UseOsdkListResult<
123
129
  * The total count of objects matching the query (if available from the API)
124
130
  */
125
131
  totalCount?: string;
132
+ hasMore: boolean;
133
+ objectSet: ObjectSet<T, RDPs> | undefined;
134
+ refetch: () => Promise<void>;
126
135
  }
127
136
  export declare function useOsdkObjects<
128
137
  Q 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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I,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.1-main-20260406220320",
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 || >=2.8.1-beta.0",
58
+ "@osdk/client": "^2.8.0 || >=2.8.1-beta.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.1-main-20260406220320",
89
+ "@osdk/client": "2.8.1-main-20260406220320",
90
+ "@osdk/client.test.ontology": "2.8.1-main-20260406220320",
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 @@
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AA;AAAA;AAClC,KACF;AAAA;AAEF,EAAO,OAAA;AAAA,IACL,SAAA;AAAA,IACA;AAAA,GACF;AACF","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}"]}