@sanity/sdk 3.0.0 → 3.2.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/_internal.d.ts +72 -19
- package/dist/_exports/_internal.d.ts.map +1 -1
- package/dist/_exports/_internal.js +130 -11
- package/dist/_exports/_internal.js.map +1 -1
- package/dist/_exports/agent.d.ts +7 -7
- package/dist/_exports/agent.d.ts.map +1 -1
- package/dist/_exports/agent.js +1 -1
- package/dist/_exports/comlink.d.ts +9 -9
- package/dist/_exports/comlink.d.ts.map +1 -1
- package/dist/_exports/comlink.js +2 -2
- package/dist/_exports/dashboard.d.ts +2 -0
- package/dist/_exports/dashboard.js +2 -0
- package/dist/{authStore-C0o1NOxW.d.ts → authStore-BO2vch3I.d.ts} +516 -63
- package/dist/authStore-BO2vch3I.d.ts.map +1 -0
- package/dist/{authStore-CtE9bLHW.js → clientStore-BI4D8HhJ.js} +390 -15
- package/dist/clientStore-BI4D8HhJ.js.map +1 -0
- package/dist/{createSanityInstance-DUI1bGIg.d.ts → createSanityInstance-BQIqyGLX.d.ts} +17 -2
- package/dist/createSanityInstance-BQIqyGLX.d.ts.map +1 -0
- package/dist/{createStateSourceAction-BOKtqFNm.js → createStateSourceAction-DdAhEfnZ.js} +7 -3
- package/dist/createStateSourceAction-DdAhEfnZ.js.map +1 -0
- package/dist/defineProperty-Bho9Ngsi.js +31 -0
- package/dist/{getNodeState-CR3__B2D.js → getNodeState-B4nG0sjm.js} +2 -2
- package/dist/{getNodeState-CR3__B2D.js.map → getNodeState-B4nG0sjm.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +370 -90
- package/dist/index.js.map +1 -1
- package/dist/topicStore-Ct7IFNtY.js +565 -0
- package/dist/topicStore-Ct7IFNtY.js.map +1 -0
- package/dist/topicStore-D0WqhQGF.d.ts +435 -0
- package/dist/topicStore-D0WqhQGF.d.ts.map +1 -0
- package/dist/{queryStore-C7yMHPUI.js → version-BcRmCiYi.js} +48 -16
- package/dist/version-BcRmCiYi.js.map +1 -0
- package/package.json +19 -18
- package/src/_exports/_internal.ts +13 -0
- package/src/_exports/dashboard.ts +36 -0
- package/src/_exports/index.ts +17 -1
- package/src/access/checkPermissions.test.ts +1 -1
- package/src/access/checkPermissions.ts +1 -1
- package/src/applications/applications.test-d.ts +28 -4
- package/src/applications/applications.test.ts +4 -4
- package/src/applications/applications.ts +43 -18
- package/src/auth/authMode.test.ts +24 -0
- package/src/auth/authMode.ts +8 -3
- package/src/auth/authStore.ts +12 -0
- package/src/auth/authStrategy.ts +2 -0
- package/src/auth/handleAuthCallback.test.ts +2 -2
- package/src/auth/handleAuthCallback.ts +1 -1
- package/src/auth/logout.test.ts +46 -1
- package/src/auth/logout.ts +2 -1
- package/src/auth/oauth/oauthActions.test.ts +457 -0
- package/src/auth/oauth/oauthActions.ts +389 -0
- package/src/auth/oauth/oauthAuth.test.ts +206 -0
- package/src/auth/oauth/oauthAuth.ts +168 -0
- package/src/auth/oauth/pkce.test.ts +44 -0
- package/src/auth/oauth/pkce.ts +60 -0
- package/src/auth/oauth/types.ts +12 -0
- package/src/auth/refreshStampedToken.ts +1 -1
- package/src/auth/studioModeAuth.test.ts +1 -1
- package/src/auth/studioModeAuth.ts +1 -1
- package/src/auth/subscribeToStateAndFetchCurrentUser.test.ts +2 -2
- package/src/auth/subscribeToStateAndFetchCurrentUser.ts +1 -1
- package/src/comments/addonDatasetStore.test.ts +2 -2
- package/src/comments/addonDatasetStore.ts +2 -2
- package/src/comments/commentActions.ts +6 -5
- package/src/comments/commentsStore.ts +4 -4
- package/src/config/authConfig.ts +18 -0
- package/src/dashboard/messageBus/__fixtures__/test-topics.ts +18 -0
- package/src/dashboard/messageBus/bus.test.ts +1033 -0
- package/src/dashboard/messageBus/bus.ts +1246 -0
- package/src/dashboard/messageBus/store.test.ts +142 -0
- package/src/dashboard/messageBus/store.ts +74 -0
- package/src/dashboard/messageBus/topicStore.test.ts +172 -0
- package/src/dashboard/messageBus/topicStore.ts +184 -0
- package/src/dashboard/messageBus/topics.test.ts +71 -0
- package/src/dashboard/messageBus/topics.ts +260 -0
- package/src/document/actions.ts +3 -3
- package/src/document/applyDocumentActions.ts +5 -9
- package/src/document/documentStore.concurrency.test.ts +2 -1
- package/src/document/documentStore.test.ts +19 -18
- package/src/document/documentStore.ts +17 -17
- package/src/document/permissions.ts +2 -1
- package/src/document/processActions.test.ts +2 -1
- package/src/document/processMutations.ts +61 -24
- package/src/document/reducers.ts +2 -2
- package/src/installations/installations.test-d.ts +3 -3
- package/src/installations/installations.test.ts +2 -2
- package/src/installations/installations.ts +4 -21
- package/src/organization/organization.test.ts +2 -2
- package/src/organization/organization.ts +1 -1
- package/src/organizations/organizations.test.ts +2 -2
- package/src/organizations/organizations.ts +1 -1
- package/src/presence/presenceStore.test.ts +15 -22
- package/src/presence/presenceStore.ts +3 -2
- package/src/project/project.test.ts +3 -3
- package/src/project/project.ts +1 -1
- package/src/projection/getProjectionState.test.ts +6 -4
- package/src/projection/getProjectionState.ts +4 -4
- package/src/projection/resolveProjection.ts +2 -2
- package/src/projects/projects.test.ts +2 -2
- package/src/projects/projects.ts +1 -1
- package/src/query/queryStore.ts +6 -6
- package/src/store/createSanityInstance.test.ts +1 -1
- package/src/store/createSanityInstance.ts +4 -4
- package/src/store/createStoreInstance.test.ts +0 -5
- package/src/telemetry/telemetryManager.test.ts +1 -1
- package/src/telemetry/telemetryManager.ts +2 -2
- package/src/typegen/defineProjection.test.ts +17 -0
- package/src/typegen/defineProjection.ts +19 -0
- package/src/typegen/groqCompat.ts +122 -0
- package/src/typegen/resolve.ts +37 -0
- package/src/users/usersStore.test.ts +1 -1
- package/src/users/usersStore.ts +5 -5
- package/src/utils/createGroqSearchFilter.test.ts +8 -0
- package/src/utils/createGroqSearchFilter.ts +6 -3
- package/src/utils/ids.test.ts +40 -15
- package/src/utils/ids.ts +47 -2
- package/dist/authStore-C0o1NOxW.d.ts.map +0 -1
- package/dist/authStore-CtE9bLHW.js.map +0 -1
- package/dist/clientStore-BtE2-q2i.js +0 -90
- package/dist/clientStore-BtE2-q2i.js.map +0 -1
- package/dist/createSanityInstance-DUI1bGIg.d.ts.map +0 -1
- package/dist/createStateSourceAction-BOKtqFNm.js.map +0 -1
- package/dist/getEnv-D5RGkQLu.js +0 -8
- package/dist/getEnv-D5RGkQLu.js.map +0 -1
- package/dist/logger-DAtJb5RQ.js +0 -173
- package/dist/logger-DAtJb5RQ.js.map +0 -1
- package/dist/queryStore-C7yMHPUI.js.map +0 -1
- package/dist/rolldown-runtime-vyAXikos.js +0 -9
- package/dist/telemetryManager-UIEiMtC0.js +0 -127
- package/dist/telemetryManager-UIEiMtC0.js.map +0 -1
- package/dist/version-D8RP_Q59.js +0 -9
- package/dist/version-D8RP_Q59.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bi as BoundStoreAction, zi as StateSource } from "../authStore-BO2vch3I.js";
|
|
2
2
|
import { ChannelInput, ChannelInstance, Controller, Message, Node, NodeInput, Status } from "@sanity/comlink";
|
|
3
3
|
/**
|
|
4
4
|
* Message sent from a containing app to an iframe
|
|
@@ -51,24 +51,24 @@ interface ComlinkControllerState {
|
|
|
51
51
|
* Calls the destroy method on the controller and resets the controller state.
|
|
52
52
|
* @public
|
|
53
53
|
*/
|
|
54
|
-
declare const destroyController: BoundStoreAction<ComlinkControllerState, [], void>;
|
|
54
|
+
export declare const destroyController: BoundStoreAction<ComlinkControllerState, [], void>;
|
|
55
55
|
/**
|
|
56
56
|
* Retrieve or create a channel to be used for communication between
|
|
57
57
|
* an application and the controller.
|
|
58
58
|
* @public
|
|
59
59
|
*/
|
|
60
|
-
declare const getOrCreateChannel: BoundStoreAction<ComlinkControllerState, [options: ChannelInput], ChannelInstance<import("@sanity/comlink").Message, import("@sanity/comlink").Message>>;
|
|
60
|
+
export declare const getOrCreateChannel: BoundStoreAction<ComlinkControllerState, [options: ChannelInput], ChannelInstance<import("@sanity/comlink").Message, import("@sanity/comlink").Message>>;
|
|
61
61
|
/**
|
|
62
62
|
* Initializes or fetches a controller to handle communication
|
|
63
63
|
* between an application and iframes.
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
|
-
declare const getOrCreateController: BoundStoreAction<ComlinkControllerState, [targetOrigin: string], Controller>;
|
|
66
|
+
export declare const getOrCreateController: BoundStoreAction<ComlinkControllerState, [targetOrigin: string], Controller>;
|
|
67
67
|
/**
|
|
68
68
|
* Signals to the store that the consumer has stopped using the channel
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
|
-
declare const releaseChannel: BoundStoreAction<ComlinkControllerState, [name: string], void>;
|
|
71
|
+
export declare const releaseChannel: BoundStoreAction<ComlinkControllerState, [name: string], void>;
|
|
72
72
|
/**
|
|
73
73
|
* Individual node with its relevant options
|
|
74
74
|
* @public
|
|
@@ -91,14 +91,14 @@ interface ComlinkNodeState {
|
|
|
91
91
|
* Signals to the store that the consumer has stopped using the node
|
|
92
92
|
* @public
|
|
93
93
|
*/
|
|
94
|
-
declare const releaseNode: BoundStoreAction<ComlinkNodeState, [name: string], void>;
|
|
94
|
+
export declare const releaseNode: BoundStoreAction<ComlinkNodeState, [name: string], void>;
|
|
95
95
|
/**
|
|
96
96
|
* Retrieve or create a node to be used for communication between
|
|
97
97
|
* an application and the controller -- specifically, a node should
|
|
98
98
|
* be created within a frame / window to communicate with the controller.
|
|
99
99
|
* @public
|
|
100
100
|
*/
|
|
101
|
-
declare const getOrCreateNode: BoundStoreAction<ComlinkNodeState, [options: NodeInput], Node<import("@sanity/comlink").Message, import("@sanity/comlink").Message>>;
|
|
101
|
+
export declare const getOrCreateNode: BoundStoreAction<ComlinkNodeState, [options: NodeInput], Node<import("@sanity/comlink").Message, import("@sanity/comlink").Message>>;
|
|
102
102
|
/**
|
|
103
103
|
* @public
|
|
104
104
|
*/
|
|
@@ -113,6 +113,6 @@ interface NodeState {
|
|
|
113
113
|
* @returns A subscribable state source for the node
|
|
114
114
|
* @public
|
|
115
115
|
*/
|
|
116
|
-
declare const getNodeState: BoundStoreAction<ComlinkNodeState, [NodeInput], StateSource<NodeState | undefined>>;
|
|
117
|
-
export {
|
|
116
|
+
export declare const getNodeState: BoundStoreAction<ComlinkNodeState, [NodeInput], StateSource<NodeState | undefined>>;
|
|
117
|
+
export type { ComlinkControllerState, ComlinkNodeState, FrameMessage, NewTokenResponseMessage, NodeState, RequestNewTokenMessage, WindowMessage };
|
|
118
118
|
//# sourceMappingURL=comlink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comlink.d.ts","names":[],"sources":["../../src/comlink/types.ts","../../src/comlink/controller/comlinkControllerStore.ts","../../src/comlink/node/comlinkNodeStore.ts","../../src/comlink/node/getNodeState.ts"],"mappings":";;;;;;KAMY,eAAe;;;;;KAMf,gBAAgB;;;;;KAMhB;EACV;EACA;;;;;;KAOU;EACV;EACA;IAAU;IAAsB;;;;;;;UCfjB;EACf,SAAS,gBAAgB,cAAc;EAEvC,SAAS;EAET;;;;;;UAOe;EACf,YAAY;EACZ;EACA,UAAU,YAAY;;;;;;
|
|
1
|
+
{"version":3,"file":"comlink.d.ts","names":[],"sources":["../../src/comlink/types.ts","../../src/comlink/controller/comlinkControllerStore.ts","../../src/comlink/node/comlinkNodeStore.ts","../../src/comlink/node/getNodeState.ts"],"mappings":";;;;;;KAMY,eAAe;;;;;KAMf,gBAAgB;;;;;KAMhB;EACV;EACA;;;;;;KAOU;EACV;EACA;IAAU;IAAsB;;;;;;;UCfjB;EACf,SAAS,gBAAgB,cAAc;EAEvC,SAAS;EAET;;;;;;UAOe;EACf,YAAY;EACZ;EACA,UAAU,YAAY;;;;;;qBAyBX,mBAAiB,iBAAA;;;;;;qBAUjB,oBAAkB,iBAAA,yBAAA,SAAA,eAAA,0CAAA,mCAAA;;;;;;qBAUlB,uBAAqB,iBAAA,yBAAA,uBAAA;;;;;qBASrB,gBAAc,iBAAA,yBAAA;;;;;UCvEV;EACf,MAAM,KAAK,eAAe;EAE1B,SAAS;EAET,QAAQ;EACR;;;;;;UAOe;EACf,OAAO,YAAY;EAEnB,eAAe,YAAY;;;;;;qBAuBhB,aAAW,iBAAA,mBAAA;;;;;;;qBAQX,iBAAe,iBAAA,mBAAA,SAAA,YAAA,+BAAA,mCAAA;;;;UCvCX;EACf,MAAM,KAAK,eAAe;EAC1B,QAAQ;;;;;;;;;qBAaG,cAAY,iBAAA,mBAAA,YAAA,YAAA"}
|
package/dist/_exports/comlink.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as bindActionGlobally, o as defineStore } from "../createStateSourceAction-DdAhEfnZ.js";
|
|
2
2
|
import { t as isDeepEqual } from "../object-CxXlSVg7.js";
|
|
3
|
-
import { n as getOrCreateNode, r as releaseNode, t as getNodeState } from "../getNodeState-
|
|
3
|
+
import { n as getOrCreateNode, r as releaseNode, t as getNodeState } from "../getNodeState-B4nG0sjm.js";
|
|
4
4
|
import { createController } from "@sanity/comlink";
|
|
5
5
|
/**
|
|
6
6
|
* Calls the destroy method on the controller and resets the controller state.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as PayloadOf, C as ApplicationConfig, D as EventTopicDef, E as EventTopic, F as TopicName, I as TopicResult, L as Topics, M as ReplyOf, N as StateTopic, O as NavigationLocation, P as StateTopicDef, R as ValueOf, T as DashboardTopics, _ as MessageBusMeta, a as ConnectMessageBusOptions, b as connectMessageBus, c as MessageBusAbortOptions, d as MessageBusEmitOptions, f as MessageBusEmitResult, g as MessageBusMessage, h as MessageBusHost, j as RemoteModuleRef, k as NavigationTarget, l as MessageBusClient, m as MessageBusErrorCode, n as TopicError, p as MessageBusError, s as MessageBus, t as TopicData, u as MessageBusConnection, v as MessageBusQueryOptions, w as ApplicationConfigAppType, y as MessageBusStateSource } from "../topicStore-D0WqhQGF.js";
|
|
2
|
+
export { type ApplicationConfig, type ApplicationConfigAppType, type ConnectMessageBusOptions, type DashboardTopics, type EventTopic, type EventTopicDef, type MessageBus, type MessageBusAbortOptions, type MessageBusClient, type MessageBusConnection, type MessageBusEmitOptions, type MessageBusEmitResult, MessageBusError, type MessageBusErrorCode, type MessageBusHost, type MessageBusMessage, type MessageBusMeta, type MessageBusQueryOptions, type MessageBusStateSource, type NavigationLocation, type NavigationTarget, type PayloadOf, type RemoteModuleRef, type ReplyOf, type StateTopic, type StateTopicDef, type TopicData, TopicError, type TopicName, type TopicResult, type Topics, type ValueOf, connectMessageBus };
|