Class PayloadBuilder<T, R>
Constructors
Properties
Protected
Optional
_fields
Protected
Optional
_meta
Protected
_schema
_schema: string
Readonly
options
Methods
build
- build(): R
Returns R
meta
- meta(meta: DeepPickStartsWith<T, "$">): this
Returns this
schema
- schema(value: string): void
Returns void
Static
addStorageMeta
- addStorageMeta<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payload: T,
index?: number,
): Promise<WithStorageMeta<T>> Parameters
- payload: T
Optional
index: number
- addStorageMeta<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<WithStorageMeta<T>[]>
Static
dataHash
- dataHash<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payload: T,
): Promise<Lowercase<string>> Returns Promise<Lowercase<string>>
Static
dataHashes
- dataHashes(payloads: undefined): Promise<undefined>
Returns Promise<undefined>
- dataHashes<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<Lowercase<string>[]> Returns Promise<Lowercase<string>[]>
Static
dataHashPairs
- dataHashPairs<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<[T, Lowercase<string>][]> Returns Promise<[T, Lowercase<string>][]>
Static
filterExclude
- filterExclude<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: undefined | T[],
hash: Lowercase<string> | Lowercase<string>[],
): Promise<T[]> Parameters
- payloads: undefined | T[]
- hash: Lowercase<string> | Lowercase<string>[]
Returns Promise<T[]>
Static
filterExcludeByDataHash
- filterExcludeByDataHash<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: undefined | T[],
hash: Lowercase<string> | Lowercase<string>[],
): Promise<T[]> Parameters
- payloads: undefined | T[]
- hash: Lowercase<string> | Lowercase<string>[]
Returns Promise<T[]>
Static
filterIncludeByDataHash
- filterIncludeByDataHash<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: undefined | T[],
hash: Lowercase<string> | Lowercase<string>[],
): Promise<T[]> Parameters
- payloads: undefined | T[]
- hash: Lowercase<string> | Lowercase<string>[]
Returns Promise<T[]>
Static
findByDataHash
- findByDataHash<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: undefined | T[],
hash: Lowercase<string>,
): Promise<undefined | T> Parameters
- payloads: undefined | T[]
- hash: Lowercase<string>
Returns Promise<undefined | T>
Static
hash
- hash<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payload: T,
): Promise<Lowercase<string>> Returns Promise<Lowercase<string>>
Static
hashes
- hashes(payloads: undefined): Promise<undefined>
Returns Promise<undefined>
- hashes<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<Lowercase<string>[]> Returns Promise<Lowercase<string>[]>
Static
hashPairs
- hashPairs<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<[T, Lowercase<string>][]> Returns Promise<[T, Lowercase<string>][]>
Static
omitClientMeta
- omitClientMeta<T extends object>(
payload: T,
maxDepth?: number,
): WithoutClientMeta<T> Parameters
- payload: T
Optional
maxDepth: number
- omitClientMeta<T extends object>(
payloads: T[],
maxDepth?: number,
): WithoutClientMeta<T>[] Parameters
- payloads: T[]
Optional
maxDepth: number
Static
omitMeta
- omitMeta<T extends object>(payload: T, maxDepth?: number): WithoutMeta<T>
Parameters
- payload: T
Optional
maxDepth: number
- omitMeta<T extends object>(payloads: T[], maxDepth?: number): WithoutMeta<T>[]
Parameters
- payloads: T[]
Optional
maxDepth: number
Static
omitPrivateStorageMeta
- omitPrivateStorageMeta<T extends object>(
payload: T,
maxDepth?: number,
): WithoutPrivateStorageMeta<T> Parameters
- payload: T
Optional
maxDepth: number
- omitPrivateStorageMeta<T extends object>(
payloads: T[],
maxDepth?: number,
): WithoutPrivateStorageMeta<T>[] Parameters
- payloads: T[]
Optional
maxDepth: number
Static
omitStorageMeta
- omitStorageMeta<T extends object>(
payload: T,
maxDepth?: number,
): WithoutStorageMeta<T> Parameters
- payload: T
Optional
maxDepth: number
- omitStorageMeta<T extends object>(
payloads: T[],
maxDepth?: number,
): WithoutStorageMeta<T>[] Parameters
- payloads: T[]
Optional
maxDepth: number
Static
toAllHashMap
- toAllHashMap<T extends DeepRestrictToStringKeys<{ schema: string }>>(
payloads: T[],
): Promise<Record<Lowercase<string>, T>> Returns Promise<Record<Lowercase<string>, T>>
Static
toDataHashMap
- toDataHashMap<T extends DeepRestrictToStringKeys<{ schema: string }>>(
objs: T[],
): Promise<Record<Lowercase<string>, T>> Returns Promise<Record<Lowercase<string>, T>>
Static
toHashMap
- toHashMap<T extends DeepRestrictToStringKeys<{ schema: string }>>(
objs: T[],
): Promise<Record<Lowercase<string>, T>> Returns Promise<Record<Lowercase<string>, T>>