npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@junobuild/functions

v0.5.2

Published

JavaScript and TypeScript utilities for Juno Serverless Functions

Downloads

3,294

Readme

npm license

Juno Functions

JavaScript and TypeScript utilities for [Juno] Serverless Functions.

:toolbox: Functions

:gear: createFunctionSchema

Wraps a Zod function schema so that parsing returns the original function instead of Zod's wrapped validator.

Why?

In Zod v4, z.function({...}) normally returns a wrapper that validates both arguments and the return value every time the function is called. If your function's return type is void | Promise<void>, Zod tries to validate it synchronously, which can throw "Encountered Promise during synchronous parse" when the implementation is async.

By using .implement, we tell Zod: “this is the function that satisfies the schema.” That way the schema still validates the function shape at parse time, but the returned value is the original function you passed in — no runtime wrapper, no sync/async mismatch.

Reference: https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912*

| Function | Type | | ---------------------- | ----------------------------------------------------------------------------------------------------------------- | | createFunctionSchema | <T extends z.ZodFunction>(schema: T) => ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]> |

:link: Source

:gear: HookContextSchema

| Function | Type | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | HookContextSchema | <T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: T; }, $strict> |

References:

  • HookContext

:link: Source

:gear: AssertFunctionSchema

| Function | Type | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssertFunctionSchema | <T extends z.ZodTypeAny>(contextSchema: T) => ZodCustom<$InferInnerFunctionType<ZodTuple<[T], null>, ZodVoid>, $InferInnerFunctionType<ZodTuple<[T], null>, ZodVoid>> |

References:

  • AssertFunction

:link: Source

:gear: RunFunctionSchema

| Function | Type | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | RunFunctionSchema | <T extends z.ZodTypeAny>(contextSchema: T) => ZodCustom<$InferInnerFunctionType<ZodTuple<[T], null>, ZodUnion<[ZodPromise<ZodVoid>, ZodVoid]>>, $InferInnerFunctionType<...>> |

References:

  • RunFunction

:link: Source

:gear: DocContextSchema

| Function | Type | | ------------------ | -------------------------------------------------------------------------------------------------------------------- | | DocContextSchema | <T extends z.ZodTypeAny>(dataSchema: T) => ZodObject<{ collection: ZodString; key: ZodString; data: T; }, $strict> |

References:

  • DocContext

:link: Source

:gear: AssertFnSchema

| Function | Type | | ---------------- | ---------------------------------------------------------------------------------------------------------------- | | AssertFnSchema | <T extends z.ZodTypeAny>(assertSchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T> |

:link: Source

:gear: AssertFnOrObjectSchema

| Function | Type | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssertFnOrObjectSchema | <T extends z.ZodTypeAny>(assertSchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]> |

:link: Source

:gear: defineAssert

| Function | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | defineAssert | { <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; } |

:link: Source

:gear: defineAssert

| Function | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | defineAssert | { <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; } |

:link: Source

:gear: defineAssert

| Function | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | defineAssert | { <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; } |

:link: Source

:gear: defineAssert

| Function | Type | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | defineAssert | { <T extends Assert>(assert: T): T; <T extends Assert>(assert: AssertFn<T>): AssertFn<T>; <T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>; } |

:link: Source

:gear: HookFnSchema

| Function | Type | | -------------- | -------------------------------------------------------------------------------------------------------------- | | HookFnSchema | <T extends z.ZodTypeAny>(hookSchema: T) => ZodFunction<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T> |

:link: Source

:gear: HookFnOrObjectSchema

| Function | Type | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | HookFnOrObjectSchema | <T extends z.ZodTypeAny>(hookSchema: T) => ZodUnion<readonly [T, ZodCustom<$InferInnerFunctionType<ZodTuple<[ZodRecord<ZodString, ZodString>], null>, T>, $InferInnerFunctionType<...>>]> |

:link: Source

:gear: defineHook

| Function | Type | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | | defineHook | { <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; } |

:link: Source

:gear: defineHook

| Function | Type | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | | defineHook | { <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; } |

:link: Source

:gear: defineHook

| Function | Type | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | | defineHook | { <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; } |

:link: Source

:gear: defineHook

| Function | Type | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | | defineHook | { <T extends Hook>(hook: T): T; <T extends Hook>(hook: HookFn<T>): HookFn<T>; <T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>; } |

:link: Source

:gear: createListResultsSchema

Represents a list result.

| Function | Type | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | createListResultsSchema | <T extends z.ZodTypeAny>(itemData: T) => ZodObject<{ items: ZodArray<ZodTuple<[ZodString, T], null>>; items_length: ZodBigInt; items_page: ZodOptional<ZodBigInt>; matches_length: ZodBigInt; matches_pages: ZodOptional<...>; }, $strict> |

References:

  • JsListResults

:link: Source

:gear: normalizeCaller

Normalizes a user ID into a raw Uint8Array representation.

| Function | Type | | ----------------- | ---------------------------------------------- | | normalizeCaller | (caller: any) => Uint8Array<ArrayBufferLike> |

Parameters:

  • caller: - The caller identity, either a raw Uint8Array or a Principal instance.

Returns:

The raw user ID as a Uint8Array.

:link: Source

:gear: getAdminControllers

Gets the list of admin controllers from the Satellite.

| Function | Type | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | getAdminControllers | () => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][] |

Returns:

The list of admin controllers.

:link: Source

:gear: getControllers

Gets the list of controllers from the Satellite.

| Function | Type | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | getControllers | () => [Uint8Array<ArrayBufferLike>, { metadata: [string, string][]; created_at: bigint; updated_at: bigint; scope: "write" or "admin" or "submit"; expires_at?: bigint or undefined; }][] |

Returns:

The list of all controllers.

:link: Source

:gear: isAdminController

Checks if the given caller is an admin among the provided controllers.

| Function | Type | | ------------------- | -------------------------------------------- | | isAdminController | (params: ControllerCheckParams) => boolean |

Parameters:

  • params: - The parameters including the caller identity and the list of controllers to verify against.

Returns:

Whether the caller is an admin.

:link: Source

:gear: isController

Checks if the given caller exists among the provided controllers.

| Function | Type | | -------------- | -------------------------------------------- | | isController | (params: ControllerCheckParams) => boolean |

Parameters:

  • params: - The parameters including the caller identity and the list of controllers to verify against.

Returns:

Whether the caller is a controller.

:link: Source

:gear: setDocStore

Stores or updates a document in the datastore.

The data must have been encoded - using encodeDocData - before calling this function.

| Function | Type | | ------------- | ------------------------------------------------------ | | setDocStore | (params: SetDocStoreParams) => DocContext<DocUpsert> |

Parameters:

  • params: - The parameters required to store the document, including the caller, collection, key, and document data.

Returns:

The context of the stored or updated document, including its key, collection, and both the previous and current versions of the document.

:link: Source

:gear: deleteDocStore

Deletes a document from the datastore.

| Function | Type | | ---------------- | --------------------------------------------------------- | | deleteDocStore | (params: DeleteDocStoreParams) => DocContext<OptionDoc> |

Parameters:

  • params: - The parameters required to delete the document, including the caller, collection, key, and the expected version of the document.

Returns:

The context of the deleted document, including its key, collection, and optionally the previous document data if it existed.

:link: Source

:gear: getDocStore

Retrieve a document from the datastore.

| Function | Type | | ------------- | ------------------------------------------ | | getDocStore | (params: GetDocStoreParams) => OptionDoc |

Parameters:

  • params: - The parameters required to get the document.

Returns:

The document if found, or undefined if not.

:link: Source

:gear: listDocsStore

Lists documents from the datastore using optional filtering, pagination, and ordering parameters.

| Function | Type | | --------------- | ----------------------------------------------- | | listDocsStore | (params: ListStoreParams) => ListResults<Doc> |

Parameters:

  • params: - The parameters required to perform the list operation.

Returns:

A list result containing matching documents and pagination metadata.

:link: Source

:gear: countCollectionDocsStore

Counts the number of documents in a specific collection.

| Function | Type | | -------------------------- | -------------------------------------- | | countCollectionDocsStore | (params: CollectionParams) => bigint |

Parameters:

  • params: - The parameters required to count documents in the collection.

Returns:

The total number of documents in the specified collection.

:link: Source

:gear: countDocsStore

Counts the number of documents in a collection matching specific filters and owned by a specific caller.

| Function | Type | | ---------------- | ------------------------------------- | | countDocsStore | (params: ListStoreParams) => bigint |

Parameters:

  • params: - The parameters required to perform the filtered count.

Returns:

The number of documents that match the provided filters.

:link: Source

:gear: deleteDocsStore

Delete documents in a specific collection of the Datastore.

| Function | Type | | ----------------- | ------------------------------------ | | deleteDocsStore | (params: CollectionParams) => void |

Parameters:

  • params: - The parameters required to delete documents in the collection.

:link: Source

:gear: deleteFilteredDocsStore

Delete documents in a collection matching specific filters and owned by a specific caller.

| Function | Type | | ------------------------- | ------------------------------------------------------ | | deleteFilteredDocsStore | (params: ListStoreParams) => DocContext<OptionDoc>[] |

Parameters:

  • params: - The parameters required to perform the filtered deletion.

Returns:

The context resulting of the deletion of documents that match the provided filters.

:link: Source

:gear: decodeDocData

Decodes the raw data of a document into a JavaScript object.

| Function | Type | | --------------- | --------------------------------------------- | | decodeDocData | <T>(data: Uint8Array<ArrayBufferLike>) => T |

Parameters:

  • data: - The raw data to be decoded.

Returns:

The parsed JavaScript object.

:link: Source

:gear: encodeDocData

Encodes a JavaScript object into a raw data format to be applied to a document.

| Function | Type | | --------------- | --------------------------------------------- | | encodeDocData | <T>(data: T) => Uint8Array<ArrayBufferLike> |

Parameters:

  • data: - The data to be encoded.

Returns:

The serialized raw data.

:link: Source

:gear: countCollectionAssetsStore

Counts the number of assets in a specific collection.

| Function | Type | | ---------------------------- | -------------------------------------- | | countCollectionAssetsStore | (params: CollectionParams) => bigint |

Parameters:

  • params: - The parameters required to count assets in the collection.

Returns:

The total number of assets in the specified collection.

:link: Source

:gear: countAssetsStore

Counts the number of assets in a collection matching specific filters and owned by a specific caller.

| Function | Type | | ------------------ | ------------------------------------- | | countAssetsStore | (params: ListStoreParams) => bigint |

Parameters:

  • params: - The parameters required to perform the filtered count.

Returns:

The number of assets that match the provided filters.

:link: Source

:gear: setAssetHandler

Sets or updates an asset in the storage.

| Function | Type | | ----------------- | ----------------------------------------- | | setAssetHandler | (params: SetAssetHandlerParams) => void |

Parameters:

  • params: - The parameters required to set or update an asset.

:link: Source

:gear: deleteAssetStore

Deletes an asset from the storage.

| Function | Type | | ------------------ | ---------------------------------------------- | | deleteAssetStore | (params: GetAssetStoreParams) => OptionAsset |

Parameters:

  • params: - The parameters required to delete the asset.

Returns:

The potentially deleted asset.

:link: Source

:gear: deleteAssetsStore

Delete assets in a specific collection of the Storage.

| Function | Type | | ------------------- | ------------------------------------ | | deleteAssetsStore | (params: CollectionParams) => void |

Parameters:

  • params: - The parameters required to delete assets in the collection.

:link: Source

:gear: deleteFilteredAssetsStore

Delete assets in a collection matching specific filters and owned by a specific caller.

| Function | Type | | --------------------------- | -------------------------------------------- | | deleteFilteredAssetsStore | (params: ListStoreParams) => OptionAsset[] |

Parameters:

  • params: - The parameters required to perform the filtered deletion.

Returns:

The potential asset resulting of the deletion that match the provided filters.

:link: Source

:gear: setAssetTokenStore

Set or update an access token for an asset in a collection's store.

| Function | Type | | -------------------- | -------------------------------------------- | | setAssetTokenStore | (params: SetAssetTokenStoreParams) => void |

Parameters:

  • params: - The parameters required to set the token of the asset.

:link: Source

:gear: getAssetStore

Retrieve an asset from the storage.

| Function | Type | | --------------- | ---------------------------------------------- | | getAssetStore | (params: GetAssetStoreParams) => OptionAsset |

Parameters:

  • params: - The parameters required to get the asset.

Returns:

The asset if found, or undefined if not.

:link: Source

:gear: listAssetsStore

Lists assets (without content) from the storage using optional filtering, pagination, and ordering parameters.

| Function | Type | | ----------------- | ---------------------------------------------------------- | | listAssetsStore | (params: ListStoreParams) => ListResults<AssetNoContent> |

Parameters:

  • params: - The parameters required to perform the list operation.

Returns:

A list result containing matching assets and pagination metadata.

:link: Source

:gear: getContentChunksStore

Retrieves content chunks of an asset.

This function fetches a content chunk of a given asset encoding using the specified parameters.

| Function | Type | | ----------------------- | ------------------------------------------------------------ | | getContentChunksStore | (params: GetContentChunksStoreParams) => Blob or undefined |

Parameters:

  • params: - The parameters including encoding, chunk index, and memory type.

Returns:

The content chunk if found, or undefined if not.

:link: Source

:gear: call

Makes an asynchronous call to a canister on the Internet Computer.

This function encodes the provided arguments using Candid, performs the canister call, and decodes the response based on the expected result types.

| Function | Type | | -------- | --------------------------------------- | | call | <T>(params: CallParams) => Promise<T> |

Parameters:

  • params: - The parameters required for the canister call

Returns:

A promise resolving to the decoded result of the call. Returns undefined if the canister response is empty.

:link: Source

:gear: id

Retrieves the Satellite's Principal ID.

This function is a JavaScript binding for the Rust function ic_cdk::id(), which returns the Principal of the executing canister.

| Function | Type | | -------- | ----------------- | | id | () => Principal |

Returns:

The Principal ID of the Satellite.

:link: Source

:gear: time

Gets current timestamp, in nanoseconds since the epoch (1970-01-01)

This function is a JavaScript binding for the Rust function ic_cdk::time(), which returns the system time publicly exposed and verified part of the IC state tree

| Function | Type | | -------- | -------------- | | time | () => bigint |

Returns:

The current timestamp.

:link: Source

:wrench: Constants

:gear: Uint8ArraySchema

A schema that validates a value is an Uint8Array.

| Constant | Type | | ------------------ | --------------------------------------------------------------------- | | Uint8ArraySchema | ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>> |

:link: Source

:gear: RawPrincipalSchema

| Constant | Type | | -------------------- | --------------------------------------------------------------------- | | RawPrincipalSchema | ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>> |

References:

  • RawPrincipal

:link: Source

:gear: PrincipalSchema

| Constant | Type | | ----------------- | --------------------------------------------- | | PrincipalSchema | ZodCustom<CandidPrincipal, CandidPrincipal> |

References:

  • Principal

:link: Source

:gear: TimestampSchema

| Constant | Type | | ----------------- | ----------- | | TimestampSchema | ZodBigInt |

References:

  • Timestamp

:link: Source

:gear: VersionSchema

| Constant | Type | | --------------- | ----------- | | VersionSchema | ZodBigInt |

References:

  • Version

:link: Source

:gear: RawUserIdSchema

| Constant | Type | | ----------------- | --------------------------------------------------------------------- | | RawUserIdSchema | ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>> |

References:

  • RawUserId

:link: Source

:gear: UserIdSchema

| Constant | Type | | -------------- | --------------------------------------------- | | UserIdSchema | ZodCustom<CandidPrincipal, CandidPrincipal> |

References:

  • UserId

:link: Source

:gear: CollectionSchema

| Constant | Type | | ------------------ | ----------- | | CollectionSchema | ZodString |

References:

  • Collection

:link: Source

:gear: KeySchema

| Constant | Type | | ----------- | ----------- | | KeySchema | ZodString |

References:

  • Key

:link: Source

:gear: DescriptionSchema

| Constant | Type | | ------------------- | ----------- | | DescriptionSchema | ZodString |

References:

  • Description

:link: Source

:gear: CollectionsSchema

| Constant | Type | | ------------------- | ------------------------------------------------------------------------ | | CollectionsSchema | ZodObject<{ collections: ZodReadonly<ZodArray<ZodString>>; }, $strict> |

References:

  • Collections

:link: Source

:gear: RawDataSchema

| Constant | Type | | --------------- | --------------------------------------------------------------------- | | RawDataSchema | ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>> |

References:

  • RawData

:link: Source

:gear: DocSchema

| Constant | Type | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | DocSchema | ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict> |

References:

  • Doc

:link: Source

:gear: OptionDocSchema

| Constant | Type | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OptionDocSchema | ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>> |

References:

  • OptionDoc

:link: Source

:gear: SetDocSchema

| Constant | Type | | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SetDocSchema | ZodObject<{ data: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; description: ZodOptional<ZodString>; version: ZodOptional<...>; }, $strict> |

References:

  • SetDoc

:link: Source

:gear: DelDocSchema

| Constant | Type | | -------------- | ---------------------------------------------------------- | | DelDocSchema | ZodObject<{ version: ZodOptional<ZodBigInt>; }, $strict> |

References:

  • DelDoc

:link: Source

:gear: DocUpsertSchema

| Constant | Type | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | DocUpsertSchema | ZodObject<{ before: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<Uint8Array<...>, Uint8Array<...>>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; after: ZodObject<...>; }, $s... |

References:

  • DocUpsert

:link: Source

:gear: DocAssertSetSchema

| Constant | Type | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | DocAssertSetSchema | ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<...>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }, $strict> |

References:

  • DocAssertSet

:link: Source

:gear: DocAssertDeleteSchema

| Constant | Type | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | DocAssertDeleteSchema | ZodObject<{ current: ZodOptional<ZodObject<{ owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodCustom<...>; description: ZodOptional<...>; created_at: ZodBigInt; updated_at: ZodBigInt; version: ZodOptional<...>; }, $strict>>; proposed: ZodObject<...>; }, $strict> |

References:

  • DocAssertDelete

:link: Source

:gear: OnSetDocContextSchema

| Constant | Type | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OnSetDocContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict> |

References:

  • OnSetDocContext

:link: Source

:gear: OnSetManyDocsContextSchema

| Constant | Type | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | OnSetManyDocsContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>>; }, $strict> |

References:

  • OnSetManyDocsContext

:link: Source

:gear: OnDeleteDocContextSchema

| Constant | Type | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OnDeleteDocContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>; }, $strict> |

References:

  • OnDeleteDocContext

:link: Source

:gear: OnDeleteManyDocsContextSchema

| Constant | Type | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OnDeleteManyDocsContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict> |

References:

  • OnDeleteManyDocsContext

:link: Source

:gear: OnDeleteFilteredDocsContextSchema

| Constant | Type | | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OnDeleteFilteredDocsContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodArray<ZodObject<{ collection: ZodString; key: ZodString; data: ZodOptional<...>; }, $strict>>; }, $strict> |

References:

  • OnDeleteFilteredDocsContext

:link: Source

:gear: AssertSetDocContextSchema

| Constant | Type | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssertSetDocContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict> |

References:

  • AssertSetDocContext

:link: Source

:gear: AssertDeleteDocContextSchema

| Constant | Type | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssertDeleteDocContextSchema | ZodObject<{ caller: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>; data: ZodObject<{ collection: ZodString; key: ZodString; data: ZodObject<...>; }, $strict>; }, $strict> |

References:

  • AssertDeleteDocContext

:link: Source

:gear: SatelliteEnvSchema

| Constant | Type | | -------------------- | --------------------------------- | | SatelliteEnvSchema | ZodRecord<ZodString, ZodString> |

References:

  • SatelliteEnv

:link: Source

:gear: HeaderFieldsSchema

| Constant | Type | | -------------------- | -------------------------------------------------- | | HeaderFieldsSchema | ZodArray<ZodTuple<[ZodString, ZodString], null>> |

References:

  • HeaderFields

:link: Source

:gear: BlobSchema

| Constant | Type | | ------------ | --------------------------------------------------------------------- | | BlobSchema | ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>> |

References:

  • Blob

:link: Source

:gear: AssetKeySchema

| Constant | Type | | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssetKeySchema | ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict> |

References:

  • AssetKey

:link: Source

:gear: AssetEncodingSchema

| Constant | Type | | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssetEncodingSchema | ZodObject<{ modified: ZodBigInt; content_chunks: ZodArray<ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>>; total_length: ZodBigInt; sha256: ZodCustom<...>; }, $strip> |

References:

  • AssetEncoding

:link: Source

:gear: AssetSchema

| Constant | Type | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssetSchema | ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict> |

References:

  • Asset

:link: Source

:gear: AssetNoContentSchema

| Constant | Type | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssetNoContentSchema | ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; encodings: ZodArray<...>; }, $strict> |

References:

  • AssetNoContent

:link: Source

:gear: BatchSchema

| Constant | Type | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | BatchSchema | ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; reference_id: ZodOptional<...>; expires_at: ZodBigInt; encoding_type: ZodOptional<...>;... |

References:

  • Batch

:link: Source

:gear: CommitBatchSchema

| Constant | Type | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | CommitBatchSchema | ZodObject<{ batch_id: ZodBigInt; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; chunk_ids: ZodArray<ZodBigInt>; }, $strict> |

References:

  • CommitBatch

:link: Source

:gear: FullPathSchema

| Constant | Type | | ---------------- | ----------- | | FullPathSchema | ZodString |

References:

  • FullPath

:link: Source

:gear: AssetAccessTokenSchema

| Constant | Type | | ------------------------ | ------------------------ | | AssetAccessTokenSchema | ZodOptional<ZodString> |

References:

  • AssetAccessToken

:link: Source

:gear: OptionAssetSchema

| Constant | Type | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | OptionAssetSchema | ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<...>>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>> |

References:

  • OptionAsset

:link: Source

:gear: AssetAssertUploadSchema

| Constant | Type | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AssetAssertUploadSchema | ZodObject<{ current: ZodOptional<ZodObject<{ key: ZodObject<{ name: ZodString; full_path: ZodString; token: ZodOptional<ZodString>; collection: ZodString; owner: ZodCustom<...>; description: ZodOptional<...>; }, $strict>; ... 4 more ...; version: ZodOptional<...>; }, $strict>>; batch: ZodObject<...>; commit_batch: Z... |

References:

  • AssetAssertUpload

:link: Source

:gear: OnUploadAssetContextSchema

| Constant | Type