@plitzi/sdk-shared 0.32.25 → 0.33.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/CHANGELOG.md +6 -0
- package/dist/auth/authFailureLink.d.ts +9 -0
- package/dist/auth/authFailureLink.mjs +20 -0
- package/dist/auth/failureChannel.d.ts +31 -0
- package/dist/auth/failureChannel.mjs +26 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.mjs +3 -0
- package/dist/connectors/constants.d.ts +28 -0
- package/dist/connectors/constants.mjs +29 -0
- package/dist/connectors/index.d.ts +7 -0
- package/dist/connectors/index.mjs +5 -0
- package/dist/connectors/manifestTokens.d.ts +17 -0
- package/dist/connectors/manifestTokens.mjs +70 -0
- package/dist/connectors/presets.d.ts +22 -0
- package/dist/connectors/presets.mjs +220 -0
- package/dist/connectors/validateManifest.d.ts +28 -0
- package/dist/connectors/validateManifest.mjs +183 -0
- package/dist/dataSource/getBindingsDetails.mjs +1 -1
- package/dist/hooks/useNetwork.mjs +32 -26
- package/dist/hooks/usePlitziServiceContext.d.ts +1 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +47 -40
- package/dist/navigation/index.d.ts +4 -0
- package/dist/navigation/index.mjs +3 -0
- package/dist/navigation/matchPath.d.ts +12 -0
- package/dist/navigation/matchPath.mjs +42 -0
- package/dist/navigation/routes.d.ts +28 -0
- package/dist/navigation/routes.mjs +124 -0
- package/dist/network/NetworkContext.d.ts +5 -3
- package/dist/network/NetworkInternalContext.d.ts +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +16 -0
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +16 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +9 -18
- package/dist/network/graphql/builder/Mutations/index.mjs +150 -156
- package/dist/network/graphql/builder/Queries/InitQuery.d.ts +1 -4
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +2 -33
- package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +25 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -0
- package/dist/network/graphql/builder/Queries/index.d.ts +3 -12
- package/dist/network/graphql/builder/Queries/index.mjs +22 -28
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +19 -0
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/index.d.ts +4 -163
- package/dist/network/graphql/builder/Subscriptions/index.mjs +3 -109
- package/dist/network/graphql/builder/index.d.ts +2 -2
- package/dist/network/graphql/builder/index.mjs +1 -1
- package/dist/network/graphql/index.mjs +1 -1
- package/dist/network/graphql/sdk/Mutations/index.d.ts +2 -13
- package/dist/network/graphql/sdk/Mutations/index.mjs +2 -9
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -4
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -13
- package/dist/network/graphql/sdk/Queries/index.d.ts +0 -12
- package/dist/network/graphql/sdk/Queries/index.mjs +8 -16
- package/dist/network/index.d.ts +3 -1
- package/dist/network/index.mjs +7 -6
- package/dist/network/spaceEvents.d.ts +405 -0
- package/dist/network/spaceEvents.mjs +244 -0
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.mjs +4 -3
- package/dist/server/rsc/refreshRsc.d.ts +16 -0
- package/dist/server/rsc/refreshRsc.mjs +16 -0
- package/dist/server/rsc/useRscRefresh.d.ts +2 -0
- package/dist/server/rsc/useRscRefresh.mjs +10 -0
- package/dist/server/rsc/useRscSync.d.ts +11 -0
- package/dist/server/rsc/useRscSync.mjs +20 -0
- package/dist/store/index.d.ts +54 -53
- package/dist/store/index.mjs +4 -3
- package/dist/store/renderSettings.d.ts +26 -0
- package/dist/store/renderSettings.mjs +39 -0
- package/dist/types/AuthTypes.d.ts +33 -3
- package/dist/types/BuilderTypes.d.ts +15 -0
- package/dist/types/CollectionTypes.d.ts +3 -49
- package/dist/types/CommonTypes.d.ts +17 -2
- package/dist/types/ConnectorTypes.d.ts +147 -0
- package/dist/types/ConnectorTypes.mjs +0 -0
- package/dist/types/DevToolsTypes.d.ts +18 -3
- package/dist/types/InteractionTypes.d.ts +1 -1
- package/dist/types/McpTypes/index.d.ts +0 -4
- package/dist/types/NavigationTypes.d.ts +0 -10
- package/dist/types/SchemaTypes.d.ts +27 -5
- package/dist/types/SdkTypes.d.ts +19 -2
- package/dist/types/ServerTypes.d.ts +296 -103
- package/dist/types/SpaceTypes.d.ts +17 -1
- package/dist/types/StoreTypes.d.ts +36 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/websockets/RTCodec.d.ts +6 -0
- package/package.json +108 -309
- package/vite.config.ts +21 -1
- package/dist/collections/CollectionContext.d.ts +0 -2
- package/dist/collections/CollectionContext.mjs +0 -5
- package/dist/collections/index.d.ts +0 -3
- package/dist/collections/index.mjs +0 -2
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.mjs +0 -24
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.mjs +0 -16
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.mjs +0 -17
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.mjs +0 -14
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.mjs +0 -32
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.mjs +0 -16
- package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.d.ts +0 -6
- package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.mjs +0 -35
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.d.ts +0 -6
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.mjs +0 -16
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.d.ts +0 -9
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.mjs +0 -27
- package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.d.ts +0 -9
- package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.mjs +0 -37
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.mjs +0 -17
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.mjs +0 -17
- package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.d.ts +0 -2
- package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.mjs +0 -41
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.mjs +0 -40
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.mjs +0 -30
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.mjs +0 -15
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.mjs +0 -27
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.mjs +0 -27
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.mjs +0 -21
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.mjs +0 -14
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.mjs +0 -21
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.mjs +0 -15
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.d.ts +0 -17
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.mjs +0 -17
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.d.ts +0 -8
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.mjs +0 -13
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.d.ts +0 -8
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.mjs +0 -13
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.d.ts +0 -16
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.mjs +0 -17
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.d.ts +0 -9
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.mjs +0 -14
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.d.ts +0 -8
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.mjs +0 -13
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.d.ts +0 -9
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.mjs +0 -14
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.d.ts +0 -11
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.mjs +0 -40
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.mjs +0 -29
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.mjs +0 -39
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.d.ts +0 -9
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.mjs +0 -29
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.d.ts +0 -9
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.mjs +0 -14
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.d.ts +0 -5
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.mjs +0 -11
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.mjs +0 -26
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.mjs +0 -26
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.d.ts +0 -5
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.mjs +0 -11
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.mjs +0 -26
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.mjs +0 -26
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.d.ts +0 -5
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.mjs +0 -11
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.mjs +0 -26
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.mjs +0 -20
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.d.ts +0 -5
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.mjs +0 -11
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.mjs +0 -20
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.d.ts +0 -6
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.d.ts +0 -4
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.mjs +0 -13
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.d.ts +0 -16
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.d.ts +0 -15
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.mjs +0 -16
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.mjs +0 -15
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.d.ts +0 -9
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.mjs +0 -14
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.d.ts +0 -10
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.mjs +0 -15
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.d.ts +0 -8
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.mjs +0 -13
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.d.ts +0 -7
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.mjs +0 -12
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.d.ts +0 -8
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.mjs +0 -13
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddMutation.d.ts +0 -2
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.d.ts +0 -4
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.mjs +0 -16
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveMutation.d.ts +0 -2
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +0 -4
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.mjs +0 -14
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateMutation.d.ts +0 -2
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +0 -4
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.mjs +0 -16
- package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.mjs +0 -32
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.mjs +0 -14
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.d.ts +0 -9
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.mjs +0 -25
- package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.d.ts +0 -9
- package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.mjs +0 -25
- package/dist/server/rsc/RscContext.d.ts +0 -13
- package/dist/server/rsc/RscContext.mjs +0 -5
- package/dist/server/rsc/RscProvider.d.ts +0 -13
- package/dist/server/rsc/RscProvider.mjs +0 -42
package/dist/store/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import e, { DEFAULT_RENDER_SETTINGS as t, useRenderOverride as n } from "./renderSettings.mjs";
|
|
2
|
+
import { createStoreHook as r } from "@plitzi/nexus/react";
|
|
2
3
|
//#region src/store/index.ts
|
|
3
|
-
var { useStore:
|
|
4
|
+
var { useStore: i, useStoreSync: a, useStoreGetter: o, useStoreSetter: s } = r(), { useStore: c, useStoreSync: l, useStoreGetter: u, useStoreSetter: d } = r(), { useStore: f, useStoreSync: p, useStoreGetter: m, useStoreSetter: h } = r();
|
|
4
5
|
//#endregion
|
|
5
|
-
export {
|
|
6
|
+
export { t as DEFAULT_RENDER_SETTINGS, f as useBuilderStore, m as useBuilderStoreGetter, h as useBuilderStoreSetter, p as useBuilderStoreSync, i as useCommonStore, o as useCommonStoreGetter, s as useCommonStoreSetter, a as useCommonStoreSync, n as useRenderOverride, e as useRenderSettings, c as useSdkStore, u as useSdkStoreGetter, d as useSdkStoreSetter, l as useSdkStoreSync };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RenderSettings } from '../types';
|
|
2
|
+
/** The surface a schema renders on when nobody said otherwise: a live, non-debug space rendered in place. Each surface
|
|
3
|
+
* seeds `render` at its own store root with these plus whatever it actually is (the builder, for one, is not
|
|
4
|
+
* preview by default) — this is the floor, so no read site carries its own idea of the default. */
|
|
5
|
+
export declare const DEFAULT_RENDER_SETTINGS: Required<RenderSettings>;
|
|
6
|
+
/** Reads `render` from the nearest store, filled in. Returns every key defined, so call sites destructure without
|
|
7
|
+
* restating a default — and a tree that never seeded it (a standalone element, a test) still renders.
|
|
8
|
+
*
|
|
9
|
+
* A nested scope that seeds `render` SHADOWS the whole slice — reads do not fall through key by key, whichever way
|
|
10
|
+
* they are written — so a subtree that overrides one flag must restate the rest ({@link useRenderOverride}). */
|
|
11
|
+
declare const useRenderSettings: () => Required<RenderSettings>;
|
|
12
|
+
/** Builds the value for a `<StoreProvider>` that renders a subtree under different settings — the builder's preview
|
|
13
|
+
* pane being preview whatever the editor's own toggle says. Carries the surrounding settings over explicitly,
|
|
14
|
+
* because the scope shadows the slice: what an override leaves out is NOT inherited, it is lost.
|
|
15
|
+
*
|
|
16
|
+
* `overrides` has to be referentially stable (a module-level constant), like any memo input. */
|
|
17
|
+
export declare const useRenderOverride: (overrides: RenderSettings) => {
|
|
18
|
+
render: {
|
|
19
|
+
previewMode: boolean;
|
|
20
|
+
debugMode: boolean;
|
|
21
|
+
renderMode: import('..').RenderMode;
|
|
22
|
+
environment: import('..').Environment;
|
|
23
|
+
isHydrating: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default useRenderSettings;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useCommonStore as e } from "./index.mjs";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
//#region src/store/renderSettings.ts
|
|
4
|
+
var n = {
|
|
5
|
+
previewMode: !0,
|
|
6
|
+
debugMode: !1,
|
|
7
|
+
renderMode: "raw",
|
|
8
|
+
environment: "main",
|
|
9
|
+
isHydrating: !1
|
|
10
|
+
}, r = () => {
|
|
11
|
+
let [[r, i, a, o, s]] = e([
|
|
12
|
+
"render.previewMode",
|
|
13
|
+
"render.debugMode",
|
|
14
|
+
"render.renderMode",
|
|
15
|
+
"render.environment",
|
|
16
|
+
"render.isHydrating"
|
|
17
|
+
]);
|
|
18
|
+
return t(() => ({
|
|
19
|
+
previewMode: r ?? n.previewMode,
|
|
20
|
+
debugMode: i ?? n.debugMode,
|
|
21
|
+
renderMode: a ?? n.renderMode,
|
|
22
|
+
environment: o ?? n.environment,
|
|
23
|
+
isHydrating: s ?? n.isHydrating
|
|
24
|
+
}), [
|
|
25
|
+
r,
|
|
26
|
+
i,
|
|
27
|
+
a,
|
|
28
|
+
o,
|
|
29
|
+
s
|
|
30
|
+
]);
|
|
31
|
+
}, i = (e) => {
|
|
32
|
+
let n = r();
|
|
33
|
+
return t(() => ({ render: {
|
|
34
|
+
...n,
|
|
35
|
+
...e
|
|
36
|
+
} }), [n, e]);
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { n as DEFAULT_RENDER_SETTINGS, r as default, i as useRenderOverride };
|
|
@@ -9,14 +9,44 @@ export type User = {
|
|
|
9
9
|
export type TokenResult = {
|
|
10
10
|
errors?: Record<string, unknown>;
|
|
11
11
|
accessToken: string;
|
|
12
|
+
/** Unix seconds. Seconds rather than milliseconds because that is what a JWT `exp` and every OAuth2 response use. */
|
|
12
13
|
expiresAt: number | null;
|
|
13
14
|
refreshToken: string | null;
|
|
15
|
+
/** Unix seconds the refresh token dies at, when the backend says. Renewal is impossible past it. */
|
|
16
|
+
refreshExpiresAt?: number | null;
|
|
17
|
+
};
|
|
18
|
+
export type AuthState = 'init' | 'initLoading' | 'authenticating' | 'authenticated' | 'guest';
|
|
19
|
+
/**
|
|
20
|
+
* Why a credential was refused, as reported by the auth backend (Plitzi's API answers it in `reason` on every 401).
|
|
21
|
+
* The distinction that matters to a client is renewable versus not: `expired` asks for a refresh, `revoked`,
|
|
22
|
+
* `inactive` and `missing` end the session, and `network` is not an answer at all — it must never sign anyone out.
|
|
23
|
+
*/
|
|
24
|
+
export type AuthFailureReason = 'missing' | 'expired' | 'revoked' | 'inactive' | 'malformed' | 'outdated' | 'network';
|
|
25
|
+
/** What an auth backend hands back from a grant (login, refresh) or an identity call. Both halves are optional:
|
|
26
|
+
* a backend may answer a refresh with tokens alone, or an identity call with a user alone. */
|
|
27
|
+
export type AuthGrant<U = Record<string, unknown>> = {
|
|
28
|
+
user?: U;
|
|
29
|
+
token?: TokenResult;
|
|
30
|
+
};
|
|
31
|
+
export type AuthResult<U = Record<string, unknown>> = ({
|
|
32
|
+
ok: true;
|
|
33
|
+
} & AuthGrant<U>) | {
|
|
34
|
+
ok: false;
|
|
35
|
+
reason: AuthFailureReason;
|
|
14
36
|
};
|
|
15
37
|
export type AuthContextValue = {
|
|
16
|
-
login
|
|
17
|
-
|
|
38
|
+
/** The credentials your login endpoint expects. Values arrive from interaction parameters, hence `unknown`. */
|
|
39
|
+
login: (params: Record<string, unknown>) => Promise<TokenResult | undefined>;
|
|
40
|
+
refresh: (params?: Record<string, unknown>) => Promise<TokenResult | undefined>;
|
|
18
41
|
can: (permission: string) => boolean;
|
|
19
|
-
logout: (
|
|
42
|
+
logout: () => Promise<void>;
|
|
43
|
+
/** Ask the backend whether the session still stands, renewing it if that is what it takes. Resolves to the
|
|
44
|
+
* outcome, so a caller that needs certainty (a guarded action) can await it instead of trusting the last check. */
|
|
45
|
+
revalidate: (force?: boolean) => Promise<boolean>;
|
|
46
|
+
/** Report that the backend refused a credential — the `reason` from a 401. `expired` triggers a silent renewal,
|
|
47
|
+
* anything terminal ends the session. This is how an app tells auth that reality moved on between checks. */
|
|
48
|
+
invalidate: (reason?: AuthFailureReason) => void;
|
|
49
|
+
state: AuthState;
|
|
20
50
|
authenticated: boolean;
|
|
21
51
|
user?: {
|
|
22
52
|
details?: {
|
|
@@ -10,6 +10,20 @@ export type Template = {
|
|
|
10
10
|
schema: Schema;
|
|
11
11
|
style: Style;
|
|
12
12
|
};
|
|
13
|
+
export type SubscriptionCollaboratorElement = {
|
|
14
|
+
elementId: string;
|
|
15
|
+
rootId: string;
|
|
16
|
+
};
|
|
17
|
+
export type SubscriptionCollaboratorPointer = {
|
|
18
|
+
rootId: string;
|
|
19
|
+
anchorId?: string;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
export type SubscriptionCollaboratorElementState = {
|
|
24
|
+
hovered?: SubscriptionCollaboratorElement;
|
|
25
|
+
selected?: SubscriptionCollaboratorElement;
|
|
26
|
+
};
|
|
13
27
|
export type SubscriptionCollaborator = {
|
|
14
28
|
color: string;
|
|
15
29
|
user: {
|
|
@@ -17,4 +31,5 @@ export type SubscriptionCollaborator = {
|
|
|
17
31
|
surName: string;
|
|
18
32
|
};
|
|
19
33
|
instanceId: string;
|
|
34
|
+
elementState?: SubscriptionCollaboratorElementState;
|
|
20
35
|
};
|
|
@@ -19,7 +19,9 @@ export type CollectionField = {
|
|
|
19
19
|
};
|
|
20
20
|
export type CollectionRecord = {
|
|
21
21
|
id: string;
|
|
22
|
-
values:
|
|
22
|
+
/** Provider-shaped values. Not flat: external CMSs carry components, relations and localized objects, and a
|
|
23
|
+
* record must be able to hold them unchanged. */
|
|
24
|
+
values: Record<string, unknown>;
|
|
23
25
|
status: 'draft' | 'published' | 'archived';
|
|
24
26
|
createdAt: number;
|
|
25
27
|
updatedAt: number;
|
|
@@ -34,51 +36,3 @@ export type Collection = {
|
|
|
34
36
|
fields: Record<string, CollectionField>;
|
|
35
37
|
records: CollectionRecord[];
|
|
36
38
|
};
|
|
37
|
-
export type BuilderCollectionContextValue = {
|
|
38
|
-
collections: Record<string, Collection>;
|
|
39
|
-
fetchCollections: (filter: string, cursor?: string, limit?: number, append?: Collection[], store?: boolean) => Promise<{
|
|
40
|
-
edges: CollectionRaw[];
|
|
41
|
-
pageInfo: PageInfo;
|
|
42
|
-
} | undefined>;
|
|
43
|
-
fetchCollection: (id: string, recordsFilter: string, store?: boolean) => Promise<CollectionRaw | undefined>;
|
|
44
|
-
addCollection: (name: string, namePlural: string, description: string, privacy: Collection['privacy'], fields: Collection['fields']) => Promise<Collection | undefined>;
|
|
45
|
-
updateCollection: (id: string, name: string, namePlural: string, description: string, privacy: Collection['privacy'], fields: Collection['fields']) => Promise<Collection | undefined>;
|
|
46
|
-
removeCollection: (id: string) => Promise<boolean>;
|
|
47
|
-
fetchRecords: (collectionId: string, filter?: string | object, cursor?: string, limit?: number, append?: CollectionRecord[], store?: boolean) => Promise<{
|
|
48
|
-
pageInfo: PageInfo;
|
|
49
|
-
edges: CollectionRecord[];
|
|
50
|
-
} | undefined>;
|
|
51
|
-
fetchRecord: (collectionId: string, id: string, store?: boolean) => Promise<CollectionRecord | undefined>;
|
|
52
|
-
addRecord: (collectionId: string, status: CollectionRecord['status'], values: CollectionRecord['values'], updateStore?: boolean) => Promise<CollectionRecord | undefined>;
|
|
53
|
-
updateRecord: (collectionId: string, recordId: string, status: CollectionRecord['status'], values: CollectionRecord['values'], updateStore?: boolean) => Promise<CollectionRecord | undefined>;
|
|
54
|
-
removeRecord: (collectionId: string, recordId: string, updateStore?: boolean) => Promise<boolean>;
|
|
55
|
-
};
|
|
56
|
-
export type SdkCollectionContextValue = {
|
|
57
|
-
collections: Record<string, Collection>;
|
|
58
|
-
fetchCollections: (filter: string, cursor?: string, limit?: number) => Promise<{
|
|
59
|
-
edges: CollectionRaw[];
|
|
60
|
-
pageInfo: PageInfo;
|
|
61
|
-
} | undefined>;
|
|
62
|
-
fetchCollection: (id: string, recordsFilter: string) => Promise<CollectionRaw | undefined>;
|
|
63
|
-
fetchRecords: (collectionId: string, filter?: string | object, cursor?: string, limit?: number) => Promise<{
|
|
64
|
-
pageInfo: PageInfo;
|
|
65
|
-
edges: CollectionRecord[];
|
|
66
|
-
} | undefined>;
|
|
67
|
-
fetchRecord: (collectionId: string, id: string) => Promise<CollectionRecord | undefined>;
|
|
68
|
-
addRecord: (collectionId: string, status: CollectionRecord['status'], values: CollectionRecord['values'], updateStore?: boolean) => Promise<CollectionRecord | undefined>;
|
|
69
|
-
updateRecord: (collectionId: string, recordId: string, status: CollectionRecord['status'], values: CollectionRecord['values'], updateStore?: boolean) => Promise<CollectionRecord | undefined>;
|
|
70
|
-
removeRecord: (collectionId: string, recordId: string, updateStore?: boolean) => Promise<boolean>;
|
|
71
|
-
};
|
|
72
|
-
export type CollectionContextValue<T extends 'builder' | 'sdk' = 'sdk'> = T extends 'builder' ? BuilderCollectionContextValue : SdkCollectionContextValue;
|
|
73
|
-
export type CollectionRaw = {
|
|
74
|
-
id: string;
|
|
75
|
-
name: string;
|
|
76
|
-
namePlural: string;
|
|
77
|
-
description: string;
|
|
78
|
-
privacy: 'public' | 'private';
|
|
79
|
-
fields: Record<string, CollectionField>;
|
|
80
|
-
records: {
|
|
81
|
-
pageInfo: PageInfo;
|
|
82
|
-
edges: CollectionRecord[];
|
|
83
|
-
};
|
|
84
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { User } from './AuthTypes';
|
|
2
|
-
import { SSRRscData } from './ServerTypes';
|
|
2
|
+
import { SSRRenderResult, SSRRscData } from './ServerTypes';
|
|
3
3
|
export type Environment = 'production' | 'staging' | 'development' | 'main';
|
|
4
4
|
export type Server<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
5
5
|
apiServer: string;
|
|
@@ -17,7 +17,22 @@ export type Server<T extends Record<string, unknown> = Record<string, unknown>>
|
|
|
17
17
|
user?: {
|
|
18
18
|
details?: User;
|
|
19
19
|
accessToken?: string | Promise<string>;
|
|
20
|
+
/** Unix seconds the session token dies at, so a hydrated page schedules its renewal without decoding anything. */
|
|
21
|
+
expiresAt?: number;
|
|
20
22
|
};
|
|
21
|
-
|
|
23
|
+
ssr?: ServerSSR;
|
|
22
24
|
} & T;
|
|
25
|
+
/** What the rendering server hands over for THIS render, consumed once at the SDK root and not read from here again:
|
|
26
|
+
* the RSC bootstrap is projected into the store (`rsc`), which is where the live payload lives from then on. The
|
|
27
|
+
* rest of `Server` is long-lived configuration — endpoints, session — and stays readable anywhere. */
|
|
28
|
+
export type ServerSSR = {
|
|
29
|
+
/** Path where this origin answers RSC refreshes. Published only by a server that actually mounts the endpoint, so
|
|
30
|
+
* its absence is what tells a client-only render (embed, builder, offline widget) not to fetch. */
|
|
31
|
+
rscPath?: string;
|
|
32
|
+
/** The payload that server already resolved for this page, so the first render costs no request. */
|
|
33
|
+
rscData?: SSRRscData;
|
|
34
|
+
/** Channel the SSR render writes its response into (status, redirect). Server-side only and by reference: it never
|
|
35
|
+
* crosses to the browser, and nothing subscribes to it. */
|
|
36
|
+
renderResult?: SSRRenderResult;
|
|
37
|
+
};
|
|
23
38
|
export type RenderMode = 'raw' | 'iframe' | 'shadow' | 'widget';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { CollectionField } from './CollectionTypes';
|
|
2
|
+
/** How the provider walks result windows. Cursor providers echo their own token back through `nextCursor`. */
|
|
3
|
+
export type ConnectorPagination = 'offset' | 'page' | 'cursor';
|
|
4
|
+
export type ConnectorAuth = {
|
|
5
|
+
in: 'header' | 'query';
|
|
6
|
+
name: string;
|
|
7
|
+
/** Template resolved against the credential, e.g. `Bearer {{credential.token}}`. */
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
/** Where a read endpoint's records and counts sit inside this provider's response. */
|
|
11
|
+
export type ConnectorResponseMapping = {
|
|
12
|
+
/** Where the records array lives in the response. Omitted means the response is the array. */
|
|
13
|
+
itemsPath?: string;
|
|
14
|
+
/** Where the total count lives. Omitted means the count is unknown and paging relies on page size. */
|
|
15
|
+
totalPath?: string;
|
|
16
|
+
/** Where a record's id lives, relative to the record. Defaults to `id`. */
|
|
17
|
+
idPath?: string;
|
|
18
|
+
/** Where a record's values live, relative to the record. `.` (default) means the record itself. */
|
|
19
|
+
valuesPath?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The HTTP verb an endpoint uses.
|
|
23
|
+
*
|
|
24
|
+
* The full REST vocabulary, on both reads and writes: what separates the two is what the endpoint is *for* — only
|
|
25
|
+
* writes are reachable through `/_action` — not which verb it happens to use. Search reads through POST, upsert
|
|
26
|
+
* writes through PUT, and an integration that cannot say so is a CMS client, not a REST one.
|
|
27
|
+
*/
|
|
28
|
+
export type ConnectorHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
29
|
+
/** A request that returns records. */
|
|
30
|
+
export type ConnectorReadEndpoint = ConnectorResponseMapping & {
|
|
31
|
+
/** Template appended to `baseUrl`, e.g. `/api/{{resource}}`. */
|
|
32
|
+
path: string;
|
|
33
|
+
/** Defaults to `GET`. Any verb is allowed: reading through POST is how most search endpoints work. */
|
|
34
|
+
method?: ConnectorHttpMethod;
|
|
35
|
+
/** Query parameters, values templated. Entries resolving to empty are dropped. */
|
|
36
|
+
query?: Record<string, string>;
|
|
37
|
+
/** Headers for this endpoint only, merged over the connection's own. */
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
/** Body sent when `method` is POST. Values are templated; `{{values}}` carries the submitted record. */
|
|
40
|
+
body?: Record<string, string>;
|
|
41
|
+
/** Paging style for this endpoint, when it differs from the connection default. */
|
|
42
|
+
pagination?: ConnectorPagination;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A request that changes something.
|
|
46
|
+
*
|
|
47
|
+
* Writes are a separate map from reads rather than one map keyed by method: only these are reachable through
|
|
48
|
+
* `/_action`, so a read can never be invoked as a mutation, and a write can never be mounted as a data source.
|
|
49
|
+
*/
|
|
50
|
+
export type ConnectorWriteEndpoint = {
|
|
51
|
+
method: ConnectorHttpMethod;
|
|
52
|
+
/** Template appended to `baseUrl`, e.g. `/api/{{resource}}/{{id}}`. */
|
|
53
|
+
path: string;
|
|
54
|
+
query?: Record<string, string>;
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
/** Wraps the submitted values, e.g. `data` produces `{ "data": { … } }`. Omitted sends them at the root. */
|
|
57
|
+
bodyPath?: string;
|
|
58
|
+
/** Where the written record sits in the response, when the caller wants it back. */
|
|
59
|
+
response?: ConnectorResponseMapping;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Every request the connector knows how to make, named by the author.
|
|
63
|
+
*
|
|
64
|
+
* Both sides are open maps, not a fixed `list` plus `create`/`update`/`delete`: a connector is a declarative REST
|
|
65
|
+
* client, and an API has as many operations as it has. The CMS case is just the one where the read is called
|
|
66
|
+
* `list` and the writes happen to be named after CRUD.
|
|
67
|
+
*
|
|
68
|
+
* They are nested under `endpoints` rather than sitting beside `auth`, `operators` and `media` because those
|
|
69
|
+
* describe the connection and apply to every call, while these describe individual calls.
|
|
70
|
+
*/
|
|
71
|
+
export type ConnectorEndpoints = {
|
|
72
|
+
read: Record<string, ConnectorReadEndpoint>;
|
|
73
|
+
/** Absent or empty means read-only: an undeclared write is refused rather than guessed. */
|
|
74
|
+
write?: Record<string, ConnectorWriteEndpoint>;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* A connector is data, not code: everything a provider needs is declared here and interpreted by the engine, so
|
|
78
|
+
* adding a CMS never means shipping a new adapter. This document is server-side state — it names endpoints and an
|
|
79
|
+
* auth scheme and must never reach the browser.
|
|
80
|
+
*
|
|
81
|
+
* It lives in shared types because the builder authors the same document the server executes; keeping two copies in
|
|
82
|
+
* step by hand is how a manifest ends up describing an endpoint that the engine does not read.
|
|
83
|
+
*/
|
|
84
|
+
export type ConnectorManifest = {
|
|
85
|
+
id: string;
|
|
86
|
+
/** Identifier of the credential to resolve. The secret itself is never part of the manifest. */
|
|
87
|
+
credential?: string;
|
|
88
|
+
baseUrl: string;
|
|
89
|
+
auth?: ConnectorAuth;
|
|
90
|
+
/** Static headers, values templated. */
|
|
91
|
+
headers?: Record<string, string>;
|
|
92
|
+
endpoints: ConnectorEndpoints;
|
|
93
|
+
pagination?: ConnectorPagination;
|
|
94
|
+
/** Operator templates keyed by operator name, e.g. `{ eq: 'filters[{{field}}][$eq]={{value}}' }`. */
|
|
95
|
+
operators?: Record<string, string>;
|
|
96
|
+
/** Base for relative media URLs returned by the provider. See `rebaseMedia` for exactly which values it rewrites. */
|
|
97
|
+
media?: {
|
|
98
|
+
baseUrl?: string;
|
|
99
|
+
};
|
|
100
|
+
/** Field types, the only part of a connector the browser is allowed to see (it drives typed bindings). */
|
|
101
|
+
fields?: Record<string, CollectionField['type']>;
|
|
102
|
+
/** Escape hatch for data feeding templates whose bound paths cannot be determined statically. */
|
|
103
|
+
projection?: 'full';
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* What the builder authors.
|
|
107
|
+
*
|
|
108
|
+
* `id` is missing on purpose: a connector's identity belongs to the row that stores it, and a document that carries
|
|
109
|
+
* its own id can disagree with the one it was fetched by. The store stamps it on read.
|
|
110
|
+
*/
|
|
111
|
+
export type ConnectorManifestDraft = Omit<ConnectorManifest, 'id'>;
|
|
112
|
+
/**
|
|
113
|
+
* A connector as a server-side reader hands it over: the identity a provider element stores, the human name, and
|
|
114
|
+
* the manifest itself.
|
|
115
|
+
*
|
|
116
|
+
* Distinct from the builder's `SpaceConnector`, which also carries the storage row's numeric id and timestamps —
|
|
117
|
+
* a reader that had to invent those could answer from nothing but the database, and the MCP writes connectors
|
|
118
|
+
* through the same shape it reads them by.
|
|
119
|
+
*/
|
|
120
|
+
export type ConnectorEntry = {
|
|
121
|
+
/** The identifier a provider element stores in its `connector` attribute. Unique within the space. */
|
|
122
|
+
id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
manifest: ConnectorManifest;
|
|
125
|
+
};
|
|
126
|
+
export type ConnectorFilter = {
|
|
127
|
+
field: string;
|
|
128
|
+
operator: string;
|
|
129
|
+
value: string | number | boolean;
|
|
130
|
+
};
|
|
131
|
+
export type ConnectorQuery = {
|
|
132
|
+
/** Content type / collection name substituted into the path template. */
|
|
133
|
+
resource?: string;
|
|
134
|
+
limit?: number;
|
|
135
|
+
offset?: number;
|
|
136
|
+
page?: number;
|
|
137
|
+
cursor?: string;
|
|
138
|
+
filters?: ConnectorFilter[];
|
|
139
|
+
routeParams?: Record<string, string | undefined>;
|
|
140
|
+
queryParams?: Record<string, string>;
|
|
141
|
+
};
|
|
142
|
+
export type ConnectorRecord = {
|
|
143
|
+
id: string;
|
|
144
|
+
values: Record<string, unknown>;
|
|
145
|
+
};
|
|
146
|
+
/** Resolved credential material. Values are interpolated into templates as `{{credential.<key>}}`. */
|
|
147
|
+
export type ConnectorCredential = Record<string, string>;
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import { NavigationStatus } from './NavigationTypes';
|
|
|
3
3
|
import { ElementInteraction } from './SchemaTypes';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
export type LogType = 'info' | 'warning' | 'danger' | 'success' | 'custom';
|
|
6
|
-
export type LogCategory = 'navigation' | 'interactions' | 'store';
|
|
6
|
+
export type LogCategory = 'navigation' | 'interactions' | 'store' | 'network';
|
|
7
7
|
export type LogNavigation = {
|
|
8
8
|
category: 'navigation';
|
|
9
9
|
params: {
|
|
@@ -18,7 +18,10 @@ export type LogEventBridge = {
|
|
|
18
18
|
export type LogInteraction = {
|
|
19
19
|
category: 'interactions';
|
|
20
20
|
params: {
|
|
21
|
+
/** The SOURCE a global callback or utility named — `space`, `state` — not the element it ran on. */
|
|
21
22
|
elementId: string;
|
|
23
|
+
/** The idRef of the element the interaction fired on. What tells two identical-looking entries apart. */
|
|
24
|
+
elementRef?: string;
|
|
22
25
|
startTime: number;
|
|
23
26
|
endTime: number;
|
|
24
27
|
node: ElementInteraction;
|
|
@@ -35,10 +38,22 @@ export type LogStore = {
|
|
|
35
38
|
next: unknown;
|
|
36
39
|
};
|
|
37
40
|
};
|
|
38
|
-
|
|
41
|
+
/** Something that arrived from the server and was not what it claimed to be — a space event failing its schema. */
|
|
42
|
+
export type LogNetwork = {
|
|
43
|
+
category: 'network';
|
|
44
|
+
params: {
|
|
45
|
+
event: string;
|
|
46
|
+
issues: {
|
|
47
|
+
path: string;
|
|
48
|
+
message: string;
|
|
49
|
+
}[];
|
|
50
|
+
payload?: unknown;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type LogParams = LogNavigation['params'] | LogInteraction['params'] | LogEventBridge['params'] | LogStore['params'] | LogNetwork['params'];
|
|
39
54
|
export type Log = {
|
|
40
55
|
logType: string;
|
|
41
56
|
message: ReactNode;
|
|
42
57
|
time?: string;
|
|
43
|
-
} & (LogInteraction | LogNavigation | LogEventBridge | LogStore);
|
|
58
|
+
} & (LogInteraction | LogNavigation | LogEventBridge | LogStore | LogNetwork);
|
|
44
59
|
export type ProviderCallback = (...args: unknown[]) => Record<string, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementInteraction } from './SchemaTypes';
|
|
2
2
|
import { RuleValue } from '@plitzi/plitzi-ui/QueryBuilder';
|
|
3
3
|
export type InteractionCallbackType = 'trigger' | 'globalCallback' | 'callback' | 'utility';
|
|
4
|
-
export type InteractionStatus = 'completed' | 'skipped';
|
|
4
|
+
export type InteractionStatus = 'completed' | 'skipped' | 'failed';
|
|
5
5
|
export type InteractionNodeStatus = 'success' | 'failed' | 'skipped' | 'disabled';
|
|
6
6
|
export type InteractionPostCallback<T extends Record<string, unknown> = Record<string, unknown>> = (params: InteractionCallbackParamValues<T>, callbackResult?: unknown) => unknown;
|
|
7
7
|
export type PostCallbackNode<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import { Helmet } from '@dr.pogodin/react-helmet';
|
|
2
1
|
export type NavigationStatus = 'authenticated' | 'normal' | 'redirect' | 'notFound' | 'accessDenied';
|
|
3
2
|
export type QueryParams = Record<string, string[] | string | undefined>;
|
|
4
3
|
export type RouteParams = Record<string, string[] | string | undefined>;
|
|
5
|
-
export type NavigationContextValue = {
|
|
6
|
-
Helmet?: typeof Helmet;
|
|
7
|
-
navigate: (url: string, isExternal?: boolean) => void;
|
|
8
|
-
urlSearchParams?: URLSearchParams;
|
|
9
|
-
routeParams: RouteParams;
|
|
10
|
-
queryParams: QueryParams;
|
|
11
|
-
hostname?: string;
|
|
12
|
-
currentPageId: string;
|
|
13
|
-
};
|
|
@@ -7,8 +7,6 @@ export type SchemaRsc = {
|
|
|
7
7
|
enabled?: boolean;
|
|
8
8
|
/** Wire protocol for RSC updates. 'json' is the default (data-only). 'stream' uses the RSC wire format (requires react-server condition). */
|
|
9
9
|
transport?: 'json' | 'stream';
|
|
10
|
-
/** Path for the RSC endpoint. Defaults to '/_rsc'. */
|
|
11
|
-
path?: string;
|
|
12
10
|
};
|
|
13
11
|
export type DropPosition = 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'custom';
|
|
14
12
|
export type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
@@ -98,9 +96,8 @@ export type Schema = {
|
|
|
98
96
|
keepState?: boolean;
|
|
99
97
|
stateStorage?: 'localStorage' | 'sessionStorage';
|
|
100
98
|
customCss: string;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
auth0ClientId?: string;
|
|
99
|
+
/** `basic` covers any HTTP+JSON backend by configuration; anything else is a name someone registered. */
|
|
100
|
+
userProvider?: 'basic' | 'custom' | '' | (string & {});
|
|
104
101
|
tokenStorage?: 'localStorage' | 'sessionStorage' | '';
|
|
105
102
|
loginUrl?: string;
|
|
106
103
|
userUrl?: string;
|
|
@@ -108,7 +105,32 @@ export type Schema = {
|
|
|
108
105
|
logoutUrl?: string;
|
|
109
106
|
detailsPath?: string;
|
|
110
107
|
tokenPath?: string;
|
|
108
|
+
refreshTokenPath?: string;
|
|
111
109
|
expirationTimePath?: string;
|
|
110
|
+
refreshExpirationTimePath?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Name of a readable (non-httpOnly) cookie your backend sets alongside its session cookie, whose value is
|
|
113
|
+
* `<access expiry>.<refresh expiry>` in unix seconds. It carries no credential — only when the session dies —
|
|
114
|
+
* and it is what lets a page answer "is anyone signed in here?" with no request at all, including the answer
|
|
115
|
+
* "no". Without it, a first load with empty storage has to ask the backend to find out.
|
|
116
|
+
*/
|
|
117
|
+
sessionHintCookie?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Where to hand a credential this browser obtained on its own, so the rendering server can establish a session
|
|
120
|
+
* of its own for it. Declaring it is how a space says "my sign-in happens in the browser" — a client-side
|
|
121
|
+
* identity provider (Auth0 and the like) leaves the server rendering pages as a guest while the browser knows
|
|
122
|
+
* who this is, and the page changes under the visitor as it hydrates. Leave empty when your backend issues the
|
|
123
|
+
* session itself, which is the case whenever `loginUrl` is your own API.
|
|
124
|
+
*/
|
|
125
|
+
sessionExchangeUrl?: string;
|
|
126
|
+
/**
|
|
127
|
+
* What to do on a page that requires a session while the stored one is being re-checked. `optimistic` (the
|
|
128
|
+
* default) renders from the stored session and signs out if the check disagrees; `strict` waits for the answer,
|
|
129
|
+
* trading a round trip for never showing a signed-in page to someone whose session has just ended.
|
|
130
|
+
*/
|
|
131
|
+
sessionGate?: 'optimistic' | 'strict';
|
|
132
|
+
/** How old a confirmation may get before the SDK re-checks on the next focus. Defaults to 300. */
|
|
133
|
+
sessionRevalidateSeconds?: number;
|
|
112
134
|
};
|
|
113
135
|
rsc?: SchemaRsc;
|
|
114
136
|
pages: Element['id'][];
|
package/dist/types/SdkTypes.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Collection } from './CollectionTypes';
|
|
2
1
|
import { ComponentDefinition } from './ElementTypes';
|
|
3
2
|
import { PluginRaw } from './PluginTypes';
|
|
4
3
|
import { Schema } from './SchemaTypes';
|
|
@@ -9,8 +8,26 @@ export type OfflineDataRaw = {
|
|
|
9
8
|
style: Style;
|
|
10
9
|
plugins?: PluginRaw[];
|
|
11
10
|
segments?: Record<string, Segment>;
|
|
12
|
-
collections?: Record<string, Collection>;
|
|
13
11
|
};
|
|
14
12
|
export type OfflineData = Omit<OfflineDataRaw, 'plugins'> & {
|
|
15
13
|
plugins: Record<string, ComponentDefinition>;
|
|
16
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Where the browser reports what it can only see from the browser — SPA route changes, interactions, the
|
|
17
|
+
* visitor's country/device — and the credential it reports with.
|
|
18
|
+
*
|
|
19
|
+
* The page view that BILLS is never counted from here: a key that ships inside a public page is a key anyone
|
|
20
|
+
* can replay, so quota is metered at the two server-side chokepoints that cost the deployment real bandwidth
|
|
21
|
+
* (the SSR render, and the schema fetch a client-side render makes). This channel feeds the analytics plane
|
|
22
|
+
* only. A render with no config reports nothing at all, which is what an offline export or an embedded widget
|
|
23
|
+
* gets.
|
|
24
|
+
*/
|
|
25
|
+
export type AnalyticsConfig = {
|
|
26
|
+
/** Collector base URL, e.g. `https://api.example.com/v1/collect`. Batches POST to `${endpoint}/batch`. */
|
|
27
|
+
endpoint: string;
|
|
28
|
+
/** Public per-space ingest key, sent as `x-plitzi-ingest-key`. */
|
|
29
|
+
key: string;
|
|
30
|
+
/** The server already counted this page load, so the first render must not be reported again. Set by SSR;
|
|
31
|
+
* a purely client-side render leaves it off and reports its own first view. */
|
|
32
|
+
firstViewCounted?: boolean;
|
|
33
|
+
};
|