@sanity/mutate
Version:
Experimental toolkit for working with Sanity mutations in JavaScript & TypeScript
5 lines • 6.96 kB
TypeScript
import { $ as PathElement, A as SafePath, B as Try, C as ParseInnerExpression, D as ParseProperty, E as ParseObject, F as ToArray, G as AnyEmptyArray, H as Get, I as ToNumber, J as FindBy, K as ByIndex, L as Trim, M as SplitAll, N as StringToPath, O as ParseValue, P as StripError, Q as Path, R as TrimLeft, S as ParseExpressions, T as ParseNumber, U as GetAtPath, V as Unwrap, W as getAtPath, X as Index, Y as FindInArray, Z as KeyedPathElement, _ as MergeInner, a as isKeyElement, b as ParseAllProps, c as startsWith, d as parse, et as PropertyName, f as Concat, g as Merge, h as Err, i as isIndexElement, j as Split, k as Result, l as normalize, m as Digit, n as isElementEqual, o as isKeyedElement, p as ConcatInner, q as ElementType, r as isEqual, s as isPropertyElement, st as Optional, t as isArrayElement, tt as AnyArray, u as stringify, v as Ok, w as ParseKVPair, x as ParseError, y as OnlyDigits, z as TrimRight } from "./_chunks-dts/index.js";
import { A as StringOp, C as Operation, D as ReplaceOp, E as RemoveOp, M as UnassignOp, N as UnsetOp, O as SetIfMissingOp, P as UpsertOp, S as ObjectOp, T as RelativePosition, _ as DiffMatchPatchOp, b as InsertOp, c as NodePatchList, d as SanityDocumentBase, f as Transaction, g as DecOp, h as AssignOp, i as DeleteMutation, j as TruncateOp, k as SetOp, l as PatchMutation, m as ArrayOp, n as CreateMutation, o as Mutation, p as AnyOp, r as CreateOrReplaceMutation, s as NodePatch, t as CreateIfNotExistsMutation, u as PatchOptions, v as IncOp, w as PrimitiveOp, x as NumberOp, y as InsertIfMissingOp } from "./_chunks-dts/types.js";
import { _ as SanitySetPatch, c as SanityCreateOrReplaceMutation, d as SanityDiffMatchPatch, f as SanityIncPatch, g as SanitySetIfMissingPatch, l as SanityDecPatch, m as SanityMutation, o as SanityCreateIfNotExistsMutation, p as SanityInsertPatch, s as SanityCreateMutation, t as Insert, u as SanityDeleteMutation, v as SanityUnsetPatch } from "./_chunks-dts/types2.js";
import { $ as MutationGroup, A as DocumentLoader, B as DocumentUpdate, C as createOptimisticStoreClientBackend, D as createOptimisticStoreInternal, E as createOptimisticStore, F as ReadOnlyDocumentStore, G as ListenerChannelErrorEvent, H as createDocumentUpdateListener, I as createReadOnlyStore, J as ListenerEvent, K as ListenerDisconnectEvent, L as DocumentMutationUpdate, M as InaccessibleDocumentResult, N as InaccessibleReason, O as createDocumentEventListener, P as MapTuple, Q as ListenerWelcomeEvent, R as DocumentReconnectUpdate, S as SanityClientLike, T as OptimisticStoreBackend, U as toTransactions, V as DocumentUpdateListener, W as DocumentMap, X as ListenerReconnectEvent, Y as ListenerMutationEvent, Z as ListenerSyncEvent, _ as DocEndpointResponse, a as SharedListenerListenFn, at as RemoteDocumentEvent, b as createDocumentLoader, c as DocumentIdSetEvent, ct as SubmitResult, d as IdSetListenFn, et as MutationResult, f as InitialEvent, g as toState, h as createIdSetListenerFromClient, i as RequestOptions, it as QueryParams, j as DocumentResult, k as AccessibleDocumentResult, l as DocumentIdSetState, lt as TransactionalMutationGroup, m as createIdSetListener, n as createOptimisticStoreInMemoryBackend, nt as OptimisticDocumentEvent, o as createSharedListener, ot as RemoteMutationEvent, p as InsertMethod, q as ListenerEndpointEvent, r as ListenerOptions, rt as OptimisticStore, s as createSharedListenerFromClient, st as RemoteSyncEvent, t as RawPatch, tt as NonTransactionalMutationGroup, u as FetchDocumentIdsFn, v as FetchDocuments, w as LocalState, x as createDocumentLoaderFromClient, y as OmittedDocument, z as DocumentSyncUpdate } from "./_chunks-dts/index2.js";
export { type AccessibleDocumentResult, type AnyArray, type AnyEmptyArray, type AnyOp, type ArrayOp, type AssignOp, type ByIndex, type Concat, type ConcatInner, type CreateIfNotExistsMutation, type CreateMutation, type CreateOrReplaceMutation, type DecOp, type DeleteMutation, type DiffMatchPatchOp, type Digit, DocEndpointResponse, DocumentIdSetEvent, DocumentIdSetState, type DocumentLoader, type DocumentMap, DocumentMutationUpdate, DocumentReconnectUpdate, type DocumentResult, DocumentSyncUpdate, DocumentUpdate, DocumentUpdateListener, type ElementType, type Err, FetchDocumentIdsFn, FetchDocuments, type FindBy, type FindInArray, type Get, type GetAtPath, IdSetListenFn, type InaccessibleDocumentResult, type InaccessibleReason, type IncOp, type Index, InitialEvent, type Insert, type InsertIfMissingOp, InsertMethod, type InsertOp, type KeyedPathElement, type ListenerChannelErrorEvent, type ListenerDisconnectEvent, type ListenerEndpointEvent, type ListenerEvent, type ListenerMutationEvent, ListenerOptions, type ListenerReconnectEvent, type ListenerSyncEvent, type ListenerWelcomeEvent, LocalState, MapTuple, type Merge, type MergeInner, type Mutation, type MutationGroup, type MutationResult, type NodePatch, type NodePatchList, type NonTransactionalMutationGroup, type NumberOp, type ObjectOp, type Ok, OmittedDocument, type OnlyDigits, type Operation, type OptimisticDocumentEvent, type OptimisticStore, OptimisticStoreBackend, type Optional, type ParseAllProps, type ParseError, type ParseExpressions, type ParseInnerExpression, type ParseKVPair, type ParseNumber, type ParseObject, type ParseProperty, type ParseValue, type PatchMutation, type PatchOptions, type Path, type PathElement, type PrimitiveOp, type PropertyName, type QueryParams, type RawPatch, ReadOnlyDocumentStore, type RelativePosition, type RemoteDocumentEvent, type RemoteMutationEvent, type RemoteSyncEvent, type RemoveOp, type ReplaceOp, RequestOptions, type Result, type SafePath, SanityClientLike, type SanityCreateIfNotExistsMutation, type SanityCreateMutation, type SanityCreateOrReplaceMutation, type SanityDecPatch, type SanityDeleteMutation, type SanityDiffMatchPatch, type SanityDocumentBase, type SanityIncPatch, type SanityInsertPatch, type SanityMutation, type SanitySetIfMissingPatch, type SanitySetPatch, type SanityUnsetPatch, type SetIfMissingOp, type SetOp, SharedListenerListenFn, type Split, type SplitAll, type StringOp, type StringToPath, type StripError, type SubmitResult, type ToArray, type ToNumber, type Transaction, type TransactionalMutationGroup, type Trim, type TrimLeft, type TrimRight, type TruncateOp, type Try, type UnassignOp, type UnsetOp, type Unwrap, type UpsertOp, createDocumentEventListener, createDocumentLoader, createDocumentLoaderFromClient, createDocumentUpdateListener, createIdSetListener, createIdSetListenerFromClient, createOptimisticStore, createOptimisticStoreClientBackend, createOptimisticStoreInMemoryBackend, createOptimisticStoreInternal, createReadOnlyStore, createSharedListener, createSharedListenerFromClient, type getAtPath, type isArrayElement, type isElementEqual, type isEqual, type isIndexElement, type isKeyElement, type isKeyedElement, type isPropertyElement, type normalize, type parse, type startsWith, type stringify, toState, toTransactions };