@sanity/sdk 3.3.0-rc.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/_exports/_internal.d.ts +12 -4
  2. package/dist/_exports/_internal.d.ts.map +1 -1
  3. package/dist/_exports/_internal.js +24 -6
  4. package/dist/_exports/_internal.js.map +1 -1
  5. package/dist/_exports/agent.js +1 -1
  6. package/dist/_exports/comlink.d.ts +1 -1
  7. package/dist/_exports/dashboard.d.ts +1 -1
  8. package/dist/_exports/dashboard.js +1 -1
  9. package/dist/{authStore-BGoEGxOq.d.ts → applications-pRS8tuC2.d.ts} +349 -362
  10. package/dist/applications-pRS8tuC2.d.ts.map +1 -0
  11. package/dist/{clientStore-QDrJNTM4.js → clientStore-BI4D8HhJ.js} +10 -14
  12. package/dist/clientStore-BI4D8HhJ.js.map +1 -0
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +123 -156
  15. package/dist/index.js.map +1 -1
  16. package/dist/{topicStore-Ct7IFNtY.js → topicStore-BJ54_X6H.js} +3 -1
  17. package/dist/topicStore-BJ54_X6H.js.map +1 -0
  18. package/dist/{topicStore-DXvuH9h4.d.ts → topicStore-D-jEwzlX.d.ts} +54 -25
  19. package/dist/topicStore-D-jEwzlX.d.ts.map +1 -0
  20. package/dist/{version-CIhX5ppJ.js → version-CD4aBigm.js} +3 -3
  21. package/dist/{version-CIhX5ppJ.js.map → version-CD4aBigm.js.map} +1 -1
  22. package/package.json +7 -7
  23. package/src/_exports/_internal.ts +2 -0
  24. package/src/applications/applicationOrigin.test.ts +51 -0
  25. package/src/applications/applicationOrigin.ts +26 -0
  26. package/src/auth/authStore.test.ts +0 -18
  27. package/src/auth/authStore.ts +1 -4
  28. package/src/auth/handleAuthCallback.test.ts +0 -33
  29. package/src/auth/handleAuthCallback.ts +1 -11
  30. package/src/auth/logout.test.ts +1 -9
  31. package/src/auth/logout.ts +1 -18
  32. package/src/auth/oauth/oauthActions.test.ts +0 -136
  33. package/src/auth/oauth/oauthActions.ts +29 -78
  34. package/src/auth/oauth/oauthAuth.test.ts +0 -23
  35. package/src/auth/oauth/oauthAuth.ts +8 -18
  36. package/src/dashboard/messageBus/bus.test.ts +39 -0
  37. package/src/dashboard/messageBus/bus.ts +32 -22
  38. package/src/dashboard/messageBus/topics.test.ts +36 -2
  39. package/src/dashboard/messageBus/topics.ts +51 -16
  40. package/src/installations/installations.test-d.ts +11 -0
  41. package/src/installations/installations.test.ts +6 -4
  42. package/src/installations/installations.ts +13 -2
  43. package/dist/authStore-BGoEGxOq.d.ts.map +0 -1
  44. package/dist/clientStore-QDrJNTM4.js.map +0 -1
  45. package/dist/topicStore-Ct7IFNtY.js.map +0 -1
  46. package/dist/topicStore-DXvuH9h4.d.ts.map +0 -1
@@ -386,309 +386,136 @@ type AccessResourceType = 'organization' | 'project' | 'media-library' | 'canvas
386
386
  */
387
387
  declare const checkPermissions: Fetcher<[resourceType: AccessResourceType, resourceId: string, permissions: string[]], Record<string, boolean>>;
388
388
  /**
389
- * A response field that the API embeds only when its `include` token was
390
- * requested. Given the full set of tokens `All`, the token `Key` this field
391
- * maps to, and the tokens actually `Requested`, it resolves to:
392
- *
393
- * - `unknown` (field absent) when nothing — or nothing matching `Key` — was requested
394
- * - `Field` (present, as declared) when a literal request list contains `Key`
395
- * - `Partial<Field>` (optional) when `Requested` is the wide `All` union, i.e.
396
- * an `include` array whose members aren't known at the type level
397
- *
398
- * Absent arms return `unknown` so they vanish under intersection. Mirrors the
399
- * `boolean extends Flag` trick the organization/project types use, but for an
400
- * include-token union rather than a boolean flag.
389
+ * Represents the various states the authentication type can be in.
401
390
  *
402
- * @internal
391
+ * @public
403
392
  */
404
- type Included<All extends string, Key extends All, Requested extends All, Field> = [All] extends [Requested] ? Partial<Field> : [Key] extends [Requested] ? Field : unknown;
393
+ declare enum AuthStateType {
394
+ LOGGED_IN = "logged-in",
395
+ LOGGING_IN = "logging-in",
396
+ ERROR = "error",
397
+ LOGGED_OUT = "logged-out"
398
+ }
405
399
  /**
406
- * Whether the requested include tokens intersect a given set — used to decide
407
- * whether a parent field (e.g. an application's `activeDeployment`) is present,
408
- * when requesting any of several tokens forces it in.
400
+ * OAuth tokens issued by Sanity's OAuth token endpoint.
409
401
  *
410
- * @internal
402
+ * @public
411
403
  */
412
- type IncludesAny<Requested extends string, Set extends string> = [Requested & Set] extends [never] ? false : true;
404
+ interface OAuthTokens {
405
+ accessToken: string;
406
+ tokenType: 'bearer';
407
+ expiresIn: number;
408
+ expiresAt: Date;
409
+ refreshToken?: string;
410
+ }
413
411
  /**
414
- * Related data the Applications API can embed in a response. `interfaces`,
415
- * `workspaces` and `access` are children of the active deployment and are
416
- * embedded under {@link Application.activeDeployment}; `config.studio` and
417
- * `config.mfManifest` are embedded under {@link Application.config}.
412
+ * Represents the various states the authentication can be in.
418
413
  *
419
- * @see https://www.sanity.io/docs/http-reference/applications-api
420
414
  * @public
421
415
  */
422
- type ApplicationInclude = 'interfaces' | 'workspaces' | 'access' | 'config.studio' | 'config.mfManifest' | 'activeDeployment';
423
- type ApplicationInterfaceBase = {
424
- id: string;
425
- name: string;
426
- title: string;
427
- version: string;
428
- /** Module federation module ID; resolved from the host mf-manifest at runtime */
429
- moduleId: string;
430
- };
416
+ type AuthState = LoggedInAuthState | LoggedOutAuthState | LoggingInAuthState | ErrorAuthState;
431
417
  /**
432
- * Placement metadata for application and panel interfaces.
433
- *
434
- * @see https://www.sanity.io/docs/http-reference/applications-api
418
+ * Logged-in state from the auth state.
435
419
  * @public
436
420
  */
437
- type ApplicationInterfacePlacementMetadata = {
438
- dock?: {
439
- group?: string;
440
- order?: number;
441
- };
421
+ type LoggedInAuthState = {
422
+ type: AuthStateType.LOGGED_IN;
423
+ token: string;
424
+ currentUser: CurrentUser | null;
425
+ lastTokenRefresh?: number;
442
426
  };
443
427
  /**
444
- * An interface exposed by a deployment, embedded when `interfaces` is included.
445
- *
446
- * @see https://www.sanity.io/docs/http-reference/applications-api
428
+ * Logged-out state from the auth state.
447
429
  * @public
448
430
  */
449
- type ApplicationInterface = ApplicationInterfaceBase & ({
450
- type: 'app';
451
- metadata: ApplicationInterfacePlacementMetadata | null;
452
- } | {
453
- type: 'panel';
454
- metadata: ApplicationInterfacePlacementMetadata | null;
455
- } | {
456
- type: 'asset_source';
457
- metadata: null;
458
- } | {
459
- type: 'worker';
460
- metadata: null;
461
- } | {
462
- type: 'tile';
463
- metadata: {
464
- order?: number;
465
- size: 'small' | 'large' | 'banner';
466
- };
467
- });
431
+ type LoggedOutAuthState = {
432
+ type: AuthStateType.LOGGED_OUT;
433
+ isDestroyingSession: boolean;
434
+ };
468
435
  /**
469
- * A studio workspace of a deployment, embedded when `workspaces` is included.
470
- * Studio applications only.
471
- *
472
- * @see https://www.sanity.io/docs/http-reference/applications-api
436
+ * Logging-in state from the auth state.
473
437
  * @public
474
438
  */
475
- interface ApplicationWorkspace {
476
- id: string;
477
- name: string;
478
- title: string | null;
479
- subtitle: string | null;
480
- projectId: string;
481
- dataset: string;
482
- schemaDescriptorId: string | null;
483
- basePath: string | null;
484
- /** Sanitized SVG icon markup */
485
- icon: string | null;
486
- }
439
+ type LoggingInAuthState = {
440
+ type: AuthStateType.LOGGING_IN;
441
+ isExchangingToken: boolean;
442
+ };
487
443
  /**
488
- * A resource an application accesses, embedded when `access` is included.
489
- *
490
- * @see https://www.sanity.io/docs/http-reference/applications-api
444
+ * Error state from the auth state.
491
445
  * @public
492
446
  */
493
- interface ApplicationAccess {
494
- id: string;
495
- resourceType: 'datasets' | 'canvases' | 'dashboards' | 'media-libraries';
496
- resourceId: string;
497
- }
447
+ type ErrorAuthState = {
448
+ type: AuthStateType.ERROR;
449
+ error: unknown;
450
+ };
498
451
  /**
499
- * Studio configuration, embedded under `config` when `config.studio` is included.
452
+ * Represents the various states the authentication can be in.
500
453
  *
501
- * @see https://www.sanity.io/docs/http-reference/applications-api
502
454
  * @public
503
455
  */
504
- interface ApplicationStudioConfig {
505
- projectId: string;
506
- /** Release channel (`next`, `stable`, `latest`) or a pinned semver; null if unset */
507
- autoUpdatingVersion: string | null;
456
+ interface DashboardContext {
457
+ mode?: string;
458
+ env?: string;
459
+ orgId?: string;
508
460
  }
509
461
  /**
510
- * The active deployment as embedded under {@link Application.activeDeployment}.
511
- * Its `interfaces`, `workspaces` and `access` children are each present only
512
- * when the matching {@link ApplicationInclude} token was requested. `workspaces`
513
- * is omitted (not `null`) for non-studio applications even when requested.
514
- *
515
- * @see https://www.sanity.io/docs/http-reference/applications-api
516
- * @public
462
+ * The method of authentication used.
463
+ * @internal
517
464
  */
518
- type ApplicationDeployment<Include extends ApplicationInclude = never> = {
519
- id: string;
520
- applicationId: string;
521
- size: number | null;
522
- version: string | null;
523
- isAutoUpdating: boolean | null;
524
- isActiveDeployment: boolean;
525
- deployedBy: string | null;
526
- createdAt: string;
527
- updatedAt: string;
528
- } & Included<ApplicationInclude, 'interfaces', Include, {
529
- interfaces: ApplicationInterface[];
530
- }> & Included<ApplicationInclude, 'workspaces', Include, {
531
- workspaces?: ApplicationWorkspace[];
532
- }> & Included<ApplicationInclude, 'access', Include, {
533
- access: ApplicationAccess[];
534
- }>;
465
+ type AuthMethodOptions = 'localstorage' | 'cookie' | undefined;
535
466
  /**
536
- * The always-present fields of an org-owned application returned by the
537
- * Applications API (`/applications`), before any {@link ApplicationInclude}.
538
- *
539
- * @see https://www.sanity.io/docs/http-reference/applications-api
540
467
  * @public
541
468
  */
542
- interface ApplicationBase {
543
- id: string;
544
- type: 'studio' | 'coreApp';
545
- title: string;
546
- /** Stable, immutable identity, distinct from the mutable `slug` address. */
547
- name: string;
548
- /** Qualified, globally-unique handle: `sanity/<name>` for singletons, `<organizationId>/<name>` otherwise. */
549
- reference: string;
550
- icon: string | null;
551
- isSingleton: boolean;
552
- visibility: 'default' | 'unlisted' | 'disabled';
553
- slug: string | null;
554
- externalUrl: string | null;
555
- organizationId: string;
556
- createdAt: string;
557
- updatedAt: string;
469
+ interface AuthStoreState {
470
+ authState: AuthState;
471
+ providers?: AuthProvider[];
472
+ options: {
473
+ initialLocationHref: string;
474
+ clientFactory: (config: ClientConfig) => SanityClient;
475
+ customProviders: AuthConfig['providers'];
476
+ storageKey: string;
477
+ storageArea: Storage | undefined;
478
+ apiHost: string | undefined;
479
+ loginUrl: string;
480
+ callbackUrl: string | undefined;
481
+ providedToken: string | undefined;
482
+ authMethod: AuthMethodOptions;
483
+ oauth: AuthConfig['oauth'];
484
+ };
485
+ dashboardContext?: DashboardContext;
486
+ oauthTokens?: OAuthTokens;
558
487
  }
559
- type DeploymentToken = 'activeDeployment' | 'interfaces' | 'workspaces' | 'access';
560
- type ConfigToken = 'config.studio' | 'config.mfManifest';
561
- type ApplicationConfig<Include extends ApplicationInclude> = Included<ApplicationInclude, 'config.studio', Include, {
562
- studio?: ApplicationStudioConfig;
563
- }> & Included<ApplicationInclude, 'config.mfManifest', Include, {
564
- mfManifest?: unknown;
565
- }>;
566
- type ApplicationConfigShape<Include extends ApplicationInclude> = [ApplicationInclude] extends [Include] ? {
567
- config?: ApplicationConfig<Include>;
568
- } : IncludesAny<Include, ConfigToken> extends true ? {
569
- config: ApplicationConfig<Include>;
570
- } : unknown;
571
- type ApplicationDeploymentShape<Include extends ApplicationInclude> = [ApplicationInclude] extends [Include] ? {
572
- activeDeployment?: ApplicationDeployment<Include> | null;
573
- } : IncludesAny<Include, DeploymentToken> extends true ? {
574
- activeDeployment: ApplicationDeployment<Include> | null;
575
- } : unknown;
576
488
  /**
577
- * An org-owned application as returned by the Applications API
578
- * (`/applications`). `config` and `activeDeployment` (with its
579
- * `interfaces`/`workspaces`/`access` children) are present only when the
580
- * corresponding {@link ApplicationInclude} tokens were requested.
581
- *
582
- * @see https://www.sanity.io/docs/http-reference/applications-api
583
489
  * @public
584
490
  */
585
- type Application<Include extends ApplicationInclude = never> = ApplicationBase & ApplicationConfigShape<Include> & ApplicationDeploymentShape<Include>;
491
+ declare const getCurrentUserState: BoundStoreAction<AuthStoreState, [], StateSource<CurrentUser | null>>;
586
492
  /**
587
- * Options for listing an organization's applications.
588
- *
589
- * @see https://www.sanity.io/docs/http-reference/applications-api
590
493
  * @public
591
494
  */
592
- interface ApplicationsOptions<Include extends ApplicationInclude = ApplicationInclude> {
593
- organizationId: string;
594
- /** Filter by application type */
595
- type?: string;
596
- include?: Include[];
597
- /** Page size (1-100, default 50), or `'none'` to disable pagination */
598
- limit?: number | 'none';
599
- /** Cursor from a previous response's `nextCursor` */
600
- cursor?: string;
601
- }
495
+ declare const getTokenState: BoundStoreAction<AuthStoreState, [], StateSource<string | null>>;
602
496
  /**
603
- * The cursor-paginated envelope returned by `GET /applications`.
604
- *
605
- * @see https://www.sanity.io/docs/http-reference/applications-api
606
497
  * @public
607
498
  */
608
- interface ApplicationsResponse<Include extends ApplicationInclude = never> {
609
- nextCursor: string | null;
610
- data: Application<Include>[];
611
- }
612
- /**
613
- * Fetcher for an organization's applications (`GET /applications`), on the
614
- * shared fetcher cache.
615
- *
616
- * @see https://www.sanity.io/docs/http-reference/applications-api
617
- * @internal
618
- */
619
- declare const applications: Fetcher<[options: ApplicationsOptions<ApplicationInclude>], ApplicationsResponse<ApplicationInclude>>;
620
- /**
621
- * Fetcher for a single application (`GET /applications/:id`), on the shared
622
- * fetcher cache. No pre-seeding from {@link applications}: its list keys
623
- * include the organization, which this fetcher's params can't reconstruct.
624
- *
625
- * @see https://www.sanity.io/docs/http-reference/applications-api
626
- * @internal
627
- */
628
- declare const application: Fetcher<[applicationId: string, options?: {
629
- include?: ApplicationInclude[];
630
- } | undefined], Application<ApplicationInclude>>;
631
- /**
632
- * Confirmation returned by the API's soft-delete endpoints.
633
- *
634
- * @see https://www.sanity.io/docs/http-reference/applications-api
635
- * @internal
636
- */
637
- interface DeletedResult {
638
- deleted: boolean;
639
- }
640
- /**
641
- * Dashboard visibility for an application.
642
- *
643
- * @see https://www.sanity.io/docs/http-reference/applications-api
644
- * @internal
645
- */
646
- type ApplicationVisibility = ApplicationBase['visibility'];
499
+ declare const getLoginUrlState: BoundStoreAction<AuthStoreState, [], StateSource<string>>;
647
500
  /**
648
- * Mutable properties of an application (`PATCH /applications/:id`) — the
649
- * writable subset of {@link ApplicationBase}, each optional, keyed by id.
650
- *
651
- * @see https://www.sanity.io/docs/http-reference/applications-api
652
- * @internal
501
+ * @public
653
502
  */
654
- type UpdateApplicationInput = {
655
- applicationId: string;
656
- } & Partial<Pick<ApplicationBase, 'title' | 'icon' | 'visibility'>>;
503
+ declare const getAuthState: BoundStoreAction<AuthStoreState, [], StateSource<AuthState>>;
657
504
  /**
658
- * Mutation to update an application (`PATCH /applications/:id`). Invalidates the
659
- * updated application and the list so active entries reconverge on server truth.
660
- *
661
- * @see https://www.sanity.io/docs/http-reference/applications-api
662
- * @internal
505
+ * @public
663
506
  */
664
- declare const updateApplication: (instance: SanityInstance, input: UpdateApplicationInput) => Promise<MutationResult<ApplicationBase>>;
507
+ declare const getDashboardOrganizationId: BoundStoreAction<AuthStoreState, [], StateSource<string | undefined>>;
665
508
  /**
666
- * Input for {@link deleteApplication}.
667
- *
668
- * @internal
509
+ * Returns a state source indicating if the SDK is running within a dashboard context.
510
+ * @public
669
511
  */
670
- interface DeleteApplicationInput {
671
- applicationId: string;
672
- }
512
+ declare const getIsInDashboardState: BoundStoreAction<AuthStoreState, [], StateSource<boolean>>;
673
513
  /**
674
- * Mutation to soft-delete an application (`DELETE /applications/:id`).
675
- * Invalidates the deleted application and the list.
676
- *
677
- * @see https://www.sanity.io/docs/http-reference/applications-api
514
+ * Action to explicitly set the authentication token.
515
+ * Used internally by the Comlink token refresh.
678
516
  * @internal
679
517
  */
680
- declare const deleteApplication: (instance: SanityInstance, input: DeleteApplicationInput) => Promise<MutationResult<DeletedResult>>;
681
- /**
682
- * Represents the various states the authentication type can be in.
683
- *
684
- * @public
685
- */
686
- declare enum AuthStateType {
687
- LOGGED_IN = "logged-in",
688
- LOGGING_IN = "logging-in",
689
- ERROR = "error",
690
- LOGGED_OUT = "logged-out"
691
- }
518
+ declare const setAuthToken: BoundStoreAction<AuthStoreState, [token: string | null], void>;
692
519
  /**
693
520
  * Error message returned by the organization verification
694
521
  * @public
@@ -704,35 +531,13 @@ interface OrgVerificationResult {
704
531
  */
705
532
  declare function observeOrganizationVerificationState(instance: SanityInstance, projectIds: string[]): Observable<OrgVerificationResult>;
706
533
  /**
707
- * Handles the auth redirect callback. In OAuth mode this delegates to
708
- * {@link handleOAuthCallback}; otherwise it exchanges the legacy `sid` for a
709
- * long-lived token.
710
- *
711
534
  * @public
712
535
  */
713
536
  declare const handleAuthCallback: BoundStoreAction<AuthStoreState, [locationHref?: string | undefined], Promise<string | false>>;
714
537
  /**
715
- * Logs the current user out. In OAuth mode this revokes the OAuth tokens
716
- * instead of calling the legacy `/auth/logout` endpoint; revocation is
717
- * best-effort, so the OAuth path resolves even if the revoke request fails,
718
- * whereas the legacy path rejects when `/auth/logout` fails. Local state and
719
- * storage are cleared in both cases.
720
- *
721
538
  * @public
722
539
  */
723
540
  declare const logout: BoundStoreAction<AuthStoreState, [], Promise<void>>;
724
- /**
725
- * OAuth tokens issued by Sanity's OAuth token endpoint.
726
- *
727
- * @public
728
- */
729
- interface OAuthTokens {
730
- accessToken: string;
731
- tokenType: 'bearer';
732
- expiresIn: number;
733
- expiresAt: Date;
734
- refreshToken?: string;
735
- }
736
541
  /**
737
542
  * Starts the OAuth authorization-code + PKCE flow: generates a `code_verifier`,
738
543
  * `code_challenge` and `state`, persists the verifier and state to
@@ -746,14 +551,9 @@ declare const startOAuthAuthorization: BoundStoreAction<AuthStoreState, [], Prom
746
551
  * responses, exchanges the authorization `code` for tokens, persists them, and
747
552
  * transitions to `LOGGED_IN`.
748
553
  *
749
- * Returns the URL for the caller to `history.replaceState` to when a callback
750
- * was processed: on success, the same-origin location the user was on when
751
- * the flow started (if any), otherwise the callback URL cleaned of OAuth
752
- * params. Returns `false` when there was nothing to handle (no code, or an
753
- * exchange already in progress). A callback that fails validation while a
754
- * session is already `LOGGED_IN` (e.g. a remount before the params were
755
- * stripped) is ignored with a warning and still returns the cleaned URL, so a
756
- * string result does not imply an exchange ran.
554
+ * Returns the callback URL cleaned of OAuth params (for the caller to
555
+ * `history.replaceState`) when a callback was processed, or `false` when there
556
+ * was nothing to handle (no code, or an exchange already in progress).
757
557
  *
758
558
  * @public
759
559
  */
@@ -2604,6 +2404,31 @@ type SetFavoriteInput = FavoriteDocumentContext & {
2604
2404
  * @internal
2605
2405
  */
2606
2406
  declare const setFavorite: (instance: SanityInstance, input: SetFavoriteInput) => Promise<MutationResult<FavoriteStatusResponse>>;
2407
+ /**
2408
+ * A response field that the API embeds only when its `include` token was
2409
+ * requested. Given the full set of tokens `All`, the token `Key` this field
2410
+ * maps to, and the tokens actually `Requested`, it resolves to:
2411
+ *
2412
+ * - `unknown` (field absent) when nothing — or nothing matching `Key` — was requested
2413
+ * - `Field` (present, as declared) when a literal request list contains `Key`
2414
+ * - `Partial<Field>` (optional) when `Requested` is the wide `All` union, i.e.
2415
+ * an `include` array whose members aren't known at the type level
2416
+ *
2417
+ * Absent arms return `unknown` so they vanish under intersection. Mirrors the
2418
+ * `boolean extends Flag` trick the organization/project types use, but for an
2419
+ * include-token union rather than a boolean flag.
2420
+ *
2421
+ * @internal
2422
+ */
2423
+ type Included<All extends string, Key extends All, Requested extends All, Field> = [All] extends [Requested] ? Partial<Field> : [Key] extends [Requested] ? Field : unknown;
2424
+ /**
2425
+ * Whether the requested include tokens intersect a given set — used to decide
2426
+ * whether a parent field (e.g. an application's `activeDeployment`) is present,
2427
+ * when requesting any of several tokens forces it in.
2428
+ *
2429
+ * @internal
2430
+ */
2431
+ type IncludesAny<Requested extends string, Set extends string> = [Requested & Set] extends [never] ? false : true;
2607
2432
  /**
2608
2433
  * Related data the Installations API can embed in a response. Each token adds
2609
2434
  * a top-level field to the {@link Installation} item.
@@ -2611,7 +2436,7 @@ declare const setFavorite: (instance: SanityInstance, input: SetFavoriteInput) =
2611
2436
  * @see https://www.sanity.io/docs/http-reference/applications-api
2612
2437
  * @public
2613
2438
  */
2614
- type InstallationInclude = 'activeConfig' | 'access' | 'interfaces';
2439
+ type InstallationInclude = 'activeConfig' | 'access' | 'interfaces' | 'config.mfManifest';
2615
2440
  /**
2616
2441
  * A resource an installation accesses, embedded when `access` is included.
2617
2442
  *
@@ -2670,7 +2495,9 @@ interface InstallationBase {
2670
2495
  * @see https://www.sanity.io/docs/http-reference/applications-api
2671
2496
  * @public
2672
2497
  */
2673
- type Installation<Include extends InstallationInclude = never> = InstallationBase & Included<InstallationInclude, 'activeConfig', Include, {
2498
+ type Installation<Include extends InstallationInclude = never> = InstallationBase & Included<InstallationInclude, 'config.mfManifest', Include, {
2499
+ application: InstallationBase['application'] & ([InstallationInclude] extends [Include] ? Partial<Pick<Application<'config.mfManifest'>, 'config'>> : Pick<Application<'config.mfManifest'>, 'config'>);
2500
+ }> & Included<InstallationInclude, 'activeConfig', Include, {
2674
2501
  activeConfig: InstallationActiveConfig | null;
2675
2502
  }> & Included<InstallationInclude, 'access', Include, {
2676
2503
  access: InstallationAccess[];
@@ -3511,123 +3338,283 @@ declare function getCorsErrorProjectId(error: Error): string | null;
3511
3338
  *
3512
3339
  * @public
3513
3340
  */
3514
- declare function isImportError(error: unknown): boolean;
3515
- /**
3516
- * This version is provided by pkg-utils at build time
3517
- * @internal
3518
- */
3519
- declare const CORE_SDK_VERSION: {};
3341
+ declare function isImportError(error: unknown): boolean;
3342
+ /**
3343
+ * This version is provided by pkg-utils at build time
3344
+ * @internal
3345
+ */
3346
+ declare const CORE_SDK_VERSION: {};
3347
+ /**
3348
+ * @public
3349
+ */
3350
+ type SanityProject$1 = SanityProject;
3351
+ /**
3352
+ * Related data the Applications API can embed in a response. `interfaces`,
3353
+ * `workspaces` and `access` are children of the active deployment and are
3354
+ * embedded under {@link Application.activeDeployment}; `config.studio` and
3355
+ * `config.mfManifest` are embedded under {@link Application.config}.
3356
+ *
3357
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3358
+ * @public
3359
+ */
3360
+ type ApplicationInclude = 'interfaces' | 'workspaces' | 'access' | 'config.studio' | 'config.mfManifest' | 'activeDeployment';
3361
+ type ApplicationInterfaceBase = {
3362
+ id: string;
3363
+ name: string;
3364
+ title: string;
3365
+ version: string;
3366
+ /** Module federation module ID; resolved from the host mf-manifest at runtime */
3367
+ moduleId: string;
3368
+ };
3369
+ /**
3370
+ * Placement metadata for application and panel interfaces.
3371
+ *
3372
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3373
+ * @public
3374
+ */
3375
+ type ApplicationInterfacePlacementMetadata = {
3376
+ dock?: {
3377
+ group?: string;
3378
+ order?: number;
3379
+ };
3380
+ };
3381
+ /**
3382
+ * An interface exposed by a deployment, embedded when `interfaces` is included.
3383
+ *
3384
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3385
+ * @public
3386
+ */
3387
+ type ApplicationInterface = ApplicationInterfaceBase & ({
3388
+ type: 'app';
3389
+ metadata: ApplicationInterfacePlacementMetadata | null;
3390
+ } | {
3391
+ type: 'panel';
3392
+ metadata: ApplicationInterfacePlacementMetadata | null;
3393
+ } | {
3394
+ type: 'asset_source';
3395
+ metadata: null;
3396
+ } | {
3397
+ type: 'worker';
3398
+ metadata: null;
3399
+ } | {
3400
+ type: 'tile';
3401
+ metadata: {
3402
+ order?: number;
3403
+ size: 'small' | 'large' | 'banner';
3404
+ };
3405
+ });
3406
+ /**
3407
+ * A studio workspace of a deployment, embedded when `workspaces` is included.
3408
+ * Studio applications only.
3409
+ *
3410
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3411
+ * @public
3412
+ */
3413
+ interface ApplicationWorkspace {
3414
+ id: string;
3415
+ name: string;
3416
+ title: string | null;
3417
+ subtitle: string | null;
3418
+ projectId: string;
3419
+ dataset: string;
3420
+ schemaDescriptorId: string | null;
3421
+ basePath: string | null;
3422
+ /** Sanitized SVG icon markup */
3423
+ icon: string | null;
3424
+ }
3520
3425
  /**
3426
+ * A resource an application accesses, embedded when `access` is included.
3427
+ *
3428
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3521
3429
  * @public
3522
3430
  */
3523
- type SanityProject$1 = SanityProject;
3431
+ interface ApplicationAccess {
3432
+ id: string;
3433
+ resourceType: 'datasets' | 'canvases' | 'dashboards' | 'media-libraries';
3434
+ resourceId: string;
3435
+ }
3524
3436
  /**
3525
- * Represents the various states the authentication can be in.
3437
+ * Studio configuration, embedded under `config` when `config.studio` is included.
3526
3438
  *
3439
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3527
3440
  * @public
3528
3441
  */
3529
- type AuthState = LoggedInAuthState | LoggedOutAuthState | LoggingInAuthState | ErrorAuthState;
3442
+ interface ApplicationStudioConfig {
3443
+ projectId: string;
3444
+ /** Release channel (`next`, `stable`, `latest`) or a pinned semver; null if unset */
3445
+ autoUpdatingVersion: string | null;
3446
+ }
3530
3447
  /**
3531
- * Logged-in state from the auth state.
3448
+ * The active deployment as embedded under {@link Application.activeDeployment}.
3449
+ * Its `interfaces`, `workspaces` and `access` children are each present only
3450
+ * when the matching {@link ApplicationInclude} token was requested. `workspaces`
3451
+ * is omitted (not `null`) for non-studio applications even when requested.
3452
+ *
3453
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3532
3454
  * @public
3533
3455
  */
3534
- type LoggedInAuthState = {
3535
- type: AuthStateType.LOGGED_IN;
3536
- token: string;
3537
- currentUser: CurrentUser | null;
3538
- lastTokenRefresh?: number;
3539
- };
3456
+ type ApplicationDeployment<Include extends ApplicationInclude = never> = {
3457
+ id: string;
3458
+ applicationId: string;
3459
+ size: number | null;
3460
+ version: string | null;
3461
+ isAutoUpdating: boolean | null;
3462
+ isActiveDeployment: boolean;
3463
+ deployedBy: string | null;
3464
+ createdAt: string;
3465
+ updatedAt: string;
3466
+ } & Included<ApplicationInclude, 'interfaces', Include, {
3467
+ interfaces: ApplicationInterface[];
3468
+ }> & Included<ApplicationInclude, 'workspaces', Include, {
3469
+ workspaces?: ApplicationWorkspace[];
3470
+ }> & Included<ApplicationInclude, 'access', Include, {
3471
+ access: ApplicationAccess[];
3472
+ }>;
3540
3473
  /**
3541
- * Logged-out state from the auth state.
3474
+ * The always-present fields of an org-owned application returned by the
3475
+ * Applications API (`/applications`), before any {@link ApplicationInclude}.
3476
+ *
3477
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3542
3478
  * @public
3543
3479
  */
3544
- type LoggedOutAuthState = {
3545
- type: AuthStateType.LOGGED_OUT;
3546
- isDestroyingSession: boolean;
3547
- };
3480
+ interface ApplicationBase {
3481
+ id: string;
3482
+ type: 'studio' | 'coreApp';
3483
+ title: string;
3484
+ /** Stable, immutable identity, distinct from the mutable `slug` address. */
3485
+ name: string;
3486
+ /** Qualified, globally-unique handle: `sanity/<name>` for singletons, `<organizationId>/<name>` otherwise. */
3487
+ reference: string;
3488
+ icon: string | null;
3489
+ isSingleton: boolean;
3490
+ visibility: 'default' | 'unlisted' | 'disabled';
3491
+ slug: string | null;
3492
+ externalUrl: string | null;
3493
+ organizationId: string;
3494
+ createdAt: string;
3495
+ updatedAt: string;
3496
+ }
3497
+ type DeploymentToken = 'activeDeployment' | 'interfaces' | 'workspaces' | 'access';
3498
+ type ConfigToken = 'config.studio' | 'config.mfManifest';
3499
+ type ApplicationConfig<Include extends ApplicationInclude> = Included<ApplicationInclude, 'config.studio', Include, {
3500
+ studio?: ApplicationStudioConfig;
3501
+ }> & Included<ApplicationInclude, 'config.mfManifest', Include, {
3502
+ mfManifest?: unknown;
3503
+ }>;
3504
+ type ApplicationConfigShape<Include extends ApplicationInclude> = [ApplicationInclude] extends [Include] ? {
3505
+ config?: ApplicationConfig<Include>;
3506
+ } : IncludesAny<Include, ConfigToken> extends true ? {
3507
+ config: ApplicationConfig<Include>;
3508
+ } : unknown;
3509
+ type ApplicationDeploymentShape<Include extends ApplicationInclude> = [ApplicationInclude] extends [Include] ? {
3510
+ activeDeployment?: ApplicationDeployment<Include> | null;
3511
+ } : IncludesAny<Include, DeploymentToken> extends true ? {
3512
+ activeDeployment: ApplicationDeployment<Include> | null;
3513
+ } : unknown;
3548
3514
  /**
3549
- * Logging-in state from the auth state.
3515
+ * An org-owned application as returned by the Applications API
3516
+ * (`/applications`). `config` and `activeDeployment` (with its
3517
+ * `interfaces`/`workspaces`/`access` children) are present only when the
3518
+ * corresponding {@link ApplicationInclude} tokens were requested.
3519
+ *
3520
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3550
3521
  * @public
3551
3522
  */
3552
- type LoggingInAuthState = {
3553
- type: AuthStateType.LOGGING_IN;
3554
- isExchangingToken: boolean;
3555
- };
3523
+ type Application<Include extends ApplicationInclude = never> = ApplicationBase & ApplicationConfigShape<Include> & ApplicationDeploymentShape<Include>;
3556
3524
  /**
3557
- * Error state from the auth state.
3525
+ * Options for listing an organization's applications.
3526
+ *
3527
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3558
3528
  * @public
3559
3529
  */
3560
- type ErrorAuthState = {
3561
- type: AuthStateType.ERROR;
3562
- error: unknown;
3563
- };
3530
+ interface ApplicationsOptions<Include extends ApplicationInclude = ApplicationInclude> {
3531
+ organizationId: string;
3532
+ /** Filter by application type */
3533
+ type?: string;
3534
+ include?: Include[];
3535
+ /** Page size (1-100, default 50), or `'none'` to disable pagination */
3536
+ limit?: number | 'none';
3537
+ /** Cursor from a previous response's `nextCursor` */
3538
+ cursor?: string;
3539
+ }
3564
3540
  /**
3565
- * Represents the various states the authentication can be in.
3541
+ * The cursor-paginated envelope returned by `GET /applications`.
3566
3542
  *
3543
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3567
3544
  * @public
3568
3545
  */
3569
- interface DashboardContext {
3570
- mode?: string;
3571
- env?: string;
3572
- orgId?: string;
3546
+ interface ApplicationsResponse<Include extends ApplicationInclude = never> {
3547
+ nextCursor: string | null;
3548
+ data: Application<Include>[];
3573
3549
  }
3574
3550
  /**
3575
- * The method of authentication used.
3551
+ * Fetcher for an organization's applications (`GET /applications`), on the
3552
+ * shared fetcher cache.
3553
+ *
3554
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3576
3555
  * @internal
3577
3556
  */
3578
- type AuthMethodOptions = 'localstorage' | 'cookie' | undefined;
3579
- /**
3580
- * @public
3581
- */
3582
- interface AuthStoreState {
3583
- authState: AuthState;
3584
- providers?: AuthProvider[];
3585
- options: {
3586
- initialLocationHref: string;
3587
- clientFactory: (config: ClientConfig) => SanityClient;
3588
- customProviders: AuthConfig['providers'];
3589
- storageKey: string;
3590
- storageArea: Storage | undefined;
3591
- apiHost: string | undefined;
3592
- loginUrl: string;
3593
- callbackUrl: string | undefined;
3594
- providedToken: string | undefined;
3595
- authMethod: AuthMethodOptions;
3596
- oauth: AuthConfig['oauth'];
3597
- };
3598
- dashboardContext?: DashboardContext;
3599
- oauthTokens?: OAuthTokens;
3600
- }
3557
+ declare const applications: Fetcher<[options: ApplicationsOptions<ApplicationInclude>], ApplicationsResponse<ApplicationInclude>>;
3601
3558
  /**
3602
- * @public
3559
+ * Fetcher for a single application (`GET /applications/:id`), on the shared
3560
+ * fetcher cache. No pre-seeding from {@link applications}: its list keys
3561
+ * include the organization, which this fetcher's params can't reconstruct.
3562
+ *
3563
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3564
+ * @internal
3603
3565
  */
3604
- declare const getCurrentUserState: BoundStoreAction<AuthStoreState, [], StateSource<CurrentUser | null>>;
3566
+ declare const application: Fetcher<[applicationId: string, options?: {
3567
+ include?: ApplicationInclude[];
3568
+ } | undefined], Application<ApplicationInclude>>;
3605
3569
  /**
3606
- * @public
3570
+ * Confirmation returned by the API's soft-delete endpoints.
3571
+ *
3572
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3573
+ * @internal
3607
3574
  */
3608
- declare const getTokenState: BoundStoreAction<AuthStoreState, [], StateSource<string | null>>;
3575
+ interface DeletedResult {
3576
+ deleted: boolean;
3577
+ }
3609
3578
  /**
3610
- * @public
3579
+ * Dashboard visibility for an application.
3580
+ *
3581
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3582
+ * @internal
3611
3583
  */
3612
- declare const getLoginUrlState: BoundStoreAction<AuthStoreState, [], StateSource<string>>;
3584
+ type ApplicationVisibility = ApplicationBase['visibility'];
3613
3585
  /**
3614
- * @public
3586
+ * Mutable properties of an application (`PATCH /applications/:id`) — the
3587
+ * writable subset of {@link ApplicationBase}, each optional, keyed by id.
3588
+ *
3589
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3590
+ * @internal
3615
3591
  */
3616
- declare const getAuthState: BoundStoreAction<AuthStoreState, [], StateSource<AuthState>>;
3592
+ type UpdateApplicationInput = {
3593
+ applicationId: string;
3594
+ } & Partial<Pick<ApplicationBase, 'title' | 'icon' | 'visibility'>>;
3617
3595
  /**
3618
- * @public
3596
+ * Mutation to update an application (`PATCH /applications/:id`). Invalidates the
3597
+ * updated application and the list so active entries reconverge on server truth.
3598
+ *
3599
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3600
+ * @internal
3619
3601
  */
3620
- declare const getDashboardOrganizationId: BoundStoreAction<AuthStoreState, [], StateSource<string | undefined>>;
3602
+ declare const updateApplication: (instance: SanityInstance, input: UpdateApplicationInput) => Promise<MutationResult<ApplicationBase>>;
3621
3603
  /**
3622
- * Returns a state source indicating if the SDK is running within a dashboard context.
3623
- * @public
3604
+ * Input for {@link deleteApplication}.
3605
+ *
3606
+ * @internal
3624
3607
  */
3625
- declare const getIsInDashboardState: BoundStoreAction<AuthStoreState, [], StateSource<boolean>>;
3608
+ interface DeleteApplicationInput {
3609
+ applicationId: string;
3610
+ }
3626
3611
  /**
3627
- * Action to explicitly set the authentication token.
3628
- * Used internally by the Comlink token refresh.
3612
+ * Mutation to soft-delete an application (`DELETE /applications/:id`).
3613
+ * Invalidates the deleted application and the list.
3614
+ *
3615
+ * @see https://www.sanity.io/docs/http-reference/applications-api
3629
3616
  * @internal
3630
3617
  */
3631
- declare const setAuthToken: BoundStoreAction<AuthStoreState, [token: string | null], void>;
3632
- export { project as $, publishDocument as $n, refreshOAuthTokens as $r, ApplyDocumentActionsOptions as $t, loadMoreUsers as A, CacheWriter as Ai, CreateReleaseAction as An, RemoveCommentOptions as Ar, OrganizationsOptions as At, getQueryState as B, BoundStoreAction as Bi, ReleaseAction as Bn, CommentLocalState as Br, InstallationBase as Bt, slicePath$1 as C, application as Ci, ProcessMutationsOptions as Cn, getCommentThreadsState as Cr, ResolveUsersOptions as Ct, getCorsErrorProjectId as D, AccessResourceType as Di, Action as Dn, resolveCommentThreads as Dr, UsersGroupState as Dt, isImportError as E, updateApplication as Ei, JsonMatch as En, parseCommentsOptionsKey as Er, UserProfile as Et, ReleaseState as F, MutationResult as Fi, EditDocumentAction as Fn, removeComment as Fr, OrganizationOptions as Ft, resolveProjection as G, archiveRelease as Gn, CommentTextSelectionItem as Gr, installations as Gt, resolveQuery as H, UnarchiveReleaseAction as Hn, CommentReaction as Hr, InstallationsOptions as Ht, getActiveReleasesState as I, defineFetcher as Ii, EditDocumentOptions as In, replyToComment as Ir, organization as It, ProjectBase as J, deleteDocument as Jn, ClientStoreState as Jr, SetFavoriteInput as Jt, getProjectionState as K, createDocument as Kn, CommentThread as Kr, FavoriteDocumentContext as Kt, getAllReleasesState as L, defineMutation as Li, EditReleaseAction as Ln, setCommentStatus as Lr, Installation as Lt, resolveUsers as M, FetcherDefinition as Mi, DeleteReleaseAction as Mn, SetCommentStatusOptions as Mr, Organization as Mt, defineProjection as N, FetcherSnapshot as Ni, DiscardDocumentAction as Nn, UpdateCommentOptions as Nr, OrganizationBase as Nt, getUserState as O, checkPermissions as Oi, ArchiveReleaseAction as On, resolveComments as Or, UsersStoreState as Ot, getPerspectiveState as P, MutationDefinition as Pi, DocumentAction as Pn, createComment as Pr, OrganizationMember as Pt, ProjectOptions as Q, editRelease as Qn, handleOAuthCallback as Qr, ActionsResult as Qt, QueryOptions as R, Selector as Ri, PublishDocumentAction as Rn, updateComment as Rr, InstallationAccess as Rt, jsonMatch$1 as S, UpdateApplicationInput as Si, DocumentSet as Sn, ResolveCommentsOptions as Sr, ResolveUserOptions as St, CORE_SDK_VERSION as T, deleteApplication as Ti, processMutations as Tn, getCommentsState as Tr, SanityUserResponse as Tt, ProjectsOptions as U, UnpublishDocumentAction as Un, CommentStatus as Ur, InstallationsResponse as Ut, parseQueryKey as V, ScheduleReleaseAction as Vn, CommentMessage as Vr, InstallationInclude as Vt, projects as W, UnscheduleReleaseAction as Wn, CommentTextSelection as Wr, installation as Wt, ProjectMemberRole as X, discardDocument as Xn, getClientState as Xr, setFavorite as Xt, ProjectMember as Y, deleteRelease as Yn, getClient as Yr, favorites as Yt, ProjectMetadata as Z, editDocument as Zn, getOAuthTokensState as Zr, getReleaseDocumentId as Zt, SanityDocument$3 as _, ApplicationWorkspace as _i, resolveDocument as _n, createDatasetHandle as _r, TransportEvent as _t, LoggedOutAuthState as a, observeOrganizationVerificationState as ai, DocumentEditedEvent as an, ResolveDocument as ar, getPresence as at, getPathDepth as b, DeleteApplicationInput as bi, DocumentPermissionsResult as bn, createProjectHandle as br, GetUsersOptions as bt, getCurrentUserState as c, Application as ci, DocumentRemotePatchesEvent as cn, datasets as cr, DocumentPresence as ct, getLoginUrlState as d, ApplicationDeployment as di, TransactionAcceptedEvent as dn, LogContext as dr, PresencePerspectiveOptions as dt, revokeOAuthTokens as ei, applyDocumentActions as en, publishRelease as er, PreviewMedia as et, getTokenState as f, ApplicationInclude as fi, TransactionRevertedEvent as fn, LogLevel as fr, PresenceSelection as ft, Role as g, ApplicationVisibility as gi, getPermissionsState as gn, createLogger as gr, StateEvent as gt, ReleaseDocument$1 as h, ApplicationStudioConfig as hi, getDocumentSyncStatus as hn, LoggerConfig as hr, RollCallEvent as ht, LoggedInAuthState as i, handleAuthCallback as ii, DocumentDiscardedEvent as in, unscheduleRelease as ir, getDocumentPresence as it, resolveUser as j, Fetcher as ji, DeleteDocumentAction as jn, ReplyToCommentOptions as jr, organizations as jt, getUsersState as k, CacheTag as ki, CreateDocumentAction as kn, CreateCommentOptions as kr, Organizations as kt, getDashboardOrganizationId as l, ApplicationAccess as li, DocumentTransactionSubmissionResult as ln, configureLogging as lr, DocumentPresenceOptions as lt, CurrentUser$1 as m, ApplicationInterfacePlacementMetadata as mi, getDocumentState as mn, Logger as mr, ReportPresenceOptions as mt, AuthStoreState as n, OAuthTokens as ni, DocumentCreatedEvent as nn, unarchiveRelease as nr, PreviewValue as nt, LoggingInAuthState as o, OrgVerificationResult as oi, DocumentEvent as on, ResolveProjectionResult as or, reportPresence as ot, setAuthToken as p, ApplicationInterface as pi, DocumentOptions as pn, LogNamespace as pr, PresenceSelectionPoint as pt, Project as q, createRelease as qn, ClientOptions as qr, FavoriteStatusResponse as qt, ErrorAuthState as r, logout as ri, DocumentDeletedEvent as rn, unpublishDocument as rr, ProjectionValuePending as rt, getAuthState as s, AuthStateType as si, DocumentPublishedEvent as sn, ResolveQueryResult as sr, DisconnectEvent as st, AuthState as t, startOAuthAuthorization as ti, ActionErrorEvent as tn, scheduleRelease as tr, PreviewQueryResult as tt, getIsInDashboardState as u, ApplicationBase as ui, DocumentUnpublishedEvent as un, InstanceContext as ur, PresenceLocation as ut, SanityProject$1 as v, ApplicationsOptions as vi, resolvePermissions as vn, createDocumentHandle as vr, UserPresence as vt, stringifyPath$1 as w, applications as wi, patchOperations as wn, getCommentsOptionsKey as wr, SanityUser as wt, joinPaths as x, DeletedResult as xi, PermissionDeniedReason as xn, CommentsOptions as xr, Membership as xt, getIndexForKey$1 as y, ApplicationsResponse as yi, subscribeDocumentEvents as yn, createDocumentTypeHandle as yr, GetUserOptions as yt, getQueryKey as z, StateSource as zi, PublishReleaseAction as zn, Comment as zr, InstallationActiveConfig as zt };
3633
- //# sourceMappingURL=authStore-BGoEGxOq.d.ts.map
3618
+ declare const deleteApplication: (instance: SanityInstance, input: DeleteApplicationInput) => Promise<MutationResult<DeletedResult>>;
3619
+ export { Project as $, createRelease as $n, ClientOptions as $r, FavoriteStatusResponse as $t, stringifyPath$1 as A, CacheWriter as Ai, patchOperations as An, getCommentsOptionsKey as Ar, SanityUser as At, getPerspectiveState as B, BoundStoreAction as Bi, DocumentAction as Bn, createComment as Br, OrganizationMember as Bt, SanityDocument$3 as C, getTokenState as Ci, resolveDocument as Cn, createDatasetHandle as Cr, TransportEvent as Ct, joinPaths as D, AccessResourceType as Di, PermissionDeniedReason as Dn, CommentsOptions as Dr, Membership as Dt, getPathDepth as E, AuthStateType as Ei, DocumentPermissionsResult as En, createProjectHandle as Er, GetUsersOptions as Et, getUsersState as F, MutationResult as Fi, CreateDocumentAction as Fn, CreateCommentOptions as Fr, Organizations as Ft, getQueryKey as G, PublishReleaseAction as Gn, Comment as Gr, InstallationActiveConfig as Gt, getActiveReleasesState as H, EditDocumentOptions as Hn, replyToComment as Hr, organization as Ht, loadMoreUsers as I, defineFetcher as Ii, CreateReleaseAction as In, RemoveCommentOptions as Ir, OrganizationsOptions as It, resolveQuery as J, UnarchiveReleaseAction as Jn, CommentReaction as Jr, InstallationsOptions as Jt, getQueryState as K, ReleaseAction as Kn, CommentLocalState as Kr, InstallationBase as Kt, resolveUser as L, defineMutation as Li, DeleteDocumentAction as Ln, ReplyToCommentOptions as Lr, organizations as Lt, isImportError as M, FetcherDefinition as Mi, JsonMatch as Mn, parseCommentsOptionsKey as Mr, UserProfile as Mt, getCorsErrorProjectId as N, FetcherSnapshot as Ni, Action as Nn, resolveCommentThreads as Nr, UsersGroupState as Nt, jsonMatch$1 as O, checkPermissions as Oi, DocumentSet as On, ResolveCommentsOptions as Or, ResolveUserOptions as Ot, getUserState as P, MutationDefinition as Pi, ArchiveReleaseAction as Pn, resolveComments as Pr, UsersStoreState as Pt, getProjectionState as Q, createDocument as Qn, CommentThread as Qr, FavoriteDocumentContext as Qt, resolveUsers as R, Selector as Ri, DeleteReleaseAction as Rn, SetCommentStatusOptions as Rr, Organization as Rt, Role as S, getLoginUrlState as Si, getPermissionsState as Sn, createLogger as Sr, StateEvent as St, getIndexForKey$1 as T, OAuthTokens as Ti, subscribeDocumentEvents as Tn, createDocumentTypeHandle as Tr, GetUserOptions as Tt, getAllReleasesState as U, EditReleaseAction as Un, setCommentStatus as Ur, Installation as Ut, ReleaseState as V, EditDocumentAction as Vn, removeComment as Vr, OrganizationOptions as Vt, QueryOptions as W, PublishDocumentAction as Wn, updateComment as Wr, InstallationAccess as Wt, projects as X, UnscheduleReleaseAction as Xn, CommentTextSelection as Xr, installation as Xt, ProjectsOptions as Y, UnpublishDocumentAction as Yn, CommentStatus as Yr, InstallationsResponse as Yt, resolveProjection as Z, archiveRelease as Zn, CommentTextSelectionItem as Zr, installations as Zt, applications as _, LoggingInAuthState as _i, TransactionAcceptedEvent as _n, LogContext as _r, PresencePerspectiveOptions as _t, ApplicationInclude as a, refreshOAuthTokens as ai, ApplyDocumentActionsOptions as an, publishDocument as ar, project as at, CurrentUser$1 as b, getDashboardOrganizationId as bi, getDocumentState as bn, Logger as br, ReportPresenceOptions as bt, ApplicationStudioConfig as c, logout as ci, DocumentCreatedEvent as cn, unarchiveRelease as cr, PreviewValue as ct, ApplicationsOptions as d, OrgVerificationResult as di, DocumentEditedEvent as dn, ResolveDocument as dr, getPresence as dt, ClientStoreState as ei, SetFavoriteInput as en, deleteDocument as er, ProjectBase as et, ApplicationsResponse as f, AuthState as fi, DocumentEvent as fn, ResolveProjectionResult as fr, reportPresence as ft, application as g, LoggedOutAuthState as gi, DocumentUnpublishedEvent as gn, InstanceContext as gr, PresenceLocation as gt, UpdateApplicationInput as h, LoggedInAuthState as hi, DocumentTransactionSubmissionResult as hn, configureLogging as hr, DocumentPresenceOptions as ht, ApplicationDeployment as i, handleOAuthCallback as ii, ActionsResult as in, editRelease as ir, ProjectOptions as it, CORE_SDK_VERSION as j, Fetcher as ji, processMutations as jn, getCommentsState as jr, SanityUserResponse as jt, slicePath$1 as k, CacheTag as ki, ProcessMutationsOptions as kn, getCommentThreadsState as kr, ResolveUsersOptions as kt, ApplicationVisibility as l, handleAuthCallback as li, DocumentDeletedEvent as ln, unpublishDocument as lr, ProjectionValuePending as lt, DeletedResult as m, ErrorAuthState as mi, DocumentRemotePatchesEvent as mn, datasets as mr, DocumentPresence as mt, ApplicationAccess as n, getClientState as ni, setFavorite as nn, discardDocument as nr, ProjectMemberRole as nt, ApplicationInterface as o, revokeOAuthTokens as oi, applyDocumentActions as on, publishRelease as or, PreviewMedia as ot, DeleteApplicationInput as p, AuthStoreState as pi, DocumentPublishedEvent as pn, ResolveQueryResult as pr, DisconnectEvent as pt, parseQueryKey as q, ScheduleReleaseAction as qn, CommentMessage as qr, InstallationInclude as qt, ApplicationBase as r, getOAuthTokensState as ri, getReleaseDocumentId as rn, editDocument as rr, ProjectMetadata as rt, ApplicationInterfacePlacementMetadata as s, startOAuthAuthorization as si, ActionErrorEvent as sn, scheduleRelease as sr, PreviewQueryResult as st, Application as t, getClient as ti, favorites as tn, deleteRelease as tr, ProjectMember as tt, ApplicationWorkspace as u, observeOrganizationVerificationState as ui, DocumentDiscardedEvent as un, unscheduleRelease as ur, getDocumentPresence as ut, deleteApplication as v, getAuthState as vi, TransactionRevertedEvent as vn, LogLevel as vr, PresenceSelection as vt, SanityProject$1 as w, setAuthToken as wi, resolvePermissions as wn, createDocumentHandle as wr, UserPresence as wt, ReleaseDocument$1 as x, getIsInDashboardState as xi, getDocumentSyncStatus as xn, LoggerConfig as xr, RollCallEvent as xt, updateApplication as y, getCurrentUserState as yi, DocumentOptions as yn, LogNamespace as yr, PresenceSelectionPoint as yt, defineProjection as z, StateSource as zi, DiscardDocumentAction as zn, UpdateCommentOptions as zr, OrganizationBase as zt };
3620
+ //# sourceMappingURL=applications-pRS8tuC2.d.ts.map