@sanity/sdk-react 3.1.0 → 3.3.0-rc.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.
- package/dist/_exports/dashboard-internal.d.ts +2 -0
- package/dist/_exports/dashboard-internal.js +2 -0
- package/dist/_exports/dashboard.d.ts +457 -7
- package/dist/_exports/dashboard.d.ts.map +1 -1
- package/dist/_exports/dashboard.js +623 -2
- package/dist/_exports/dashboard.js.map +1 -1
- package/dist/index.d.ts +227 -87
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +147 -30
- package/dist/index.js.map +1 -1
- package/dist/{useStudioWorkspacesByProjectIdDataset-DxUlukmF.js → useStudioWorkspacesByProjectIdDataset-BZ_Ud887.js} +53 -56
- package/dist/useStudioWorkspacesByProjectIdDataset-BZ_Ud887.js.map +1 -0
- package/package.json +34 -32
- package/src/_exports/dashboard-internal.ts +1 -0
- package/src/_exports/dashboard.test-d.ts +64 -0
- package/src/_exports/dashboard.ts +70 -0
- package/src/_exports/index.ts +1 -1
- package/src/_exports/sdk-react.ts +3 -0
- package/src/components/auth/AuthBoundary.test.tsx +115 -2
- package/src/components/auth/AuthBoundary.tsx +18 -5
- package/src/components/auth/LoginCallback.test.tsx +46 -7
- package/src/components/auth/LoginCallback.tsx +22 -4
- package/src/context/DashboardTokenRefresh.test.tsx +124 -22
- package/src/context/DashboardTokenRefresh.tsx +31 -15
- package/src/dashboard/createRemoteInstance.test.ts +168 -0
- package/src/dashboard/createRemoteInstance.ts +123 -0
- package/src/dashboard/module.ts +39 -0
- package/src/dashboard/remoteClientState.ts +27 -0
- package/src/dashboard/urlFor.test.ts +246 -0
- package/src/dashboard/urlFor.ts +462 -0
- package/src/hooks/applications/useApplication.test-d.ts +1 -1
- package/src/hooks/auth/useHandleOAuthCallback.test.tsx +16 -0
- package/src/hooks/auth/useHandleOAuthCallback.tsx +49 -0
- package/src/hooks/auth/useOAuthAuthorize.test.tsx +16 -0
- package/src/hooks/auth/useOAuthAuthorize.tsx +28 -0
- package/src/hooks/auth/useOAuthTokens.test.tsx +240 -0
- package/src/hooks/auth/useOAuthTokens.tsx +95 -0
- package/src/hooks/dashboard/useApplication.test.tsx +59 -0
- package/src/hooks/dashboard/useApplication.ts +22 -0
- package/src/hooks/dashboard/useApplicationConfig.test.tsx +106 -0
- package/src/hooks/dashboard/useApplicationConfig.ts +45 -0
- package/src/hooks/dashboard/useApplicationConfigs.test.tsx +89 -0
- package/src/hooks/dashboard/useApplicationConfigs.ts +26 -0
- package/src/hooks/dashboard/useApplicationForegroundId.test.tsx +54 -0
- package/src/hooks/dashboard/useApplicationForegroundId.ts +22 -0
- package/src/hooks/dashboard/useApplications.test.tsx +249 -0
- package/src/hooks/dashboard/useApplications.ts +128 -0
- package/src/hooks/dashboard/useEmit.test.tsx +124 -0
- package/src/hooks/dashboard/useEmit.ts +78 -0
- package/src/hooks/dashboard/useNavigate.ts +1 -3
- package/src/hooks/dashboard/useRemoteClient.test.tsx +88 -0
- package/src/hooks/dashboard/useRemoteClient.ts +10 -0
- package/src/hooks/dashboard/useTopic.test.tsx +200 -0
- package/src/hooks/dashboard/useTopic.ts +29 -0
- package/src/hooks/dashboard/useUpdateFavorite.test.tsx +8 -1
- package/src/hooks/document/useApplyDocumentActions.ts +3 -4
- package/src/hooks/document/useCreateDocument.ts +2 -3
- package/src/hooks/document/useDocument.ts +11 -6
- package/src/hooks/document/useEditDocument.ts +5 -5
- package/src/hooks/projection/useDocumentProjection.ts +6 -7
- package/src/hooks/query/useQuery.ts +3 -4
- package/dist/useStudioWorkspacesByProjectIdDataset-DxUlukmF.js.map +0 -1
- package/src/context/dashboardToken.ts +0 -63
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { DatasetsResponse, DatasetsResponse as DatasetsResponse$1, SanityProjectMember } from "@sanity/client";
|
|
2
|
-
import { AccessResourceType, ActionsResult, Application, ApplicationInclude, ApplicationsOptions, ApplicationsResponse, AuthState, ClientOptions, Comment, CommentThread, CommentsOptions, CreateCommentOptions, CurrentUser, DatasetHandle, DocumentAction, DocumentEvent, DocumentHandle as DocumentHandle$1, DocumentOptions, DocumentPermissionsResult, DocumentPresence, DocumentResource, DocumentTypeHandle as DocumentTypeHandle$1, FavoriteStatusResponse, GetUserOptions, GetUsersOptions, Installation, InstallationInclude, InstallationsOptions, InstallationsResponse, JsonMatch, Organization, OrganizationOptions, Organizations, OrganizationsOptions, PresenceSelection, PreviewValue, Project, ProjectHandle, ProjectOptions, ProjectsOptions, QueryOptions, ReleaseAction, ReleaseDocument, RemoveCommentOptions, ReplyToCommentOptions, SanityConfig, SanityInstance, SanityUser, SetCommentStatusOptions, TokenSource, UpdateCommentOptions, UserPresence } from "@sanity/sdk";
|
|
2
|
+
import { AccessResourceType, ActionsResult, Application, ApplicationInclude, ApplicationsOptions, ApplicationsResponse, AuthState, ClientOptions, Comment, CommentThread, CommentsOptions, CreateCommentOptions, CurrentUser, DatasetHandle, DocumentAction, DocumentEvent, DocumentHandle as DocumentHandle$1, DocumentOptions, DocumentPermissionsResult, DocumentPresence, DocumentResource, DocumentTypeHandle as DocumentTypeHandle$1, FavoriteStatusResponse, GetUserOptions, GetUsersOptions, Installation, InstallationInclude, InstallationsOptions, InstallationsResponse, JsonMatch, OAuthTokens, Organization, OrganizationOptions, Organizations, OrganizationsOptions, PresenceSelection, PreviewValue, Project, ProjectHandle, ProjectOptions, ProjectsOptions, QueryOptions, ReleaseAction, ReleaseDocument, RemoveCommentOptions, ReplyToCommentOptions, ResolveDocument, ResolveProjectionResult, ResolveQueryResult, SanityConfig, SanityInstance, SanityUser, SetCommentStatusOptions, TokenSource, UpdateCommentOptions, UserPresence } from "@sanity/sdk";
|
|
3
3
|
import "@sanity/sdk/_internal";
|
|
4
4
|
import React$1, { PropsWithChildren, ReactElement, ReactNode } from "react";
|
|
5
5
|
import { FallbackProps } from "react-error-boundary";
|
|
6
6
|
import { CanvasResource, MediaResource, StudioResource } from "@sanity/message-protocol";
|
|
7
7
|
import { FrameMessage, WindowMessage } from "@sanity/sdk/comlink";
|
|
8
|
-
import "xstate";
|
|
9
8
|
import { AgentGenerateOptions, AgentPatchOptions, AgentPatchResult, AgentPromptOptions, AgentPromptResult, AgentTransformOptions, AgentTranslateOptions } from "@sanity/sdk/agent";
|
|
10
|
-
import { SanityDocument as SanityDocument$1, SanityProjectionResult, SanityQueryResult } from "groq";
|
|
11
9
|
import { Path, SanityDocument, SortOrderingItem, SortOrderingItem as SortOrderingItem$1 } from "@sanity/types";
|
|
12
10
|
export * from "@sanity/sdk";
|
|
13
11
|
/**
|
|
@@ -80,7 +78,7 @@ interface AuthBoundaryProps {
|
|
|
80
78
|
*
|
|
81
79
|
* @internal
|
|
82
80
|
*/
|
|
83
|
-
declare function AuthBoundary({ LoginErrorComponent, ...props }: AuthBoundaryProps): React.ReactNode;
|
|
81
|
+
export declare function AuthBoundary({ LoginErrorComponent, ...props }: AuthBoundaryProps): React.ReactNode;
|
|
84
82
|
/**
|
|
85
83
|
* @public
|
|
86
84
|
* @category Types
|
|
@@ -190,7 +188,7 @@ interface SanityAppProps {
|
|
|
190
188
|
* }
|
|
191
189
|
* ```
|
|
192
190
|
*/
|
|
193
|
-
declare function SanityApp({ children, fallback, config: configProp, ...props }: SanityAppProps): ReactElement;
|
|
191
|
+
export declare function SanityApp({ children, fallback, config: configProp, ...props }: SanityAppProps): ReactElement;
|
|
194
192
|
/**
|
|
195
193
|
* @internal
|
|
196
194
|
*/
|
|
@@ -207,7 +205,7 @@ interface SDKProviderProps extends AuthBoundaryProps {
|
|
|
207
205
|
*
|
|
208
206
|
* Top-level context provider that provides access to the Sanity SDK.
|
|
209
207
|
*/
|
|
210
|
-
declare function SDKProvider({ children, config, fallback, inferMediaLibraryAndCanvas, ...props }: SDKProviderProps): ReactElement;
|
|
208
|
+
export declare function SDKProvider({ children, config, fallback, inferMediaLibraryAndCanvas, ...props }: SDKProviderProps): ReactElement;
|
|
211
209
|
/**
|
|
212
210
|
* React SDK resource handle — extends the core DatasetHandle with `resourceName`
|
|
213
211
|
* for context-based resource resolution.
|
|
@@ -249,7 +247,7 @@ interface DocumentHandle<TDocumentType extends string = string, TDataset extends
|
|
|
249
247
|
* It is used to automatically request a new token on 401 error if enabled.
|
|
250
248
|
* @public
|
|
251
249
|
*/
|
|
252
|
-
declare const ComlinkTokenRefreshProvider: React$1.FC<PropsWithChildren>;
|
|
250
|
+
export declare const ComlinkTokenRefreshProvider: React$1.FC<PropsWithChildren>;
|
|
253
251
|
interface RenderSanitySDKAppOptions {
|
|
254
252
|
reactStrictMode?: boolean;
|
|
255
253
|
}
|
|
@@ -260,7 +258,7 @@ interface NamedSources {
|
|
|
260
258
|
[key: string]: SanityConfig;
|
|
261
259
|
}
|
|
262
260
|
/** @internal */
|
|
263
|
-
declare function renderSanityApp(rootElement: HTMLElement | null, namedSources: NamedSources, options: RenderSanitySDKAppOptions, children: React.ReactNode): () => void;
|
|
261
|
+
export declare function renderSanityApp(rootElement: HTMLElement | null, namedSources: NamedSources, options: RenderSanitySDKAppOptions, children: React.ReactNode): () => void;
|
|
264
262
|
/**
|
|
265
263
|
* Props for the ResourceProvider component
|
|
266
264
|
* @internal
|
|
@@ -294,7 +292,7 @@ interface ResourceProviderProps extends SanityConfig {
|
|
|
294
292
|
* </ResourceProvider>
|
|
295
293
|
* ```
|
|
296
294
|
*/
|
|
297
|
-
declare function ResourceProvider({ children, fallback, resource, ...config }: ResourceProviderProps): React.ReactNode;
|
|
295
|
+
export declare function ResourceProvider({ children, fallback, resource, ...config }: ResourceProviderProps): React.ReactNode;
|
|
298
296
|
/**
|
|
299
297
|
* Props for the SanityInstanceProvider component
|
|
300
298
|
* @public
|
|
@@ -349,7 +347,7 @@ interface SanityInstanceProviderProps {
|
|
|
349
347
|
*
|
|
350
348
|
* @category Components
|
|
351
349
|
*/
|
|
352
|
-
declare function SanityInstanceProvider({ instance, fallback, children }: SanityInstanceProviderProps): React.ReactNode;
|
|
350
|
+
export declare function SanityInstanceProvider({ instance, fallback, children }: SanityInstanceProviderProps): React.ReactNode;
|
|
353
351
|
/**
|
|
354
352
|
* Minimal duck-typed interface representing a Sanity Studio workspace.
|
|
355
353
|
* The Studio's `Workspace` type satisfies this naturally — no import
|
|
@@ -415,7 +413,7 @@ interface StudioWorkspaceHandle {
|
|
|
415
413
|
*
|
|
416
414
|
* @public
|
|
417
415
|
*/
|
|
418
|
-
declare const SDKStudioContext: import("react").Context<StudioWorkspaceHandle | null>;
|
|
416
|
+
export declare const SDKStudioContext: import("react").Context<StudioWorkspaceHandle | null>;
|
|
419
417
|
/**
|
|
420
418
|
* The value returned by a fetcher-backed hook. The hook suspends until the
|
|
421
419
|
* first fetch succeeds, so `data` is always present once your component renders.
|
|
@@ -445,7 +443,7 @@ interface FetcherHookResult<TData> {
|
|
|
445
443
|
* @param permissions - The permission names to check.
|
|
446
444
|
* @returns The result envelope `{data, isFetching, error, refetch}`.
|
|
447
445
|
*/
|
|
448
|
-
declare const useCheckPermissions: <Permission extends string>(resourceType: AccessResourceType, resourceId: string, permissions: Permission[]) => FetcherHookResult<Record<Permission, boolean>>;
|
|
446
|
+
export declare const useCheckPermissions: <Permission extends string>(resourceType: AccessResourceType, resourceId: string, permissions: Permission[]) => FetcherHookResult<Record<Permission, boolean>>;
|
|
449
447
|
interface Subscription {
|
|
450
448
|
unsubscribe(): void;
|
|
451
449
|
}
|
|
@@ -525,7 +523,7 @@ interface Subscribable<T> {
|
|
|
525
523
|
*
|
|
526
524
|
* @category Agent Actions
|
|
527
525
|
*/
|
|
528
|
-
declare function useAgentGenerate(resourceHandle?: ResourceHandle): (options: AgentGenerateOptions) => Subscribable<unknown>;
|
|
526
|
+
export declare function useAgentGenerate(resourceHandle?: ResourceHandle): (options: AgentGenerateOptions) => Subscribable<unknown>;
|
|
529
527
|
/**
|
|
530
528
|
* @alpha
|
|
531
529
|
* Transforms an existing document or selected fields using Sanity Agent Actions.
|
|
@@ -597,7 +595,7 @@ declare function useAgentGenerate(resourceHandle?: ResourceHandle): (options: Ag
|
|
|
597
595
|
*
|
|
598
596
|
* @category Agent Actions
|
|
599
597
|
*/
|
|
600
|
-
declare function useAgentTransform(resourceHandle?: ResourceHandle): (options: AgentTransformOptions) => Subscribable<unknown>;
|
|
598
|
+
export declare function useAgentTransform(resourceHandle?: ResourceHandle): (options: AgentTransformOptions) => Subscribable<unknown>;
|
|
601
599
|
/**
|
|
602
600
|
* @alpha
|
|
603
601
|
* Translates documents or fields using Sanity Agent Actions.
|
|
@@ -688,7 +686,7 @@ declare function useAgentTransform(resourceHandle?: ResourceHandle): (options: A
|
|
|
688
686
|
*
|
|
689
687
|
* @category Agent Actions
|
|
690
688
|
*/
|
|
691
|
-
declare function useAgentTranslate(resourceHandle?: ResourceHandle): (options: AgentTranslateOptions) => Subscribable<unknown>;
|
|
689
|
+
export declare function useAgentTranslate(resourceHandle?: ResourceHandle): (options: AgentTranslateOptions) => Subscribable<unknown>;
|
|
692
690
|
/**
|
|
693
691
|
* @alpha
|
|
694
692
|
* Prompts the Content Agent using the same instruction template format as other agent actions.
|
|
@@ -783,7 +781,7 @@ declare function useAgentTranslate(resourceHandle?: ResourceHandle): (options: A
|
|
|
783
781
|
*
|
|
784
782
|
* @category Agent Actions
|
|
785
783
|
*/
|
|
786
|
-
declare function useAgentPrompt(resourceHandle?: ResourceHandle): (options: AgentPromptOptions) => Promise<AgentPromptResult>;
|
|
784
|
+
export declare function useAgentPrompt(resourceHandle?: ResourceHandle): (options: AgentPromptOptions) => Promise<AgentPromptResult>;
|
|
787
785
|
/**
|
|
788
786
|
* @alpha
|
|
789
787
|
* Schema-aware patching with Sanity Agent Actions.
|
|
@@ -933,7 +931,7 @@ declare function useAgentPrompt(resourceHandle?: ResourceHandle): (options: Agen
|
|
|
933
931
|
*
|
|
934
932
|
* @category Agent Actions
|
|
935
933
|
*/
|
|
936
|
-
declare function useAgentPatch(resourceHandle?: ResourceHandle): (options: AgentPatchOptions) => Promise<AgentPatchResult>;
|
|
934
|
+
export declare function useAgentPatch(resourceHandle?: ResourceHandle): (options: AgentPatchOptions) => Promise<AgentPatchResult>;
|
|
937
935
|
/**
|
|
938
936
|
* Returns a single application by id.
|
|
939
937
|
*
|
|
@@ -946,7 +944,7 @@ declare function useAgentPatch(resourceHandle?: ResourceHandle): (options: Agent
|
|
|
946
944
|
* @param options - Optional `include` list to expand related resources.
|
|
947
945
|
* @returns The result envelope `{data, isFetching, error, refetch}`.
|
|
948
946
|
*/
|
|
949
|
-
declare const useApplication: <Include extends ApplicationInclude = never>(applicationId: string, options?: {
|
|
947
|
+
export declare const useApplication: <Include extends ApplicationInclude = never>(applicationId: string, options?: {
|
|
950
948
|
include?: Include[];
|
|
951
949
|
}) => FetcherHookResult<Application<Include>>;
|
|
952
950
|
/**
|
|
@@ -960,7 +958,7 @@ declare const useApplication: <Include extends ApplicationInclude = never>(appli
|
|
|
960
958
|
* @param options - Filter and include options for the applications list.
|
|
961
959
|
* @returns The result envelope `{data, isFetching, error, refetch}`.
|
|
962
960
|
*/
|
|
963
|
-
declare const useApplications: <Include extends ApplicationInclude = never>(options: ApplicationsOptions<Include>) => FetcherHookResult<ApplicationsResponse<Include>>;
|
|
961
|
+
export declare const useApplications: <Include extends ApplicationInclude = never>(options: ApplicationsOptions<Include>) => FetcherHookResult<ApplicationsResponse<Include>>;
|
|
964
962
|
/**
|
|
965
963
|
* The value returned by a mutation-backed hook. The write-side counterpart to
|
|
966
964
|
* {@link FetcherHookResult}: local `{mutate, isPending, error, data, reset}`
|
|
@@ -991,14 +989,14 @@ interface MutationHookResult<TInput, TResult> {
|
|
|
991
989
|
* @internal
|
|
992
990
|
* @returns The mutation envelope `{mutate, isPending, error, data, reset}`.
|
|
993
991
|
*/
|
|
994
|
-
declare const useDeleteApplication: () => MutationHookResult<import("@sanity/sdk").DeleteApplicationInput, import("@sanity/sdk").DeletedResult>;
|
|
992
|
+
export declare const useDeleteApplication: () => MutationHookResult<import("@sanity/sdk").DeleteApplicationInput, import("@sanity/sdk").DeletedResult>;
|
|
995
993
|
/**
|
|
996
994
|
* Updates an application's mutable properties (title, icon, visibility).
|
|
997
995
|
*
|
|
998
996
|
* @internal
|
|
999
997
|
* @returns The mutation envelope `{mutate, isPending, error, data, reset}`.
|
|
1000
998
|
*/
|
|
1001
|
-
declare const useUpdateApplication: () => MutationHookResult<import("@sanity/sdk").UpdateApplicationInput, import("@sanity/sdk").ApplicationBase>;
|
|
999
|
+
export declare const useUpdateApplication: () => MutationHookResult<import("@sanity/sdk").UpdateApplicationInput, import("@sanity/sdk").ApplicationBase>;
|
|
1002
1000
|
/**
|
|
1003
1001
|
* @internal
|
|
1004
1002
|
* A React hook that subscribes to authentication state changes.
|
|
@@ -1020,13 +1018,13 @@ declare const useUpdateApplication: () => MutationHookResult<import("@sanity/sdk
|
|
|
1020
1018
|
* }
|
|
1021
1019
|
* ```
|
|
1022
1020
|
*/
|
|
1023
|
-
declare const useAuthState: () => AuthState;
|
|
1021
|
+
export declare const useAuthState: () => AuthState;
|
|
1024
1022
|
/**
|
|
1025
1023
|
* Hook to get the currently logged in user
|
|
1026
1024
|
* @internal
|
|
1027
1025
|
* @returns The current user or null if not authenticated
|
|
1028
1026
|
*/
|
|
1029
|
-
declare const useAuthToken: () => string | null;
|
|
1027
|
+
export declare const useAuthToken: () => string | null;
|
|
1030
1028
|
type UseCurrentUser = {
|
|
1031
1029
|
/**
|
|
1032
1030
|
* @public
|
|
@@ -1055,7 +1053,7 @@ type UseCurrentUser = {
|
|
|
1055
1053
|
* @function
|
|
1056
1054
|
* @TODO This should not return null — users of a custom app will always be authenticated via Core
|
|
1057
1055
|
*/
|
|
1058
|
-
declare const useCurrentUser: UseCurrentUser;
|
|
1056
|
+
export declare const useCurrentUser: UseCurrentUser;
|
|
1059
1057
|
/**
|
|
1060
1058
|
* @internal
|
|
1061
1059
|
* A React hook that returns a function for handling authentication callbacks.
|
|
@@ -1096,17 +1094,154 @@ declare const useCurrentUser: UseCurrentUser;
|
|
|
1096
1094
|
* @returns A callback handler function that processes OAuth redirects
|
|
1097
1095
|
* @public
|
|
1098
1096
|
*/
|
|
1099
|
-
declare const useHandleAuthCallback: () => (locationHref?: string | undefined) => Promise<string | false>;
|
|
1097
|
+
export declare const useHandleAuthCallback: () => (locationHref?: string | undefined) => Promise<string | false>;
|
|
1098
|
+
/**
|
|
1099
|
+
* A React hook that returns a function for handling the OAuth redirect callback.
|
|
1100
|
+
*
|
|
1101
|
+
* @remarks
|
|
1102
|
+
* This is the OAuth counterpart to `useHandleAuthCallback`. The returned
|
|
1103
|
+
* function invokes core's `handleOAuthCallback`, which validates the `state`
|
|
1104
|
+
* parameter, surfaces `?error=` redirects, exchanges the authorization `code`
|
|
1105
|
+
* for tokens, persists them, and transitions the auth state to `LOGGED_IN` —
|
|
1106
|
+
* all in core. On success it resolves the same-origin location the user was on
|
|
1107
|
+
* when the flow started (so deep links survive login), otherwise the callback
|
|
1108
|
+
* URL cleaned of the OAuth params (`code`, `state`, `error`,
|
|
1109
|
+
* `error_description`). It resolves `false` when there was nothing to handle.
|
|
1110
|
+
* The resolved URL may be a different route, so navigate to it rather than
|
|
1111
|
+
* only calling `history.replaceState`.
|
|
1112
|
+
*
|
|
1113
|
+
* `AuthBoundary` runs this for you when the app lands on the OAuth redirect
|
|
1114
|
+
* URI. Reach for this hook only when building a custom callback component.
|
|
1115
|
+
*
|
|
1116
|
+
* Concurrent calls are single-flight in core, so React StrictMode's double
|
|
1117
|
+
* invocation will not trigger a second code exchange, and a repeated call with
|
|
1118
|
+
* a stale callback URL is ignored once a session is established.
|
|
1119
|
+
*
|
|
1120
|
+
* @example
|
|
1121
|
+
* ```tsx
|
|
1122
|
+
* function OAuthCallback() {
|
|
1123
|
+
* const handleCallback = useHandleOAuthCallback()
|
|
1124
|
+
* const navigate = useNavigate() // your router's navigation
|
|
1125
|
+
*
|
|
1126
|
+
* useEffect(() => {
|
|
1127
|
+
* handleCallback(window.location.href)
|
|
1128
|
+
* .then((nextUrl) => {
|
|
1129
|
+
* // Returns the user to where they started, with OAuth params removed
|
|
1130
|
+
* if (nextUrl) navigate(nextUrl, {replace: true})
|
|
1131
|
+
* })
|
|
1132
|
+
* .catch(console.error)
|
|
1133
|
+
* }, [handleCallback, navigate])
|
|
1134
|
+
*
|
|
1135
|
+
* return <div>Completing sign-in…</div>
|
|
1136
|
+
* }
|
|
1137
|
+
* ```
|
|
1138
|
+
*
|
|
1139
|
+
* @returns A callback handler that processes the OAuth redirect
|
|
1140
|
+
* @public
|
|
1141
|
+
*/
|
|
1142
|
+
export declare const useHandleOAuthCallback: () => (locationHref?: string | undefined) => Promise<string | false>;
|
|
1100
1143
|
/**
|
|
1101
1144
|
* @internal
|
|
1102
1145
|
*/
|
|
1103
|
-
declare function useLoginUrl(): string;
|
|
1146
|
+
export declare function useLoginUrl(): string;
|
|
1104
1147
|
/**
|
|
1105
1148
|
* Hook to log out of the current session
|
|
1106
1149
|
* @internal
|
|
1107
1150
|
* @returns A function to log out of the current session
|
|
1108
1151
|
*/
|
|
1109
|
-
declare const useLogOut: () => () => Promise<void>;
|
|
1152
|
+
export declare const useLogOut: () => () => Promise<void>;
|
|
1153
|
+
/**
|
|
1154
|
+
* A React hook that returns a function for starting the OAuth authorization-code + PKCE flow.
|
|
1155
|
+
*
|
|
1156
|
+
* @remarks
|
|
1157
|
+
* The returned function invokes core's `startOAuthAuthorization`, which generates
|
|
1158
|
+
* the PKCE `code_verifier`, `code_challenge` and `state`, persists the verifier and
|
|
1159
|
+
* state to `sessionStorage`, and navigates the browser to the authorize endpoint.
|
|
1160
|
+
* `clientId`, `redirectUri` and `organizationId` are read from the instance's
|
|
1161
|
+
* `auth.oauth` config. The returned promise rejects if the instance has no `auth.oauth` config.
|
|
1162
|
+
*
|
|
1163
|
+
* Pair with {@link useHandleOAuthCallback} on the redirect URI to complete the flow.
|
|
1164
|
+
*
|
|
1165
|
+
* @example
|
|
1166
|
+
* ```tsx
|
|
1167
|
+
* function LoginButton() {
|
|
1168
|
+
* const authorize = useOAuthAuthorize()
|
|
1169
|
+
* return <button onClick={() => authorize().catch(console.error)}>Sign in</button>
|
|
1170
|
+
* }
|
|
1171
|
+
* ```
|
|
1172
|
+
*
|
|
1173
|
+
* @returns A function that starts the OAuth flow by navigating to the authorization URL
|
|
1174
|
+
* @public
|
|
1175
|
+
*/
|
|
1176
|
+
export declare const useOAuthAuthorize: () => () => Promise<void>;
|
|
1177
|
+
/**
|
|
1178
|
+
* The current OAuth token state, plus actions to refresh and revoke it.
|
|
1179
|
+
*
|
|
1180
|
+
* @public
|
|
1181
|
+
*/
|
|
1182
|
+
interface UseOAuthTokensResult {
|
|
1183
|
+
/** The stored OAuth tokens, or `null` when not logged in via OAuth */
|
|
1184
|
+
tokens: OAuthTokens | null;
|
|
1185
|
+
/**
|
|
1186
|
+
* Returns whether the access token has expired, comparing `expiresAt` against
|
|
1187
|
+
* the current time at the moment it is called. Reading the clock does not
|
|
1188
|
+
* trigger a re-render, so call this in an event handler or effect rather than
|
|
1189
|
+
* during render. Returns `false` when there are no tokens.
|
|
1190
|
+
*/
|
|
1191
|
+
isExpired: () => boolean;
|
|
1192
|
+
/**
|
|
1193
|
+
* Refresh via the OAuth `refresh_token` grant. When there is no refresh token,
|
|
1194
|
+
* core clears the stored tokens, logs the user out, and this resolves `null`.
|
|
1195
|
+
* Rejects on transient failures (network, 5xx, 408, 429), leaving tokens
|
|
1196
|
+
* unchanged so the call can be retried. Also rejects when the server rejects
|
|
1197
|
+
* the refresh token itself (other 4xx); core clears the tokens and logs out
|
|
1198
|
+
* first, so check `tokens` before retrying.
|
|
1199
|
+
*/
|
|
1200
|
+
refresh: () => Promise<OAuthTokens | null>;
|
|
1201
|
+
/** Revoke the tokens at the OAuth server, clear them locally, and log out. */
|
|
1202
|
+
revoke: () => Promise<void>;
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* A React hook that exposes the stored OAuth token state along with `refresh`
|
|
1206
|
+
* and `revoke` actions.
|
|
1207
|
+
*
|
|
1208
|
+
* @remarks
|
|
1209
|
+
* The token view is a synchronous read over core's token state source, so the
|
|
1210
|
+
* hook re-renders whenever tokens change — including changes made in another
|
|
1211
|
+
* tab, which core propagates via `storage` events.
|
|
1212
|
+
*
|
|
1213
|
+
* @returns The current {@link UseOAuthTokensResult}
|
|
1214
|
+
*
|
|
1215
|
+
* @example
|
|
1216
|
+
* ```tsx
|
|
1217
|
+
* function TokenStatus() {
|
|
1218
|
+
* const {tokens, isExpired, refresh, revoke} = useOAuthTokens()
|
|
1219
|
+
*
|
|
1220
|
+
* if (!tokens) return <div>Not signed in</div>
|
|
1221
|
+
*
|
|
1222
|
+
* const handleRefresh = async () => {
|
|
1223
|
+
* if (!isExpired()) return
|
|
1224
|
+
* try {
|
|
1225
|
+
* await refresh()
|
|
1226
|
+
* } catch {
|
|
1227
|
+
* // Transient failure (tokens unchanged, retry later) or the refresh
|
|
1228
|
+
* // token was rejected (tokens now null, user is logged out).
|
|
1229
|
+
* }
|
|
1230
|
+
* }
|
|
1231
|
+
*
|
|
1232
|
+
* return (
|
|
1233
|
+
* <div>
|
|
1234
|
+
* <p>Expires at {tokens.expiresAt.toLocaleTimeString()}</p>
|
|
1235
|
+
* <button onClick={handleRefresh}>Refresh if expired</button>
|
|
1236
|
+
* <button onClick={() => revoke()}>Revoke tokens</button>
|
|
1237
|
+
* </div>
|
|
1238
|
+
* )
|
|
1239
|
+
* }
|
|
1240
|
+
* ```
|
|
1241
|
+
*
|
|
1242
|
+
* @public
|
|
1243
|
+
*/
|
|
1244
|
+
export declare function useOAuthTokens(): UseOAuthTokensResult;
|
|
1110
1245
|
/**
|
|
1111
1246
|
* Hook that verifies the current projects belongs to the organization ID specified in the dashboard context.
|
|
1112
1247
|
*
|
|
@@ -1127,7 +1262,7 @@ declare const useLogOut: () => () => Promise<void>;
|
|
|
1127
1262
|
* }
|
|
1128
1263
|
* ```
|
|
1129
1264
|
*/
|
|
1130
|
-
declare function useVerifyOrgProjects(disabled?: boolean, projectIds?: string[]): string | null;
|
|
1265
|
+
export declare function useVerifyOrgProjects(disabled?: boolean, projectIds?: string[]): string | null;
|
|
1131
1266
|
/**
|
|
1132
1267
|
* A React hook that provides a client that subscribes to changes in your application,
|
|
1133
1268
|
*
|
|
@@ -1155,7 +1290,12 @@ declare function useVerifyOrgProjects(disabled?: boolean, projectIds?: string[])
|
|
|
1155
1290
|
* @public
|
|
1156
1291
|
* @function
|
|
1157
1292
|
*/
|
|
1158
|
-
declare const useClient: (options: ClientOptions) => import("@sanity/client").SanityClient;
|
|
1293
|
+
export declare const useClient: (options: ClientOptions) => import("@sanity/client").SanityClient;
|
|
1294
|
+
declare global {
|
|
1295
|
+
interface SymbolConstructor {
|
|
1296
|
+
readonly observable: symbol;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1159
1299
|
/**
|
|
1160
1300
|
* @public
|
|
1161
1301
|
*/
|
|
@@ -1195,7 +1335,7 @@ interface FrameConnection<TFrameMessage extends FrameMessage> {
|
|
|
1195
1335
|
/**
|
|
1196
1336
|
* @internal
|
|
1197
1337
|
*/
|
|
1198
|
-
declare function useFrameConnection<TFrameMessage extends FrameMessage, TWindowMessage extends WindowMessage>(options: UseFrameConnectionOptions<TWindowMessage>): FrameConnection<TFrameMessage>;
|
|
1338
|
+
export declare function useFrameConnection<TFrameMessage extends FrameMessage, TWindowMessage extends WindowMessage>(options: UseFrameConnectionOptions<TWindowMessage>): FrameConnection<TFrameMessage>;
|
|
1199
1339
|
/**
|
|
1200
1340
|
* @internal
|
|
1201
1341
|
*/
|
|
@@ -1230,7 +1370,7 @@ interface WindowConnection<TMessage extends WindowMessage> {
|
|
|
1230
1370
|
* Generally not to be used directly, but to be used as a dependency of
|
|
1231
1371
|
* Comlink-powered hooks like `useStudioWorkspacesByProjectIdDataset`.
|
|
1232
1372
|
*/
|
|
1233
|
-
declare function useWindowConnection<TWindowMessage extends WindowMessage, TFrameMessage extends FrameMessage>({ name, connectTo, onMessage }: UseWindowConnectionOptions<TFrameMessage>): WindowConnection<TWindowMessage>;
|
|
1373
|
+
export declare function useWindowConnection<TWindowMessage extends WindowMessage, TFrameMessage extends FrameMessage>({ name, connectTo, onMessage }: UseWindowConnectionOptions<TFrameMessage>): WindowConnection<TWindowMessage>;
|
|
1234
1374
|
/**
|
|
1235
1375
|
* Adds React hook support (resourceName resolution) to core types.
|
|
1236
1376
|
* Prefer using the React-layer handle types (ResourceHandle, DocumentHandle)
|
|
@@ -1302,7 +1442,7 @@ interface CommentActions {
|
|
|
1302
1442
|
*
|
|
1303
1443
|
* @public
|
|
1304
1444
|
*/
|
|
1305
|
-
declare function useCommentActions(): CommentActions;
|
|
1445
|
+
export declare function useCommentActions(): CommentActions;
|
|
1306
1446
|
/**
|
|
1307
1447
|
* @public
|
|
1308
1448
|
* @category Types
|
|
@@ -1346,7 +1486,7 @@ interface UseCommentsResult {
|
|
|
1346
1486
|
*
|
|
1347
1487
|
* @public
|
|
1348
1488
|
*/
|
|
1349
|
-
declare function useComments(options: WithResourceNameSupport<CommentsOptions>): UseCommentsResult;
|
|
1489
|
+
export declare function useComments(options: WithResourceNameSupport<CommentsOptions>): UseCommentsResult;
|
|
1350
1490
|
/**
|
|
1351
1491
|
* @public
|
|
1352
1492
|
* @category Types
|
|
@@ -1397,7 +1537,7 @@ interface UseCommentThreadsResult {
|
|
|
1397
1537
|
*
|
|
1398
1538
|
* @public
|
|
1399
1539
|
*/
|
|
1400
|
-
declare function useCommentThreads(options: WithResourceNameSupport<CommentsOptions>): UseCommentThreadsResult;
|
|
1540
|
+
export declare function useCommentThreads(options: WithResourceNameSupport<CommentsOptions>): UseCommentThreadsResult;
|
|
1401
1541
|
/**
|
|
1402
1542
|
* Returns the currently active `DocumentResource` for the nearest resource context.
|
|
1403
1543
|
*
|
|
@@ -1415,7 +1555,7 @@ declare function useCommentThreads(options: WithResourceNameSupport<CommentsOpti
|
|
|
1415
1555
|
* console.log(resource?.projectId, resource?.dataset)
|
|
1416
1556
|
* ```
|
|
1417
1557
|
*/
|
|
1418
|
-
declare function useResource(): DocumentResource | undefined;
|
|
1558
|
+
export declare function useResource(): DocumentResource | undefined;
|
|
1419
1559
|
/**
|
|
1420
1560
|
* Retrieves the current Sanity instance from context
|
|
1421
1561
|
*
|
|
@@ -1436,7 +1576,7 @@ declare function useResource(): DocumentResource | undefined;
|
|
|
1436
1576
|
*
|
|
1437
1577
|
* @throws Error if no SanityInstance is found in context
|
|
1438
1578
|
*/
|
|
1439
|
-
declare const useSanityInstance: () => SanityInstance;
|
|
1579
|
+
export declare const useSanityInstance: () => SanityInstance;
|
|
1440
1580
|
/**
|
|
1441
1581
|
* Props shared by {@link useFavorite} and {@link useUpdateFavorite}: a document
|
|
1442
1582
|
* handle plus the resource it lives in.
|
|
@@ -1474,7 +1614,7 @@ interface UseFavoriteProps extends DocumentHandle$1 {
|
|
|
1474
1614
|
* }
|
|
1475
1615
|
* ```
|
|
1476
1616
|
*/
|
|
1477
|
-
declare function useFavorite(props: UseFavoriteProps): boolean;
|
|
1617
|
+
export declare function useFavorite(props: UseFavoriteProps): boolean;
|
|
1478
1618
|
interface DocumentInteractionHistory {
|
|
1479
1619
|
recordEvent: (eventType: 'viewed' | 'edited' | 'created' | 'deleted') => void;
|
|
1480
1620
|
}
|
|
@@ -1531,7 +1671,7 @@ interface UseRecordDocumentHistoryEventProps extends DocumentHandle$1 {
|
|
|
1531
1671
|
* }
|
|
1532
1672
|
* ```
|
|
1533
1673
|
*/
|
|
1534
|
-
declare function useRecordDocumentHistoryEvent({ documentId, documentType, resourceType, resourceId, schemaName }: UseRecordDocumentHistoryEventProps): DocumentInteractionHistory;
|
|
1674
|
+
export declare function useRecordDocumentHistoryEvent({ documentId, documentType, resourceType, resourceId, schemaName }: UseRecordDocumentHistoryEventProps): DocumentInteractionHistory;
|
|
1535
1675
|
interface DashboardResource {
|
|
1536
1676
|
id: string;
|
|
1537
1677
|
name: string;
|
|
@@ -1584,7 +1724,7 @@ interface StudioWorkspacesResult {
|
|
|
1584
1724
|
* }
|
|
1585
1725
|
* ```
|
|
1586
1726
|
*/
|
|
1587
|
-
declare function useStudioWorkspacesByProjectIdDataset(): StudioWorkspacesResult;
|
|
1727
|
+
export declare function useStudioWorkspacesByProjectIdDataset(): StudioWorkspacesResult;
|
|
1588
1728
|
/**
|
|
1589
1729
|
* The value returned by {@link useUpdateFavorite}.
|
|
1590
1730
|
*
|
|
@@ -1641,7 +1781,7 @@ interface UpdateFavorite {
|
|
|
1641
1781
|
* }
|
|
1642
1782
|
* ```
|
|
1643
1783
|
*/
|
|
1644
|
-
declare function useUpdateFavorite(props: UseFavoriteProps): UpdateFavorite;
|
|
1784
|
+
export declare function useUpdateFavorite(props: UseFavoriteProps): UpdateFavorite;
|
|
1645
1785
|
/**
|
|
1646
1786
|
* Returns metadata for each dataset the current user has access to.
|
|
1647
1787
|
*
|
|
@@ -1672,12 +1812,12 @@ declare function useUpdateFavorite(props: UseFavoriteProps): UpdateFavorite;
|
|
|
1672
1812
|
* 4. `instance.config`.
|
|
1673
1813
|
* @public
|
|
1674
1814
|
*/
|
|
1675
|
-
declare function useDatasets(options?: ProjectHandle): FetcherHookResult<DatasetsResponse$1>;
|
|
1815
|
+
export declare function useDatasets(options?: ProjectHandle): FetcherHookResult<DatasetsResponse$1>;
|
|
1676
1816
|
/**
|
|
1677
1817
|
* @public
|
|
1678
1818
|
*/
|
|
1679
1819
|
interface UseApplyDocumentActions {
|
|
1680
|
-
(): <TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(action: DocumentAction<TDocumentType, TDataset, TProjectId> | DocumentAction<TDocumentType, TDataset, TProjectId>[], options?: ResourceHandle) => Promise<ActionsResult<
|
|
1820
|
+
(): <TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(action: DocumentAction<TDocumentType, TDataset, TProjectId> | DocumentAction<TDocumentType, TDataset, TProjectId>[], options?: ResourceHandle) => Promise<ActionsResult<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>>>;
|
|
1681
1821
|
}
|
|
1682
1822
|
/**
|
|
1683
1823
|
* @public
|
|
@@ -1855,14 +1995,14 @@ interface UseApplyDocumentActions {
|
|
|
1855
1995
|
* perspective: {releaseName: 'summer-drop'},
|
|
1856
1996
|
* })
|
|
1857
1997
|
*
|
|
1858
|
-
* apply(editDocument(docHandle, {title: 'Updated for release'}))
|
|
1998
|
+
* apply(editDocument(docHandle, {set: {title: 'Updated for release'}}))
|
|
1859
1999
|
* }
|
|
1860
2000
|
*
|
|
1861
2001
|
* return <button onClick={handleEdit}>Edit in Release</button>
|
|
1862
2002
|
* }
|
|
1863
2003
|
* ```
|
|
1864
2004
|
*/
|
|
1865
|
-
declare const useApplyDocumentActions: UseApplyDocumentActions;
|
|
2005
|
+
export declare const useApplyDocumentActions: UseApplyDocumentActions;
|
|
1866
2006
|
type IgnoredKey = '_id' | '_type' | '_rev' | '_createdAt' | '_updatedAt';
|
|
1867
2007
|
/**
|
|
1868
2008
|
* Optional per-call overrides for {@link useCreateDocument}'s create function.
|
|
@@ -1883,7 +2023,7 @@ interface CreateDocumentOverrides {
|
|
|
1883
2023
|
* @returns A function that creates the document. It accepts optional initial field values and an optional `{documentId}` override,
|
|
1884
2024
|
* and resolves to the {@link DocumentHandle} of the created document (carrying the generated or supplied id).
|
|
1885
2025
|
*/
|
|
1886
|
-
declare function useCreateDocument<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentTypeHandle<TDocumentType, TDataset, TProjectId>): (initialValue?: Partial<Omit<
|
|
2026
|
+
export declare function useCreateDocument<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentTypeHandle<TDocumentType, TDataset, TProjectId>): (initialValue?: Partial<Omit<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>, IgnoredKey>>, overrides?: CreateDocumentOverrides) => Promise<DocumentHandle<TDocumentType, TDataset, TProjectId>>;
|
|
1887
2027
|
/**
|
|
1888
2028
|
* @public
|
|
1889
2029
|
* Create a new document with an explicit type `TData`.
|
|
@@ -1892,18 +2032,18 @@ declare function useCreateDocument<TDocumentType extends string = string, TDatas
|
|
|
1892
2032
|
* @returns A function that creates the document. It accepts optional initial field values (typed against `TData`) and an
|
|
1893
2033
|
* optional `{documentId}` override, and resolves to the {@link DocumentHandle} of the created document.
|
|
1894
2034
|
*/
|
|
1895
|
-
declare function useCreateDocument<TData extends Record<string, unknown>>(options: DocumentTypeHandle): (initialValue?: Partial<Omit<TData, IgnoredKey>>, overrides?: CreateDocumentOverrides) => Promise<DocumentHandle>;
|
|
2035
|
+
export declare function useCreateDocument<TData extends Record<string, unknown>>(options: DocumentTypeHandle): (initialValue?: Partial<Omit<TData, IgnoredKey>>, overrides?: CreateDocumentOverrides) => Promise<DocumentHandle>;
|
|
1896
2036
|
type UseDocumentOptions<TPath extends string | undefined = undefined, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string> = DocumentHandle<TDocumentType, TDataset, TProjectId> & {
|
|
1897
2037
|
path?: TPath;
|
|
1898
2038
|
};
|
|
1899
2039
|
interface UseDocument {
|
|
1900
2040
|
/** @internal */
|
|
1901
2041
|
<TDocumentType extends string, TDataset extends string, TProjectId extends string = string>(options: UseDocumentOptions<undefined, TDocumentType, TDataset, TProjectId>): {
|
|
1902
|
-
data:
|
|
2042
|
+
data: ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`> | null;
|
|
1903
2043
|
};
|
|
1904
2044
|
/** @internal */
|
|
1905
2045
|
<TPath extends string, TDocumentType extends string, TDataset extends string = string, TProjectId extends string = string>(options: UseDocumentOptions<TPath, TDocumentType>): {
|
|
1906
|
-
data: JsonMatch<
|
|
2046
|
+
data: JsonMatch<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>, TPath> | undefined;
|
|
1907
2047
|
};
|
|
1908
2048
|
/** @internal */
|
|
1909
2049
|
<TData>(options: DocumentOptions<undefined>): {
|
|
@@ -1976,9 +2116,9 @@ interface UseDocument {
|
|
|
1976
2116
|
* @inlineType DocumentOptions
|
|
1977
2117
|
*/
|
|
1978
2118
|
<TPath extends string | undefined = undefined, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: UseDocumentOptions<TPath, TDocumentType>): TPath extends string ? {
|
|
1979
|
-
data: JsonMatch<
|
|
2119
|
+
data: JsonMatch<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>, TPath> | undefined;
|
|
1980
2120
|
} : {
|
|
1981
|
-
data:
|
|
2121
|
+
data: ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`> | null;
|
|
1982
2122
|
};
|
|
1983
2123
|
/**
|
|
1984
2124
|
* @public
|
|
@@ -2075,7 +2215,7 @@ interface UseDocument {
|
|
|
2075
2215
|
*
|
|
2076
2216
|
* @function
|
|
2077
2217
|
*/
|
|
2078
|
-
declare const useDocument: UseDocument;
|
|
2218
|
+
export declare const useDocument: UseDocument;
|
|
2079
2219
|
/**
|
|
2080
2220
|
* @public
|
|
2081
2221
|
*/
|
|
@@ -2137,7 +2277,7 @@ interface UseDocumentEventOptions<TDataset extends string = string, TProjectId e
|
|
|
2137
2277
|
* }
|
|
2138
2278
|
* ```
|
|
2139
2279
|
*/
|
|
2140
|
-
declare function useDocumentEvent<TDataset extends string = string, TProjectId extends string = string>(options: UseDocumentEventOptions<TDataset, TProjectId>): void;
|
|
2280
|
+
export declare function useDocumentEvent<TDataset extends string = string, TProjectId extends string = string>(options: UseDocumentEventOptions<TDataset, TProjectId>): void;
|
|
2141
2281
|
/**
|
|
2142
2282
|
*
|
|
2143
2283
|
* @public
|
|
@@ -2215,7 +2355,7 @@ declare function useDocumentEvent<TDataset extends string = string, TProjectId e
|
|
|
2215
2355
|
* }
|
|
2216
2356
|
* ```
|
|
2217
2357
|
*/
|
|
2218
|
-
declare function useDocumentPermissions(actionOrActions: WithResourceNameSupport<DocumentAction> | WithResourceNameSupport<DocumentAction>[]): DocumentPermissionsResult;
|
|
2358
|
+
export declare function useDocumentPermissions(actionOrActions: WithResourceNameSupport<DocumentAction> | WithResourceNameSupport<DocumentAction>[]): DocumentPermissionsResult;
|
|
2219
2359
|
type UseDocumentSyncStatus = {
|
|
2220
2360
|
/**
|
|
2221
2361
|
* Exposes the document's sync status between local and remote document states.
|
|
@@ -2255,7 +2395,7 @@ type UseDocumentSyncStatus = {
|
|
|
2255
2395
|
* @public
|
|
2256
2396
|
* @function
|
|
2257
2397
|
*/
|
|
2258
|
-
declare const useDocumentSyncStatus: UseDocumentSyncStatus;
|
|
2398
|
+
export declare const useDocumentSyncStatus: UseDocumentSyncStatus;
|
|
2259
2399
|
type Updater<TValue> = TValue | ((currentValue: TValue) => TValue);
|
|
2260
2400
|
/**
|
|
2261
2401
|
* @public
|
|
@@ -2265,7 +2405,7 @@ type Updater<TValue> = TValue | ((currentValue: TValue) => TValue);
|
|
|
2265
2405
|
* @returns A stable function to update the document state. Accepts either the new document state or an updater function `(currentValue) => nextValue`.
|
|
2266
2406
|
* Returns a promise resolving to the {@link ActionsResult}.
|
|
2267
2407
|
*/
|
|
2268
|
-
declare function useEditDocument<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentOptions<undefined, TDocumentType, TDataset, TProjectId>): (nextValue: Updater<
|
|
2408
|
+
export declare function useEditDocument<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentOptions<undefined, TDocumentType, TDataset, TProjectId>): (nextValue: Updater<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>>) => Promise<ActionsResult<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>>>;
|
|
2269
2409
|
/**
|
|
2270
2410
|
* @public
|
|
2271
2411
|
* Edit a specific path within a document, relying on Typegen for the type.
|
|
@@ -2274,7 +2414,7 @@ declare function useEditDocument<TDocumentType extends string = string, TDataset
|
|
|
2274
2414
|
* @returns A stable function to update the value at the specified path. Accepts either the new value or an updater function `(currentValue) => nextValue`.
|
|
2275
2415
|
* Returns a promise resolving to the {@link ActionsResult}.
|
|
2276
2416
|
*/
|
|
2277
|
-
declare function useEditDocument<TPath extends string = string, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentOptions<TPath, TDocumentType, TDataset, TProjectId>): (nextValue: Updater<JsonMatch<
|
|
2417
|
+
export declare function useEditDocument<TPath extends string = string, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: DocumentOptions<TPath, TDocumentType, TDataset, TProjectId>): (nextValue: Updater<JsonMatch<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>, TPath>>) => Promise<ActionsResult<ResolveDocument<TDocumentType, `${TProjectId}.${TDataset}`>>>;
|
|
2278
2418
|
/**
|
|
2279
2419
|
* @public
|
|
2280
2420
|
* Edit an entire document with an explicit type `TData`.
|
|
@@ -2283,7 +2423,7 @@ declare function useEditDocument<TPath extends string = string, TDocumentType ex
|
|
|
2283
2423
|
* @returns A stable function to update the document state. Accepts either the new document state (`TData`) or an updater function `(currentValue: TData) => nextValue: TData`.
|
|
2284
2424
|
* Returns a promise resolving to the {@link ActionsResult}.
|
|
2285
2425
|
*/
|
|
2286
|
-
declare function useEditDocument<TData>(options: DocumentOptions<undefined>): (nextValue: Updater<TData>) => Promise<ActionsResult>;
|
|
2426
|
+
export declare function useEditDocument<TData>(options: DocumentOptions<undefined>): (nextValue: Updater<TData>) => Promise<ActionsResult>;
|
|
2287
2427
|
/**
|
|
2288
2428
|
* @public
|
|
2289
2429
|
* Edit a specific path within a document with an explicit type `TData`.
|
|
@@ -2292,7 +2432,7 @@ declare function useEditDocument<TData>(options: DocumentOptions<undefined>): (n
|
|
|
2292
2432
|
* @returns A stable function to update the value at the specified path. Accepts either the new value (`TData`) or an updater function `(currentValue: TData) => nextValue: TData`.
|
|
2293
2433
|
* Returns a promise resolving to the {@link ActionsResult}.
|
|
2294
2434
|
*/
|
|
2295
|
-
declare function useEditDocument<TData>(options: DocumentOptions<string>): (nextValue: Updater<TData>) => Promise<ActionsResult>;
|
|
2435
|
+
export declare function useEditDocument<TData>(options: DocumentOptions<string>): (nextValue: Updater<TData>) => Promise<ActionsResult>;
|
|
2296
2436
|
/**
|
|
2297
2437
|
* Configuration options for the useDocuments hook
|
|
2298
2438
|
*
|
|
@@ -2459,7 +2599,7 @@ interface DocumentsResponse<TDocumentType extends string = string, TDataset exte
|
|
|
2459
2599
|
* }
|
|
2460
2600
|
* ```
|
|
2461
2601
|
*/
|
|
2462
|
-
declare function useDocuments<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>({ batchSize, params, search, filter, orderings, documentType, ...rawOptions }: DocumentsOptions<TDocumentType, TDataset, TProjectId>): DocumentsResponse<TDocumentType, TDataset, TProjectId>;
|
|
2602
|
+
export declare function useDocuments<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>({ batchSize, params, search, filter, orderings, documentType, ...rawOptions }: DocumentsOptions<TDocumentType, TDataset, TProjectId>): DocumentsResponse<TDocumentType, TDataset, TProjectId>;
|
|
2463
2603
|
/**
|
|
2464
2604
|
* Returns a single installation by id.
|
|
2465
2605
|
*
|
|
@@ -2472,7 +2612,7 @@ declare function useDocuments<TDocumentType extends string = string, TDataset ex
|
|
|
2472
2612
|
* @param options - Optional `include` list to expand related resources.
|
|
2473
2613
|
* @returns The result envelope `{data, isFetching, error, refetch}`.
|
|
2474
2614
|
*/
|
|
2475
|
-
declare const useInstallation: <Include extends InstallationInclude = never>(installationId: string, options?: {
|
|
2615
|
+
export declare const useInstallation: <Include extends InstallationInclude = never>(installationId: string, options?: {
|
|
2476
2616
|
include?: Include[];
|
|
2477
2617
|
}) => FetcherHookResult<Installation<Include>>;
|
|
2478
2618
|
/**
|
|
@@ -2486,7 +2626,7 @@ declare const useInstallation: <Include extends InstallationInclude = never>(ins
|
|
|
2486
2626
|
* @param options - Filter and include options for the installations list.
|
|
2487
2627
|
* @returns The result envelope `{data, isFetching, error, refetch}`.
|
|
2488
2628
|
*/
|
|
2489
|
-
declare const useInstallations: <Include extends InstallationInclude = never>(options: InstallationsOptions<Include>) => FetcherHookResult<InstallationsResponse<Include>>;
|
|
2629
|
+
export declare const useInstallations: <Include extends InstallationInclude = never>(options: InstallationsOptions<Include>) => FetcherHookResult<InstallationsResponse<Include>>;
|
|
2490
2630
|
/**
|
|
2491
2631
|
* Returns metadata for a given organisation.
|
|
2492
2632
|
*
|
|
@@ -2511,7 +2651,7 @@ declare const useInstallations: <Include extends InstallationInclude = never>(op
|
|
|
2511
2651
|
* @public
|
|
2512
2652
|
* @function
|
|
2513
2653
|
*/
|
|
2514
|
-
declare const useOrganization: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = false>(options: OrganizationOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Organization<IncludeMembers, IncludeFeatures>>;
|
|
2654
|
+
export declare const useOrganization: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = false>(options: OrganizationOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Organization<IncludeMembers, IncludeFeatures>>;
|
|
2515
2655
|
/**
|
|
2516
2656
|
* Returns metadata for each organisation the current user has access to.
|
|
2517
2657
|
*
|
|
@@ -2541,7 +2681,7 @@ declare const useOrganization: <IncludeMembers extends boolean = false, IncludeF
|
|
|
2541
2681
|
* @public
|
|
2542
2682
|
* @function
|
|
2543
2683
|
*/
|
|
2544
|
-
declare const useOrganizations: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = false>(options?: OrganizationsOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Organizations<IncludeMembers, IncludeFeatures>>;
|
|
2684
|
+
export declare const useOrganizations: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = false>(options?: OrganizationsOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Organizations<IncludeMembers, IncludeFeatures>>;
|
|
2545
2685
|
/**
|
|
2546
2686
|
* Configuration options for the usePaginatedDocuments hook
|
|
2547
2687
|
*
|
|
@@ -2740,7 +2880,7 @@ interface PaginatedDocumentsResponse<TDocumentType extends string = string, TDat
|
|
|
2740
2880
|
* // <PaginatedDocumentList dataset={myDatasetHandle} documentType="post" />
|
|
2741
2881
|
* ```
|
|
2742
2882
|
*/
|
|
2743
|
-
declare function usePaginatedDocuments<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>({ documentType, filter, pageSize, params, orderings, search, ...rawOptions }: PaginatedDocumentsOptions<TDocumentType, TDataset, TProjectId>): PaginatedDocumentsResponse<TDocumentType, TDataset, TProjectId>;
|
|
2883
|
+
export declare function usePaginatedDocuments<TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>({ documentType, filter, pageSize, params, orderings, search, ...rawOptions }: PaginatedDocumentsOptions<TDocumentType, TDataset, TProjectId>): PaginatedDocumentsResponse<TDocumentType, TDataset, TProjectId>;
|
|
2744
2884
|
/**
|
|
2745
2885
|
* Every participant in the current project and dataset, or Canvas.
|
|
2746
2886
|
*
|
|
@@ -2758,7 +2898,7 @@ declare function usePaginatedDocuments<TDocumentType extends string = string, TD
|
|
|
2758
2898
|
*
|
|
2759
2899
|
* @public
|
|
2760
2900
|
*/
|
|
2761
|
-
declare function usePresence(options?: ResourceHandle): {
|
|
2901
|
+
export declare function usePresence(options?: ResourceHandle): {
|
|
2762
2902
|
locations: UserPresence[];
|
|
2763
2903
|
};
|
|
2764
2904
|
/** @beta */
|
|
@@ -2808,7 +2948,7 @@ interface UsePresenceForDocumentOptions extends DocumentHandle {
|
|
|
2808
2948
|
*
|
|
2809
2949
|
* @beta
|
|
2810
2950
|
*/
|
|
2811
|
-
declare function usePresenceForDocument(options: UsePresenceForDocumentOptions): {
|
|
2951
|
+
export declare function usePresenceForDocument(options: UsePresenceForDocumentOptions): {
|
|
2812
2952
|
presence: DocumentPresence[];
|
|
2813
2953
|
};
|
|
2814
2954
|
/** @beta */
|
|
@@ -2874,7 +3014,7 @@ interface UseReportPresenceOptions extends DocumentHandle {
|
|
|
2874
3014
|
*
|
|
2875
3015
|
* @beta
|
|
2876
3016
|
*/
|
|
2877
|
-
declare function useReportPresence(options: UseReportPresenceOptions): void;
|
|
3017
|
+
export declare function useReportPresence(options: UseReportPresenceOptions): void;
|
|
2878
3018
|
/**
|
|
2879
3019
|
* @public
|
|
2880
3020
|
* @category Types
|
|
@@ -2952,7 +3092,7 @@ interface useDocumentPreviewResults {
|
|
|
2952
3092
|
* )
|
|
2953
3093
|
* ```
|
|
2954
3094
|
*/
|
|
2955
|
-
declare function useDocumentPreview({ ref, ...docHandle }: useDocumentPreviewOptions): useDocumentPreviewResults;
|
|
3095
|
+
export declare function useDocumentPreview({ ref, ...docHandle }: useDocumentPreviewOptions): useDocumentPreviewResults;
|
|
2956
3096
|
/**
|
|
2957
3097
|
* @public
|
|
2958
3098
|
* @category Types
|
|
@@ -3000,19 +3140,19 @@ interface useDocumentProjectionResults<TData> {
|
|
|
3000
3140
|
* @param options - Options including the document handle properties (`documentId`, `documentType`, etc.) and the `projection`.
|
|
3001
3141
|
* @returns The projected data, typed based on Typegen.
|
|
3002
3142
|
*
|
|
3003
|
-
* @example Using Typegen for a book preview
|
|
3143
|
+
* @example Using an existing experimental Typegen file for a book preview
|
|
3004
3144
|
* ```tsx
|
|
3005
3145
|
* // ProjectionComponent.tsx
|
|
3006
|
-
* import {useDocumentProjection, type DocumentHandle} from '@sanity/sdk-react'
|
|
3146
|
+
* import {defineProjection, useDocumentProjection, type DocumentHandle} from '@sanity/sdk-react'
|
|
3007
3147
|
* import {useRef} from 'react'
|
|
3008
|
-
* import {defineProjection} from 'groq'
|
|
3009
3148
|
*
|
|
3010
3149
|
* // Define props using DocumentHandle with the specific document type
|
|
3011
3150
|
* type ProjectionComponentProps = {
|
|
3012
3151
|
* doc: DocumentHandle<'book'> // Typegen knows 'book'
|
|
3013
3152
|
* }
|
|
3014
3153
|
*
|
|
3015
|
-
* //
|
|
3154
|
+
* // Keep the projection string identical to its entry in the existing generated file.
|
|
3155
|
+
* // Current Typegen does not scan defineProjection imported from the SDK.
|
|
3016
3156
|
* const myProjection = defineProjection(`{
|
|
3017
3157
|
* title,
|
|
3018
3158
|
* 'coverImage': cover.asset->url,
|
|
@@ -3048,7 +3188,7 @@ interface useDocumentProjectionResults<TData> {
|
|
|
3048
3188
|
* // </Suspense>
|
|
3049
3189
|
* ```
|
|
3050
3190
|
*/
|
|
3051
|
-
declare function useDocumentProjection<TProjection extends string = string, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: useDocumentProjectionOptions<TProjection, TDocumentType, TDataset, TProjectId>): useDocumentProjectionResults<
|
|
3191
|
+
export declare function useDocumentProjection<TProjection extends string = string, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: useDocumentProjectionOptions<TProjection, TDocumentType, TDataset, TProjectId>): useDocumentProjectionResults<ResolveProjectionResult<TProjection, TDocumentType, `${TProjectId}.${TDataset}`>>;
|
|
3052
3192
|
/**
|
|
3053
3193
|
* @public
|
|
3054
3194
|
* Fetch a projection with an explicitly defined return type `TData`.
|
|
@@ -3094,7 +3234,7 @@ declare function useDocumentProjection<TProjection extends string = string, TDoc
|
|
|
3094
3234
|
* // </Suspense>
|
|
3095
3235
|
* ```
|
|
3096
3236
|
*/
|
|
3097
|
-
declare function useDocumentProjection<TData extends object>(options: useDocumentProjectionOptions): useDocumentProjectionResults<TData>;
|
|
3237
|
+
export declare function useDocumentProjection<TData extends object>(options: useDocumentProjectionOptions): useDocumentProjectionResults<TData>;
|
|
3098
3238
|
/**
|
|
3099
3239
|
* Returns metadata for a given project.
|
|
3100
3240
|
*
|
|
@@ -3131,7 +3271,7 @@ declare function useDocumentProjection<TData extends object>(options: useDocumen
|
|
|
3131
3271
|
* @public
|
|
3132
3272
|
* @function
|
|
3133
3273
|
*/
|
|
3134
|
-
declare const useProject: <IncludeMembers extends boolean = true, IncludeFeatures extends boolean = true>(options?: ProjectOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Project<IncludeMembers, IncludeFeatures>>;
|
|
3274
|
+
export declare const useProject: <IncludeMembers extends boolean = true, IncludeFeatures extends boolean = true>(options?: ProjectOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Project<IncludeMembers, IncludeFeatures>>;
|
|
3135
3275
|
/**
|
|
3136
3276
|
* Returns metadata for each project you have access to.
|
|
3137
3277
|
*
|
|
@@ -3163,7 +3303,7 @@ declare const useProject: <IncludeMembers extends boolean = true, IncludeFeature
|
|
|
3163
3303
|
* @public
|
|
3164
3304
|
* @function
|
|
3165
3305
|
*/
|
|
3166
|
-
declare const useProjects: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = true>(options?: ProjectsOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Project<IncludeMembers, IncludeFeatures>[]>;
|
|
3306
|
+
export declare const useProjects: <IncludeMembers extends boolean = false, IncludeFeatures extends boolean = true>(options?: ProjectsOptions<IncludeMembers, IncludeFeatures>) => FetcherHookResult<Project<IncludeMembers, IncludeFeatures>[]>;
|
|
3167
3307
|
/**
|
|
3168
3308
|
* Hook options for useQuery, supporting both direct resource and resourceName.
|
|
3169
3309
|
* @beta
|
|
@@ -3224,9 +3364,9 @@ type UseQueryOptions<TQuery extends string = string, TDataset extends string = s
|
|
|
3224
3364
|
* }
|
|
3225
3365
|
* ```
|
|
3226
3366
|
*/
|
|
3227
|
-
declare function useQuery<TQuery extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: UseQueryOptions<TQuery, TDataset, TProjectId>): {
|
|
3367
|
+
export declare function useQuery<TQuery extends string = string, TDataset extends string = string, TProjectId extends string = string>(options: UseQueryOptions<TQuery, TDataset, TProjectId>): {
|
|
3228
3368
|
/** The query result, typed based on the GROQ query string */
|
|
3229
|
-
data:
|
|
3369
|
+
data: ResolveQueryResult<TQuery, `${TProjectId}.${TDataset}`>;
|
|
3230
3370
|
/** True if a query transition is in progress */
|
|
3231
3371
|
isPending: boolean;
|
|
3232
3372
|
};
|
|
@@ -3258,7 +3398,7 @@ declare function useQuery<TQuery extends string = string, TDataset extends strin
|
|
|
3258
3398
|
* }
|
|
3259
3399
|
* ```
|
|
3260
3400
|
*/
|
|
3261
|
-
declare function useQuery<TData>(options: WithResourceNameSupport<QueryOptions>): {
|
|
3401
|
+
export declare function useQuery<TData>(options: WithResourceNameSupport<QueryOptions>): {
|
|
3262
3402
|
/** The query result, cast to the provided type TData */
|
|
3263
3403
|
data: TData;
|
|
3264
3404
|
/** True if another query is resolving in the background (suspense handles the initial loading state) */
|
|
@@ -3280,7 +3420,7 @@ declare function useQuery<TData>(options: WithResourceNameSupport<QueryOptions>)
|
|
|
3280
3420
|
* const activeReleases = useActiveReleases()
|
|
3281
3421
|
* ```
|
|
3282
3422
|
*/
|
|
3283
|
-
declare function useActiveReleases(options?: WithResourceNameSupport<DatasetHandle> | undefined): ReleaseDocument[];
|
|
3423
|
+
export declare function useActiveReleases(options?: WithResourceNameSupport<DatasetHandle> | undefined): ReleaseDocument[];
|
|
3284
3424
|
/**
|
|
3285
3425
|
* @public
|
|
3286
3426
|
* @function
|
|
@@ -3306,7 +3446,7 @@ declare function useActiveReleases(options?: WithResourceNameSupport<DatasetHand
|
|
|
3306
3446
|
* const releases = useAllReleases()
|
|
3307
3447
|
* ```
|
|
3308
3448
|
*/
|
|
3309
|
-
declare function useAllReleases(options?: WithResourceNameSupport<DatasetHandle> | undefined): ReleaseDocument[];
|
|
3449
|
+
export declare function useAllReleases(options?: WithResourceNameSupport<DatasetHandle> | undefined): ReleaseDocument[];
|
|
3310
3450
|
/**
|
|
3311
3451
|
* @public
|
|
3312
3452
|
*/
|
|
@@ -3380,12 +3520,12 @@ interface UseApplyReleaseActions {
|
|
|
3380
3520
|
* }
|
|
3381
3521
|
* ```
|
|
3382
3522
|
*/
|
|
3383
|
-
declare const useApplyReleaseActions: UseApplyReleaseActions;
|
|
3523
|
+
export declare const useApplyReleaseActions: UseApplyReleaseActions;
|
|
3384
3524
|
/**
|
|
3385
3525
|
* @public
|
|
3386
3526
|
* @function
|
|
3387
3527
|
*/
|
|
3388
|
-
declare function usePerspective(perspectiveHandle?: ResourceHandle): string | string[];
|
|
3528
|
+
export declare function usePerspective(perspectiveHandle?: ResourceHandle): string | string[];
|
|
3389
3529
|
/**
|
|
3390
3530
|
* @public
|
|
3391
3531
|
* @category Types
|
|
@@ -3432,7 +3572,7 @@ interface UserResult {
|
|
|
3432
3572
|
* )
|
|
3433
3573
|
* ```
|
|
3434
3574
|
*/
|
|
3435
|
-
declare function useUser(options: GetUserOptions): UserResult;
|
|
3575
|
+
export declare function useUser(options: GetUserOptions): UserResult;
|
|
3436
3576
|
/**
|
|
3437
3577
|
* @public
|
|
3438
3578
|
* @category Types
|
|
@@ -3493,11 +3633,11 @@ interface UsersResult {
|
|
|
3493
3633
|
* 3. The active resource (`ResourceProvider`/`SDKProvider`)
|
|
3494
3634
|
* 4. `instance.config`.
|
|
3495
3635
|
*/
|
|
3496
|
-
declare function useUsers(options?: GetUsersOptions): UsersResult;
|
|
3636
|
+
export declare function useUsers(options?: GetUsersOptions): UsersResult;
|
|
3497
3637
|
/**
|
|
3498
3638
|
* This version is provided by pkg-utils at build time
|
|
3499
3639
|
* @internal
|
|
3500
3640
|
*/
|
|
3501
|
-
declare const REACT_SDK_VERSION: {};
|
|
3502
|
-
export {
|
|
3641
|
+
export declare const REACT_SDK_VERSION: {};
|
|
3642
|
+
export type { AuthBoundaryProps, Status as ComlinkStatus, CommentActions, CreateDocumentOverrides, DatasetsResponse, DocumentHandle, DocumentTypeHandle, DocumentsOptions, DocumentsResponse, FetcherHookResult, FrameConnection, FrameMessageHandler as MessageHandler, MutationHookResult, PaginatedDocumentsOptions, PaginatedDocumentsResponse, ResourceHandle, ResourceProviderProps, SDKProviderProps, SanityAppProps, SanityDocument, SanityInstanceProviderProps, SanityProjectMember, SortOrderingItem, StudioWorkspaceHandle, UseCommentThreadsResult, UseCommentsResult, UseFrameConnectionOptions, UseOAuthTokensResult, UsePresenceForDocumentOptions, UseReportPresenceOptions, UseWindowConnectionOptions, UserResult, UsersResult, WindowConnection, WindowMessageHandler, useDocumentPreviewOptions, useDocumentPreviewResults, useDocumentProjectionOptions, useDocumentProjectionResults };
|
|
3503
3643
|
//# sourceMappingURL=index.d.ts.map
|