From 6dd7a92bf57a25bce80e54fc636a9a4adac9821d Mon Sep 17 00:00:00 2001 From: DiGiV3rse <147015881+digiv3rse@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:23:03 +0700 Subject: [PATCH] Add files via upload --- dist/index-BUp9r-lh.d.cts | 2537 +++++ dist/index-BUp9r-lh.d.ts | 2537 +++++ dist/index.cjs | 166 + dist/index.cjs.map | 1 + dist/index.d.cts | 3313 +++++++ dist/index.d.ts | 3313 +++++++ dist/index.js | 12 + dist/index.js.map | 1 + dist/legacy/index.cjs | 26 + dist/legacy/index.cjs.map | 1 + dist/legacy/index.d.cts | 19182 ++++++++++++++++++++++++++++++++++++ dist/legacy/index.d.ts | 19182 ++++++++++++++++++++++++++++++++++++ dist/legacy/index.js | 8 + dist/legacy/index.js.map | 1 + 14 files changed, 50280 insertions(+) create mode 100644 dist/index-BUp9r-lh.d.cts create mode 100644 dist/index-BUp9r-lh.d.ts create mode 100644 dist/index.cjs create mode 100644 dist/index.cjs.map create mode 100644 dist/index.d.cts create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map create mode 100644 dist/legacy/index.cjs create mode 100644 dist/legacy/index.cjs.map create mode 100644 dist/legacy/index.d.cts create mode 100644 dist/legacy/index.d.ts create mode 100644 dist/legacy/index.js create mode 100644 dist/legacy/index.js.map diff --git a/dist/index-BUp9r-lh.d.cts b/dist/index-BUp9r-lh.d.cts new file mode 100644 index 00000000..c839877c --- /dev/null +++ b/dist/index-BUp9r-lh.d.cts @@ -0,0 +1,2537 @@ +import { z } from 'zod'; + +/** + * Branding helper type. + * + * @internal + */ +type Brand = T & { + [K in ReservedName]: TBrand; +}; +/** + * Omits properties from an union type, preserving the union. + * @internal + */ +type DistributiveOmit = T extends any ? Omit : never; +/** + * Overwrites properties from T1 with one from T2 + * @internal + * @example + * ```ts + * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string } + * ``` + */ +type Overwrite = DistributiveOmit & T2; +/** + * Declares an array of at least two elements of the specified type. + */ +type TwoAtLeastArray = [T, T, ...T[]]; +/** + * Beautify the readout of all of the members of that intersection. + * + * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697 + * + * @internal + */ +type Prettify = { + [K in keyof T]: T[K]; +} & {}; +/** + * @internal + */ +type ShapeCheck = T extends { + $schema: string; + digi: unknown; + signature?: Signature; +} ? T : never; + +/** + * A locale identifier. + * + * Syntax: [language]-[region] where: + * - [language] is a lowercase ISO 639-1 language code + * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code + * + * You can pass just the language code, or both the language and region codes. + * + * @example + * - `en` any English + * - `en-US` English as used in the United States + * - `en-GB` English as used in the United Kingdom + */ +type Locale = Brand; +/** + * @internal + */ +declare function toLocale(value: string): Locale; +/** + * @internal + */ +declare const LocaleSchema: z.ZodType; +/** + * A base64 encoded encrypted string value. + */ +type EncryptedString = Brand; +/** + * @internal + */ +declare const EncryptedStringSchema: z.ZodEffects; +/** + * Modifies a schema to accept an encrypted string value as well as its decrypted version. + * + * @internal + */ +declare function encryptable(schema: z.ZodType): z.ZodEffects, z.ZodEffects]>>, EncryptedString | T, unknown>; +/** + * @internal + */ +declare function nonEmpty(schema: z.ZodString): z.ZodType; +/** + * @internal + */ +declare function nonEmptyStringSchema(description?: string): z.ZodType; +/** + * @internal + */ +declare function encryptableStringSchema(description: string): z.ZodEffects, z.ZodEffects]>>, string | EncryptedString, unknown>; +/** + * An arbitrary string or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableString = string | EncryptedString; +/** + * An arbitrary label. + * + * All lowercased, 50 characters max. + */ +type Tag = Brand; +/** + * @internal + */ +declare function toTag(value: string): Tag; +/** + * @internal + */ +declare const TagSchema: z.ZodType; +/** + * A unique DiGi App identifier. + */ +type AppId = Brand; +/** + * @internal + */ +declare function toAppId(value: string): AppId; +/** + * @internal + */ +declare const AppIdSchema: z.ZodType; +/** + * A cryptographic signature. + */ +type Signature = Brand; +/** + * @internal + */ +declare function toSignature(value: string): Signature; +/** + * @internal + */ +declare const SignatureSchema: z.ZodType; +/** + * A markdown text. + */ +type Markdown = Brand; +/** + * @internal + */ +declare function toMarkdown(value: string): Markdown; +/** + * @internal + */ +declare function markdown(schema: z.ZodType): z.ZodType; +/** + * A markdown text or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableMarkdown = Markdown | EncryptedString; +/** + * A Uniform Resource Identifier. + * + * It could be a URL pointing to a specific resource, + * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...). + */ +type URI = Brand; +/** + * @internal + */ +declare function toUri(value: string): URI; +/** + * @internal + */ +declare function uriSchema(description?: string): z.ZodType; +/** + * @internal + */ +declare function encryptableUriSchema(description?: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; +/** + * A URI or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableURI = URI | EncryptedString; +/** + * A Geographic coordinate as subset of Geo URI (RFC 5870). + * + * Currently only supports the `geo:lat,lng` format. + * + * Use the {@link geoUri} helper to create one, do not attempt to create one manually. + * + * @example + * ```ts + * 'geo:40.689247,-74.044502' + * + * 'geo:41.890209,12.492231' + * ``` + * + * @see https://tools.ietf.org/html/rfc5870 + */ +type GeoURI = `geo:${number},${number}`; +/** + * @internal + */ +declare const GeoURISchema: z.ZodEffects; +/** + * A geographic point on the Earth. + */ +type GeoPoint = { + /** + * The latitude in decimal degrees (from -90° to +90°). + */ + lat: number; + /** + * The longitude in decimal degrees (from -180° to +180°). + */ + lng: number; +}; +/** + * @internal + */ +declare const GeoPointSchema: z.ZodType; +/** + * Helper to create a Geo URI from a {@link GeoPoint}. + * + * @category Helpers + * @example + * ```ts + * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502' + * + * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231' + * ``` + */ +declare function geoUri(point: GeoPoint): GeoURI; +/** + * Helper to parse a {@link GeoPoint} from a {@link GeoURI}. + * + * @category Helpers + */ +declare function geoPoint(value: GeoURI): GeoPoint; +/** + * @internal + */ +declare function encryptableGeoUriSchema(description: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | `geo:${number},${number}`, unknown>; +/** + * A Geo URI or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableGeoURI = GeoURI | EncryptedString; +/** + * The address of a physical location. + */ +type PhysicalAddress = { + /** + * The full mailing address formatted for display. + */ + formatted?: EncryptableString; + /** + * The street address including house number, street name, P.O. Box, + * apartment or unit number and extended multi-line address information. + */ + streetAddress?: EncryptableString; + /** + * The city or locality. + */ + locality: EncryptableString; + /** + * The state or region. + */ + region?: EncryptableString; + /** + * The zip or postal code. + */ + postalCode?: EncryptableString; + /** + * The country name component. + */ + country: EncryptableString; +}; +/** + * @internal + */ +declare const PhysicalAddressSchema: z.ZodType; +/** + * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`. + */ +type DateTime = Brand; +/** + * @internal + */ +declare function toDateTime(value: string): DateTime; +/** + * @internal + */ +declare function datetimeSchema(description: string): z.ZodType; +/** + * @internal + */ +declare function encryptableDateTimeSchema(description: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | DateTime, unknown>; +/** + * A DateTime or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableDateTime = DateTime | EncryptedString; +/** + * An EVM compatible address. + */ +type EvmAddress = Brand; +/** + * @internal + */ +declare function toEvmAddress(value: string): EvmAddress; +/** + * @internal + */ +declare const EvmAddressSchema: z.ZodType; +/** + * An EVM compatible Chain Id. + */ +type ChainId = Brand; +/** + * @internal + */ +declare function toChainId(value: number): ChainId; +/** + * @internal + */ +declare const ChainIdSchema: z.ZodType; +/** + * An EVM compatible address on a specific chain. + */ +type NetworkAddress = { + /** + * The chain id. + */ + chainId: ChainId; + /** + * The EVM address. + */ + address: EvmAddress; +}; +/** + * @internal + */ +declare const NetworkAddressSchema: z.ZodType; +/** + * An NFT token identifier. + */ +type TokenId = Brand; +/** + * @internal + */ +declare function toTokenId(value: string): TokenId; +/** + * @internal + */ +declare const TokenIdSchema: z.ZodType; +/** + * A Fungible Tokens. Usually an ERC20 token. + */ +type Asset = { + /** + * The asset contract address. + */ + contract: NetworkAddress; + /** + * The number of decimals of the asset (e.g. 18 for WETH) + */ + decimals: number; +}; +/** + * @internal + */ +declare const AssetSchema: z.ZodType; +/** + * Creates an {@link Asset}. + * + * @internal + */ +declare function asset(contract: NetworkAddressDetails, decimals: number): Asset; +/** + * An amount of a specific asset. + */ +type Amount = { + /** + * The asset. + * + * See {@link asset} helper to create one. + */ + asset: Asset; + /** + * The amount in the smallest unit of the given asset (e.g. wei for ETH). + */ + value: string; +}; +/** + * @internal + */ +declare const AmountSchema: z.ZodType; +type NetworkAddressDetails = { + /** + * The chain id. + */ + chainId: number; + /** + * The EVM address. + */ + address: string; +}; +/** + * @internal + */ +type AmountDetails = { + contract: NetworkAddressDetails; + decimals: number; + value: string; +}; +/** + * @internal + */ +declare function amount(input: AmountDetails): Amount; +/** + * A DiGi Profile identifier. + * + * @example + * ``` + * 0x01 + * ``` + */ +type ProfileId = Brand; +/** + * @internal + */ +declare function toProfileId(value: string): ProfileId; +/** + * @internal + */ +declare const ProfileIdSchema: z.ZodType; +/** + * A DiGi Publication identifier. + * + * No Momoka publications for now. + * + * @example + * ``` + * 0x01-0x01 + * ``` + */ +type PublicationId = Brand; +/** + * @internal + */ +declare function toPublicationId(value: string): PublicationId; +/** + * @internal + */ +declare const PublicationIdSchema: z.ZodType; + +/** + * The display type of a marketplace metadata attribute. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ +declare enum MarketplaceMetadataAttributeDisplayType { + NUMBER = "number", + STRING = "string", + DATE = "date" +} +/** + * A marketplace metadata attribute. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ +type MarketplaceMetadataAttribute = { + value?: string | number | undefined; + display_type?: MarketplaceMetadataAttributeDisplayType | undefined; + trait_type?: string | undefined; +}; +/** + * @internal + */ +declare const MarketplaceMetadataAttributeSchema: z.ZodType; +/** + * The metadata standard for marketplace(s). + * + * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure + */ +type MarketplaceMetadata = { + /** + * A human-readable description of the item. It could be plain text or markdown. + */ + description?: Markdown | null; + /** + * This is the URL that will appear below the asset's image on OpenSea and others etc. + * and will allow users to leave OpenSea and view the item on the site. + */ + external_url?: URI | null; + /** + * Name of the NFT item. + */ + name?: string; + /** + * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ + attributes?: MarketplaceMetadataAttribute[]; + /** + * Marketplaces will store any NFT image here. + */ + image?: URI | null; + /** + * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, + * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. + * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, + * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported. + */ + animation_url?: URI | null; +}; +/** + * @internal + */ +declare const MarketplaceMetadataSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, z.ZodTypeAny, "passthrough">>; + +declare enum EncryptionProvider { + LIT_PROTOCOL = "LIT_PROTOCOL" +} +declare enum NftContractType { + ERC721 = "ERC721", + ERC1155 = "ERC1155" +} +declare enum ConditionType { + NFT_OWNERSHIP = "NFT_OWNERSHIP", + ERC20_OWNERSHIP = "ERC20_OWNERSHIP", + EOA_OWNERSHIP = "EOA_OWNERSHIP", + PROFILE_OWNERSHIP = "PROFILE_OWNERSHIP", + FOLLOW = "FOLLOW", + COLLECT = "COLLECT", + ADVANCED_CONTRACT = "ADVANCED_CONTRACT", + AND = "AND", + OR = "OR" +} +type NftOwnershipCondition = { + type: ConditionType.NFT_OWNERSHIP; + contractType: NftContractType; + contract: NetworkAddress; + tokenIds?: TokenId[]; +}; +/** + * @private + */ +declare function refineNftOwnershipCondition(condition: NftOwnershipCondition, ctx: z.RefinementCtx): void; +/** + * @internal + */ +declare const NftOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + contract: z.ZodType; + contractType: z.ZodNativeEnum; + tokenIds: z.ZodOptional, "many">>; +}, "strip", z.ZodTypeAny, { + type: ConditionType.NFT_OWNERSHIP; + contract: NetworkAddress; + contractType: NftContractType; + tokenIds?: TokenId[] | undefined; +}, { + type: ConditionType.NFT_OWNERSHIP; + contractType: NftContractType; + contract?: unknown; + tokenIds?: unknown[] | undefined; +}>; +declare enum ConditionComparisonOperator { + EQUAL = "EQUAL", + NOT_EQUAL = "NOT_EQUAL", + GREATER_THAN = "GREATER_THAN", + GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL", + LESS_THAN = "LESS_THAN", + LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL" +} +type Erc20OwnershipCondition = { + type: ConditionType.ERC20_OWNERSHIP; + amount: Amount; + condition: ConditionComparisonOperator; +}; +/** + * @internal + */ +declare const Erc20OwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + amount: z.ZodType; + condition: z.ZodNativeEnum; +}, "strip", z.ZodTypeAny, { + type: ConditionType.ERC20_OWNERSHIP; + amount: Amount; + condition: ConditionComparisonOperator; +}, { + type: ConditionType.ERC20_OWNERSHIP; + condition: ConditionComparisonOperator; + amount?: unknown; +}>; +type EoaOwnershipCondition = { + type: ConditionType.EOA_OWNERSHIP; + address: EvmAddress; +}; +/** + * @internal + */ +declare const EoaOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + address: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.EOA_OWNERSHIP; + address: string & { + __type__: "EvmAddress"; + }; +}, { + type: ConditionType.EOA_OWNERSHIP; + address?: unknown; +}>; +type ProfileOwnershipCondition = { + type: ConditionType.PROFILE_OWNERSHIP; + profileId: ProfileId; +}; +/** + * @internal + */ +declare const ProfileOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + profileId: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.PROFILE_OWNERSHIP; + profileId: string & { + __type__: "ProfileId"; + }; +}, { + type: ConditionType.PROFILE_OWNERSHIP; + profileId?: unknown; +}>; +type FollowCondition = { + type: ConditionType.FOLLOW; + follow: ProfileId; +}; +/** + * @internal + */ +declare const FollowConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + follow: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.FOLLOW; + follow: string & { + __type__: "ProfileId"; + }; +}, { + type: ConditionType.FOLLOW; + follow?: unknown; +}>; +type CollectCondition = { + type: ConditionType.COLLECT; + publicationId: PublicationId; + thisPublication: boolean; +}; +/** + * @internal + */ +declare const CollectConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + publicationId: z.ZodType; + thisPublication: z.ZodDefault>; +}, "strip", z.ZodTypeAny, { + type: ConditionType.COLLECT; + publicationId: string & { + __type__: "PublicationId"; + }; + thisPublication: boolean; +}, { + type: ConditionType.COLLECT; + publicationId?: unknown; + thisPublication?: boolean | undefined; +}>; +type AdvancedContractCondition = { + type: ConditionType.ADVANCED_CONTRACT; + contract: NetworkAddress; + functionName: string; + abi: string; + params: string[]; + comparison: ConditionComparisonOperator; + value: string; +}; +/** + * @internal + */ +declare const AdvancedContractConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + contract: z.ZodType; + functionName: z.ZodString; + abi: z.ZodString; + params: z.ZodArray; + comparison: z.ZodNativeEnum; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + params: string[]; + type: ConditionType.ADVANCED_CONTRACT; + contract: NetworkAddress; + functionName: string; + abi: string; + comparison: ConditionComparisonOperator; +}, { + value: string; + params: string[]; + type: ConditionType.ADVANCED_CONTRACT; + functionName: string; + abi: string; + comparison: ConditionComparisonOperator; + contract?: unknown; +}>; +type SimpleCondition = CollectCondition | AdvancedContractCondition | EoaOwnershipCondition | Erc20OwnershipCondition | FollowCondition | NftOwnershipCondition | ProfileOwnershipCondition; +type BaseCondition = { + type: ConditionType; +}; +type ComposableConditionSchema = z.ZodObject<{ + type: z.ZodTypeAny; +} & z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, T>; +type AndCondition = { + type: ConditionType.AND; + criteria: TwoAtLeastArray; +}; +/** + * @internal + */ +declare const AndConditionSchema: ComposableConditionSchema>; +type OrCondition = { + type: ConditionType.OR; + criteria: TwoAtLeastArray; +}; +/** + * @internal + */ +declare const OrConditionSchema: ComposableConditionSchema>; +type AnyCondition = SimpleCondition | AndCondition | OrCondition; +type AccessCondition = OrCondition; +/** + * @internal + */ +declare const AccessConditionSchema: z.ZodType; +/** + * A symmetric encryption key. + */ +type LitEncryptionKey = Brand; +/** + * @internal + */ +declare function toLitEncryptionKey(value: string): LitEncryptionKey; +/** + * @internal + */ +declare const LitEncryptionKeySchema: z.Schema; +/** + * @internal + */ +declare const EncryptedPaths: z.ZodArray, "many">; +type EncryptedPaths = z.infer; +type LitEncryptionStrategy = { + provider: EncryptionProvider; + encryptionKey: LitEncryptionKey; + accessCondition: AccessCondition; + encryptedPaths: string[]; +}; +/** + * @internal + */ +declare const LitEncryptionStrategySchema: z.ZodObject<{ + provider: z.ZodLiteral; + encryptionKey: z.ZodType; + accessCondition: z.ZodType; + encryptedPaths: z.ZodArray, "many">; +}, "strip", z.ZodTypeAny, { + provider: EncryptionProvider; + encryptionKey: string & { + __type__: "LitEncryptionKey"; + }; + accessCondition: AccessCondition; + encryptedPaths: string[]; +}, { + provider: EncryptionProvider; + encryptionKey: string; + accessCondition: object; + encryptedPaths: unknown[]; +}>; +/** + * The publication encryption strategy. + * + * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly. + */ +type PublicationEncryptionStrategy = LitEncryptionStrategy; +/** + * @internal + */ +declare const PublicationEncryptionStrategySchema: z.ZodType; + +/** + * The type of a metadata attribute. + */ +declare enum MetadataAttributeType { + BOOLEAN = "Boolean", + DATE = "Date", + NUMBER = "Number", + STRING = "String", + JSON = "JSON" +} +type BooleanAttribute = { + /** + * A JS boolean value serialized as string. It's consumer responsibility to parse it. + */ + value: 'true' | 'false'; + /** + * Union discriminant. + */ + type: MetadataAttributeType.BOOLEAN; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const BooleanAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; +}, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; +}, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; +}>; +type DateAttribute = { + /** + * A valid ISO 8601 date string. It's consumer responsibility to parse it. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.DATE; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const DateAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; +}, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; +}>; +type NumberAttribute = { + /** + * A valid JS number serialized as string. It's consumer responsibility to parse it. + * + * @example + * ```ts + * '42' + * + * '42n' + * + * '42.42' + * ``` + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.NUMBER; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const NumberAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; +}, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; +}>; +type StringAttribute = { + /** + * Any string value. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.STRING; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const StringAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; +}, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; +}>; +type JSONAttribute = { + /** + * A JSON string. It's consumer responsibility to validate and parse it. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.JSON; + /** + * Union discriminant. + */ + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const JSONAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; +}, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; +}>; +/** + * A DiGi metadata attribute. + */ +type MetadataAttribute = BooleanAttribute | DateAttribute | NumberAttribute | StringAttribute | JSONAttribute; +declare const MetadataAttributeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; +}, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; +}, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; +}, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; +}, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; +}, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; +}, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; +}>]>; + +/** + * The main focus of a publication. + */ +declare enum PublicationMainFocus { + VIDEO = "VIDEO", + IMAGE = "IMAGE", + ARTICLE = "ARTICLE", + TEXT_ONLY = "TEXT_ONLY", + AUDIO = "AUDIO", + LINK = "LINK", + EMBED = "EMBED", + CHECKING_IN = "CHECKING_IN", + EVENT = "EVENT", + MINT = "MINT", + TRANSACTION = "TRANSACTION", + LIVESTREAM = "LIVESTREAM", + SHORT_VIDEO = "SHORT_VIDEO", + THREE_D = "3D", + STORY = "STORY", + SPACE = "SPACE" +} + +declare enum PublicationContentWarning { + NSFW = "NSFW", + SENSITIVE = "SENSITIVE", + SPOILER = "SPOILER" +} +/** + * Common fields of a DiGi primary publication. + */ +type PublicationMetadataCommon = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this publication belongs to. + */ + appId?: AppId; + /** + * Determine if the publication should not be shown in any feed. + * + * @defaultValue false + */ + hideFromFeed?: boolean; + /** + * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. + * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged. + */ + attributes?: MetadataAttribute[]; + /** + * The locale of the metadata. + */ + locale: Locale; + /** + * The encryption strategy used to encrypt the publication. + * + * If not present, the publication is presumed to be unencrypted. + */ + encryptedWith?: PublicationEncryptionStrategy; + /** + * An arbitrary list of tags. + */ + tags?: Tag[]; + /** + * Specify a content warning. + */ + contentWarning?: PublicationContentWarning; +}; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function metadataDetailsWith | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>; +}>(augmentation: Augmentation): z.ZodObject; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T ? { [k in keyof T]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_6 ? { [k in keyof T_6]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>, (z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_9 ? { [k in keyof T_9]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_7 extends object ? { [k_2 in keyof T_7]: undefined extends z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_8 ? { [k in keyof T_8]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_2] ? never : k_2; } : never)[keyof Augmentation | Exclude<"attributes", keyof Augmentation> | Exclude<"id", keyof Augmentation> | Exclude<"appId", keyof Augmentation> | Exclude<"hideFromFeed", keyof Augmentation> | Exclude<"locale", keyof Augmentation> | Exclude<"encryptedWith", keyof Augmentation> | Exclude<"tags", keyof Augmentation> | Exclude<"contentWarning", keyof Augmentation>]> extends infer T_1 ? { [k_1 in keyof T_1]: z.objectUtil.addQuestionMarks; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_2 ? { [k in keyof T_2]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>, (z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_5 ? { [k in keyof T_5]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_3 extends object ? { [k_2 in keyof T_3]: undefined extends z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_4 ? { [k in keyof T_4]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_2] ? never : k_2; } : never)[keyof Augmentation | Exclude<"attributes", keyof Augmentation> | Exclude<"id", keyof Augmentation> | Exclude<"appId", keyof Augmentation> | Exclude<"hideFromFeed", keyof Augmentation> | Exclude<"locale", keyof Augmentation> | Exclude<"encryptedWith", keyof Augmentation> | Exclude<"tags", keyof Augmentation> | Exclude<"contentWarning", keyof Augmentation>]>[k_1]; } : never, z.baseObjectInputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_12 ? { [k in keyof T_12]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_10 ? { [k_3 in keyof T_10]: z.baseObjectInputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_11 ? { [k in keyof T_11]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_3]; } : never>; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function publicationWith; + digi: ReturnType; +}>(augmentation: Augmentation): z.ZodObject>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T ? { [k in keyof T]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T_1 ? { [k in keyof T_1]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T_2 ? { [k in keyof T_2]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, z.ZodTypeAny, "passthrough">>; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function mainContentFocus(focus: T): z.ZodLiteral; +declare function mainContentFocus(...focuses: [T, O]): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>; +/** + * @internal + */ +declare function optionalContentSchema(): z.ZodOptional, z.ZodEffects]>>, EncryptedString | Markdown, unknown>>; + +export { toLocale as $, type AppId as A, type Brand as B, type ChainId as C, type DistributiveOmit as D, type EncryptableURI as E, type FollowCondition as F, MarketplaceMetadataAttributeSchema as G, MarketplaceMetadataSchema as H, type BooleanAttribute as I, BooleanAttributeSchema as J, type DateAttribute as K, DateAttributeSchema as L, type MetadataAttribute as M, type NetworkAddressDetails as N, type OrCondition as O, type PublicationMetadataCommon as P, type NumberAttribute as Q, NumberAttributeSchema as R, type Signature as S, type TwoAtLeastArray as T, type URI as U, type StringAttribute as V, StringAttributeSchema as W, type JSONAttribute as X, JSONAttributeSchema as Y, MetadataAttributeSchema as Z, type Locale as _, type EncryptableString as a, Erc20OwnershipConditionSchema as a$, LocaleSchema as a0, EncryptedStringSchema as a1, encryptable as a2, nonEmpty as a3, nonEmptyStringSchema as a4, encryptableStringSchema as a5, type Tag as a6, toTag as a7, TagSchema as a8, toAppId as a9, NetworkAddressSchema as aA, type TokenId as aB, toTokenId as aC, TokenIdSchema as aD, type Asset as aE, AssetSchema as aF, asset as aG, type Amount as aH, AmountSchema as aI, type AmountDetails as aJ, amount as aK, type ProfileId as aL, toProfileId as aM, ProfileIdSchema as aN, type PublicationId as aO, toPublicationId as aP, PublicationIdSchema as aQ, PublicationContentWarning as aR, metadataDetailsWith as aS, publicationWith as aT, mainContentFocus as aU, optionalContentSchema as aV, EncryptionProvider as aW, NftContractType as aX, ConditionType as aY, refineNftOwnershipCondition as aZ, NftOwnershipConditionSchema as a_, AppIdSchema as aa, toSignature as ab, SignatureSchema as ac, toMarkdown as ad, markdown as ae, toUri as af, uriSchema as ag, encryptableUriSchema as ah, type GeoURI as ai, GeoURISchema as aj, type GeoPoint as ak, GeoPointSchema as al, geoUri as am, geoPoint as an, encryptableGeoUriSchema as ao, PhysicalAddressSchema as ap, type DateTime as aq, toDateTime as ar, datetimeSchema as as, encryptableDateTimeSchema as at, type EvmAddress as au, toEvmAddress as av, EvmAddressSchema as aw, toChainId as ax, ChainIdSchema as ay, type NetworkAddress as az, MetadataAttributeType as b, EoaOwnershipConditionSchema as b0, ProfileOwnershipConditionSchema as b1, FollowConditionSchema as b2, CollectConditionSchema as b3, AdvancedContractConditionSchema as b4, AndConditionSchema as b5, OrConditionSchema as b6, AccessConditionSchema as b7, type LitEncryptionKey as b8, toLitEncryptionKey as b9, LitEncryptionKeySchema as ba, EncryptedPaths as bb, type LitEncryptionStrategy as bc, LitEncryptionStrategySchema as bd, type PublicationEncryptionStrategy as be, PublicationEncryptionStrategySchema as bf, type EncryptedString as c, PublicationMainFocus as d, type EncryptableMarkdown as e, type MarketplaceMetadata as f, type Markdown as g, type MarketplaceMetadataAttribute as h, type EncryptableGeoURI as i, type PhysicalAddress as j, type EncryptableDateTime as k, type ShapeCheck as l, type CollectCondition as m, type EoaOwnershipCondition as n, ConditionComparisonOperator as o, type Erc20OwnershipCondition as p, type NftOwnershipCondition as q, type ProfileOwnershipCondition as r, type AdvancedContractCondition as s, type SimpleCondition as t, type AndCondition as u, type AnyCondition as v, type AccessCondition as w, type Overwrite as x, type Prettify as y, MarketplaceMetadataAttributeDisplayType as z }; diff --git a/dist/index-BUp9r-lh.d.ts b/dist/index-BUp9r-lh.d.ts new file mode 100644 index 00000000..c839877c --- /dev/null +++ b/dist/index-BUp9r-lh.d.ts @@ -0,0 +1,2537 @@ +import { z } from 'zod'; + +/** + * Branding helper type. + * + * @internal + */ +type Brand = T & { + [K in ReservedName]: TBrand; +}; +/** + * Omits properties from an union type, preserving the union. + * @internal + */ +type DistributiveOmit = T extends any ? Omit : never; +/** + * Overwrites properties from T1 with one from T2 + * @internal + * @example + * ```ts + * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string } + * ``` + */ +type Overwrite = DistributiveOmit & T2; +/** + * Declares an array of at least two elements of the specified type. + */ +type TwoAtLeastArray = [T, T, ...T[]]; +/** + * Beautify the readout of all of the members of that intersection. + * + * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697 + * + * @internal + */ +type Prettify = { + [K in keyof T]: T[K]; +} & {}; +/** + * @internal + */ +type ShapeCheck = T extends { + $schema: string; + digi: unknown; + signature?: Signature; +} ? T : never; + +/** + * A locale identifier. + * + * Syntax: [language]-[region] where: + * - [language] is a lowercase ISO 639-1 language code + * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code + * + * You can pass just the language code, or both the language and region codes. + * + * @example + * - `en` any English + * - `en-US` English as used in the United States + * - `en-GB` English as used in the United Kingdom + */ +type Locale = Brand; +/** + * @internal + */ +declare function toLocale(value: string): Locale; +/** + * @internal + */ +declare const LocaleSchema: z.ZodType; +/** + * A base64 encoded encrypted string value. + */ +type EncryptedString = Brand; +/** + * @internal + */ +declare const EncryptedStringSchema: z.ZodEffects; +/** + * Modifies a schema to accept an encrypted string value as well as its decrypted version. + * + * @internal + */ +declare function encryptable(schema: z.ZodType): z.ZodEffects, z.ZodEffects]>>, EncryptedString | T, unknown>; +/** + * @internal + */ +declare function nonEmpty(schema: z.ZodString): z.ZodType; +/** + * @internal + */ +declare function nonEmptyStringSchema(description?: string): z.ZodType; +/** + * @internal + */ +declare function encryptableStringSchema(description: string): z.ZodEffects, z.ZodEffects]>>, string | EncryptedString, unknown>; +/** + * An arbitrary string or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableString = string | EncryptedString; +/** + * An arbitrary label. + * + * All lowercased, 50 characters max. + */ +type Tag = Brand; +/** + * @internal + */ +declare function toTag(value: string): Tag; +/** + * @internal + */ +declare const TagSchema: z.ZodType; +/** + * A unique DiGi App identifier. + */ +type AppId = Brand; +/** + * @internal + */ +declare function toAppId(value: string): AppId; +/** + * @internal + */ +declare const AppIdSchema: z.ZodType; +/** + * A cryptographic signature. + */ +type Signature = Brand; +/** + * @internal + */ +declare function toSignature(value: string): Signature; +/** + * @internal + */ +declare const SignatureSchema: z.ZodType; +/** + * A markdown text. + */ +type Markdown = Brand; +/** + * @internal + */ +declare function toMarkdown(value: string): Markdown; +/** + * @internal + */ +declare function markdown(schema: z.ZodType): z.ZodType; +/** + * A markdown text or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableMarkdown = Markdown | EncryptedString; +/** + * A Uniform Resource Identifier. + * + * It could be a URL pointing to a specific resource, + * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...). + */ +type URI = Brand; +/** + * @internal + */ +declare function toUri(value: string): URI; +/** + * @internal + */ +declare function uriSchema(description?: string): z.ZodType; +/** + * @internal + */ +declare function encryptableUriSchema(description?: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; +/** + * A URI or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableURI = URI | EncryptedString; +/** + * A Geographic coordinate as subset of Geo URI (RFC 5870). + * + * Currently only supports the `geo:lat,lng` format. + * + * Use the {@link geoUri} helper to create one, do not attempt to create one manually. + * + * @example + * ```ts + * 'geo:40.689247,-74.044502' + * + * 'geo:41.890209,12.492231' + * ``` + * + * @see https://tools.ietf.org/html/rfc5870 + */ +type GeoURI = `geo:${number},${number}`; +/** + * @internal + */ +declare const GeoURISchema: z.ZodEffects; +/** + * A geographic point on the Earth. + */ +type GeoPoint = { + /** + * The latitude in decimal degrees (from -90° to +90°). + */ + lat: number; + /** + * The longitude in decimal degrees (from -180° to +180°). + */ + lng: number; +}; +/** + * @internal + */ +declare const GeoPointSchema: z.ZodType; +/** + * Helper to create a Geo URI from a {@link GeoPoint}. + * + * @category Helpers + * @example + * ```ts + * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502' + * + * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231' + * ``` + */ +declare function geoUri(point: GeoPoint): GeoURI; +/** + * Helper to parse a {@link GeoPoint} from a {@link GeoURI}. + * + * @category Helpers + */ +declare function geoPoint(value: GeoURI): GeoPoint; +/** + * @internal + */ +declare function encryptableGeoUriSchema(description: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | `geo:${number},${number}`, unknown>; +/** + * A Geo URI or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableGeoURI = GeoURI | EncryptedString; +/** + * The address of a physical location. + */ +type PhysicalAddress = { + /** + * The full mailing address formatted for display. + */ + formatted?: EncryptableString; + /** + * The street address including house number, street name, P.O. Box, + * apartment or unit number and extended multi-line address information. + */ + streetAddress?: EncryptableString; + /** + * The city or locality. + */ + locality: EncryptableString; + /** + * The state or region. + */ + region?: EncryptableString; + /** + * The zip or postal code. + */ + postalCode?: EncryptableString; + /** + * The country name component. + */ + country: EncryptableString; +}; +/** + * @internal + */ +declare const PhysicalAddressSchema: z.ZodType; +/** + * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`. + */ +type DateTime = Brand; +/** + * @internal + */ +declare function toDateTime(value: string): DateTime; +/** + * @internal + */ +declare function datetimeSchema(description: string): z.ZodType; +/** + * @internal + */ +declare function encryptableDateTimeSchema(description: string): z.ZodEffects, z.ZodEffects]>>, EncryptedString | DateTime, unknown>; +/** + * A DateTime or its encrypted version. + * + * For example in the context of a token-gated publication, fields of this type are encrypted. + */ +type EncryptableDateTime = DateTime | EncryptedString; +/** + * An EVM compatible address. + */ +type EvmAddress = Brand; +/** + * @internal + */ +declare function toEvmAddress(value: string): EvmAddress; +/** + * @internal + */ +declare const EvmAddressSchema: z.ZodType; +/** + * An EVM compatible Chain Id. + */ +type ChainId = Brand; +/** + * @internal + */ +declare function toChainId(value: number): ChainId; +/** + * @internal + */ +declare const ChainIdSchema: z.ZodType; +/** + * An EVM compatible address on a specific chain. + */ +type NetworkAddress = { + /** + * The chain id. + */ + chainId: ChainId; + /** + * The EVM address. + */ + address: EvmAddress; +}; +/** + * @internal + */ +declare const NetworkAddressSchema: z.ZodType; +/** + * An NFT token identifier. + */ +type TokenId = Brand; +/** + * @internal + */ +declare function toTokenId(value: string): TokenId; +/** + * @internal + */ +declare const TokenIdSchema: z.ZodType; +/** + * A Fungible Tokens. Usually an ERC20 token. + */ +type Asset = { + /** + * The asset contract address. + */ + contract: NetworkAddress; + /** + * The number of decimals of the asset (e.g. 18 for WETH) + */ + decimals: number; +}; +/** + * @internal + */ +declare const AssetSchema: z.ZodType; +/** + * Creates an {@link Asset}. + * + * @internal + */ +declare function asset(contract: NetworkAddressDetails, decimals: number): Asset; +/** + * An amount of a specific asset. + */ +type Amount = { + /** + * The asset. + * + * See {@link asset} helper to create one. + */ + asset: Asset; + /** + * The amount in the smallest unit of the given asset (e.g. wei for ETH). + */ + value: string; +}; +/** + * @internal + */ +declare const AmountSchema: z.ZodType; +type NetworkAddressDetails = { + /** + * The chain id. + */ + chainId: number; + /** + * The EVM address. + */ + address: string; +}; +/** + * @internal + */ +type AmountDetails = { + contract: NetworkAddressDetails; + decimals: number; + value: string; +}; +/** + * @internal + */ +declare function amount(input: AmountDetails): Amount; +/** + * A DiGi Profile identifier. + * + * @example + * ``` + * 0x01 + * ``` + */ +type ProfileId = Brand; +/** + * @internal + */ +declare function toProfileId(value: string): ProfileId; +/** + * @internal + */ +declare const ProfileIdSchema: z.ZodType; +/** + * A DiGi Publication identifier. + * + * No Momoka publications for now. + * + * @example + * ``` + * 0x01-0x01 + * ``` + */ +type PublicationId = Brand; +/** + * @internal + */ +declare function toPublicationId(value: string): PublicationId; +/** + * @internal + */ +declare const PublicationIdSchema: z.ZodType; + +/** + * The display type of a marketplace metadata attribute. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ +declare enum MarketplaceMetadataAttributeDisplayType { + NUMBER = "number", + STRING = "string", + DATE = "date" +} +/** + * A marketplace metadata attribute. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ +type MarketplaceMetadataAttribute = { + value?: string | number | undefined; + display_type?: MarketplaceMetadataAttributeDisplayType | undefined; + trait_type?: string | undefined; +}; +/** + * @internal + */ +declare const MarketplaceMetadataAttributeSchema: z.ZodType; +/** + * The metadata standard for marketplace(s). + * + * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure + */ +type MarketplaceMetadata = { + /** + * A human-readable description of the item. It could be plain text or markdown. + */ + description?: Markdown | null; + /** + * This is the URL that will appear below the asset's image on OpenSea and others etc. + * and will allow users to leave OpenSea and view the item on the site. + */ + external_url?: URI | null; + /** + * Name of the NFT item. + */ + name?: string; + /** + * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item. + * + * @see https://docs.opensea.io/docs/metadata-standards#attributes + */ + attributes?: MarketplaceMetadataAttribute[]; + /** + * Marketplaces will store any NFT image here. + */ + image?: URI | null; + /** + * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, + * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. + * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, + * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported. + */ + animation_url?: URI | null; +}; +/** + * @internal + */ +declare const MarketplaceMetadataSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, z.ZodTypeAny, "passthrough">>; + +declare enum EncryptionProvider { + LIT_PROTOCOL = "LIT_PROTOCOL" +} +declare enum NftContractType { + ERC721 = "ERC721", + ERC1155 = "ERC1155" +} +declare enum ConditionType { + NFT_OWNERSHIP = "NFT_OWNERSHIP", + ERC20_OWNERSHIP = "ERC20_OWNERSHIP", + EOA_OWNERSHIP = "EOA_OWNERSHIP", + PROFILE_OWNERSHIP = "PROFILE_OWNERSHIP", + FOLLOW = "FOLLOW", + COLLECT = "COLLECT", + ADVANCED_CONTRACT = "ADVANCED_CONTRACT", + AND = "AND", + OR = "OR" +} +type NftOwnershipCondition = { + type: ConditionType.NFT_OWNERSHIP; + contractType: NftContractType; + contract: NetworkAddress; + tokenIds?: TokenId[]; +}; +/** + * @private + */ +declare function refineNftOwnershipCondition(condition: NftOwnershipCondition, ctx: z.RefinementCtx): void; +/** + * @internal + */ +declare const NftOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + contract: z.ZodType; + contractType: z.ZodNativeEnum; + tokenIds: z.ZodOptional, "many">>; +}, "strip", z.ZodTypeAny, { + type: ConditionType.NFT_OWNERSHIP; + contract: NetworkAddress; + contractType: NftContractType; + tokenIds?: TokenId[] | undefined; +}, { + type: ConditionType.NFT_OWNERSHIP; + contractType: NftContractType; + contract?: unknown; + tokenIds?: unknown[] | undefined; +}>; +declare enum ConditionComparisonOperator { + EQUAL = "EQUAL", + NOT_EQUAL = "NOT_EQUAL", + GREATER_THAN = "GREATER_THAN", + GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL", + LESS_THAN = "LESS_THAN", + LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL" +} +type Erc20OwnershipCondition = { + type: ConditionType.ERC20_OWNERSHIP; + amount: Amount; + condition: ConditionComparisonOperator; +}; +/** + * @internal + */ +declare const Erc20OwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + amount: z.ZodType; + condition: z.ZodNativeEnum; +}, "strip", z.ZodTypeAny, { + type: ConditionType.ERC20_OWNERSHIP; + amount: Amount; + condition: ConditionComparisonOperator; +}, { + type: ConditionType.ERC20_OWNERSHIP; + condition: ConditionComparisonOperator; + amount?: unknown; +}>; +type EoaOwnershipCondition = { + type: ConditionType.EOA_OWNERSHIP; + address: EvmAddress; +}; +/** + * @internal + */ +declare const EoaOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + address: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.EOA_OWNERSHIP; + address: string & { + __type__: "EvmAddress"; + }; +}, { + type: ConditionType.EOA_OWNERSHIP; + address?: unknown; +}>; +type ProfileOwnershipCondition = { + type: ConditionType.PROFILE_OWNERSHIP; + profileId: ProfileId; +}; +/** + * @internal + */ +declare const ProfileOwnershipConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + profileId: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.PROFILE_OWNERSHIP; + profileId: string & { + __type__: "ProfileId"; + }; +}, { + type: ConditionType.PROFILE_OWNERSHIP; + profileId?: unknown; +}>; +type FollowCondition = { + type: ConditionType.FOLLOW; + follow: ProfileId; +}; +/** + * @internal + */ +declare const FollowConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + follow: z.ZodType; +}, "strip", z.ZodTypeAny, { + type: ConditionType.FOLLOW; + follow: string & { + __type__: "ProfileId"; + }; +}, { + type: ConditionType.FOLLOW; + follow?: unknown; +}>; +type CollectCondition = { + type: ConditionType.COLLECT; + publicationId: PublicationId; + thisPublication: boolean; +}; +/** + * @internal + */ +declare const CollectConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + publicationId: z.ZodType; + thisPublication: z.ZodDefault>; +}, "strip", z.ZodTypeAny, { + type: ConditionType.COLLECT; + publicationId: string & { + __type__: "PublicationId"; + }; + thisPublication: boolean; +}, { + type: ConditionType.COLLECT; + publicationId?: unknown; + thisPublication?: boolean | undefined; +}>; +type AdvancedContractCondition = { + type: ConditionType.ADVANCED_CONTRACT; + contract: NetworkAddress; + functionName: string; + abi: string; + params: string[]; + comparison: ConditionComparisonOperator; + value: string; +}; +/** + * @internal + */ +declare const AdvancedContractConditionSchema: z.ZodObject<{ + type: z.ZodLiteral; + contract: z.ZodType; + functionName: z.ZodString; + abi: z.ZodString; + params: z.ZodArray; + comparison: z.ZodNativeEnum; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + params: string[]; + type: ConditionType.ADVANCED_CONTRACT; + contract: NetworkAddress; + functionName: string; + abi: string; + comparison: ConditionComparisonOperator; +}, { + value: string; + params: string[]; + type: ConditionType.ADVANCED_CONTRACT; + functionName: string; + abi: string; + comparison: ConditionComparisonOperator; + contract?: unknown; +}>; +type SimpleCondition = CollectCondition | AdvancedContractCondition | EoaOwnershipCondition | Erc20OwnershipCondition | FollowCondition | NftOwnershipCondition | ProfileOwnershipCondition; +type BaseCondition = { + type: ConditionType; +}; +type ComposableConditionSchema = z.ZodObject<{ + type: z.ZodTypeAny; +} & z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, T>; +type AndCondition = { + type: ConditionType.AND; + criteria: TwoAtLeastArray; +}; +/** + * @internal + */ +declare const AndConditionSchema: ComposableConditionSchema>; +type OrCondition = { + type: ConditionType.OR; + criteria: TwoAtLeastArray; +}; +/** + * @internal + */ +declare const OrConditionSchema: ComposableConditionSchema>; +type AnyCondition = SimpleCondition | AndCondition | OrCondition; +type AccessCondition = OrCondition; +/** + * @internal + */ +declare const AccessConditionSchema: z.ZodType; +/** + * A symmetric encryption key. + */ +type LitEncryptionKey = Brand; +/** + * @internal + */ +declare function toLitEncryptionKey(value: string): LitEncryptionKey; +/** + * @internal + */ +declare const LitEncryptionKeySchema: z.Schema; +/** + * @internal + */ +declare const EncryptedPaths: z.ZodArray, "many">; +type EncryptedPaths = z.infer; +type LitEncryptionStrategy = { + provider: EncryptionProvider; + encryptionKey: LitEncryptionKey; + accessCondition: AccessCondition; + encryptedPaths: string[]; +}; +/** + * @internal + */ +declare const LitEncryptionStrategySchema: z.ZodObject<{ + provider: z.ZodLiteral; + encryptionKey: z.ZodType; + accessCondition: z.ZodType; + encryptedPaths: z.ZodArray, "many">; +}, "strip", z.ZodTypeAny, { + provider: EncryptionProvider; + encryptionKey: string & { + __type__: "LitEncryptionKey"; + }; + accessCondition: AccessCondition; + encryptedPaths: string[]; +}, { + provider: EncryptionProvider; + encryptionKey: string; + accessCondition: object; + encryptedPaths: unknown[]; +}>; +/** + * The publication encryption strategy. + * + * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly. + */ +type PublicationEncryptionStrategy = LitEncryptionStrategy; +/** + * @internal + */ +declare const PublicationEncryptionStrategySchema: z.ZodType; + +/** + * The type of a metadata attribute. + */ +declare enum MetadataAttributeType { + BOOLEAN = "Boolean", + DATE = "Date", + NUMBER = "Number", + STRING = "String", + JSON = "JSON" +} +type BooleanAttribute = { + /** + * A JS boolean value serialized as string. It's consumer responsibility to parse it. + */ + value: 'true' | 'false'; + /** + * Union discriminant. + */ + type: MetadataAttributeType.BOOLEAN; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const BooleanAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; +}, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; +}, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; +}>; +type DateAttribute = { + /** + * A valid ISO 8601 date string. It's consumer responsibility to parse it. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.DATE; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const DateAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; +}, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; +}>; +type NumberAttribute = { + /** + * A valid JS number serialized as string. It's consumer responsibility to parse it. + * + * @example + * ```ts + * '42' + * + * '42n' + * + * '42.42' + * ``` + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.NUMBER; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const NumberAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; +}, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; +}>; +type StringAttribute = { + /** + * Any string value. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.STRING; + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const StringAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; +}, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; +}>; +type JSONAttribute = { + /** + * A JSON string. It's consumer responsibility to validate and parse it. + */ + value: string; + /** + * Union discriminant. + */ + type: MetadataAttributeType.JSON; + /** + * Union discriminant. + */ + /** + * The attribute's unique identifier. + */ + key: string; +}; +/** + * @internal + */ +declare const JSONAttributeSchema: z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; +}, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; +}>; +/** + * A DiGi metadata attribute. + */ +type MetadataAttribute = BooleanAttribute | DateAttribute | NumberAttribute | StringAttribute | JSONAttribute; +declare const MetadataAttributeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; +}, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; +}, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; +}, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; +}, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; +}, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; +}>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; +}, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; +}, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; +}>]>; + +/** + * The main focus of a publication. + */ +declare enum PublicationMainFocus { + VIDEO = "VIDEO", + IMAGE = "IMAGE", + ARTICLE = "ARTICLE", + TEXT_ONLY = "TEXT_ONLY", + AUDIO = "AUDIO", + LINK = "LINK", + EMBED = "EMBED", + CHECKING_IN = "CHECKING_IN", + EVENT = "EVENT", + MINT = "MINT", + TRANSACTION = "TRANSACTION", + LIVESTREAM = "LIVESTREAM", + SHORT_VIDEO = "SHORT_VIDEO", + THREE_D = "3D", + STORY = "STORY", + SPACE = "SPACE" +} + +declare enum PublicationContentWarning { + NSFW = "NSFW", + SENSITIVE = "SENSITIVE", + SPOILER = "SPOILER" +} +/** + * Common fields of a DiGi primary publication. + */ +type PublicationMetadataCommon = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this publication belongs to. + */ + appId?: AppId; + /** + * Determine if the publication should not be shown in any feed. + * + * @defaultValue false + */ + hideFromFeed?: boolean; + /** + * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. + * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged. + */ + attributes?: MetadataAttribute[]; + /** + * The locale of the metadata. + */ + locale: Locale; + /** + * The encryption strategy used to encrypt the publication. + * + * If not present, the publication is presumed to be unencrypted. + */ + encryptedWith?: PublicationEncryptionStrategy; + /** + * An arbitrary list of tags. + */ + tags?: Tag[]; + /** + * Specify a content warning. + */ + contentWarning?: PublicationContentWarning; +}; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function metadataDetailsWith | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>; +}>(augmentation: Augmentation): z.ZodObject; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T ? { [k in keyof T]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_6 ? { [k in keyof T_6]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>, (z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_9 ? { [k in keyof T_9]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_7 extends object ? { [k_2 in keyof T_7]: undefined extends z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_8 ? { [k in keyof T_8]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_2] ? never : k_2; } : never)[keyof Augmentation | Exclude<"attributes", keyof Augmentation> | Exclude<"id", keyof Augmentation> | Exclude<"appId", keyof Augmentation> | Exclude<"hideFromFeed", keyof Augmentation> | Exclude<"locale", keyof Augmentation> | Exclude<"encryptedWith", keyof Augmentation> | Exclude<"tags", keyof Augmentation> | Exclude<"contentWarning", keyof Augmentation>]> extends infer T_1 ? { [k_1 in keyof T_1]: z.objectUtil.addQuestionMarks; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_2 ? { [k in keyof T_2]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>, (z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_5 ? { [k in keyof T_5]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_3 extends object ? { [k_2 in keyof T_3]: undefined extends z.baseObjectOutputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_4 ? { [k in keyof T_4]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_2] ? never : k_2; } : never)[keyof Augmentation | Exclude<"attributes", keyof Augmentation> | Exclude<"id", keyof Augmentation> | Exclude<"appId", keyof Augmentation> | Exclude<"hideFromFeed", keyof Augmentation> | Exclude<"locale", keyof Augmentation> | Exclude<"encryptedWith", keyof Augmentation> | Exclude<"tags", keyof Augmentation> | Exclude<"contentWarning", keyof Augmentation>]>[k_1]; } : never, z.baseObjectInputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_12 ? { [k in keyof T_12]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never> extends infer T_10 ? { [k_3 in keyof T_10]: z.baseObjectInputType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation extends infer T_11 ? { [k in keyof T_11]: (Omit<{ + id: z.ZodType; + appId: z.ZodOptional>; + hideFromFeed: z.ZodOptional; + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + locale: z.ZodType; + encryptedWith: z.ZodOptional>; + tags: z.ZodOptional>>, Set, unknown>, Tag[], unknown>>; + contentWarning: z.ZodOptional>; +}, keyof Augmentation> & Augmentation)[k]; } : never>[k_3]; } : never>; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function publicationWith; + digi: ReturnType; +}>(augmentation: Augmentation): z.ZodObject>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T ? { [k in keyof T]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T_1 ? { [k in keyof T_1]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation extends infer T_2 ? { [k in keyof T_2]: (Omit<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; +}, "signature" | keyof Augmentation> & { + signature: z.ZodOptional>; +} & Augmentation)[k]; } : never, z.ZodTypeAny, "passthrough">>; +/** + * Ok, ok, don't! It's really not meant to be used outside. + * Don't have Kenny say you we told you so. + * + * @internal + */ +declare function mainContentFocus(focus: T): z.ZodLiteral; +declare function mainContentFocus(...focuses: [T, O]): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>; +/** + * @internal + */ +declare function optionalContentSchema(): z.ZodOptional, z.ZodEffects]>>, EncryptedString | Markdown, unknown>>; + +export { toLocale as $, type AppId as A, type Brand as B, type ChainId as C, type DistributiveOmit as D, type EncryptableURI as E, type FollowCondition as F, MarketplaceMetadataAttributeSchema as G, MarketplaceMetadataSchema as H, type BooleanAttribute as I, BooleanAttributeSchema as J, type DateAttribute as K, DateAttributeSchema as L, type MetadataAttribute as M, type NetworkAddressDetails as N, type OrCondition as O, type PublicationMetadataCommon as P, type NumberAttribute as Q, NumberAttributeSchema as R, type Signature as S, type TwoAtLeastArray as T, type URI as U, type StringAttribute as V, StringAttributeSchema as W, type JSONAttribute as X, JSONAttributeSchema as Y, MetadataAttributeSchema as Z, type Locale as _, type EncryptableString as a, Erc20OwnershipConditionSchema as a$, LocaleSchema as a0, EncryptedStringSchema as a1, encryptable as a2, nonEmpty as a3, nonEmptyStringSchema as a4, encryptableStringSchema as a5, type Tag as a6, toTag as a7, TagSchema as a8, toAppId as a9, NetworkAddressSchema as aA, type TokenId as aB, toTokenId as aC, TokenIdSchema as aD, type Asset as aE, AssetSchema as aF, asset as aG, type Amount as aH, AmountSchema as aI, type AmountDetails as aJ, amount as aK, type ProfileId as aL, toProfileId as aM, ProfileIdSchema as aN, type PublicationId as aO, toPublicationId as aP, PublicationIdSchema as aQ, PublicationContentWarning as aR, metadataDetailsWith as aS, publicationWith as aT, mainContentFocus as aU, optionalContentSchema as aV, EncryptionProvider as aW, NftContractType as aX, ConditionType as aY, refineNftOwnershipCondition as aZ, NftOwnershipConditionSchema as a_, AppIdSchema as aa, toSignature as ab, SignatureSchema as ac, toMarkdown as ad, markdown as ae, toUri as af, uriSchema as ag, encryptableUriSchema as ah, type GeoURI as ai, GeoURISchema as aj, type GeoPoint as ak, GeoPointSchema as al, geoUri as am, geoPoint as an, encryptableGeoUriSchema as ao, PhysicalAddressSchema as ap, type DateTime as aq, toDateTime as ar, datetimeSchema as as, encryptableDateTimeSchema as at, type EvmAddress as au, toEvmAddress as av, EvmAddressSchema as aw, toChainId as ax, ChainIdSchema as ay, type NetworkAddress as az, MetadataAttributeType as b, EoaOwnershipConditionSchema as b0, ProfileOwnershipConditionSchema as b1, FollowConditionSchema as b2, CollectConditionSchema as b3, AdvancedContractConditionSchema as b4, AndConditionSchema as b5, OrConditionSchema as b6, AccessConditionSchema as b7, type LitEncryptionKey as b8, toLitEncryptionKey as b9, LitEncryptionKeySchema as ba, EncryptedPaths as bb, type LitEncryptionStrategy as bc, LitEncryptionStrategySchema as bd, type PublicationEncryptionStrategy as be, PublicationEncryptionStrategySchema as bf, type EncryptedString as c, PublicationMainFocus as d, type EncryptableMarkdown as e, type MarketplaceMetadata as f, type Markdown as g, type MarketplaceMetadataAttribute as h, type EncryptableGeoURI as i, type PhysicalAddress as j, type EncryptableDateTime as k, type ShapeCheck as l, type CollectCondition as m, type EoaOwnershipCondition as n, ConditionComparisonOperator as o, type Erc20OwnershipCondition as p, type NftOwnershipCondition as q, type ProfileOwnershipCondition as r, type AdvancedContractCondition as s, type SimpleCondition as t, type AndCondition as u, type AnyCondition as v, type AccessCondition as w, type Overwrite as x, type Prettify as y, MarketplaceMetadataAttributeDisplayType as z }; diff --git a/dist/index.cjs b/dist/index.cjs new file mode 100644 index 00000000..98adecaa --- /dev/null +++ b/dist/index.cjs @@ -0,0 +1,166 @@ +'use strict'; + +var zod = require('zod'); +var uuid = require('uuid'); + +var ee=class extends Error{name="InvariantError"};function te(e,t){if(!e)throw new ee(t)}function Qe(e="Unexpected call to never()"){throw new ee(e)}function ae(e){return e.length>0}function j(e){return e.length>=2}var Lt=99,_e=` +`,ke="\xB7 ";function Pt(e){return e.replace(/"/g,'\\"')}var xt=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function Oe(e){return e.length===1?e[0].toString():e.reduce((t,a)=>{if(typeof a=="number")return t+"["+a.toString()+"]";if(a.includes('"'))return t+'["'+Pt(a)+'"]';if(!xt.test(a))return t+'["'+a+'"]';let i=t.length===0?"":".";return t+i+a},"")}function Nt(e){let t=e.unionErrors.map(g=>g.issues.map(A=>ae(A.path)?`"${Oe(A.path)}": ${A.message}`:A.message)),a=[...new Set(t.map(g=>g.join("; ")))],i=Array.isArray(e.path)?e.path:[e.path],S=ae(i)?`"${Oe(i)}": `:"";return j(a)?`${ke}${S}expected to match one of the following groups: + ${a.join(`${_e} OR:${_e} `)}`:`${ke}${S}${a[0]}`}function _t(e){return e.code===zod.z.ZodIssueCode.invalid_union?Nt(e):ae(e.path)?`${ke}"${Oe(e.path)}": ${e.message}`:e.message}function ie(e){let t=e.errors.slice(0,Lt).map(a=>_t(a)).join(_e);return t.length===0?`invalid argument, it was not possible to determine a more detailed reason. +Check the input you provided and try again.`:`fix the following issues +${t}`}var oe=class extends Error{name="ValidationError"};function s(e){if(e.success)return e.data;throw new oe(ie(e.error))}function kt(e){return e}var Ot=/^[a-z]{2}(?:-[a-zA-Z]{2})?$/,vt=/^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i,Xe=zod.z.string({description:"A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."}).regex(Ot,"Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."),et=Xe.catch(e=>{let t=vt.exec(e.input);return t?t[1]:e.input}).superRefine((e,t)=>{let a=Xe.safeParse(e);return a.success||a.error.issues.forEach(i=>{t.addIssue(i);}),zod.z.NEVER}).transform(kt);function wt(e){return e}function Rt(e){return e.every(t=>!t.success)}var zt=zod.z.string().describe("An encrypted value.").regex(/^\S+$/,"Should be a valid encrypted value.").transform(wt);function k(e){let t=[e,zt];return zod.z.union(t).catch(a=>a.input).superRefine((a,i)=>{let S=t.map(g=>g.safeParse(a));return Rt(S)&&i.addIssue({code:zod.z.ZodIssueCode.invalid_union,unionErrors:S.map(g=>g.error)}),zod.z.NEVER})}function we(e){return zod.z.preprocess((t,a)=>{let i=zod.z.string().safeParse(t);return i.success?i.data.replace(/^[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*/,"").replace(/[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*$/,"").trim():(i.error.issues.forEach(S=>{a.addIssue(S);}),zod.z.NEVER)},e.min(1))}function n(e){return we(zod.z.string({description:e}))}function T(e){return k(n(e))}function di(e){return e}var Re=zod.z.string().describe("An arbitrary tag.").min(1).max(50).transform(e=>e.toLowerCase());function Bt(e){return e}var U=zod.z.string().describe("A DiGi App identifier.").min(1).max(200).transform(Bt);function Ut(e){return e}var F=zod.z.string().min(1).describe("A cryptographic signature of the DiGi metadata.").transform(Ut);function Ft(e){return e}function P(e){return e.transform(Ft)}function Zt(e){return e}function x(e="A Uniform Resource Identifier. "){return zod.z.string({description:e}).min(6).url({message:"Should be a valid URI"}).transform(Zt)}function y(e){return k(x(e))}var ve=/^geo:(-?\d+\.?\d*),(-?\d+\.?\d*)$/,tt=zod.z.coerce.number({description:"The latitude."}).min(-90).max(90),at=zod.z.coerce.number({description:"The longitude."}).min(-180).max(180),it=zod.z.string().describe("A Geographic coordinate as subset of Geo URI (RFC 5870). Currently only supports the `geo:lat,lng` format.").regex(ve,"Should be a Geo URI. Expected `geo:lat,lng`.").superRefine((e,t)=>{let a=ve.exec(e);if(!a)return zod.z.NEVER;let[,i="",S=""]=a,g=tt.safeParse(i);g.success||g.error.issues.forEach(Ne=>t.addIssue({...Ne,path:[...t.path,"lat"]}));let A=at.safeParse(S);return A.success||A.error.issues.forEach(Ne=>t.addIssue({...Ne,path:[...t.path,"lng"]})),zod.z.NEVER}),ot=zod.z.object({lat:tt,lng:at});function mi(e){let t=ot.safeParse(e);if(t.success){let{lat:a,lng:i}=t.data;return `geo:${a},${i}`}Qe(ie(t.error));}function pi(e){let t=it.parse(e),a=ve.exec(t);te(a,"Invalid Geo URI format. Expected `geo:lat,lng`.");let[,i="",S=""]=a;return ot.parse({lat:i,lng:S})}function ne(e){return k(it.describe(e))}var re=zod.z.object({formatted:T("The full mailing address formatted for display.").optional(),streetAddress:T("The street address including house number, street name, P.O. Box, apartment or unit number and extended multi-line address information.").optional(),locality:T("The city or locality."),region:T("The state or region.").optional(),postalCode:T("The zip or postal code.").optional(),country:T("The country name component.")});function Vt(e){return e}function jt(e){return zod.z.string({description:e}).datetime().transform(Vt)}function v(e){return k(jt(e))}function Gt(e){return e}var ze=zod.z.string().length(42).describe("An EVM compatible address.").transform(Gt);function $t(e){return e}var Be=zod.z.number().positive().transform($t),se=zod.z.object({chainId:Be,address:ze},{description:"An EVM compatible address on a specific chain."});function Ht(e){return e}var nt=zod.z.string().min(1).transform(Ht),rt=zod.z.object({contract:se,decimals:zod.z.number({description:"The number of decimals of the asset."}).int().nonnegative()});function Wt(e,t){return rt.parse({contract:e,decimals:t})}var Ue=zod.z.object({asset:rt,value:n("The amount in the smallest unit of the given asset (e.g. wei for ETH).")},{description:"An amount of a specific asset."});function st(e){return Ue.parse({asset:Wt(e.contract,e.decimals),value:e.value})}function Kt(e){return e}var Fe=zod.z.string().min(4).transform(Kt);function Yt(e){return e}var ct=zod.z.string().min(9).transform(Yt);var Jt=(t=>(t.LIT_PROTOCOL="LIT_PROTOCOL",t))(Jt||{}),Ze=(a=>(a.ERC721="ERC721",a.ERC1155="ERC1155",a))(Ze||{}),dt=(f=>(f.NFT_OWNERSHIP="NFT_OWNERSHIP",f.ERC20_OWNERSHIP="ERC20_OWNERSHIP",f.EOA_OWNERSHIP="EOA_OWNERSHIP",f.PROFILE_OWNERSHIP="PROFILE_OWNERSHIP",f.FOLLOW="FOLLOW",f.COLLECT="COLLECT",f.ADVANCED_CONTRACT="ADVANCED_CONTRACT",f.AND="AND",f.OR="OR",f))(dt||{});function ce(e,t){e.contractType==="ERC1155"&&(e.tokenIds===void 0||e.tokenIds.length===0)&&t.addIssue({code:zod.z.ZodIssueCode.custom,message:"ERC1155 requires at least one token id.",path:[...t.path,"tokenIds"]});}var Z=zod.z.object({type:zod.z.literal("NFT_OWNERSHIP"),contract:se,contractType:zod.z.nativeEnum(Ze),tokenIds:nt.array().min(1).optional().describe("A list of token IDs you want to check ownership of. The list is optional for ERC721, you MUST provide a list of token IDs for ERC1155.")}),Ve=(A=>(A.EQUAL="EQUAL",A.NOT_EQUAL="NOT_EQUAL",A.GREATER_THAN="GREATER_THAN",A.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",A.LESS_THAN="LESS_THAN",A.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",A))(Ve||{}),G=zod.z.object({type:zod.z.literal("ERC20_OWNERSHIP"),amount:Ue,condition:zod.z.nativeEnum(Ve)}),$=zod.z.object({type:zod.z.literal("EOA_OWNERSHIP"),address:ze}),H=zod.z.object({type:zod.z.literal("PROFILE_OWNERSHIP"),profileId:Fe}),W=zod.z.object({type:zod.z.literal("FOLLOW"),follow:Fe}),K=zod.z.object({type:zod.z.literal("COLLECT"),publicationId:ct,thisPublication:zod.z.boolean().optional().default(!1)}),Y=zod.z.object({type:zod.z.literal("ADVANCED_CONTRACT"),contract:se.describe("The contract address and chain id"),functionName:zod.z.string().min(1).describe("The name of the function you want to call"),abi:zod.z.string().min(1).describe("The contract ABI. Has to be in human readable single string format containing the signature of the function you want to call. See https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info"),params:zod.z.string().array().describe("The parameters to pass to the function. Must be exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays."),comparison:zod.z.nativeEnum(Ve).describe("The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL"),value:zod.z.string().regex(/^(true|false|\d{1,70})$/).describe("The comparison value. Accepts 'true', 'false' or a number")});function qt(e){return zod.z.object({type:zod.z.literal("AND"),criteria:zod.z.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(j,"Should have at least 2 conditions")})}var je=qt([Z,G,$,H,W,K,Y]);function mt(e){return zod.z.object({type:zod.z.literal("OR"),criteria:zod.z.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(j,"Should have at least 2 conditions")})}var Ge=mt([Z,G,$,H,W,K,Y]);function pt(e,t){(e.type==="AND"||e.type==="OR")&&e.criteria.forEach((a,i)=>pt(a,{...t,path:[...t.path,"criteria",i]})),e.type==="NFT_OWNERSHIP"&&ce(e,t);}var $e=mt([je,K,Y,$,G,W,Z,Ge,H]).superRefine((e,t)=>(e.criteria.forEach((a,i)=>{pt(a,{...t,path:[...t.path,"criteria",i]});}),zod.z.NEVER));function Qt(e){return e}var Xt=zod.z.string().describe("A symmetric encryption key.").length(368,"Encryption key should be 368 characters long.").transform(Qt),ea=n("An encrypted path is a string of keys separated by . that describe a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).").array().min(1),ta=zod.z.object({provider:zod.z.literal("LIT_PROTOCOL"),encryptionKey:Xt,accessCondition:$e,encryptedPaths:ea},{description:"Publication encryption strategy powered by the LIT Protocol."}),lt=zod.z.discriminatedUnion("provider",[ta]);var aa=(g=>(g.BOOLEAN="Boolean",g.DATE="Date",g.NUMBER="Number",g.STRING="String",g.JSON="JSON",g))(aa||{}),ia=zod.z.object({type:zod.z.literal("Boolean"),key:n("The attribute's unique identifier."),value:zod.z.enum(["true","false"]).describe("A JS boolean value serialized as string. It's consumer responsibility to parse it.")}),oa=zod.z.object({type:zod.z.literal("Date"),key:n("The attribute's unique identifier."),value:zod.z.string().datetime().describe("A valid ISO 8601 date string. It's consumer responsibility to parse it.")}),na=zod.z.object({type:zod.z.literal("Number"),key:n("The attribute's unique identifier."),value:n("A valid JS number serialized as string. It's consumer responsibility to parse it.")}),ra=zod.z.object({type:zod.z.literal("String"),key:n("The attribute's unique identifier."),value:n("A string value.")}),sa=zod.z.object({type:zod.z.literal("JSON"),key:n("The attribute's unique identifier."),value:n("A JSON string. It's consumer responsibility to validate and parse it.")}),w=zod.z.discriminatedUnion("type",[ia,oa,na,ra,sa]);var ut=(i=>(i.NUMBER="number",i.STRING="string",i.DATE="date",i))(ut||{}),ca=zod.z.object({display_type:zod.z.nativeEnum(ut).optional(),trait_type:n("The name of the trait.").optional(),value:zod.z.union([zod.z.string(),zod.z.number()]).optional()}).passthrough(),ht=zod.z.object({description:P(zod.z.string({description:"A human-readable description of the item. It could be plain text or markdown."})).optional().nullable().catch(null),external_url:x("This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.").optional().nullable().catch(null),name:zod.z.string({description:"Name of the NFT item."}).optional(),attributes:ca.array().optional().describe("These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.").catch([]),image:x("Marketplaces will store any NFT image here.").optional().nullable().catch(null),animation_url:x("A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.").optional().nullable().catch(null)}).passthrough();var At=(r=>(r.CCO="CCO",r.CC_BY="CC BY",r.CC_BY_ND="CC BY-ND",r.CC_BY_NC="CC BY-NC",r.TBNL_C_D_PL_Legal="TBNL-C-D-PL-Legal",r.TBNL_C_DT_PL_Legal="TBNL-C-DT-PL-Legal",r.TBNL_C_ND_PL_Legal="TBNL-C-ND-PL-Legal",r.TBNL_C_D_NPL_Legal="TBNL-C-D-NPL-Legal",r.TBNL_C_DT_NPL_Legal="TBNL-C-DT-NPL-Legal",r.TBNL_C_DTSA_PL_Legal="TBNL-C-DTSA-PL-Legal",r.TBNL_C_DTSA_NPL_Legal="TBNL-C-DTSA-NPL-Legal",r.TBNL_C_ND_NPL_Legal="TBNL-C-ND-NPL-Legal",r.TBNL_C_D_PL_Ledger="TBNL-C-D-PL-Ledger",r.TBNL_C_DT_PL_Ledger="TBNL-C-DT-PL-Ledger",r.TBNL_C_ND_PL_Ledger="TBNL-C-ND-PL-Ledger",r.TBNL_C_D_NPL_Ledger="TBNL-C-D-NPL-Ledger",r.TBNL_C_DT_NPL_Ledger="TBNL-C-DT-NPL-Ledger",r.TBNL_C_DTSA_PL_Ledger="TBNL-C-DTSA-PL-Ledger",r.TBNL_C_DTSA_NPL_Ledger="TBNL-C-DTSA-NPL-Ledger",r.TBNL_C_ND_NPL_Ledger="TBNL-C-ND-NPL-Ledger",r.TBNL_NC_D_PL_Legal="TBNL-NC-D-PL-Legal",r.TBNL_NC_DT_PL_Legal="TBNL-NC-DT-PL-Legal",r.TBNL_NC_ND_PL_Legal="TBNL-NC-ND-PL-Legal",r.TBNL_NC_D_NPL_Legal="TBNL-NC-D-NPL-Legal",r.TBNL_NC_DT_NPL_Legal="TBNL-NC-DT-NPL-Legal",r.TBNL_NC_DTSA_PL_Legal="TBNL-NC-DTSA-PL-Legal",r.TBNL_NC_DTSA_NPL_Legal="TBNL-NC-DTSA-NPL-Legal",r.TBNL_NC_ND_NPL_Legal="TBNL-NC-ND-NPL-Legal",r.TBNL_NC_D_PL_Ledger="TBNL-NC-D-PL-Ledger",r.TBNL_NC_DT_PL_Ledger="TBNL-NC-DT-PL-Ledger",r.TBNL_NC_ND_PL_Ledger="TBNL-NC-ND-PL-Ledger",r.TBNL_NC_D_NPL_Ledger="TBNL-NC-D-NPL-Ledger",r.TBNL_NC_DT_NPL_Ledger="TBNL-NC-DT-NPL-Ledger",r.TBNL_NC_DTSA_PL_Ledger="TBNL-NC-DTSA-PL-Ledger",r.TBNL_NC_DTSA_NPL_Ledger="TBNL-NC-DTSA-NPL-Ledger",r.TBNL_NC_ND_NPL_Ledger="TBNL-NC-ND-NPL-Ledger",r))(At||{}),V=zod.z.nativeEnum(At);var We=zod.z.object({item:y("The location of the file."),attributes:w.array().min(1).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.")}),yt=(A=>(A.MUSIC="MUSIC",A.PODCAST="PODCAST",A.AUDIOBOOK="AUDIOBOOK",A.VOICE_NOTE="VOICE_NOTE",A.SOUND="SOUND",A.OTHER="OTHER",A))(yt||{}),de=(O=>(O.WAV="audio/wav",O.WAV_VND="audio/vnd.wave",O.MP3="audio/mpeg",O.OGG_AUDIO="audio/ogg",O.MP4_AUDIO="audio/mp4",O.AAC="audio/aac",O.WEBM_AUDIO="audio/webm",O.FLAC="audio/flac",O))(de||{}),me=We.extend({type:zod.z.nativeEnum(de,{description:"The mime type of the audio file."}),cover:y("The cover image for the audio.").optional(),duration:zod.z.number({description:"How long the the audio is in seconds."}).positive().int().optional(),license:V.optional().describe("The license for the audio."),credits:T("The credits for the audio.").optional(),artist:T("The name of the artist.").optional(),genre:T("The genre of the audio").optional(),recordLabel:T("The record label for the audio.").optional(),kind:zod.z.nativeEnum(yt,{description:"The type of audio."}).optional(),lyrics:y("The lyrics for the audio.").optional()}),pe=(f=>(f.BMP="image/bmp",f.GIF="image/gif",f.HEIC="image/heic",f.JPEG="image/jpeg",f.PNG="image/png",f.SVG_XML="image/svg+xml",f.TIFF="image/tiff",f.WEBP="image/webp",f.X_MS_BMP="image/x-ms-bmp",f))(pe||{}),le=We.extend({type:zod.z.nativeEnum(pe,{description:"The mime type of the image"}),altTag:T("The alt tag for accessibility").optional(),license:V.optional().describe("The license for the image")}),ue=(_=>(_.GLTF="model/gltf+json",_.GLTF_BINARY="model/gltf-binary",_.M4V="video/x-m4v",_.MOV="video/mov",_.MP4="video/mp4",_.MPEG="video/mpeg",_.OGG="video/ogg",_.OGV="video/ogv",_.QUICKTIME="video/quicktime",_.WEBM="video/webm",_))(ue||{}),he=We.extend({type:zod.z.nativeEnum(ue,{description:"The mime type of the video"}),altTag:T("The alt tag for accessibility").optional(),cover:y("The cover image for the video").optional(),duration:zod.z.number({description:"How long the the video is in seconds"}).positive().int().optional(),license:V.optional().describe("The license for the video")}),ma={...de,...pe,...ue},He=zod.z.object({type:zod.z.nativeEnum(ma)});function pa(e){return He.safeParse(e).success}function la(e){if(!pa(e))return He;switch(e.type){case"audio/wav":case"audio/vnd.wave":case"audio/mpeg":case"audio/ogg":case"audio/mp4":case"audio/aac":case"audio/webm":case"audio/flac":return me;case"image/bmp":case"image/gif":case"image/heic":case"image/jpeg":case"image/png":case"image/svg+xml":case"image/tiff":case"image/webp":case"image/x-ms-bmp":return le;case"model/gltf+json":case"model/gltf-binary":case"video/x-m4v":case"video/mov":case"video/mp4":case"video/mpeg":case"video/ogg":case"video/ogv":case"video/quicktime":case"video/webm":return he}return He}var u=zod.z.discriminatedUnion("type",[me,le,he]).catch(e=>e.input).superRefine((e,t)=>{let a=la(e);if(!a)return t.addIssue({code:zod.z.ZodIssueCode.invalid_union_discriminator,options:[...new Set([Object.values(de),Object.values(pe),Object.values(ue)].flat())],message:"Invalid discriminator value. Expected one of `MediaAudioMimeType`, `MediaImageMimeType`, `MediaVideoMimeType` values."}),zod.z.NEVER;let i=a.safeParse(e);return i.success||i.error.issues.forEach(S=>{t.addIssue(S);}),zod.z.NEVER});var ha=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],ft=zod.z.enum(ha);var Tt=(i=>(i.NSFW="NSFW",i.SENSITIVE="SENSITIVE",i.SPOILER="SPOILER",i))(Tt||{}),Aa=zod.z.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:U.optional().describe("The App Id that this publication belongs to."),hideFromFeed:zod.z.boolean({description:"Determine if the publication should not be shown in any feed."}).optional(),attributes:w.array().min(1).max(20).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),locale:et,encryptedWith:lt.optional(),tags:zod.z.set(Re).max(20).catch(e=>e.input).superRefine((e,t)=>{let a=zod.z.array(Re).max(20).safeParse(e);if(a.success){let i=[...new Set(a.data)];return a.data.length>i.length&&t.addIssue({code:zod.z.ZodIssueCode.custom,fatal:!0,message:`Duplicate tags are not allowed: ${a.data.join(", ")}`}),zod.z.NEVER}a.error.issues.forEach(i=>{t.addIssue(i);});}).transform(e=>[...e]).optional().describe("An arbitrary list of tags."),contentWarning:zod.z.nativeEnum(Tt,{description:"Specify a content warning."}).optional()});function m(e){return Aa.extend(e)}function p(e){return ht.extend({signature:F.optional(),...e})}function l(...e){let t="The main focus of the publication.";if(e.length>1){let a=e.map(i=>zod.z.literal(i));return zod.z.union(a,{description:t})}return zod.z.literal(e[0],{description:t})}function h(){return k(P(zod.z.string({description:"Optional markdown content."}))).optional()}var St=(M=>(M.VIDEO="VIDEO",M.IMAGE="IMAGE",M.ARTICLE="ARTICLE",M.TEXT_ONLY="TEXT_ONLY",M.AUDIO="AUDIO",M.LINK="LINK",M.EMBED="EMBED",M.CHECKING_IN="CHECKING_IN",M.EVENT="EVENT",M.MINT="MINT",M.TRANSACTION="TRANSACTION",M.LIVESTREAM="LIVESTREAM",M.SHORT_VIDEO="SHORT_VIDEO",M.THREE_D="3D",M.STORY="STORY",M.SPACE="SPACE",M))(St||{});var z="https://json-schemas.digiv3rse.xyz";var D=`${z}/publications`,o=(C=>(C.THREE_D_LATEST=`${D}/3d/3.0.0.json`,C.ARTICLE_LATEST=`${D}/article/3.0.0.json`,C.AUDIO_LATEST=`${D}/audio/3.0.0.json`,C.CHECKING_IN_LATEST=`${D}/checking-in/3.0.0.json`,C.EMBED_LATEST=`${D}/embed/3.0.0.json`,C.EVENT_LATEST=`${D}/event/3.0.0.json`,C.IMAGE_LATEST=`${D}/image/3.0.0.json`,C.LINK_LATEST=`${D}/link/3.0.0.json`,C.LIVESTREAM_LATEST=`${D}/livestream/3.0.0.json`,C.MINT_LATEST=`${D}/mint/3.0.0.json`,C.SPACE_LATEST=`${D}/space/3.0.0.json`,C.STORY_LATEST=`${D}/story/3.0.0.json`,C.TRANSACTION_LATEST=`${D}/transaction/3.0.0.json`,C.TEXT_ONLY_LATEST=`${D}/text-only/3.0.0.json`,C.VIDEO_LATEST=`${D}/video/3.0.0.json`,C))(o||{});var gt=(S=>(S.GLTF="gLTF/GLB",S.FBX="FBX",S.VRM="VRM",S.OBJ="OBJ",S))(gt||{}),ya=zod.z.object({uri:x("The URI of the 3D asset zip file."),zipPath:n().optional().describe("Path in extracted zip. Relative. 3D start point, MUST be 3D file type."),playerUrl:x("The URL of the recommended web based 3D player to use to view the 3D asset."),format:zod.z.nativeEnum(gt).describe("The 3D format of the asset."),license:V.optional().describe("The license regulating the use of the 3D asset.")}),fa=m({mainContentFocus:l("3D"),assets:ya.array().min(1).describe("The 3D items for the publication"),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ae=p({$schema:zod.z.literal(o.THREE_D_LATEST),digi:fa});var Sa=m({mainContentFocus:l("ARTICLE"),content:k(P(n("The content for the publication as markdown."))),title:n("The optional article title.").optional(),attachments:u.array().min(1).optional().describe("Any attachment you want to include with it.")}),ye=p({$schema:zod.z.literal(o.ARTICLE_LATEST),digi:Sa});var Ma=m({mainContentFocus:l("AUDIO"),audio:me,title:n("The optional audio title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),fe=p({$schema:zod.z.literal(o.AUDIO_LATEST),digi:Ma});var Ea=m({mainContentFocus:l("CHECKING_IN"),location:T("Where you checking in from (free form text)."),position:ne("The optional geographic position of the location.").optional(),address:re.optional().describe("The optional address of the location."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Te=p({$schema:zod.z.literal(o.CHECKING_IN_LATEST),digi:Ea});var Da=m({mainContentFocus:l("EMBED"),embed:y("The embed URL."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Se=p({$schema:zod.z.literal(o.EMBED_LATEST),digi:Da});var Ia=zod.z.object({timezoneId:ft.describe("Indicates a reference timezone for the event start and end times. If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer."),timezoneOffset:zod.z.number().describe("Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).")}),La=m({title:n().describe("The title of the event.").optional(),mainContentFocus:l("EVENT"),location:zod.z.union([y("A virtual location."),T("The event location (free form text).")]).describe("The location of the event."),position:ne("The geographic position of the event.").optional(),address:re.optional().describe("The address of the event."),startsAt:v("The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),endsAt:v("The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),schedulingAdjustments:Ia.optional().describe("Captures extra criteria to recompute correctly future start and end times.See: https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events"),links:y().array().min(1).optional().describe("The links you want to include with it."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Me=p({$schema:zod.z.literal(o.EVENT_LATEST),digi:La});var xa=m({mainContentFocus:l("IMAGE"),image:le,title:n("The optional image title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),be=p({$schema:zod.z.literal(o.IMAGE_LATEST),digi:xa});var _a=m({mainContentFocus:l("LINK"),sharingLink:y("The sharing link url."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ee=p({$schema:zod.z.literal(o.LINK_LATEST),digi:_a});var Oa=m({mainContentFocus:l("LIVESTREAM"),title:n().optional().describe("The livestream title."),startsAt:v("The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),endsAt:v("The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)").optional(),playbackUrl:y("Some livestream platforms have the playback url as a separate url. If not your case make sure `liveUrl` and `playbackUrl` are the same."),liveUrl:y("Some livestream platforms have the live url as a separate url. If not your case make sure `liveUrl` and `playbackUrl` are the same."),checkLiveAPI:y("The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ce=p({$schema:zod.z.literal(o.LIVESTREAM_LATEST),digi:Oa});var wa=m({mainContentFocus:l("MINT"),mintLink:y("The mint item it can be a URL of the known provider like opensea https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata"),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),De=p({$schema:zod.z.literal(o.MINT_LATEST),digi:wa});var J=(t=>(t.LATEST=`${z}/publications/mirror/1.0.0.json`,t))(J||{});var Ra=zod.z.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:U.describe("The App Id that this publication belongs to.")},{description:"The DiGi operational metadata fields."}),Mt=zod.z.object({$schema:zod.z.literal(J.LATEST),digi:Ra,signature:F.optional()});var Ba=m({mainContentFocus:l("SPACE"),title:n().describe("The space title."),link:y("The space join link."),startsAt:v("The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ie=p({$schema:zod.z.literal(o.SPACE_LATEST),digi:Ba});var Fa=m({mainContentFocus:l("STORY"),asset:u.describe("The story asset."),content:h()}),Le=p({$schema:zod.z.literal(o.STORY_LATEST),digi:Fa});var Va=m({mainContentFocus:l("TEXT_ONLY"),content:k(P(n("The content for the publication as markdown.")))}),Pe=p({$schema:zod.z.literal(o.TEXT_ONLY_LATEST),digi:Va});var Et=(i=>(i.ERC721="ERC721",i.ERC20="ERC20",i.OTHER="OTHER",i))(Et||{}),ja=m({mainContentFocus:l("TRANSACTION"),txHash:T("The transaction hash."),type:zod.z.nativeEnum(Et).describe("The type of transaction."),chainId:Be.describe("The Chain Id."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),xe=p({$schema:zod.z.literal(o.TRANSACTION_LATEST),digi:ja});var $a=m({mainContentFocus:l("SHORT_VIDEO","VIDEO"),video:he,title:n("The optional video title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),q=p({$schema:zod.z.literal(o.VIDEO_LATEST),digi:$a});var Gs=zod.z.discriminatedUnion("$schema",[ye,fe,Te,Se,Me,be,Ee,Ce,De,Ie,Pe,Le,xe,Ae,q]);function xc(e){return s(K.safeParse({type:"COLLECT",...e}))}function Nc(e){return s($.safeParse({type:"EOA_OWNERSHIP",...e}))}function _c({condition:e,...t}){return s(G.safeParse({type:"ERC20_OWNERSHIP",amount:st(t),condition:e}))}function kc(e){return s(Z.superRefine(ce).safeParse({type:"NFT_OWNERSHIP",contractType:"ERC721",...e}))}function Oc(e){return s(Z.superRefine(ce).safeParse({type:"NFT_OWNERSHIP",contractType:"ERC1155",...e}))}function vc(e){return s(H.safeParse({type:"PROFILE_OWNERSHIP",...e}))}function wc(e){return s(W.safeParse({type:"FOLLOW",...e}))}function Rc(e){return s(Y.safeParse({type:"ADVANCED_CONTRACT",...e}))}function zc(e){return s(je.safeParse({type:"AND",criteria:e}))}function Bc(e){return s(Ge.safeParse({type:"OR",criteria:e}))}function Uc(e){return s($e.safeParse({type:"OR",criteria:e}))}function Hc({id:e=uuid.v4(),...t}){return s(Mt.safeParse({$schema:J.LATEST,digi:{id:e,...t}}))}var Q=(t=>(t.LATEST=`${z}/modules/1.0.0.json`,t))(Q||{});function Ka(e){try{JSON.parse(e);}catch{return !1}return !0}function Je(e){return zod.z.string({description:e}).refine(Ka,{message:"Invalid JSON string"})}var Ct=zod.z.object({name:we(zod.z.string().max(200)).describe("The name of the module."),title:n("The human-friendly title for the module."),description:P(n("Markdown formatted description of the module.")),authors:zod.z.array(zod.z.string().email("Authors list should only contain valid emails")).min(1,"You must supply at least one author").describe("List of authors email addresses."),initializeCalldataABI:Je("The Solidity JSON ABI as JSON-string describing the initialization function calldata."),initializeResultDataABI:Je("The Solidity JSON ABI as JSON-string describing the initialization result data.").optional(),processCalldataABI:Je("The Solidity JSON ABI as JSON-string describing the process function calldata."),attributes:zod.z.array(w).describe("An arbitrary bag of attributes."),$schema:zod.z.literal(Q.LATEST)});function rd({attributes:e=[],...t}){return s(Ct.safeParse({$schema:Q.LATEST,attributes:e,...t}))}var X=(t=>(t.LATEST=`${z}/profile/2.0.0.json`,t))(X||{});var Ya=zod.z.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),name:n("The profile display name.").optional(),bio:P(n("The profile bio as markdown.")).optional(),picture:x("The profile picture.").optional(),coverPicture:x("The profile cover picture.").optional(),attributes:w.array().min(1).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),appId:U.optional().describe("The App Id that this Profile data refers to. If omitted the data is considered to be the global Profile data.")},{description:"The DiGi specific metadata details."}),Dt=zod.z.object({$schema:zod.z.literal(X.LATEST),digi:Ya,signature:F.optional()});function Dd({id:e=uuid.v4(),...t}){return s(Dt.safeParse({$schema:X.LATEST,digi:{id:e,...t}}))}var E="en";function rm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(ye.safeParse({$schema:o.ARTICLE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"ARTICLE",...i}}))}function sm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(fe.safeParse({$schema:o.AUDIO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"AUDIO",...i}}))}function cm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Te.safeParse({$schema:o.CHECKING_IN_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"CHECKING_IN",...i}}))}function dm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Se.safeParse({$schema:o.EMBED_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"EMBED",...i}}))}function mm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Me.safeParse({$schema:o.EVENT_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"EVENT",...i}}))}function pm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(be.safeParse({$schema:o.IMAGE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"IMAGE",...i}}))}function lm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Ee.safeParse({$schema:o.LINK_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"LINK",...i}}))}function um({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Ce.safeParse({$schema:o.LIVESTREAM_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"LIVESTREAM",...i}}))}function hm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(De.safeParse({$schema:o.MINT_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"MINT",...i}}))}function Am({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Ie.safeParse({$schema:o.SPACE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"SPACE",...i}}))}function ym({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Le.safeParse({$schema:o.STORY_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"STORY",...i}}))}function fm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Pe.safeParse({$schema:o.TEXT_ONLY_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"TEXT_ONLY",...i}}))}function Tm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(Ae.safeParse({$schema:o.THREE_D_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"3D",...i}}))}function Sm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(xe.safeParse({$schema:o.TRANSACTION_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"TRANSACTION",...i}}))}function gm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(q.safeParse({$schema:o.VIDEO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"VIDEO",...i}}))}function Mm({marketplace:e,locale:t=E,id:a=uuid.v4(),...i}){return s(q.safeParse({$schema:o.VIDEO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"SHORT_VIDEO",...i}}))}var qa=/(\d+\.\d+\.\d+)/;function _m(e){let t=qa.exec(e.$schema);return te(t!==null,`Invalid schema id: ${e.$schema}`),t[0]} + +exports.AccessConditionSchema = $e; +exports.AdvancedContractConditionSchema = Y; +exports.AmountSchema = Ue; +exports.AndConditionSchema = je; +exports.AnyMediaSchema = u; +exports.AppIdSchema = U; +exports.ArticleSchema = ye; +exports.AssetSchema = rt; +exports.AudioSchema = fe; +exports.BooleanAttributeSchema = ia; +exports.ChainIdSchema = Be; +exports.CheckingInSchema = Te; +exports.CollectConditionSchema = K; +exports.ConditionComparisonOperator = Ve; +exports.ConditionType = dt; +exports.DEFAULT_LOCALE = E; +exports.DateAttributeSchema = oa; +exports.EmbedSchema = Se; +exports.EncryptedPaths = ea; +exports.EncryptedStringSchema = zt; +exports.EncryptionProvider = Jt; +exports.EoaOwnershipConditionSchema = $; +exports.Erc20OwnershipConditionSchema = G; +exports.EventSchema = Me; +exports.EvmAddressSchema = ze; +exports.FollowConditionSchema = W; +exports.GeoPointSchema = ot; +exports.GeoURISchema = it; +exports.ImageSchema = be; +exports.JSONAttributeSchema = sa; +exports.LinkSchema = Ee; +exports.LitEncryptionKeySchema = Xt; +exports.LitEncryptionStrategySchema = ta; +exports.LiveStreamSchema = Ce; +exports.LocaleSchema = et; +exports.MarketplaceMetadataAttributeDisplayType = ut; +exports.MarketplaceMetadataAttributeSchema = ca; +exports.MarketplaceMetadataSchema = ht; +exports.MediaAudioKind = yt; +exports.MediaAudioMimeType = de; +exports.MediaAudioSchema = me; +exports.MediaImageMimeType = pe; +exports.MediaImageSchema = le; +exports.MediaVideoMimeType = ue; +exports.MediaVideoSchema = he; +exports.MetadataAttributeSchema = w; +exports.MetadataAttributeType = aa; +exports.MetadataLicenseType = At; +exports.MetadataLicenseTypeSchema = V; +exports.MetadataTransactionType = Et; +exports.MintSchema = De; +exports.MirrorMetadataSchema = Mt; +exports.MirrorSchemaId = J; +exports.ModuleMetadataSchema = Ct; +exports.ModuleSchemaId = Q; +exports.NetworkAddressSchema = se; +exports.NftContractType = Ze; +exports.NftOwnershipConditionSchema = Z; +exports.NumberAttributeSchema = na; +exports.OrConditionSchema = Ge; +exports.PhysicalAddressSchema = re; +exports.ProfileIdSchema = Fe; +exports.ProfileMetadataSchema = Dt; +exports.ProfileOwnershipConditionSchema = H; +exports.ProfileSchemaId = X; +exports.PublicationContentWarning = Tt; +exports.PublicationEncryptionStrategySchema = lt; +exports.PublicationIdSchema = ct; +exports.PublicationMainFocus = St; +exports.PublicationMetadataSchema = Gs; +exports.PublicationSchemaId = o; +exports.SchedulingAdjustmentsSchema = Ia; +exports.SchemasRoot = z; +exports.SignatureSchema = F; +exports.SpaceMetadataDetailsSchema = Ba; +exports.SpaceSchema = Ie; +exports.StorySchema = Le; +exports.StringAttributeSchema = ra; +exports.TagSchema = Re; +exports.TextOnlySchema = Pe; +exports.ThreeDAssetSchema = ya; +exports.ThreeDFormat = gt; +exports.ThreeDSchema = Ae; +exports.TimezoneIdSchema = ft; +exports.TokenIdSchema = nt; +exports.TransactionSchema = xe; +exports.ValidationError = oe; +exports.VideoSchema = q; +exports.accessCondition = Uc; +exports.advancedContractCondition = Rc; +exports.amount = st; +exports.andCondition = zc; +exports.article = rm; +exports.asset = Wt; +exports.audio = sm; +exports.checkingIn = cm; +exports.collectCondition = xc; +exports.datetimeSchema = jt; +exports.embed = dm; +exports.encryptable = k; +exports.encryptableDateTimeSchema = v; +exports.encryptableGeoUriSchema = ne; +exports.encryptableStringSchema = T; +exports.encryptableUriSchema = y; +exports.eoaOwnershipCondition = Nc; +exports.erc1155OwnershipCondition = Oc; +exports.erc20OwnershipCondition = _c; +exports.erc721OwnershipCondition = kc; +exports.event = mm; +exports.extractVersion = _m; +exports.followCondition = wc; +exports.formatZodError = ie; +exports.geoPoint = pi; +exports.geoUri = mi; +exports.image = pm; +exports.link = lm; +exports.liveStream = um; +exports.mainContentFocus = l; +exports.markdown = P; +exports.metadataDetailsWith = m; +exports.mint = hm; +exports.mirror = Hc; +exports.module = rd; +exports.nonEmpty = we; +exports.nonEmptyStringSchema = n; +exports.optionalContentSchema = h; +exports.orCondition = Bc; +exports.profile = Dd; +exports.profileOwnershipCondition = vc; +exports.publicationWith = p; +exports.refineNftOwnershipCondition = ce; +exports.shortVideo = Mm; +exports.space = Am; +exports.story = ym; +exports.textOnly = fm; +exports.threeD = Tm; +exports.timezones = ha; +exports.toAppId = Bt; +exports.toChainId = $t; +exports.toDateTime = Vt; +exports.toEvmAddress = Gt; +exports.toLitEncryptionKey = Qt; +exports.toLocale = kt; +exports.toMarkdown = Ft; +exports.toProfileId = Kt; +exports.toPublicationId = Yt; +exports.toSignature = Ut; +exports.toTag = di; +exports.toTokenId = Ht; +exports.toUri = Zt; +exports.transaction = Sm; +exports.uriSchema = x; +exports.video = gm; +//# sourceMappingURL=out.js.map +//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/dist/index.cjs.map b/dist/index.cjs.map new file mode 100644 index 00000000..b8b56634 --- /dev/null +++ b/dist/index.cjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/formatters.ts","../src/utils.ts","../src/builders/ValidationError.ts","../src/primitives.ts","../src/publication/index.ts","../src/publication/common/index.ts","../src/publication/common/encryption.ts","../src/MetadataAttribute.ts","../src/marketplace.ts","../src/publication/common/license.ts","../src/publication/common/media.ts","../src/publication/common/timezones.ts","../src/publication/3D.ts","../src/publication/PublicationMainFocus.ts","../src/constants.ts","../src/publication/PublicationSchemaId.ts","../src/publication/ArticleSchema.ts","../src/publication/AudioSchema.ts","../src/publication/CheckingInSchema.ts","../src/publication/EmbedSchema.ts","../src/publication/EventSchema.ts","../src/publication/ImageSchema.ts","../src/publication/LinkSchema.ts","../src/publication/LiveStreamSchema.ts","../src/publication/MintSchema.ts","../src/publication/MirrorSchemaId.ts","../src/publication/MirrorMetadataSchema.ts","../src/publication/SpaceSchema.ts","../src/publication/StorySchema.ts","../src/publication/TextOnlySchema.ts","../src/publication/TransactionSchema.ts","../src/publication/VideoSchema.ts","../src/builders/encryption.ts","../src/builders/mirror.ts","../src/module/ModuleMetadataSchema.ts","../src/module/ModuleSchemaId.ts","../src/builders/modules.ts","../src/builders/profile.ts","../src/profile/ProfileMetadataSchema.ts","../src/profile/ProfileSchemaId.ts","../src/builders/publications.ts","../src/extractVersion.ts"],"names":["z","InvariantError","invariant","condition","message","never","hasAtLeastOne","items","hasTwoOrMore","maxIssuesInMessage","issueSeparator","bulletPoint","escapeQuotes","str","identifierRegex","formatPath","path","acc","item","separator","formatZozInvalidUnionIssue","issue","groups","zodError","nested","uniqueGroups","group","prefix","formatZodIssue","formatZodError","reason","ValidationError","evaluate","result","toLocale","value","localeRegex","localeLikeRegex","LocaleRegexSchema","LocaleSchema","ctx","match","val","exact","toEncryptedString","allFailed","results","r","EncryptedStringSchema","encryptable","schema","options","s","nonEmpty","nonEmptyStringSchema","description","encryptableStringSchema","toTag","TagSchema","toAppId","AppIdSchema","toSignature","SignatureSchema","toMarkdown","markdown","toUri","uriSchema","encryptableUriSchema","geoUriRegex","LatitudeSchema","LongitudeSchema","GeoURISchema","latitude","longitude","latResult","lngResult","GeoPointSchema","geoUri","point","lat","lng","geoPoint","uri","encryptableGeoUriSchema","PhysicalAddressSchema","toDateTime","datetimeSchema","encryptableDateTimeSchema","toEvmAddress","EvmAddressSchema","toChainId","ChainIdSchema","NetworkAddressSchema","toTokenId","TokenIdSchema","AssetSchema","asset","contract","decimals","AmountSchema","amount","input","toProfileId","ProfileIdSchema","toPublicationId","PublicationIdSchema","EncryptionProvider","NftContractType","ConditionType","refineNftOwnershipCondition","NftOwnershipConditionSchema","ConditionComparisonOperator","Erc20OwnershipConditionSchema","EoaOwnershipConditionSchema","ProfileOwnershipConditionSchema","FollowConditionSchema","CollectConditionSchema","AdvancedContractConditionSchema","andConditionSchema","AndConditionSchema","orConditionSchema","OrConditionSchema","refineAnyCondition","c","idx","AccessConditionSchema","root","toLitEncryptionKey","LitEncryptionKeySchema","EncryptedPaths","LitEncryptionStrategySchema","PublicationEncryptionStrategySchema","MetadataAttributeType","BooleanAttributeSchema","DateAttributeSchema","NumberAttributeSchema","StringAttributeSchema","JSONAttributeSchema","MetadataAttributeSchema","MarketplaceMetadataAttributeDisplayType","MarketplaceMetadataAttributeSchema","MarketplaceMetadataSchema","MetadataLicenseType","MetadataLicenseTypeSchema","MediaCommonSchema","MediaAudioKind","MediaAudioMimeType","MediaAudioSchema","MediaImageMimeType","MediaImageSchema","MediaVideoMimeType","MediaVideoSchema","AnyMediaImageMimeType","AnyMediaShapeScheme","isAnyMediaShape","resolveAnyMediaSchema","AnyMediaSchema","Schema","timezones","TimezoneIdSchema","PublicationContentWarning","PublicationMetadataCommonSchema","uniqueTags","metadataDetailsWith","augmentation","publicationWith","mainContentFocus","focuses","literals","optionalContentSchema","PublicationMainFocus","SchemasRoot","location","PublicationSchemaId","ThreeDFormat","ThreeDAssetSchema","ThreeDMetadataDetailsSchema","ThreeDSchema","ArticleMetadataDetailsSchema","ArticleSchema","AudioMetadataDetailsSchema","AudioSchema","CheckingInMetadataDetailsSchema","CheckingInSchema","EmbedMetadataDetailsSchema","EmbedSchema","SchedulingAdjustmentsSchema","EventMetadataDetailsSchema","EventSchema","ImageMetadataDetailsSchema","ImageSchema","LinkMetadataDetailsSchema","LinkSchema","LiveStreamMetadataDetailsSchema","LiveStreamSchema","MintMetadataDetailsSchema","MintSchema","MirrorSchemaId","MirrorMetadataDetailsSchema","MirrorMetadataSchema","SpaceMetadataDetailsSchema","SpaceSchema","StoryMetadataDetailsSchema","StorySchema","TextOnlyMetadataDetailsSchema","TextOnlySchema","MetadataTransactionType","TransactionMetadataDetailsSchema","TransactionSchema","VideoMetadataDetailsSchema","VideoSchema","PublicationMetadataSchema","collectCondition","eoaOwnershipCondition","erc20OwnershipCondition","others","erc721OwnershipCondition","erc1155OwnershipCondition","profileOwnershipCondition","followCondition","advancedContractCondition","andCondition","criteria","orCondition","accessCondition","v4","mirror","id","ModuleSchemaId","isValidJsonString","jsonString","ModuleMetadataSchema","module","attributes","ProfileSchemaId","ProfileMetadataDetailsSchema","ProfileMetadataSchema","profile","DEFAULT_LOCALE","article","marketplace","locale","audio","checkingIn","embed","event","image","link","liveStream","mint","space","story","textOnly","threeD","transaction","video","shortVideo","schemaVersionRegex","extractVersion","metadata"],"mappings":"AACA,OAAS,KAAAA,OAAS,MC8BX,IAAMC,GAAN,cAA6B,KAAM,CACxC,KAAO,gBACT,EASO,S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SACVA,EAAO,MAAM,OAAO,QAASZ,GAAU,CACrCmB,EAAI,SAASnB,CAAK,CACpB,CAAC,EAGIrB,EAAE,KACX,CAAC,EC5UH,OAAS,KAAAA,OAAS,MAEX,IAAM8J,GAAY,CACvB,iBACA,eACA,qBACA,iBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,qBACA,mBACA,eACA,oBACA,eACA,iBACA,eACA,uBACA,kBACA,gBACA,kBACA,kBACA,kBACA,gBACA,sBACA,cACA,iBACA,kBACA,gBACA,kBACA,eACA,oBACA,cACA,gBACA,oBACA,gBACA,gBACA,gBACA,gBACA,iBACA,mBACA,kBACA,iBACA,kBACA,gBACA,oBACA,qBACA,oBACA,kBACA,iBACA,eACA,kBACA,eACA,oBACA,mBACA,kBACA,oBACA,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,gBACA,mBACA,gBACA,yBACA,mBACA,gBACA,iBACA,uBACA,oBACA,iBACA,gBACA,uBACA,wBACA,uBACA,iBACA,kBACA,oBACA,kBACA,iBACA,kBACA,oBACA,wBACA,wBACA,kBACA,qBACA,kBACA,iBACA,kBACA,uBACA,iBACA,uBACA,iBACA,kBACA,mBACA,mBACA,mBACA,sBACA,sBACA,oBACA,oBACA,kBACA,oBACA,qBACA,kBACA,qBACA,oBACA,oBACA,iBACA,kBACA,iBACA,qBACA,uBACA,0BACA,6BACA,4BACA,wBACA,4BACA,0BACA,uBACA,iBACA,kBACA,kBACA,gBACA,iBACA,8BACA,qBACA,iBACA,eACA,sBACA,qBACA,wBACA,iBACA,kBACA,iBACA,kBACA,qBACA,oBACA,mBACA,kBACA,oBACA,iBACA,qBACA,sBACA,mBACA,kBACA,oBACA,qBACA,qBACA,iBACA,mBACA,kBACA,eACA,kBACA,8BACA,8BACA,iCACA,kBACA,iBACA,sBACA,qBACA,kBACA,yBACA,wBACA,sBACA,sBACA,uBACA,sBACA,uBACA,iBACA,iBACA,mBACA,qBACA,uBACA,mBACA,mBACA,wBACA,oBACA,uBACA,gBACA,wBACA,mBACA,mBACA,mBACA,oBACA,qBACA,wBACA,sBACA,gBACA,sBACA,kBACA,kBACA,kBACA,oBACA,qBACA,mBACA,kBACA,sBACA,mBACA,mBACA,4BACA,uBACA,oBACA,qBACA,oBACA,qBACA,mBACA,mBACA,oBACA,sBACA,YACA,cACA,aACA,cACA,aACA,cACA,gBACA,cACA,eACA,eACA,YACA,eACA,eACA,cACA,eACA,cACA,gBACA,aACA,kBACA,eACA,gBACA,aACA,YACA,aACA,gBACA,iBACA,YACA,cACA,iBACA,YACA,eACA,eACA,gBACA,iBACA,aACA,iBACA,eACA,gBACA,gBACA,mBACA,oBACA,eACA,cACA,aACA,eACA,gBACA,cACA,cACA,eACA,oBACA,mBACA,YACA,YACA,kBACA,iBACA,iBACA,aACA,gBACA,iBACA,eACA,cACA,cACA,gBACA,iBACA,aACA,gBACA,iBACA,qBACA,cACA,gBACA,eACA,cACA,eACA,aACA,aACA,mBACA,cACA,gBACA,iBACA,mBACA,eACA,qBACA,eACA,kBACA,mBACA,kBACA,sBACA,kBACA,mBACA,qBACA,yBACA,qBACA,mBACA,qBACA,qBACA,wBACA,mBACA,mBACA,kBACA,mBACA,qBACA,sBACA,sBACA,kBACA,mBACA,mBACA,iBACA,mBACA,gBACA,kBACA,gBACA,oBACA,kBACA,mBACA,kBACA,kBACA,kBACA,oBACA,gBACA,mBACA,kBACA,kBACA,qBACA,kBACA,gBACA,qBACA,cACA,eACA,gBACA,mBACA,gBACA,oBACA,gBACA,eACA,mBACA,eACA,gBACA,gBACA,cACA,eACA,mBACA,gBACA,cACA,cACA,gBACA,oBACA,kBACA,iBACA,oBACA,gBACA,eACA,mBACA,iBACA,gBACA,mBACA,kBACA,eACA,iBACA,gBACA,iBACA,mBACA,gBACA,gBACA,oBACA,gBACA,sBACA,gBACA,mBACA,eACA,gBACA,mBACA,cACA,kBACA,mBACA,iBACA,iBACA,eACA,mBACA,uBACA,kBACA,iBACA,gBACA,oBACA,kBACA,eACA,mBACA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AM,CACJ,GAAAb,EACA,OAAAc,EACA,sBACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CAmCO,SAASuC,GAAY,CAC1B,YAAAd,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAA4C,CAC1C,OAAOvL,EACLgL,GAAkB,UAAU,CAC1B,QAASnC,EAAoB,mBAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,+BACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CAqEO,SAASwC,GAAM,CACpB,YAAAf,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAAgC,CAC9B,OAAOvL,EACLkL,EAAY,UAAU,CACpB,QAASrC,EAAoB,aAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,yBACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CAmCO,SAASyC,GAAW,CACzB,YAAAhB,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAAqC,CACnC,OAAOvL,EACLkL,EAAY,UAAU,CACpB,QAASrC,EAAoB,aAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,+BACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CCliCA,IAAM0C,GAAqB,kBAkCpB,SAASC,GACdC,EACQ,CACR,IAAMlO,EAASgO,GAAmB,KAAKE,EAAS,OAAO,EAEvD,OAAAjQ,GAAU+B,IAAW,KAAM,sBAAsBkO,EAAS,OAAO,EAAE,EAC5DlO,EAAO,CAAC,CACjB","sourcesContent":["// Heavily customized and simplified version of https://www.npmjs.com/package/zod-validation-error\nimport { z } from 'zod';\n\nimport { NonEmptyArray, hasAtLeastOne, hasTwoOrMore } from './utils.js';\n\nconst maxIssuesInMessage = 99;\nconst issueSeparator = '\\n';\nconst bulletPoint = '· ';\n\nfunction escapeQuotes(str: string): string {\n return str.replace(/\"/g, '\\\\\"');\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers\n */\nconst identifierRegex = /[$_\\p{ID_Start}][$\\u200c\\u200d\\p{ID_Continue}]*/u;\n\nfunction formatPath(path: NonEmptyArray): string {\n if (path.length === 1) {\n return path[0].toString();\n }\n\n return path.reduce((acc, item) => {\n // handle numeric indices\n if (typeof item === 'number') {\n return acc + '[' + item.toString() + ']';\n }\n\n // handle quoted values\n if (item.includes('\"')) {\n return acc + '[\"' + escapeQuotes(item) + '\"]';\n }\n\n // handle special characters\n if (!identifierRegex.test(item)) {\n return acc + '[\"' + item + '\"]';\n }\n\n // handle normal values\n const separator = acc.length === 0 ? '' : '.';\n return acc + separator + item;\n }, '');\n}\n\nfunction formatZozInvalidUnionIssue(issue: z.ZodInvalidUnionIssue): string {\n const groups = issue.unionErrors.map((zodError) =>\n zodError.issues.map((nested) => {\n if (hasAtLeastOne(nested.path)) {\n return `\"${formatPath(nested.path)}\": ${nested.message}`;\n }\n return nested.message;\n }),\n );\n\n const uniqueGroups = [...new Set(groups.map((group) => group.join('; ')))];\n\n const path = Array.isArray(issue.path) ? issue.path : [issue.path];\n const prefix = hasAtLeastOne(path) ? `\"${formatPath(path)}\": ` : '';\n\n if (hasTwoOrMore(uniqueGroups)) {\n return (\n `${bulletPoint}${prefix}expected to match one of the following groups:\\n` +\n `\\t\\t${uniqueGroups.join(`${issueSeparator}\\tOR:${issueSeparator}\\t\\t`)}`\n );\n }\n\n return `${bulletPoint}${prefix}${uniqueGroups[0]}`;\n}\n\nfunction formatZodIssue(issue: z.ZodIssue): string {\n if (issue.code === z.ZodIssueCode.invalid_union) {\n return formatZozInvalidUnionIssue(issue);\n }\n\n if (hasAtLeastOne(issue.path)) {\n return `${bulletPoint}\"${formatPath(issue.path)}\": ${issue.message}`;\n }\n\n return issue.message;\n}\n\n/**\n * Formats a Zod parsing error into a human-readable string.\n *\n * The formatting is tailored to the DiGi Protocol Metadata use case. It may not be suitable for other use cases.\n *\n * @category Helpers\n *\n * @example\n * ```ts\n * const result = PublicationMetadataSchema.safeParse(invalid);\n *\n * if (!result.success) {\n * throw new Error(formatZodError(result.error));\n * }\n * ```\n */\nexport function formatZodError(zodError: z.ZodError): string {\n const reason = zodError.errors\n // limit max number of issues printed in the reason section\n .slice(0, maxIssuesInMessage)\n // format error message\n .map((issue) => formatZodIssue(issue))\n // concat as string\n .join(issueSeparator);\n\n if (reason.length === 0) {\n return (\n 'invalid argument, it was not possible to determine a more detailed reason.\\n' +\n 'Check the input you provided and try again.'\n );\n }\n\n return `fix the following issues\\n${reason}`;\n}\n","import { Signature } from './primitives';\n\n/**\n * Branding helper type.\n *\n * @internal\n */\nexport type Brand = T & {\n [K in ReservedName]: TBrand;\n};\n\n/**\n * Omits properties from an union type, preserving the union.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit = T extends any ? Omit : never;\n\n/**\n * Overwrites properties from T1 with one from T2\n * @internal\n * @example\n * ```ts\n * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string }\n * ```\n */\nexport type Overwrite = DistributiveOmit & T2;\n\n/**\n * An error that occurs when a task violates a logical condition that is assumed to be true at all times.\n */\nexport class InvariantError extends Error {\n name = 'InvariantError' as const;\n}\n\n/**\n * Asserts that the given condition is truthy\n * @internal\n *\n * @param condition - Either truthy or falsy value\n * @param message - An error message\n */\nexport function invariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n/**\n * A function that throws when called.\n *\n * @param message - An error message\n */\nexport function never(message = 'Unexpected call to never()'): never {\n throw new InvariantError(message);\n}\n\n/**\n * Specifies an object with unknown keys\n *\n * Useful when you don't care about exact props passed to the component.\n * @privateRemarks Don't use `{}` as a type. `{}` actually means \"any non-nullish value\".\n */\nexport type UnknownObject = Record;\n\n/**\n * Declares an array of at least one element of the specified type.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasAtLeastOne(items: ReadonlyArray): items is NonEmptyArray {\n return items.length > 0;\n}\n\n/**\n * Declares an array of at least two elements of the specified type.\n */\nexport type TwoAtLeastArray = [T, T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasTwoOrMore(items: ReadonlyArray): items is TwoAtLeastArray {\n return items.length >= 2;\n}\n\n/**\n * Beautify the readout of all of the members of that intersection.\n *\n * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697\n *\n * @internal\n */\nexport type Prettify = {\n [K in keyof T]: T[K];\n // eslint-disable-next-line @typescript-eslint/ban-types\n} & {};\n\n/**\n * @internal\n */\nexport type ShapeCheck = T extends {\n $schema: string;\n\n digi: unknown;\n\n signature?: Signature;\n}\n ? T\n : never;\n","import { z } from 'zod';\n\nimport { formatZodError } from '../formatters';\n\n/**\n * An error that occurs when an object does not match the expected shape.\n */\nexport class ValidationError extends Error {\n name = 'ValidationError' as const;\n}\n\n/**\n * @internal\n */\nexport function evaluate(result: z.SafeParseReturnType): Output {\n if (result.success) {\n return result.data;\n }\n throw new ValidationError(formatZodError(result.error));\n}\n","import { z } from 'zod';\n\nimport { formatZodError } from './formatters.js';\nimport { Brand, invariant, never } from './utils.js';\n\n/**\n * A locale identifier.\n *\n * Syntax: [language]-[region] where:\n * - [language] is a lowercase ISO 639-1 language code\n * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code\n *\n * You can pass just the language code, or both the language and region codes.\n *\n * @example\n * - `en` any English\n * - `en-US` English as used in the United States\n * - `en-GB` English as used in the United Kingdom\n */\nexport type Locale = Brand;\n/**\n * @internal\n */\nexport function toLocale(value: string): Locale {\n return value as Locale;\n}\n\n// using ranges instead of `i` flag so that resulting JSON Schema includes case-insensitivity.\nconst localeRegex = /^[a-z]{2}(?:-[a-zA-Z]{2})?$/;\nconst localeLikeRegex = /^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i;\n\nconst LocaleRegexSchema = z\n .string({\n description:\n 'A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n })\n .regex(\n localeRegex,\n 'Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n );\n\n/**\n * @internal\n */\nexport const LocaleSchema: z.ZodType = LocaleRegexSchema.catch(\n (ctx) => {\n // attempts to recover the language code at least\n const match = localeLikeRegex.exec(ctx.input);\n if (match) {\n return match[1] as string;\n }\n return ctx.input;\n },\n)\n .superRefine((val, ctx): val is Locale => {\n const exact = LocaleRegexSchema.safeParse(val);\n\n if (!exact.success) {\n exact.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n return z.NEVER;\n })\n .transform(toLocale);\n\n/**\n * A base64 encoded encrypted string value.\n */\nexport type EncryptedString = Brand;\nfunction toEncryptedString(value: string): EncryptedString {\n return value as EncryptedString;\n}\n\nfunction allFailed(\n results: z.SafeParseReturnType[],\n): results is z.SafeParseError[] {\n return results.every((r) => !r.success);\n}\n/**\n * @internal\n */\nexport const EncryptedStringSchema = z\n .string()\n .describe('An encrypted value.')\n .regex(\n /^\\S+$/, // Approximation of Lit Encrypted value\n 'Should be a valid encrypted value.',\n )\n .transform(toEncryptedString);\n\n/**\n * Modifies a schema to accept an encrypted string value as well as its decrypted version.\n *\n * @internal\n */\nexport function encryptable(schema: z.ZodType) {\n const options = [schema, EncryptedStringSchema] as const;\n return z\n .union(options)\n .catch((ctx) => ctx.input as T)\n .superRefine((val, ctx): val is T | EncryptedString => {\n const results = options.map((s) => s.safeParse(val));\n\n if (allFailed(results)) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union,\n unionErrors: results.map((r) => r.error),\n });\n }\n return z.NEVER;\n });\n}\n\n/**\n * @internal\n */\nexport function nonEmpty(schema: z.ZodString): z.ZodType {\n return z.preprocess((val, ctx) => {\n const result = z.string().safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return result.data\n .replace(\n // eslint-disable-next-line no-control-regex\n /^[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*/,\n '',\n )\n .replace(\n // eslint-disable-next-line no-control-regex\n /[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*$/,\n '',\n )\n .trim();\n }, schema.min(1));\n}\n/**\n * @internal\n */\nexport function nonEmptyStringSchema(description?: string) {\n return nonEmpty(z.string({ description }));\n}\n/**\n * @internal\n */\nexport function encryptableStringSchema(description: string) {\n return encryptable(nonEmptyStringSchema(description));\n}\n\n/**\n * An arbitrary string or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableString = string | EncryptedString;\n\n/**\n * An arbitrary label.\n *\n * All lowercased, 50 characters max.\n */\nexport type Tag = Brand;\n/**\n * @internal\n */\nexport function toTag(value: string): Tag {\n return value as Tag;\n}\n/**\n * @internal\n */\nexport const TagSchema: z.ZodType = z\n .string()\n .describe('An arbitrary tag.')\n .min(1)\n .max(50)\n .transform((value) => toTag(value.toLowerCase()));\n\n/**\n * A unique DiGi App identifier.\n */\nexport type AppId = Brand;\n/**\n * @internal\n */\nexport function toAppId(value: string): AppId {\n return value as AppId;\n}\n/**\n * @internal\n */\nexport const AppIdSchema: z.ZodType = z\n .string()\n .describe('A DiGi App identifier.')\n .min(1)\n .max(200)\n .transform(toAppId);\n\n/**\n * A cryptographic signature.\n */\nexport type Signature = Brand;\n/**\n * @internal\n */\nexport function toSignature(value: string): Signature {\n return value as Signature;\n}\n/**\n * @internal\n */\nexport const SignatureSchema: z.ZodType = z\n .string()\n .min(1)\n .describe('A cryptographic signature of the DiGi metadata.')\n .transform(toSignature);\n\n/**\n * A markdown text.\n */\nexport type Markdown = Brand;\n/**\n * @internal\n */\nexport function toMarkdown(value: string): Markdown {\n return value as Markdown;\n}\n\n/**\n * @internal\n */\nexport function markdown(\n schema: z.ZodType,\n): z.ZodType {\n return schema.transform(toMarkdown);\n}\n\n/**\n * A markdown text or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableMarkdown = Markdown | EncryptedString;\n\n/**\n * A Uniform Resource Identifier.\n *\n * It could be a URL pointing to a specific resource,\n * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...).\n */\nexport type URI = Brand;\n/**\n * @internal\n */\nexport function toUri(value: string): URI {\n return value as URI;\n}\n/**\n * @internal\n */\nexport function uriSchema(\n description: string = 'A Uniform Resource Identifier. ',\n): z.ZodType {\n return z\n .string({ description })\n .min(6) // [ar://.]\n .url({ message: 'Should be a valid URI' }) // reads url() but works well with URIs too and uses format: 'uri' in the JSON schema\n .transform(toUri);\n}\n/**\n * @internal\n */\nexport function encryptableUriSchema(description?: string) {\n return encryptable(uriSchema(description));\n}\n\n/**\n * A URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableURI = URI | EncryptedString;\n\nconst geoUriRegex = /^geo:(-?\\d+\\.?\\d*),(-?\\d+\\.?\\d*)$/;\n\nconst LatitudeSchema = z.coerce.number({ description: 'The latitude.' }).min(-90).max(90);\n\nconst LongitudeSchema = z.coerce.number({ description: 'The longitude.' }).min(-180).max(180);\n\n/**\n * A Geographic coordinate as subset of Geo URI (RFC 5870).\n *\n * Currently only supports the `geo:lat,lng` format.\n *\n * Use the {@link geoUri} helper to create one, do not attempt to create one manually.\n *\n * @example\n * ```ts\n * 'geo:40.689247,-74.044502'\n *\n * 'geo:41.890209,12.492231'\n * ```\n *\n * @see https://tools.ietf.org/html/rfc5870\n */\nexport type GeoURI = `geo:${number},${number}`;\n/**\n * @internal\n */\nexport const GeoURISchema = z\n .string()\n .describe(\n 'A Geographic coordinate as subset of Geo URI (RFC 5870). ' +\n 'Currently only supports the `geo:lat,lng` format.',\n )\n .regex(geoUriRegex, 'Should be a Geo URI. Expected `geo:lat,lng`.')\n .superRefine((val, ctx): val is GeoURI => {\n const match = geoUriRegex.exec(val);\n\n if (!match) {\n // should never happen\n return z.NEVER;\n }\n\n const [, latitude = '', longitude = ''] = match;\n\n const latResult = LatitudeSchema.safeParse(latitude);\n if (!latResult.success) {\n latResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lat'],\n }),\n );\n }\n\n const lngResult = LongitudeSchema.safeParse(longitude);\n if (!lngResult.success) {\n lngResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lng'],\n }),\n );\n }\n\n return z.NEVER;\n });\n\n/**\n * A geographic point on the Earth.\n */\nexport type GeoPoint = {\n /**\n * The latitude in decimal degrees (from -90° to +90°).\n */\n lat: number;\n\n /**\n * The longitude in decimal degrees (from -180° to +180°).\n */\n lng: number;\n};\n/**\n * @internal\n */\nexport const GeoPointSchema: z.ZodType = z.object({\n lat: LatitudeSchema,\n lng: LongitudeSchema,\n});\n\n/**\n * Helper to create a Geo URI from a {@link GeoPoint}.\n *\n * @category Helpers\n * @example\n * ```ts\n * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502'\n *\n * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231'\n * ```\n */\nexport function geoUri(point: GeoPoint): GeoURI {\n const result = GeoPointSchema.safeParse(point);\n\n if (result.success) {\n const { lat, lng } = result.data;\n return `geo:${lat},${lng}`;\n }\n\n never(formatZodError(result.error));\n}\n\n/**\n * Helper to parse a {@link GeoPoint} from a {@link GeoURI}.\n *\n * @category Helpers\n */\nexport function geoPoint(value: GeoURI): GeoPoint {\n const uri = GeoURISchema.parse(value);\n\n const match = geoUriRegex.exec(uri);\n\n invariant(match, 'Invalid Geo URI format. Expected `geo:lat,lng`.');\n\n const [, lat = '', lng = ''] = match;\n return GeoPointSchema.parse({ lat, lng });\n}\n/**\n * @internal\n */\nexport function encryptableGeoUriSchema(description: string) {\n return encryptable(GeoURISchema.describe(description));\n}\n\n/**\n * A Geo URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableGeoURI = GeoURI | EncryptedString;\n\n/**\n * The address of a physical location.\n */\nexport type PhysicalAddress = {\n /**\n * The full mailing address formatted for display.\n */\n formatted?: EncryptableString;\n /**\n * The street address including house number, street name, P.O. Box,\n * apartment or unit number and extended multi-line address information.\n */\n streetAddress?: EncryptableString;\n /**\n * The city or locality.\n */\n locality: EncryptableString;\n /**\n * The state or region.\n */\n region?: EncryptableString;\n /**\n * The zip or postal code.\n */\n postalCode?: EncryptableString;\n /**\n * The country name component.\n */\n country: EncryptableString;\n};\n/**\n * @internal\n */\nexport const PhysicalAddressSchema: z.ZodType = z.object({\n formatted: encryptableStringSchema('The full mailing address formatted for display.').optional(),\n streetAddress: encryptableStringSchema(\n 'The street address including house number, street name, P.O. Box, ' +\n 'apartment or unit number and extended multi-line address information.',\n ).optional(),\n locality: encryptableStringSchema('The city or locality.'),\n region: encryptableStringSchema('The state or region.').optional(),\n postalCode: encryptableStringSchema('The zip or postal code.').optional(),\n country: encryptableStringSchema('The country name component.'),\n});\n\n/**\n * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`.\n */\nexport type DateTime = Brand;\n/**\n * @internal\n */\nexport function toDateTime(value: string): DateTime {\n return value as DateTime;\n}\n/**\n * @internal\n */\nexport function datetimeSchema(description: string): z.ZodType {\n return z.string({ description }).datetime().transform(toDateTime);\n}\n/**\n * @internal\n */\nexport function encryptableDateTimeSchema(description: string) {\n return encryptable(datetimeSchema(description));\n}\n\n/**\n * A DateTime or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableDateTime = DateTime | EncryptedString;\n\n/**\n * An EVM compatible address.\n */\nexport type EvmAddress = Brand;\n/**\n * @internal\n */\nexport function toEvmAddress(value: string): EvmAddress {\n return value as EvmAddress;\n}\n/**\n * @internal\n */\nexport const EvmAddressSchema: z.ZodType = z\n .string()\n .length(42)\n .describe('An EVM compatible address.')\n .transform(toEvmAddress);\n\n/**\n * An EVM compatible Chain Id.\n */\nexport type ChainId = Brand;\n/**\n * @internal\n */\nexport function toChainId(value: number): ChainId {\n return value as ChainId;\n}\n/**\n * @internal\n */\nexport const ChainIdSchema: z.ZodType = z\n .number()\n .positive()\n .transform(toChainId);\n\n/**\n * An EVM compatible address on a specific chain.\n */\nexport type NetworkAddress = {\n /**\n * The chain id.\n */\n chainId: ChainId;\n /**\n * The EVM address.\n */\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const NetworkAddressSchema: z.ZodType = z.object(\n {\n chainId: ChainIdSchema,\n address: EvmAddressSchema,\n },\n {\n description: 'An EVM compatible address on a specific chain.',\n },\n);\n\n/**\n * An NFT token identifier.\n */\nexport type TokenId = Brand;\n/**\n * @internal\n */\nexport function toTokenId(value: string): TokenId {\n return value as TokenId;\n}\n/**\n * @internal\n */\nexport const TokenIdSchema: z.ZodType = z\n .string()\n .min(1)\n .transform(toTokenId);\n\n/**\n * A Fungible Tokens. Usually an ERC20 token.\n */\nexport type Asset = {\n /**\n * The asset contract address.\n */\n contract: NetworkAddress;\n /**\n * The number of decimals of the asset (e.g. 18 for WETH)\n */\n decimals: number;\n};\n/**\n * @internal\n */\nexport const AssetSchema: z.ZodType = z.object({\n contract: NetworkAddressSchema,\n decimals: z.number({ description: 'The number of decimals of the asset.' }).int().nonnegative(),\n});\n/**\n * Creates an {@link Asset}.\n *\n * @internal\n */\nexport function asset(contract: NetworkAddressDetails, decimals: number): Asset {\n return AssetSchema.parse({ contract, decimals });\n}\n\n/**\n * An amount of a specific asset.\n */\nexport type Amount = {\n /**\n * The asset.\n *\n * See {@link asset} helper to create one.\n */\n asset: Asset;\n /**\n * The amount in the smallest unit of the given asset (e.g. wei for ETH).\n */\n value: string;\n};\n/**\n * @internal\n */\nexport const AmountSchema: z.ZodType = z.object(\n {\n asset: AssetSchema,\n value: nonEmptyStringSchema(\n 'The amount in the smallest unit of the given asset (e.g. wei for ETH).',\n ),\n },\n {\n description: 'An amount of a specific asset.',\n },\n);\n\nexport type NetworkAddressDetails = {\n /**\n * The chain id.\n */\n chainId: number;\n /**\n * The EVM address.\n */\n address: string;\n};\n\n/**\n * @internal\n */\nexport type AmountDetails = {\n contract: NetworkAddressDetails;\n decimals: number;\n value: string;\n};\n/**\n * @internal\n */\nexport function amount(input: AmountDetails): Amount {\n return AmountSchema.parse({\n asset: asset(input.contract, input.decimals),\n value: input.value,\n });\n}\n\n/**\n * A DiGi Profile identifier.\n *\n * @example\n * ```\n * 0x01\n * ```\n */\nexport type ProfileId = Brand;\n/**\n * @internal\n */\nexport function toProfileId(value: string): ProfileId {\n return value as ProfileId;\n}\n/**\n * @internal\n */\nexport const ProfileIdSchema: z.ZodType = z\n .string()\n .min(4)\n .transform(toProfileId);\n\n/**\n * A DiGi Publication identifier.\n *\n * No Momoka publications for now.\n *\n * @example\n * ```\n * 0x01-0x01\n * ```\n */\nexport type PublicationId = Brand;\n/**\n * @internal\n */\nexport function toPublicationId(value: string): PublicationId {\n return value as PublicationId;\n}\n/**\n * @internal\n */\nexport const PublicationIdSchema: z.ZodType = z\n .string()\n .min(9)\n .transform(toPublicationId);\n","import { z } from 'zod';\n\nexport * from './common';\nexport * from './3D.js';\nexport * from './ArticleSchema.js';\nexport * from './AudioSchema.js';\nexport * from './CheckingInSchema.js';\nexport * from './EmbedSchema.js';\nexport * from './EventSchema.js';\nexport * from './ImageSchema.js';\nexport * from './LinkSchema.js';\nexport * from './LiveStreamSchema.js';\nexport * from './MintSchema.js';\nexport * from './MirrorSchemaId.js';\nexport * from './MirrorMetadataSchema.js';\nexport * from './PublicationMainFocus.js';\nexport * from './PublicationSchemaId.js';\nexport * from './SpaceSchema.js';\nexport * from './StorySchema.js';\nexport * from './TextOnlySchema.js';\nexport * from './TransactionSchema.js';\nexport * from './VideoSchema.js';\n\nimport { ThreeDMetadata, ThreeDSchema } from './3D.js';\nimport { ArticleMetadata, ArticleSchema } from './ArticleSchema.js';\nimport { AudioMetadata, AudioSchema } from './AudioSchema.js';\nimport { CheckingInMetadata, CheckingInSchema } from './CheckingInSchema.js';\nimport { EmbedMetadata, EmbedSchema } from './EmbedSchema';\nimport { EventMetadata, EventSchema } from './EventSchema.js';\nimport { ImageMetadata, ImageSchema } from './ImageSchema.js';\nimport { LinkMetadata, LinkSchema } from './LinkSchema.js';\nimport { LiveStreamMetadata, LiveStreamSchema } from './LiveStreamSchema.js';\nimport { MintMetadata, MintSchema } from './MintSchema.js';\nimport { SpaceMetadata, SpaceSchema } from './SpaceSchema.js';\nimport { StoryMetadata, StorySchema } from './StorySchema.js';\nimport { TextOnlyMetadata, TextOnlySchema } from './TextOnlySchema.js';\nimport { TransactionMetadata, TransactionSchema } from './TransactionSchema.js';\nimport { VideoMetadata, VideoSchema } from './VideoSchema.js';\nimport { ShapeCheck } from '../utils';\n\n/**\n * `PublicationMetadata` is a discriminated union of all primary publication metadata.\n *\n * @example\n * Use the `$schema` property to narrow down the type of the metadata:\n * ```ts\n * const metadata: PublicationMetadata = ...\n *\n * if (metadata.$schema === PublicationSchemaId.ARTICLE_LATEST) {\n * // metadata is ArticleMetadata\n * metadata.content; // => always string, not undefined\n * }\n * ```\n *\n * @example\n * Use the `$schema` property to determine the type of the metadata in an exhaustive switch statement:\n * ```ts\n * const metadata: PublicationMetadata = ...\n *\n * switch (metadata.$schema) {\n * case PublicationSchemaId.ARTICLE_LATEST:\n * // metadata is ArticleMetadata\n * break;\n * case PublicationSchemaId.AUDIO_LATEST:\n * // metadata is AudioMetadata\n * break;\n * case PublicationSchemaId.IMAGE_LATEST:\n * // metadata is ImageMetadata\n * break;\n * case PublicationSchemaId.TEXT_ONLY_LATEST:\n * // metadata is TextOnlyMetadata\n * break;\n * // ...\n * }\n * ```\n */\nexport type PublicationMetadata = ShapeCheck<\n | ArticleMetadata\n | AudioMetadata\n | CheckingInMetadata\n | EmbedMetadata\n | EventMetadata\n | ImageMetadata\n | LinkMetadata\n | LiveStreamMetadata\n | MintMetadata\n | SpaceMetadata\n | TextOnlyMetadata\n | StoryMetadata\n | TransactionMetadata\n | ThreeDMetadata\n | VideoMetadata\n>;\n\n/**\n * A union of all publication metadata schemas.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * PublicationMetadataSchema.parse(valid); // => PublicationMetadata\n *\n * PublicationMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * PublicationMetadataSchema.safeParse(valid);\n * // => { success: true, data: PublicationMetadata }\n *\n * PublicationMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const PublicationMetadataSchema: z.ZodType =\n z.discriminatedUnion('$schema', [\n ArticleSchema,\n AudioSchema,\n CheckingInSchema,\n EmbedSchema,\n EventSchema,\n ImageSchema,\n LinkSchema,\n LiveStreamSchema,\n MintSchema,\n SpaceSchema,\n TextOnlySchema,\n StorySchema,\n TransactionSchema,\n ThreeDSchema,\n VideoSchema,\n ]);\n","import { z } from 'zod';\n\nimport {\n PublicationEncryptionStrategy,\n PublicationEncryptionStrategySchema,\n} from './encryption.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport { MarketplaceMetadataSchema } from '../../marketplace.js';\nimport {\n AppIdSchema,\n LocaleSchema,\n TagSchema,\n nonEmptyStringSchema,\n SignatureSchema,\n AppId,\n Locale,\n Tag,\n encryptable,\n markdown,\n} from '../../primitives.js';\nimport { PublicationMainFocus } from '../PublicationMainFocus.js';\n\nexport * from './encryption.js';\nexport * from './license.js';\nexport * from './media.js';\nexport * from './timezones.js';\n\nexport enum PublicationContentWarning {\n NSFW = 'NSFW',\n SENSITIVE = 'SENSITIVE',\n SPOILER = 'SPOILER',\n}\n\n/**\n * Common fields of a DiGi primary publication.\n */\nexport type PublicationMetadataCommon = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId?: AppId;\n /**\n * Determine if the publication should not be shown in any feed.\n *\n * @defaultValue false\n */\n hideFromFeed?: boolean;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n /**\n * The locale of the metadata.\n */\n locale: Locale;\n /**\n * The encryption strategy used to encrypt the publication.\n *\n * If not present, the publication is presumed to be unencrypted.\n */\n encryptedWith?: PublicationEncryptionStrategy;\n /**\n * An arbitrary list of tags.\n */\n tags?: Tag[];\n /**\n * Specify a content warning.\n */\n contentWarning?: PublicationContentWarning;\n};\n\nconst PublicationMetadataCommonSchema = z.object({\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.optional().describe('The App Id that this publication belongs to.'),\n\n hideFromFeed: z\n .boolean({\n description: 'Determine if the publication should not be shown in any feed.',\n })\n .optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .max(20)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n locale: LocaleSchema,\n\n encryptedWith: PublicationEncryptionStrategySchema.optional(),\n\n tags: z\n .set(TagSchema) // z.set(...) sets uniqueItems: true in generated JSON Schemas\n .max(20)\n .catch((ctx) => ctx.input as Set)\n .superRefine((input, ctx) => {\n // but needs to be corrected in code\n const result = z.array(TagSchema).max(20).safeParse(input);\n\n if (result.success) {\n const uniqueTags = [...new Set(result.data)];\n if (result.data.length > uniqueTags.length) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: `Duplicate tags are not allowed: ${result.data.join(', ')}`,\n });\n }\n return z.NEVER;\n }\n\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n })\n .transform((value) => [...value]) // type coercion\n .optional()\n .describe('An arbitrary list of tags.'),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional(),\n});\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function metadataDetailsWith<\n Augmentation extends {\n mainContentFocus:\n | z.ZodLiteral\n | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>;\n },\n>(augmentation: Augmentation) {\n return PublicationMetadataCommonSchema.extend(augmentation);\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function publicationWith<\n Augmentation extends {\n $schema: z.ZodLiteral;\n digi: ReturnType;\n },\n>(augmentation: Augmentation) {\n return MarketplaceMetadataSchema.extend({\n signature: SignatureSchema.optional(),\n ...augmentation,\n });\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function mainContentFocus(focus: T): z.ZodLiteral;\nexport function mainContentFocus(\n ...focuses: [T, O]\n): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>;\nexport function mainContentFocus(...focuses: [PublicationMainFocus, ...PublicationMainFocus[]]) {\n const description = 'The main focus of the publication.';\n if (focuses.length > 1) {\n const literals = focuses.map((value) => z.literal(value)) as [\n z.ZodLiteral,\n z.ZodLiteral,\n ...z.ZodLiteral[],\n ];\n return z.union(literals, { description });\n }\n return z.literal(focuses[0], { description });\n}\n\n/**\n * @internal\n */\nexport function optionalContentSchema() {\n return encryptable(markdown(z.string({ description: 'Optional markdown content.' }))).optional();\n}\n","/* eslint-disable no-case-declarations */\nimport { z } from 'zod';\n\nimport {\n Amount,\n AmountSchema,\n EvmAddress,\n EvmAddressSchema,\n NetworkAddress,\n NetworkAddressSchema,\n ProfileId,\n ProfileIdSchema,\n PublicationId,\n PublicationIdSchema,\n TokenId,\n TokenIdSchema,\n nonEmptyStringSchema,\n} from '../../primitives.js';\nimport { hasTwoOrMore, Brand, TwoAtLeastArray } from '../../utils.js';\n\nexport enum EncryptionProvider {\n LIT_PROTOCOL = 'LIT_PROTOCOL',\n}\n\nexport enum NftContractType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n}\n\nexport enum ConditionType {\n NFT_OWNERSHIP = 'NFT_OWNERSHIP',\n ERC20_OWNERSHIP = 'ERC20_OWNERSHIP',\n EOA_OWNERSHIP = 'EOA_OWNERSHIP',\n PROFILE_OWNERSHIP = 'PROFILE_OWNERSHIP',\n FOLLOW = 'FOLLOW',\n COLLECT = 'COLLECT',\n ADVANCED_CONTRACT = 'ADVANCED_CONTRACT',\n AND = 'AND',\n OR = 'OR',\n}\n\nexport type NftOwnershipCondition = {\n type: ConditionType.NFT_OWNERSHIP;\n contractType: NftContractType;\n contract: NetworkAddress;\n tokenIds?: TokenId[];\n};\n\n/**\n * @private\n */\nexport function refineNftOwnershipCondition(\n condition: NftOwnershipCondition,\n ctx: z.RefinementCtx,\n) {\n if (condition.contractType === NftContractType.ERC1155) {\n if (condition.tokenIds === undefined || condition.tokenIds.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'ERC1155 requires at least one token id.',\n path: [...ctx.path, 'tokenIds'],\n });\n }\n }\n}\n\n/**\n * @internal\n */\nexport const NftOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.NFT_OWNERSHIP),\n contract: NetworkAddressSchema,\n contractType: z.nativeEnum(NftContractType),\n tokenIds: TokenIdSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A list of token IDs you want to check ownership of. The list is optional for ERC721, ' +\n 'you MUST provide a list of token IDs for ERC1155.',\n ),\n});\n\nexport enum ConditionComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n}\n\nexport type Erc20OwnershipCondition = {\n type: ConditionType.ERC20_OWNERSHIP;\n amount: Amount;\n condition: ConditionComparisonOperator;\n};\n/**\n * @internal\n */\nexport const Erc20OwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.ERC20_OWNERSHIP),\n amount: AmountSchema,\n condition: z.nativeEnum(ConditionComparisonOperator),\n});\n\nexport type EoaOwnershipCondition = {\n type: ConditionType.EOA_OWNERSHIP;\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const EoaOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.EOA_OWNERSHIP),\n address: EvmAddressSchema,\n});\n\nexport type ProfileOwnershipCondition = {\n type: ConditionType.PROFILE_OWNERSHIP;\n profileId: ProfileId;\n};\n/**\n * @internal\n */\nexport const ProfileOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.PROFILE_OWNERSHIP),\n profileId: ProfileIdSchema,\n});\n\nexport type FollowCondition = {\n type: ConditionType.FOLLOW;\n follow: ProfileId;\n};\n/**\n * @internal\n */\nexport const FollowConditionSchema = z.object({\n type: z.literal(ConditionType.FOLLOW),\n follow: ProfileIdSchema,\n});\n\nexport type CollectCondition = {\n type: ConditionType.COLLECT;\n publicationId: PublicationId;\n thisPublication: boolean;\n};\n/**\n * @internal\n */\nexport const CollectConditionSchema = z.object({\n type: z.literal(ConditionType.COLLECT),\n publicationId: PublicationIdSchema, // TODO check on-chain publication ID\n thisPublication: z.boolean().optional().default(false),\n});\n\nexport type AdvancedContractCondition = {\n type: ConditionType.ADVANCED_CONTRACT;\n contract: NetworkAddress;\n functionName: string;\n abi: string;\n params: string[];\n comparison: ConditionComparisonOperator;\n value: string;\n};\n\n/**\n * @internal\n */\nexport const AdvancedContractConditionSchema = z.object({\n type: z.literal(ConditionType.ADVANCED_CONTRACT),\n contract: NetworkAddressSchema.describe('The contract address and chain id'),\n functionName: z.string().min(1).describe('The name of the function you want to call'),\n abi: z\n .string()\n .min(1)\n .describe(\n 'The contract ABI. Has to be in human readable ' +\n 'single string format containing the signature of the function you want to call. See ' +\n 'https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info',\n ),\n params: z\n .string()\n .array()\n .describe(\n 'The parameters to pass to the function. Must be ' +\n 'exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to ' +\n 'represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays.',\n ),\n comparison: z\n .nativeEnum(ConditionComparisonOperator)\n .describe(\n 'The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL',\n ),\n value: z\n .string()\n .regex(/^(true|false|\\d{1,70})$/)\n .describe(`The comparison value. Accepts 'true', 'false' or a number`),\n});\n\nexport type SimpleCondition =\n | CollectCondition\n | AdvancedContractCondition\n | EoaOwnershipCondition\n | Erc20OwnershipCondition\n | FollowCondition\n | NftOwnershipCondition\n | ProfileOwnershipCondition;\n\ntype BaseCondition = {\n type: ConditionType;\n};\n\ntype ComposableConditionSchema = z.ZodObject<\n {\n type: z.ZodTypeAny;\n } & z.ZodRawShape,\n z.UnknownKeysParam,\n z.ZodTypeAny,\n T\n>;\n\nexport type AndCondition = {\n type: ConditionType.AND;\n criteria: TwoAtLeastArray;\n};\n\nfunction andConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.AND),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const AndConditionSchema = andConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type OrCondition = {\n type: ConditionType.OR;\n criteria: TwoAtLeastArray;\n};\n\nfunction orConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.OR),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const OrConditionSchema = orConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type AnyCondition =\n | SimpleCondition\n | AndCondition\n | OrCondition;\n\nfunction refineAnyCondition(condition: AnyCondition, ctx: z.RefinementCtx) {\n if (condition.type === ConditionType.AND || condition.type === ConditionType.OR) {\n condition.criteria.forEach((c, idx) =>\n refineAnyCondition(c, { ...ctx, path: [...ctx.path, 'criteria', idx] }),\n );\n }\n if (condition.type === ConditionType.NFT_OWNERSHIP) {\n refineNftOwnershipCondition(condition, ctx);\n }\n}\n\nexport type AccessCondition = OrCondition;\n/**\n * @internal\n */\nexport const AccessConditionSchema: z.ZodType =\n orConditionSchema([\n AndConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n EoaOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n FollowConditionSchema,\n NftOwnershipConditionSchema,\n OrConditionSchema,\n ProfileOwnershipConditionSchema,\n ]).superRefine((root, ctx): root is AccessCondition => {\n root.criteria.forEach((condition, idx) => {\n refineAnyCondition(condition, {\n ...ctx,\n path: [...ctx.path, 'criteria', idx],\n });\n });\n return z.NEVER;\n });\n\n/**\n * A symmetric encryption key.\n */\nexport type LitEncryptionKey = Brand;\n/**\n * @internal\n */\nexport function toLitEncryptionKey(value: string): LitEncryptionKey {\n return value as LitEncryptionKey;\n}\n/**\n * @internal\n */\nexport const LitEncryptionKeySchema: z.Schema = z\n .string()\n .describe('A symmetric encryption key.')\n .length(368, 'Encryption key should be 368 characters long.')\n .transform(toLitEncryptionKey);\n\n/**\n * @internal\n */\nexport const EncryptedPaths = nonEmptyStringSchema(\n 'An encrypted path is a string of keys separated by . that describe ' +\n 'a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).',\n)\n .array()\n .min(1);\nexport type EncryptedPaths = z.infer;\n\nexport type LitEncryptionStrategy = {\n provider: EncryptionProvider;\n encryptionKey: LitEncryptionKey;\n accessCondition: AccessCondition;\n encryptedPaths: string[];\n};\n/**\n * @internal\n */\nexport const LitEncryptionStrategySchema = z.object(\n {\n provider: z.literal(EncryptionProvider.LIT_PROTOCOL),\n encryptionKey: LitEncryptionKeySchema,\n accessCondition: AccessConditionSchema,\n encryptedPaths: EncryptedPaths,\n },\n {\n description: 'Publication encryption strategy powered by the LIT Protocol.',\n },\n);\n\n/**\n * The publication encryption strategy.\n *\n * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly.\n */\nexport type PublicationEncryptionStrategy = LitEncryptionStrategy;\n\n/**\n * @internal\n */\nexport const PublicationEncryptionStrategySchema: z.ZodType<\n PublicationEncryptionStrategy,\n z.ZodTypeDef,\n object\n> = z.discriminatedUnion('provider', [LitEncryptionStrategySchema]);\n","import { z } from 'zod';\n\nimport { nonEmptyStringSchema } from './primitives.js';\n\n/**\n * The type of a metadata attribute.\n */\nexport enum MetadataAttributeType {\n BOOLEAN = 'Boolean',\n DATE = 'Date',\n NUMBER = 'Number',\n STRING = 'String',\n JSON = 'JSON',\n}\n\nexport type BooleanAttribute = {\n /**\n * A JS boolean value serialized as string. It's consumer responsibility to parse it.\n */\n value: 'true' | 'false';\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.BOOLEAN;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const BooleanAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.BOOLEAN),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .enum(['true', 'false'])\n .describe(\"A JS boolean value serialized as string. It's consumer responsibility to parse it.\"),\n});\n\nexport type DateAttribute = {\n /**\n * A valid ISO 8601 date string. It's consumer responsibility to parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.DATE;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const DateAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.DATE),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .string()\n .datetime()\n .describe(\"A valid ISO 8601 date string. It's consumer responsibility to parse it.\"),\n});\n\nexport type NumberAttribute = {\n /**\n * A valid JS number serialized as string. It's consumer responsibility to parse it.\n *\n * @example\n * ```ts\n * '42'\n *\n * '42n'\n *\n * '42.42'\n * ```\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.NUMBER;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const NumberAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.NUMBER),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"), // TODO generalize and share\n value: nonEmptyStringSchema(\n \"A valid JS number serialized as string. It's consumer responsibility to parse it.\",\n ),\n});\n\nexport type StringAttribute = {\n /**\n * Any string value.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.STRING;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const StringAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.STRING),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema('A string value.'),\n});\n\nexport type JSONAttribute = {\n /**\n * A JSON string. It's consumer responsibility to validate and parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.JSON;\n /**\n * Union discriminant.\n */\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const JSONAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.JSON),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema(\n \"A JSON string. It's consumer responsibility to validate and parse it.\",\n ),\n});\n\n/**\n * A DiGi metadata attribute.\n */\nexport type MetadataAttribute =\n | BooleanAttribute\n | DateAttribute\n | NumberAttribute\n | StringAttribute\n | JSONAttribute;\n\nexport const MetadataAttributeSchema = z.discriminatedUnion('type', [\n BooleanAttributeSchema,\n DateAttributeSchema,\n NumberAttributeSchema,\n StringAttributeSchema,\n JSONAttributeSchema,\n]);\n","import { z } from 'zod';\n\nimport { Markdown, URI, markdown, nonEmptyStringSchema, uriSchema } from './primitives.js';\n\n/**\n * The display type of a marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport enum MarketplaceMetadataAttributeDisplayType {\n NUMBER = 'number',\n STRING = 'string',\n DATE = 'date',\n}\n\n/**\n * A marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport type MarketplaceMetadataAttribute = {\n value?: string | number | undefined;\n display_type?: MarketplaceMetadataAttributeDisplayType | undefined;\n trait_type?: string | undefined;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataAttributeSchema: z.ZodType<\n MarketplaceMetadataAttribute,\n z.ZodTypeDef,\n object\n> = z\n .object({\n display_type: z.nativeEnum(MarketplaceMetadataAttributeDisplayType).optional(),\n trait_type: nonEmptyStringSchema('The name of the trait.').optional(),\n value: z.union([z.string(), z.number()]).optional(),\n })\n .passthrough(); // make it more loose to allow for future marketplace extensions\n\n/**\n * The metadata standard for marketplace(s).\n *\n * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure\n */\nexport type MarketplaceMetadata = {\n /**\n * A human-readable description of the item. It could be plain text or markdown.\n */\n description?: Markdown | null;\n /**\n * This is the URL that will appear below the asset's image on OpenSea and others etc.\n * and will allow users to leave OpenSea and view the item on the site.\n */\n external_url?: URI | null;\n /**\n * Name of the NFT item.\n */\n name?: string;\n /**\n * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\n attributes?: MarketplaceMetadataAttribute[];\n /**\n * Marketplaces will store any NFT image here.\n */\n image?: URI | null;\n /**\n * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV,\n * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas,\n * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.\n */\n animation_url?: URI | null;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataSchema = z\n .object({\n description: markdown(\n z.string({\n description:\n 'A human-readable description of the item. It could be plain text or markdown.',\n }),\n )\n .optional()\n .nullable()\n .catch(null),\n\n external_url: uriSchema(\n `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n 'and will allow users to leave OpenSea and view the item on the site.',\n )\n .optional()\n .nullable()\n .catch(null),\n\n name: z.string({ description: 'Name of the NFT item.' }).optional(),\n\n attributes: MarketplaceMetadataAttributeSchema.array()\n .optional()\n .describe(\n 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n )\n .catch([]),\n\n image: uriSchema('Marketplaces will store any NFT image here.')\n .optional()\n .nullable()\n .catch(null),\n\n animation_url: uriSchema(\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n )\n .optional()\n .nullable()\n .catch(null),\n })\n .passthrough(); // loose validation for any unknown fields;\n","import { z } from 'zod';\n\n/**\n * The supported license types.\n */\nexport enum MetadataLicenseType {\n CCO = 'CCO',\n CC_BY = 'CC BY',\n CC_BY_ND = 'CC BY-ND',\n CC_BY_NC = 'CC BY-NC',\n TBNL_C_D_PL_Legal = 'TBNL-C-D-PL-Legal',\n TBNL_C_DT_PL_Legal = 'TBNL-C-DT-PL-Legal',\n TBNL_C_ND_PL_Legal = 'TBNL-C-ND-PL-Legal',\n TBNL_C_D_NPL_Legal = 'TBNL-C-D-NPL-Legal',\n TBNL_C_DT_NPL_Legal = 'TBNL-C-DT-NPL-Legal',\n TBNL_C_DTSA_PL_Legal = 'TBNL-C-DTSA-PL-Legal',\n TBNL_C_DTSA_NPL_Legal = 'TBNL-C-DTSA-NPL-Legal',\n TBNL_C_ND_NPL_Legal = 'TBNL-C-ND-NPL-Legal',\n TBNL_C_D_PL_Ledger = 'TBNL-C-D-PL-Ledger',\n TBNL_C_DT_PL_Ledger = 'TBNL-C-DT-PL-Ledger',\n TBNL_C_ND_PL_Ledger = 'TBNL-C-ND-PL-Ledger',\n TBNL_C_D_NPL_Ledger = 'TBNL-C-D-NPL-Ledger',\n TBNL_C_DT_NPL_Ledger = 'TBNL-C-DT-NPL-Ledger',\n TBNL_C_DTSA_PL_Ledger = 'TBNL-C-DTSA-PL-Ledger',\n TBNL_C_DTSA_NPL_Ledger = 'TBNL-C-DTSA-NPL-Ledger',\n TBNL_C_ND_NPL_Ledger = 'TBNL-C-ND-NPL-Ledger',\n TBNL_NC_D_PL_Legal = 'TBNL-NC-D-PL-Legal',\n TBNL_NC_DT_PL_Legal = 'TBNL-NC-DT-PL-Legal',\n TBNL_NC_ND_PL_Legal = 'TBNL-NC-ND-PL-Legal',\n TBNL_NC_D_NPL_Legal = 'TBNL-NC-D-NPL-Legal',\n TBNL_NC_DT_NPL_Legal = 'TBNL-NC-DT-NPL-Legal',\n TBNL_NC_DTSA_PL_Legal = 'TBNL-NC-DTSA-PL-Legal',\n TBNL_NC_DTSA_NPL_Legal = 'TBNL-NC-DTSA-NPL-Legal',\n TBNL_NC_ND_NPL_Legal = 'TBNL-NC-ND-NPL-Legal',\n TBNL_NC_D_PL_Ledger = 'TBNL-NC-D-PL-Ledger',\n TBNL_NC_DT_PL_Ledger = 'TBNL-NC-DT-PL-Ledger',\n TBNL_NC_ND_PL_Ledger = 'TBNL-NC-ND-PL-Ledger',\n TBNL_NC_D_NPL_Ledger = 'TBNL-NC-D-NPL-Ledger',\n TBNL_NC_DT_NPL_Ledger = 'TBNL-NC-DT-NPL-Ledger',\n TBNL_NC_DTSA_PL_Ledger = 'TBNL-NC-DTSA-PL-Ledger',\n TBNL_NC_DTSA_NPL_Ledger = 'TBNL-NC-DTSA-NPL-Ledger',\n TBNL_NC_ND_NPL_Ledger = 'TBNL-NC-ND-NPL-Ledger',\n}\n\n/**\n * @internal\n */\nexport const MetadataLicenseTypeSchema = z.nativeEnum(MetadataLicenseType);\n","import { z } from 'zod';\n\nimport { MetadataLicenseType, MetadataLicenseTypeSchema } from './license.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport {\n EncryptableString,\n EncryptableURI,\n encryptableStringSchema,\n encryptableUriSchema,\n} from '../../primitives.js';\n\nconst MediaCommonSchema = z.object({\n item: encryptableUriSchema('The location of the file.'),\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',\n ),\n});\n\n/**\n * The kind of audio media.\n */\nexport enum MediaAudioKind {\n MUSIC = 'MUSIC',\n PODCAST = 'PODCAST',\n AUDIOBOOK = 'AUDIOBOOK',\n VOICE_NOTE = 'VOICE_NOTE',\n SOUND = 'SOUND',\n OTHER = 'OTHER',\n}\n\n/**\n * Audio mime type.\n */\nexport enum MediaAudioMimeType {\n WAV = 'audio/wav',\n WAV_VND = 'audio/vnd.wave',\n MP3 = 'audio/mpeg',\n OGG_AUDIO = 'audio/ogg',\n MP4_AUDIO = 'audio/mp4',\n AAC = 'audio/aac',\n WEBM_AUDIO = 'audio/webm',\n FLAC = 'audio/flac',\n}\n\nexport type MediaAudio = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the audio.\n */\n type: MediaAudioMimeType;\n /**\n * The cover image for the audio.\n */\n cover?: EncryptableURI;\n /**\n * How long the the audio is in seconds.\n */\n duration?: number;\n /**\n * The license for the audio.\n */\n license?: MetadataLicenseType;\n /**\n * The credits for the audio.\n */\n credits?: EncryptableString;\n /**\n * The name of the artist.\n */\n artist?: EncryptableString;\n /**\n * The genre of the audio.\n */\n genre?: EncryptableString;\n /**\n * The record label for the audio.\n */\n recordLabel?: EncryptableString;\n /**\n * The type of audio.\n */\n kind?: MediaAudioKind;\n /**\n * The lyrics for the audio.\n */\n lyrics?: EncryptableURI;\n};\n\n/**\n * @internal\n */\nexport const MediaAudioSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaAudioMimeType, { description: 'The mime type of the audio file.' }),\n cover: encryptableUriSchema('The cover image for the audio.').optional(),\n duration: z\n .number({ description: 'How long the the audio is in seconds.' })\n .positive()\n .int()\n .optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the audio.'),\n credits: encryptableStringSchema('The credits for the audio.').optional(),\n artist: encryptableStringSchema('The name of the artist.').optional(),\n genre: encryptableStringSchema('The genre of the audio').optional(),\n recordLabel: encryptableStringSchema('The record label for the audio.').optional(),\n kind: z.nativeEnum(MediaAudioKind, { description: 'The type of audio.' }).optional(),\n lyrics: encryptableUriSchema('The lyrics for the audio.').optional(),\n});\n\n/**\n * Image mime type.\n */\nexport enum MediaImageMimeType {\n BMP = 'image/bmp',\n GIF = 'image/gif',\n HEIC = 'image/heic',\n JPEG = 'image/jpeg',\n PNG = 'image/png',\n SVG_XML = 'image/svg+xml',\n TIFF = 'image/tiff',\n WEBP = 'image/webp',\n X_MS_BMP = 'image/x-ms-bmp',\n}\n\nexport type MediaImage = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the image.\n */\n type: MediaImageMimeType;\n /**\n * The alt tag for accessibility.\n */\n altTag?: EncryptableString;\n /**\n * The license for the image.\n */\n license?: MetadataLicenseType;\n};\n\n/**\n * @internal\n */\nexport const MediaImageSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaImageMimeType, { description: 'The mime type of the image' }),\n altTag: encryptableStringSchema('The alt tag for accessibility').optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the image'),\n});\n\n/**\n * Video mime type.\n */\nexport enum MediaVideoMimeType {\n GLTF = 'model/gltf+json',\n GLTF_BINARY = 'model/gltf-binary',\n M4V = 'video/x-m4v',\n MOV = 'video/mov',\n MP4 = 'video/mp4',\n MPEG = 'video/mpeg',\n OGG = 'video/ogg',\n OGV = 'video/ogv',\n QUICKTIME = 'video/quicktime',\n WEBM = 'video/webm',\n}\n\nexport type MediaVideo = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the video.\n */\n type: MediaVideoMimeType;\n /**\n * The alt tag for accessibility.\n */\n altTag?: string;\n /**\n * The cover image for the video.\n */\n cover?: EncryptableURI;\n /**\n * How long the the video is in seconds.\n */\n duration?: number;\n /**\n * The license for the video.\n */\n license?: MetadataLicenseType;\n};\n\n/**\n * @internal\n */\nexport const MediaVideoSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaVideoMimeType, { description: 'The mime type of the video' }),\n altTag: encryptableStringSchema('The alt tag for accessibility').optional(),\n cover: encryptableUriSchema('The cover image for the video').optional(),\n duration: z\n .number({ description: 'How long the the video is in seconds' })\n .positive()\n .int()\n .optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the video'),\n});\n\n/**\n * Any media type.\n */\nexport type AnyMedia = MediaAudio | MediaImage | MediaVideo;\n\nconst AnyMediaImageMimeType = {\n ...MediaAudioMimeType,\n ...MediaImageMimeType,\n ...MediaVideoMimeType,\n};\ntype AnyMediaImageMimeType = MediaAudioMimeType | MediaImageMimeType | MediaVideoMimeType;\n\ntype AnyMediaShape = Pick;\nconst AnyMediaShapeScheme: z.ZodType = z.object({\n type: z.nativeEnum(AnyMediaImageMimeType),\n});\n\nfunction isAnyMediaShape(val: unknown): val is AnyMediaShape {\n return AnyMediaShapeScheme.safeParse(val).success;\n}\n\nfunction resolveAnyMediaSchema(val: unknown) {\n if (!isAnyMediaShape(val)) return AnyMediaShapeScheme;\n\n switch (val.type) {\n case MediaAudioMimeType.WAV:\n case MediaAudioMimeType.WAV_VND:\n case MediaAudioMimeType.MP3:\n case MediaAudioMimeType.OGG_AUDIO:\n case MediaAudioMimeType.MP4_AUDIO:\n case MediaAudioMimeType.AAC:\n case MediaAudioMimeType.WEBM_AUDIO:\n case MediaAudioMimeType.FLAC:\n return MediaAudioSchema;\n\n case MediaImageMimeType.BMP:\n case MediaImageMimeType.GIF:\n case MediaImageMimeType.HEIC:\n case MediaImageMimeType.JPEG:\n case MediaImageMimeType.PNG:\n case MediaImageMimeType.SVG_XML:\n case MediaImageMimeType.TIFF:\n case MediaImageMimeType.WEBP:\n case MediaImageMimeType.X_MS_BMP:\n return MediaImageSchema;\n\n case MediaVideoMimeType.GLTF:\n case MediaVideoMimeType.GLTF_BINARY:\n case MediaVideoMimeType.M4V:\n case MediaVideoMimeType.MOV:\n case MediaVideoMimeType.MP4:\n case MediaVideoMimeType.MPEG:\n case MediaVideoMimeType.OGG:\n case MediaVideoMimeType.OGV:\n case MediaVideoMimeType.QUICKTIME:\n case MediaVideoMimeType.WEBM:\n return MediaVideoSchema;\n }\n\n // the alleged AnyMedia is not a valid shape\n return AnyMediaShapeScheme;\n}\n\n/**\n * @internal\n */\nexport const AnyMediaSchema: z.ZodType = z\n .discriminatedUnion('type', [MediaAudioSchema, MediaImageSchema, MediaVideoSchema])\n // the following is necessary cause discriminatedUnion does not properly work when\n // the discriminant is a union of enums, so we keep the discriminatedUnion for the\n // correct JSON Schema definition but we manually refine the type for runtime checks\n .catch((ctx) => ctx.input as AnyMedia) // passthrough even if might not be an AnyMedia type\n .superRefine((val: unknown, ctx): val is AnyMedia => {\n const Schema = resolveAnyMediaSchema(val);\n\n if (!Schema) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union_discriminator,\n options: [\n ...new Set(\n [\n Object.values(MediaAudioMimeType),\n Object.values(MediaImageMimeType),\n Object.values(MediaVideoMimeType),\n ].flat(),\n ),\n ],\n message:\n 'Invalid discriminator value. Expected one of `MediaAudioMimeType`, `MediaImageMimeType`, `MediaVideoMimeType` values.',\n });\n return z.NEVER;\n }\n\n const result = Schema.safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n\n return z.NEVER;\n });\n","import { z } from 'zod';\n\nexport const timezones = [\n 'Africa/Abidjan',\n 'Africa/Accra',\n 'Africa/Addis_Ababa',\n 'Africa/Algiers',\n 'Africa/Asmera',\n 'Africa/Bamako',\n 'Africa/Bangui',\n 'Africa/Banjul',\n 'Africa/Bissau',\n 'Africa/Blantyre',\n 'Africa/Brazzaville',\n 'Africa/Bujumbura',\n 'Africa/Cairo',\n 'Africa/Casablanca',\n 'Africa/Ceuta',\n 'Africa/Conakry',\n 'Africa/Dakar',\n 'Africa/Dar_es_Salaam',\n 'Africa/Djibouti',\n 'Africa/Douala',\n 'Africa/El_Aaiun',\n 'Africa/Freetown',\n 'Africa/Gaborone',\n 'Africa/Harare',\n 'Africa/Johannesburg',\n 'Africa/Juba',\n 'Africa/Kampala',\n 'Africa/Khartoum',\n 'Africa/Kigali',\n 'Africa/Kinshasa',\n 'Africa/Lagos',\n 'Africa/Libreville',\n 'Africa/Lome',\n 'Africa/Luanda',\n 'Africa/Lubumbashi',\n 'Africa/Lusaka',\n 'Africa/Malabo',\n 'Africa/Maputo',\n 'Africa/Maseru',\n 'Africa/Mbabane',\n 'Africa/Mogadishu',\n 'Africa/Monrovia',\n 'Africa/Nairobi',\n 'Africa/Ndjamena',\n 'Africa/Niamey',\n 'Africa/Nouakchott',\n 'Africa/Ouagadougou',\n 'Africa/Porto-Novo',\n 'Africa/Sao_Tome',\n 'Africa/Tripoli',\n 'Africa/Tunis',\n 'Africa/Windhoek',\n 'America/Adak',\n 'America/Anchorage',\n 'America/Anguilla',\n 'America/Antigua',\n 'America/Araguaina',\n 'America/Argentina/La_Rioja',\n 'America/Argentina/Rio_Gallegos',\n 'America/Argentina/Salta',\n 'America/Argentina/San_Juan',\n 'America/Argentina/San_Luis',\n 'America/Argentina/Tucuman',\n 'America/Argentina/Ushuaia',\n 'America/Aruba',\n 'America/Asuncion',\n 'America/Bahia',\n 'America/Bahia_Banderas',\n 'America/Barbados',\n 'America/Belem',\n 'America/Belize',\n 'America/Blanc-Sablon',\n 'America/Boa_Vista',\n 'America/Bogota',\n 'America/Boise',\n 'America/Buenos_Aires',\n 'America/Cambridge_Bay',\n 'America/Campo_Grande',\n 'America/Cancun',\n 'America/Caracas',\n 'America/Catamarca',\n 'America/Cayenne',\n 'America/Cayman',\n 'America/Chicago',\n 'America/Chihuahua',\n 'America/Ciudad_Juarez',\n 'America/Coral_Harbour',\n 'America/Cordoba',\n 'America/Costa_Rica',\n 'America/Creston',\n 'America/Cuiaba',\n 'America/Curacao',\n 'America/Danmarkshavn',\n 'America/Dawson',\n 'America/Dawson_Creek',\n 'America/Denver',\n 'America/Detroit',\n 'America/Dominica',\n 'America/Edmonton',\n 'America/Eirunepe',\n 'America/El_Salvador',\n 'America/Fort_Nelson',\n 'America/Fortaleza',\n 'America/Glace_Bay',\n 'America/Godthab',\n 'America/Goose_Bay',\n 'America/Grand_Turk',\n 'America/Grenada',\n 'America/Guadeloupe',\n 'America/Guatemala',\n 'America/Guayaquil',\n 'America/Guyana',\n 'America/Halifax',\n 'America/Havana',\n 'America/Hermosillo',\n 'America/Indiana/Knox',\n 'America/Indiana/Marengo',\n 'America/Indiana/Petersburg',\n 'America/Indiana/Tell_City',\n 'America/Indiana/Vevay',\n 'America/Indiana/Vincennes',\n 'America/Indiana/Winamac',\n 'America/Indianapolis',\n 'America/Inuvik',\n 'America/Iqaluit',\n 'America/Jamaica',\n 'America/Jujuy',\n 'America/Juneau',\n 'America/Kentucky/Monticello',\n 'America/Kralendijk',\n 'America/La_Paz',\n 'America/Lima',\n 'America/Los_Angeles',\n 'America/Louisville',\n 'America/Lower_Princes',\n 'America/Maceio',\n 'America/Managua',\n 'America/Manaus',\n 'America/Marigot',\n 'America/Martinique',\n 'America/Matamoros',\n 'America/Mazatlan',\n 'America/Mendoza',\n 'America/Menominee',\n 'America/Merida',\n 'America/Metlakatla',\n 'America/Mexico_City',\n 'America/Miquelon',\n 'America/Moncton',\n 'America/Monterrey',\n 'America/Montevideo',\n 'America/Montserrat',\n 'America/Nassau',\n 'America/New_York',\n 'America/Nipigon',\n 'America/Nome',\n 'America/Noronha',\n 'America/North_Dakota/Beulah',\n 'America/North_Dakota/Center',\n 'America/North_Dakota/New_Salem',\n 'America/Ojinaga',\n 'America/Panama',\n 'America/Pangnirtung',\n 'America/Paramaribo',\n 'America/Phoenix',\n 'America/Port-au-Prince',\n 'America/Port_of_Spain',\n 'America/Porto_Velho',\n 'America/Puerto_Rico',\n 'America/Punta_Arenas',\n 'America/Rainy_River',\n 'America/Rankin_Inlet',\n 'America/Recife',\n 'America/Regina',\n 'America/Resolute',\n 'America/Rio_Branco',\n 'America/Santa_Isabel',\n 'America/Santarem',\n 'America/Santiago',\n 'America/Santo_Domingo',\n 'America/Sao_Paulo',\n 'America/Scoresbysund',\n 'America/Sitka',\n 'America/St_Barthelemy',\n 'America/St_Johns',\n 'America/St_Kitts',\n 'America/St_Lucia',\n 'America/St_Thomas',\n 'America/St_Vincent',\n 'America/Swift_Current',\n 'America/Tegucigalpa',\n 'America/Thule',\n 'America/Thunder_Bay',\n 'America/Tijuana',\n 'America/Toronto',\n 'America/Tortola',\n 'America/Vancouver',\n 'America/Whitehorse',\n 'America/Winnipeg',\n 'America/Yakutat',\n 'America/Yellowknife',\n 'Antarctica/Casey',\n 'Antarctica/Davis',\n 'Antarctica/DumontDUrville',\n 'Antarctica/Macquarie',\n 'Antarctica/Mawson',\n 'Antarctica/McMurdo',\n 'Antarctica/Palmer',\n 'Antarctica/Rothera',\n 'Antarctica/Syowa',\n 'Antarctica/Troll',\n 'Antarctica/Vostok',\n 'Arctic/Longyearbyen',\n 'Asia/Aden',\n 'Asia/Almaty',\n 'Asia/Amman',\n 'Asia/Anadyr',\n 'Asia/Aqtau',\n 'Asia/Aqtobe',\n 'Asia/Ashgabat',\n 'Asia/Atyrau',\n 'Asia/Baghdad',\n 'Asia/Bahrain',\n 'Asia/Baku',\n 'Asia/Bangkok',\n 'Asia/Barnaul',\n 'Asia/Beirut',\n 'Asia/Bishkek',\n 'Asia/Brunei',\n 'Asia/Calcutta',\n 'Asia/Chita',\n 'Asia/Choibalsan',\n 'Asia/Colombo',\n 'Asia/Damascus',\n 'Asia/Dhaka',\n 'Asia/Dili',\n 'Asia/Dubai',\n 'Asia/Dushanbe',\n 'Asia/Famagusta',\n 'Asia/Gaza',\n 'Asia/Hebron',\n 'Asia/Hong_Kong',\n 'Asia/Hovd',\n 'Asia/Irkutsk',\n 'Asia/Jakarta',\n 'Asia/Jayapura',\n 'Asia/Jerusalem',\n 'Asia/Kabul',\n 'Asia/Kamchatka',\n 'Asia/Karachi',\n 'Asia/Katmandu',\n 'Asia/Khandyga',\n 'Asia/Krasnoyarsk',\n 'Asia/Kuala_Lumpur',\n 'Asia/Kuching',\n 'Asia/Kuwait',\n 'Asia/Macau',\n 'Asia/Magadan',\n 'Asia/Makassar',\n 'Asia/Manila',\n 'Asia/Muscat',\n 'Asia/Nicosia',\n 'Asia/Novokuznetsk',\n 'Asia/Novosibirsk',\n 'Asia/Omsk',\n 'Asia/Oral',\n 'Asia/Phnom_Penh',\n 'Asia/Pontianak',\n 'Asia/Pyongyang',\n 'Asia/Qatar',\n 'Asia/Qostanay',\n 'Asia/Qyzylorda',\n 'Asia/Rangoon',\n 'Asia/Riyadh',\n 'Asia/Saigon',\n 'Asia/Sakhalin',\n 'Asia/Samarkand',\n 'Asia/Seoul',\n 'Asia/Shanghai',\n 'Asia/Singapore',\n 'Asia/Srednekolymsk',\n 'Asia/Taipei',\n 'Asia/Tashkent',\n 'Asia/Tbilisi',\n 'Asia/Tehran',\n 'Asia/Thimphu',\n 'Asia/Tokyo',\n 'Asia/Tomsk',\n 'Asia/Ulaanbaatar',\n 'Asia/Urumqi',\n 'Asia/Ust-Nera',\n 'Asia/Vientiane',\n 'Asia/Vladivostok',\n 'Asia/Yakutsk',\n 'Asia/Yekaterinburg',\n 'Asia/Yerevan',\n 'Atlantic/Azores',\n 'Atlantic/Bermuda',\n 'Atlantic/Canary',\n 'Atlantic/Cape_Verde',\n 'Atlantic/Faeroe',\n 'Atlantic/Madeira',\n 'Atlantic/Reykjavik',\n 'Atlantic/South_Georgia',\n 'Atlantic/St_Helena',\n 'Atlantic/Stanley',\n 'Australia/Adelaide',\n 'Australia/Brisbane',\n 'Australia/Broken_Hill',\n 'Australia/Currie',\n 'Australia/Darwin',\n 'Australia/Eucla',\n 'Australia/Hobart',\n 'Australia/Lindeman',\n 'Australia/Lord_Howe',\n 'Australia/Melbourne',\n 'Australia/Perth',\n 'Australia/Sydney',\n 'Europe/Amsterdam',\n 'Europe/Andorra',\n 'Europe/Astrakhan',\n 'Europe/Athens',\n 'Europe/Belgrade',\n 'Europe/Berlin',\n 'Europe/Bratislava',\n 'Europe/Brussels',\n 'Europe/Bucharest',\n 'Europe/Budapest',\n 'Europe/Busingen',\n 'Europe/Chisinau',\n 'Europe/Copenhagen',\n 'Europe/Dublin',\n 'Europe/Gibraltar',\n 'Europe/Guernsey',\n 'Europe/Helsinki',\n 'Europe/Isle_of_Man',\n 'Europe/Istanbul',\n 'Europe/Jersey',\n 'Europe/Kaliningrad',\n 'Europe/Kiev',\n 'Europe/Kirov',\n 'Europe/Lisbon',\n 'Europe/Ljubljana',\n 'Europe/London',\n 'Europe/Luxembourg',\n 'Europe/Madrid',\n 'Europe/Malta',\n 'Europe/Mariehamn',\n 'Europe/Minsk',\n 'Europe/Monaco',\n 'Europe/Moscow',\n 'Europe/Oslo',\n 'Europe/Paris',\n 'Europe/Podgorica',\n 'Europe/Prague',\n 'Europe/Riga',\n 'Europe/Rome',\n 'Europe/Samara',\n 'Europe/San_Marino',\n 'Europe/Sarajevo',\n 'Europe/Saratov',\n 'Europe/Simferopol',\n 'Europe/Skopje',\n 'Europe/Sofia',\n 'Europe/Stockholm',\n 'Europe/Tallinn',\n 'Europe/Tirane',\n 'Europe/Ulyanovsk',\n 'Europe/Uzhgorod',\n 'Europe/Vaduz',\n 'Europe/Vatican',\n 'Europe/Vienna',\n 'Europe/Vilnius',\n 'Europe/Volgograd',\n 'Europe/Warsaw',\n 'Europe/Zagreb',\n 'Europe/Zaporozhye',\n 'Europe/Zurich',\n 'Indian/Antananarivo',\n 'Indian/Chagos',\n 'Indian/Christmas',\n 'Indian/Cocos',\n 'Indian/Comoro',\n 'Indian/Kerguelen',\n 'Indian/Mahe',\n 'Indian/Maldives',\n 'Indian/Mauritius',\n 'Indian/Mayotte',\n 'Indian/Reunion',\n 'Pacific/Apia',\n 'Pacific/Auckland',\n 'Pacific/Bougainville',\n 'Pacific/Chatham',\n 'Pacific/Easter',\n 'Pacific/Efate',\n 'Pacific/Enderbury',\n 'Pacific/Fakaofo',\n 'Pacific/Fiji',\n 'Pacific/Funafuti',\n 'Pacific/Galapagos',\n 'Pacific/Gambier',\n 'Pacific/Guadalcanal',\n 'Pacific/Guam',\n 'Pacific/Honolulu',\n 'Pacific/Johnston',\n 'Pacific/Kiritimati',\n 'Pacific/Kosrae',\n 'Pacific/Kwajalein',\n 'Pacific/Majuro',\n 'Pacific/Marquesas',\n 'Pacific/Midway',\n 'Pacific/Nauru',\n 'Pacific/Niue',\n 'Pacific/Norfolk',\n 'Pacific/Noumea',\n 'Pacific/Pago_Pago',\n 'Pacific/Palau',\n 'Pacific/Pitcairn',\n 'Pacific/Ponape',\n 'Pacific/Port_Moresby',\n 'Pacific/Rarotonga',\n 'Pacific/Saipan',\n 'Pacific/Tahiti',\n 'Pacific/Tarawa',\n 'Pacific/Tongatapu',\n 'Pacific/Truk',\n 'Pacific/Wake',\n 'Pacific/Wallis',\n] as const;\n\n/**\n * Timezone ID\n */\nexport type TimezoneId = (typeof timezones)[number];\n\n/**\n * @internal\n */\nexport const TimezoneIdSchema = z.enum(timezones);\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n mainContentFocus,\n PublicationMetadataCommon,\n metadataDetailsWith,\n MetadataLicenseType,\n MetadataLicenseTypeSchema,\n publicationWith,\n optionalContentSchema,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n nonEmptyStringSchema,\n Signature,\n URI,\n uriSchema,\n} from '../primitives.js';\n\n/**\n * The 3D format type.\n */\nexport enum ThreeDFormat {\n GLTF = 'gLTF/GLB',\n FBX = 'FBX',\n VRM = 'VRM',\n OBJ = 'OBJ',\n}\n\n/**\n * A 3D asset.\n */\nexport type ThreeDAsset = {\n /**\n * The URI of the 3D asset zip file.\n */\n uri: URI;\n /**\n * The URL of the recommended web based 3D player to use to view the 3D asset.\n */\n playerUrl: URI;\n /**\n * The 3D format of the asset.\n */\n format: ThreeDFormat;\n /**\n * Path in extracted zip. Relative. 3D start point, MUST be 3D file type.\n */\n zipPath?: string;\n /**\n * The license regulating the use of the 3D asset.\n */\n license?: MetadataLicenseType;\n};\n/**\n * @internal\n */\nexport const ThreeDAssetSchema: z.ZodType = z.object({\n uri: uriSchema('The URI of the 3D asset zip file.'),\n zipPath: nonEmptyStringSchema()\n .optional()\n .describe('Path in extracted zip. Relative. 3D start point, MUST be 3D file type.'),\n playerUrl: uriSchema(\n 'The URL of the recommended web based 3D player to use to view the 3D asset.',\n ),\n format: z.nativeEnum(ThreeDFormat).describe('The 3D format of the asset.'),\n license: MetadataLicenseTypeSchema.optional().describe(\n 'The license regulating the use of the 3D asset.',\n ),\n});\n\nexport type ThreeDMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.THREE_D;\n /**\n * The 3D items for the publication.\n */\n assets: ThreeDAsset[];\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\nconst ThreeDMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.THREE_D),\n\n assets: ThreeDAssetSchema.array().min(1).describe('The 3D items for the publication'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a 3D piece of art.\n */\nexport type ThreeDMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.THREE_D_LATEST;\n /**\n * The metadata details.\n */\n digi: ThreeDMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ThreeDSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.THREE_D_LATEST),\n\n digi: ThreeDMetadataDetailsSchema,\n});\n","/**\n * The main focus of a publication.\n */\nexport enum PublicationMainFocus {\n VIDEO = 'VIDEO',\n IMAGE = 'IMAGE',\n ARTICLE = 'ARTICLE',\n TEXT_ONLY = 'TEXT_ONLY',\n AUDIO = 'AUDIO',\n LINK = 'LINK',\n EMBED = 'EMBED',\n CHECKING_IN = 'CHECKING_IN',\n EVENT = 'EVENT',\n MINT = 'MINT',\n TRANSACTION = 'TRANSACTION',\n LIVESTREAM = 'LIVESTREAM',\n SHORT_VIDEO = 'SHORT_VIDEO',\n THREE_D = '3D',\n STORY = 'STORY',\n SPACE = 'SPACE',\n}\n","/**\n * @internal\n */\nexport const SchemasRoot = 'https://json-schemas.digiv3rse.xyz';\n","import { SchemasRoot } from '../constants';\n\nconst location = `${SchemasRoot}/publications`;\n\n/**\n * A list of all the publication schema ids (past and present).\n */\nexport enum PublicationSchemaId {\n THREE_D_LATEST = `${location}/3d/3.0.0.json`,\n ARTICLE_LATEST = `${location}/article/3.0.0.json`,\n AUDIO_LATEST = `${location}/audio/3.0.0.json`,\n CHECKING_IN_LATEST = `${location}/checking-in/3.0.0.json`,\n EMBED_LATEST = `${location}/embed/3.0.0.json`,\n EVENT_LATEST = `${location}/event/3.0.0.json`,\n IMAGE_LATEST = `${location}/image/3.0.0.json`,\n LINK_LATEST = `${location}/link/3.0.0.json`,\n LIVESTREAM_LATEST = `${location}/livestream/3.0.0.json`,\n MINT_LATEST = `${location}/mint/3.0.0.json`,\n SPACE_LATEST = `${location}/space/3.0.0.json`,\n STORY_LATEST = `${location}/story/3.0.0.json`,\n TRANSACTION_LATEST = `${location}/transaction/3.0.0.json`,\n TEXT_ONLY_LATEST = `${location}/text-only/3.0.0.json`,\n VIDEO_LATEST = `${location}/video/3.0.0.json`,\n}\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n Signature,\n encryptable,\n markdown,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type ArticleMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.ARTICLE;\n /**\n * Markdown content.\n */\n content: EncryptableMarkdown;\n /**\n * The optional article title.\n */\n title?: string;\n /**\n * Any attachment you want to include with it.\n */\n attachments?: AnyMedia[];\n};\nconst ArticleMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.ARTICLE),\n\n content: encryptable(\n markdown(nonEmptyStringSchema('The content for the publication as markdown.')),\n ),\n\n title: nonEmptyStringSchema('The optional article title.').optional(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('Any attachment you want to include with it.'),\n });\n\n/**\n * Use this model an article-like publication (e.g. blog, news, etc.)\n */\nexport type ArticleMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.ARTICLE_LATEST;\n /**\n * The metadata details.\n */\n digi: ArticleMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ArticleSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.ARTICLE_LATEST),\n digi: ArticleMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n mainContentFocus,\n MediaAudio,\n MediaAudioSchema,\n metadataDetailsWith,\n optionalContentSchema,\n PublicationMetadataCommon,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, nonEmptyStringSchema, Signature } from '../primitives.js';\n\nexport type AudioMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.AUDIO;\n /**\n * The audio.\n */\n audio: MediaAudio;\n /**\n * The optional audio title.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst AudioMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.AUDIO),\n\n audio: MediaAudioSchema,\n\n title: nonEmptyStringSchema('The optional audio title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where an audio is the main focus.\n *\n * Use the `digi.attachments` to include more media.\n */\nexport type AudioMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.AUDIO_LATEST;\n /**\n * The metadata details.\n */\n digi: AudioMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const AudioSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.AUDIO_LATEST),\n digi: AudioMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableGeoURI,\n EncryptableMarkdown,\n EncryptableString,\n PhysicalAddress,\n PhysicalAddressSchema,\n Signature,\n encryptableGeoUriSchema,\n encryptableStringSchema,\n} from '../primitives.js';\n\nexport type CheckingInMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.CHECKING_IN;\n /**\n * Where you checking in from (free form text).\n */\n location: EncryptableString;\n /**\n * The optional geographic position of the location.\n */\n position?: EncryptableGeoURI;\n /**\n * The optional address of the location.\n */\n address?: PhysicalAddress;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst CheckingInMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.CHECKING_IN),\n\n location: encryptableStringSchema('Where you checking in from (free form text).'),\n\n position: encryptableGeoUriSchema(\n 'The optional geographic position of the location.',\n ).optional(),\n\n address: PhysicalAddressSchema.optional().describe('The optional address of the location.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community that you are checking in from a location.\n */\nexport type CheckingInMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.CHECKING_IN_LATEST;\n /**\n * The metadata details.\n */\n digi: CheckingInMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const CheckingInSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.CHECKING_IN_LATEST),\n digi: CheckingInMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\nexport type EmbedMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.EMBED;\n /**\n * The embed URL.\n */\n embed: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst EmbedMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.EMBED),\n\n embed: encryptableUriSchema('The embed URL.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication that embeds a resource such as a micro-app, a game, etc.\n */\nexport type EmbedMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.EMBED_LATEST;\n /**\n * The metadata details.\n */\n digi: EmbedMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const EmbedSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.EMBED_LATEST),\n digi: EmbedMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n TimezoneId,\n TimezoneIdSchema,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n PhysicalAddressSchema,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n encryptableStringSchema,\n EncryptableURI,\n EncryptableString,\n EncryptableGeoURI,\n PhysicalAddress,\n EncryptableDateTime,\n EncryptableMarkdown,\n encryptableGeoUriSchema,\n Signature,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\n/**\n * An object intended to help with future events scheduling adjustments.\n *\n * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events\n */\nexport type SchedulingAdjustments = {\n /**\n * Indicates a reference timezone for the event start and end times.\n * If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer.\n */\n timezoneId: TimezoneId;\n /**\n * Indicates the reference timezone offset with respect to UTC timezone a the time of event creation.\n * The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).\n */\n timezoneOffset: number;\n};\n\n/**\n * @internal\n */\nexport const SchedulingAdjustmentsSchema: z.ZodType =\n z.object({\n timezoneId: TimezoneIdSchema.describe(\n 'Indicates a reference timezone for the event start and end times. ' +\n 'If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer.',\n ),\n timezoneOffset: z\n .number()\n .describe(\n 'Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. ' +\n 'The difference in minutes between the reference timezone time and UTC time ' +\n '(e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).',\n ),\n });\n\nexport type EventMetadataDetails = PublicationMetadataCommon & {\n /**\n * The title of the event.\n */\n title?: string;\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.EVENT;\n /*\n * The location of the event.\n */\n location: EncryptableURI | EncryptableString;\n /**\n * The geographic position of the event.\n */\n position?: EncryptableGeoURI;\n /**\n * The address of the event.\n */\n address?: PhysicalAddress;\n /**\n * The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n endsAt: EncryptableDateTime;\n /**\n * Captures extra criteria to recompute correctly future start and end times.\n *\n * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events\n */\n schedulingAdjustments?: SchedulingAdjustments;\n /**\n * The links you want to include with it.\n */\n links?: EncryptableURI[];\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst EventMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n title: nonEmptyStringSchema().describe('The title of the event.').optional(),\n\n mainContentFocus: mainContentFocus(PublicationMainFocus.EVENT),\n\n location: z\n .union([\n encryptableUriSchema('A virtual location.'),\n encryptableStringSchema('The event location (free form text).'),\n ])\n .describe('The location of the event.'),\n\n position: encryptableGeoUriSchema('The geographic position of the event.').optional(),\n\n address: PhysicalAddressSchema.optional().describe('The address of the event.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n endsAt: encryptableDateTimeSchema('The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).'),\n\n schedulingAdjustments: SchedulingAdjustmentsSchema.optional().describe(\n 'Captures extra criteria to recompute correctly future start and end times.' +\n 'See: https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events',\n ),\n\n links: encryptableUriSchema()\n .array()\n .min(1)\n .optional()\n .describe('The links you want to include with it.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to create an event, virtual or physical.\n */\nexport type EventMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.EVENT_LATEST;\n /**\n * The metadata details.\n */\n digi: EventMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const EventSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.EVENT_LATEST),\n digi: EventMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n MediaImage,\n MediaImageSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature, nonEmptyStringSchema } from '../primitives.js';\n\nexport type ImageMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.IMAGE;\n /**\n * The image.\n */\n image: MediaImage;\n /**\n * A title for the image.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst ImageMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.IMAGE),\n\n image: MediaImageSchema,\n\n title: nonEmptyStringSchema('The optional image title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where an image is the main focus.\n *\n * Use the `digi.attachments` to include more images.\n */\nexport type ImageMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.IMAGE_LATEST;\n /**\n * The metadata details.\n */\n digi: ImageMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ImageSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.IMAGE_LATEST),\n digi: ImageMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\nexport type LinkMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.LINK;\n /**\n * The sharing link url.\n */\n sharingLink: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst LinkMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.LINK),\n\n sharingLink: encryptableUriSchema('The sharing link url.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a link to something you want to share.\n */\nexport type LinkMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.LINK_LATEST;\n /**\n * The metadata details.\n */\n digi: LinkMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const LinkSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.LINK_LATEST),\n digi: LinkMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common/index.js';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableDateTime,\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type LiveStreamMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.LIVESTREAM;\n /**\n * The livestream title.\n */\n title?: string;\n /**\n * The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n endsAt?: EncryptableDateTime;\n /**\n * Some livestream platforms have the playback url as a separate url.\n * If not your case make sure `liveUrl` and `playbackUrl` are the same.\n */\n playbackUrl: EncryptableURI;\n /**\n * Some livestream platforms have the live url as a separate url.\n * If not your case make sure `liveUrl` and `playbackUrl` are the same.\n */\n liveUrl: EncryptableURI;\n /**\n * The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.\n *\n * Responses from this endpoint should conform to the following schema:\n *\n * ```json\n * {\n * \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n * \"type\": \"object\",\n * \"properties\": {\n * \"isLive\": {\n * \"type\": \"boolean\"\n * }\n * },\n * \"required\": [\"isLive\"]\n * }\n * ```\n */\n checkLiveAPI?: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst LiveStreamMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.LIVESTREAM),\n\n title: nonEmptyStringSchema().optional().describe('The livestream title.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n endsAt: encryptableDateTimeSchema(\n 'The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)',\n ).optional(),\n\n playbackUrl: encryptableUriSchema(\n 'Some livestream platforms have the playback url as a separate url. ' +\n 'If not your case make sure `liveUrl` and `playbackUrl` are the same.',\n ),\n\n liveUrl: encryptableUriSchema(\n 'Some livestream platforms have the live url as a separate url. ' +\n 'If not your case make sure `liveUrl` and `playbackUrl` are the same.',\n ),\n\n checkLiveAPI: encryptableUriSchema(\n 'The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.',\n ).optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community of a livestream event.\n */\nexport type LiveStreamMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.LIVESTREAM_LATEST;\n /**\n * The metadata details.\n */\n digi: LiveStreamMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const LiveStreamSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.LIVESTREAM_LATEST),\n digi: LiveStreamMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\n// TODO validate the mint link using the allow list\n\nexport type MintMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.MINT;\n /**\n * The mint item it can be a URL of the known provider like opensea\n * https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299\n * or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626.\n *\n * The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata\n */\n mintLink: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * Any attachment you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst MintMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.MINT),\n\n mintLink: encryptableUriSchema(\n 'The mint item it can be a URL of the known provider like opensea ' +\n 'https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 ' +\n 'or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. ' +\n 'The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata',\n ),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a link to mint an NFT.\n */\nexport type MintMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.MINT_LATEST;\n /**\n * The metadata details.\n */\n digi: MintMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const MintSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.MINT_LATEST),\n digi: MintMetadataDetailsSchema,\n});\n","import { SchemasRoot } from '../constants.js';\n\nexport enum MirrorSchemaId {\n LATEST = `${SchemasRoot}/publications/mirror/1.0.0.json`,\n}\n","import { z } from 'zod';\n\nimport { MirrorSchemaId } from './MirrorSchemaId.js';\nimport {\n AppId,\n AppIdSchema,\n Signature,\n SignatureSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\nimport { ShapeCheck } from '../utils.js';\n\nexport type MirrorMetadataDetails = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId: AppId;\n};\n\nconst MirrorMetadataDetailsSchema: z.ZodType =\n z.object(\n {\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.describe('The App Id that this publication belongs to.'),\n },\n {\n description: 'The DiGi operational metadata fields.',\n },\n );\n\n/**\n * A Mirror metadata object.\n */\nexport type MirrorMetadata = ShapeCheck<{\n /**\n * The schema id.\n */\n $schema: MirrorSchemaId.LATEST;\n /**\n * The metadata details.\n */\n digi: MirrorMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n}>;\n/**\n * Mirror metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * MirrorMetadata.parse(valid); // => MirrorMetadata\n *\n * MirrorMetadata.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * MirrorMetadata.safeParse(valid);\n * // => { success: true, data: MirrorMetadata }\n *\n * MirrorMetadata.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const MirrorMetadataSchema: z.ZodType = z.object({\n $schema: z.literal(MirrorSchemaId.LATEST),\n digi: MirrorMetadataDetailsSchema,\n signature: SignatureSchema.optional(),\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableDateTime,\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type SpaceMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.SPACE;\n /**\n * The space title.\n */\n title: string;\n /**\n * The space join link.\n */\n link: EncryptableURI;\n /**\n * The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nexport const SpaceMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.SPACE),\n\n title: nonEmptyStringSchema().describe('The space title.'),\n\n link: encryptableUriSchema('The space join link.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community about a space you are hosting.\n */\nexport type SpaceMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.SPACE_LATEST;\n /**\n * The metadata details.\n */\n digi: SpaceMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const SpaceSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.SPACE_LATEST),\n\n digi: SpaceMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature } from '../primitives.js';\n\nexport type StoryMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.STORY;\n /**\n * The story asset.\n */\n asset: AnyMedia;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n};\n\nconst StoryMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.STORY),\n\n asset: AnyMediaSchema.describe('The story asset.'),\n\n content: optionalContentSchema(),\n });\n\n/**\n * Use this to model an Instagram-like story.\n */\nexport type StoryMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.STORY_LATEST;\n /**\n * The metadata details.\n */\n digi: StoryMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const StorySchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.STORY_LATEST),\n digi: StoryMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n Signature,\n encryptable,\n markdown,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type TextOnlyMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.TEXT_ONLY;\n /**\n * The content for the publication as markdown.\n */\n content: EncryptableMarkdown;\n};\n\nconst TextOnlyMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.TEXT_ONLY),\n\n content: encryptable(\n markdown(nonEmptyStringSchema('The content for the publication as markdown.')),\n ),\n });\n\n/**\n * Use this for a text-only publication.\n *\n * Most comments will fall into this category.\n */\nexport type TextOnlyMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.TEXT_ONLY_LATEST;\n /**\n * The metadata details.\n */\n digi: TextOnlyMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const TextOnlySchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.TEXT_ONLY_LATEST),\n digi: TextOnlyMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n ChainId,\n ChainIdSchema,\n EncryptableMarkdown,\n EncryptableString,\n Signature,\n encryptableStringSchema,\n} from '../primitives.js';\n\n/**\n * A way to classify the type of transaction.\n */\nexport enum MetadataTransactionType {\n ERC721 = 'ERC721',\n ERC20 = 'ERC20',\n OTHER = 'OTHER',\n}\n\nexport type TransactionMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.TRANSACTION;\n /**\n * The transaction hash.\n */\n txHash: EncryptableString;\n /**\n * The type of transaction.\n */\n type: MetadataTransactionType;\n /**\n * The Chain Id.\n */\n chainId: ChainId;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst TransactionMetadataDetailsSchema: z.ZodType<\n TransactionMetadataDetails,\n z.ZodTypeDef,\n object\n> = metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.TRANSACTION),\n\n txHash: encryptableStringSchema('The transaction hash.'),\n\n type: z.nativeEnum(MetadataTransactionType).describe('The type of transaction.'),\n\n chainId: ChainIdSchema.describe('The Chain Id.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n});\n\n/**\n * Use this to model a publication where a transaction is the main focus.\n */\nexport type TransactionMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.TRANSACTION_LATEST;\n /**\n * The metadata details.\n */\n digi: TransactionMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const TransactionSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.TRANSACTION_LATEST),\n digi: TransactionMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n MediaVideo,\n MediaVideoSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature, nonEmptyStringSchema } from '../primitives.js';\n\nexport type VideoMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.VIDEO | PublicationMainFocus.SHORT_VIDEO;\n /**\n * The video.\n */\n video: MediaVideo;\n /**\n * The optional video title.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst VideoMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(\n PublicationMainFocus.SHORT_VIDEO,\n PublicationMainFocus.VIDEO,\n ),\n\n video: MediaVideoSchema,\n\n title: nonEmptyStringSchema('The optional video title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where a video is the main focus.\n *\n * Use the `digi.attachments` to include more media.\n */\nexport type VideoMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.VIDEO_LATEST;\n /**\n * The metadata details.\n */\n digi: VideoMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const VideoSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.VIDEO_LATEST),\n digi: VideoMetadataDetailsSchema,\n});\n","import { evaluate } from './ValidationError';\nimport { NetworkAddressDetails, amount } from '../primitives';\nimport {\n AccessCondition,\n AccessConditionSchema,\n AndCondition,\n AndConditionSchema,\n AnyCondition,\n CollectCondition,\n CollectConditionSchema,\n ConditionComparisonOperator,\n ConditionType,\n EoaOwnershipCondition,\n EoaOwnershipConditionSchema,\n Erc20OwnershipCondition,\n Erc20OwnershipConditionSchema,\n FollowCondition,\n FollowConditionSchema,\n NftContractType,\n NftOwnershipCondition,\n NftOwnershipConditionSchema,\n OrCondition,\n OrConditionSchema,\n ProfileOwnershipCondition,\n ProfileOwnershipConditionSchema,\n SimpleCondition,\n refineNftOwnershipCondition,\n AdvancedContractCondition,\n AdvancedContractConditionSchema,\n} from '../publication';\n\nexport type CollectConditionDetails = {\n /**\n * The Publication Id that needs to be collected to fulfill the condition.\n */\n publicationId: string;\n /**\n * If the Publication Id refers to the current publication.\n */\n thisPublication: boolean;\n};\n/**\n * Creates a Collect condition.\n *\n * @category Helpers\n */\nexport function collectCondition(input: CollectConditionDetails): CollectCondition {\n return evaluate(\n CollectConditionSchema.safeParse({\n type: ConditionType.COLLECT,\n ...input,\n }),\n );\n}\n\nexport type EoaOwnershipConditionDetails = {\n /**\n * The EVM address to verify ownership of.\n */\n address: string;\n};\n/**\n * Creates an EOA ownership condition.\n *\n * @category Helpers\n */\nexport function eoaOwnershipCondition(input: EoaOwnershipConditionDetails): EoaOwnershipCondition {\n return evaluate(\n EoaOwnershipConditionSchema.safeParse({\n type: ConditionType.EOA_OWNERSHIP,\n ...input,\n }),\n );\n}\n\nexport type Erc20OwnershipConditionDetails = {\n /**\n * The comparison operator to use to compare the ERC-20 token balance.\n */\n condition: ConditionComparisonOperator;\n /**\n * The ERC-20 token contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The ERC-20 token decimals (e.g. 18 for GHO)\n */\n decimals: number;\n /**\n * The human readable amount to compare the ERC-20 token balance against using the comparison operator.\n *\n * @example\n * 1.5\n * 42\n * 0.000002\n */\n value: string;\n};\n\n/**\n * Creates an ERC-20 token ownership condition.\n *\n * @category Helpers\n * @param input - The ERC-20 token ownership condition details.\n */\nexport function erc20OwnershipCondition({\n condition,\n ...others\n}: Erc20OwnershipConditionDetails): Erc20OwnershipCondition {\n return evaluate(\n Erc20OwnershipConditionSchema.safeParse({\n type: ConditionType.ERC20_OWNERSHIP,\n amount: amount(others),\n condition,\n }),\n );\n}\n\nexport type Erc721OwnershipConditionDetails = {\n /**\n * The NFT contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The list of token ids to verify ownership of.\n */\n tokenIds?: string[];\n};\n\n/**\n * Creates an ERC-721 NFT ownership condition.\n *\n * @category Helpers\n */\nexport function erc721OwnershipCondition(\n input: Erc721OwnershipConditionDetails,\n): NftOwnershipCondition {\n return evaluate(\n NftOwnershipConditionSchema.superRefine(refineNftOwnershipCondition).safeParse({\n type: ConditionType.NFT_OWNERSHIP,\n contractType: NftContractType.ERC721,\n ...input,\n }),\n );\n}\n\nexport type Erc1155OwnershipConditionDetails = {\n /**\n * The NFT contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The list of token ids to verify ownership of.\n */\n tokenIds: string[];\n};\n\n/**\n * Creates an ERC-1155 NFT ownership condition.\n *\n * @category Helpers\n */\nexport function erc1155OwnershipCondition(\n input: Erc721OwnershipConditionDetails,\n): NftOwnershipCondition {\n return evaluate(\n NftOwnershipConditionSchema.superRefine(refineNftOwnershipCondition).safeParse({\n type: ConditionType.NFT_OWNERSHIP,\n contractType: NftContractType.ERC1155,\n ...input,\n }),\n );\n}\n\nexport type ProfileOwnershipConditionDetails = {\n profileId: string;\n};\n/**\n * Creates a DiGi Profile ownership condition.\n *\n * @category Helpers\n */\nexport function profileOwnershipCondition(\n input: ProfileOwnershipConditionDetails,\n): ProfileOwnershipCondition {\n return evaluate(\n ProfileOwnershipConditionSchema.safeParse({\n type: ConditionType.PROFILE_OWNERSHIP,\n ...input,\n }),\n );\n}\n\nexport type FollowConditionDetails = {\n follow: string;\n};\n/**\n * Creates a follow DiGi Profile condition.\n *\n * @category Helpers\n */\nexport function followCondition(input: FollowConditionDetails): FollowCondition {\n return evaluate(\n FollowConditionSchema.safeParse({\n type: ConditionType.FOLLOW,\n ...input,\n }),\n );\n}\n\nexport type AdvancedContractConditionDetails = {\n /**\n * The contract information, including the chain id and the EVM address.\n */\n contract: NetworkAddressDetails;\n\n /**\n * The function name to call. Has to be exactly the same as in the ABI.\n */\n functionName: string;\n\n /**\n * The function ABI. Has to be in a human-readable string format, which you can convert using the ethers library.\n * See here for more info https://docs.ethers.io/v5/api/utils/abi/fragments/#human-readable-abi\n */\n abi: string;\n\n /**\n * The parameters to pass to the function. Has to be matching the arguments described in the ABI.\n * In case of tuples and arrays, you have to pass the values as a stringified JSON array.\n */\n params: string[];\n\n /**\n * The comparison operator to use to compare the result of the function call. In case of integer outputs\n * you can use any comparison operator. In case of boolean outputs, you can only use EQUAL and NOT_EQUAL.\n */\n comparison: ConditionComparisonOperator;\n\n /**\n * The value to compare the result of the function call against. Can be a boolean or a BigNumber in string format.\n */\n value: string;\n};\n\n/**\n * Creates an arbitrary on-chain condition based on the return value\n * of a given contract view function.\n *\n * @category Helpers\n * @experimental This feature is experimental and might change in the future.\n */\nexport function advancedContractCondition(\n input: AdvancedContractConditionDetails,\n): AdvancedContractCondition {\n return evaluate(\n AdvancedContractConditionSchema.safeParse({\n type: ConditionType.ADVANCED_CONTRACT,\n ...input,\n }),\n );\n}\n\n/**\n * Creates an AND condition between two or more conditions.\n *\n * @category Helpers\n */\nexport function andCondition(criteria: T): AndCondition {\n return evaluate(\n AndConditionSchema.safeParse({\n type: ConditionType.AND,\n criteria,\n }),\n );\n}\n\n/**\n * Creates an OR condition between two or more conditions.\n *\n * @category Helpers\n */\nexport function orCondition(criteria: T): OrCondition {\n return evaluate(\n OrConditionSchema.safeParse({\n type: ConditionType.OR,\n criteria,\n }),\n );\n}\n\n/**\n * Creates the access condition specification for a given publication.\n *\n * @internal\n */\nexport function accessCondition(criteria: AnyCondition[]): AccessCondition {\n return evaluate(\n AccessConditionSchema.safeParse({\n type: ConditionType.OR,\n criteria,\n }),\n );\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport {\n MirrorMetadata,\n MirrorMetadataSchema,\n MirrorSchemaId,\n MirrorMetadataDetails,\n} from '../publication';\nimport { Prettify } from '../utils.js';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype MirrorDetails = Prettify>>;\n/**\n * All {@link MirrorMetadataDetails} fields with:\n * - `id` defaults to a UUID\n */\nexport type MirrorOptions = MirrorDetails & {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * @defaultValue a UUID\n */\n id?: string;\n};\n/**\n * Creates a valid MirrorMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = mirror({\n * appId: 'com.example.app',\n * });\n * ```\n */\nexport function mirror({ id = v4(), ...others }: MirrorOptions): MirrorMetadata {\n return evaluate(\n MirrorMetadataSchema.safeParse({\n $schema: MirrorSchemaId.LATEST,\n digi: {\n id,\n ...others,\n },\n }),\n );\n}\n","import { z } from 'zod';\n\nimport { ModuleSchemaId } from './ModuleSchemaId';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../MetadataAttribute';\nimport { nonEmptyStringSchema, Markdown, markdown, nonEmpty } from '../primitives';\n\nfunction isValidJsonString(str: string) {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n}\n\nfunction jsonString(description: string) {\n return z.string({ description }).refine(isValidJsonString, { message: 'Invalid JSON string' });\n}\n\n/**\n * The metadata standard for DiGi Modules\n */\nexport type ModuleMetadata = {\n /**\n * The name of the module.\n */\n name: string;\n /**\n * The human-friendly title for the module.\n */\n title: string;\n /**\n * Markdown formatted description of the module.\n *\n * It should explain what this module does, how to use it, examples just\n * like you would if you were building an NPM package.\n * The more detail the better to allow dApp to easily integrate it.\n */\n description: Markdown;\n /**\n * List of authors email addresses.\n */\n authors: string[];\n /**\n * The Solidity JSON ABI as JSON-string describing the initialization function calldata.\n *\n * This will be used to encode the calldata for the initialization function.\n *\n * It will also be used by the consumers of this module to decode the initialization\n * calldata so to infer the initialization criteria.\n */\n initializeCalldataABI: string;\n /**\n * The Solidity JSON ABI as JSON-string describing the initialization result data.\n *\n * This will be used by the consumers of this module to decode\n * the result data from the initialization function so to infer the\n * initialization result state.\n */\n initializeResultDataABI?: string;\n /**\n * The Solidity JSON ABI as JSON-string describing the process function calldata.\n *\n * This will be used to encode the calldata for the process function.\n *\n * Some modules might non need to return any initialization result data.\n */\n processCalldataABI: string;\n /**\n * An arbitrary bag of attributes you wish to add to the metadata.\n */\n attributes: MetadataAttribute[];\n /**\n * The schema ID.\n */\n $schema: ModuleSchemaId.LATEST;\n};\n\nexport const ModuleMetadataSchema: z.ZodType = z.object({\n name: nonEmpty(z.string().max(200)).describe('The name of the module.'),\n title: nonEmptyStringSchema('The human-friendly title for the module.'),\n description: markdown(nonEmptyStringSchema('Markdown formatted description of the module.')),\n authors: z\n .array(z.string().email('Authors list should only contain valid emails'))\n .min(1, 'You must supply at least one author')\n .describe('List of authors email addresses.'),\n initializeCalldataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the initialization function calldata.',\n ),\n initializeResultDataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the initialization result data.',\n ).optional(),\n processCalldataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the process function calldata.',\n ),\n attributes: z.array(MetadataAttributeSchema).describe('An arbitrary bag of attributes.'),\n $schema: z.literal(ModuleSchemaId.LATEST),\n});\n","import { SchemasRoot } from '../constants';\n\nexport enum ModuleSchemaId {\n LATEST = `${SchemasRoot}/modules/1.0.0.json`,\n}\n","import { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport { MetadataAttribute } from '../MetadataAttribute';\nimport { ModuleMetadata, ModuleMetadataSchema, ModuleSchemaId } from '../module';\nimport { Prettify } from '../utils';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ModuleDetails = Prettify>>;\n/**\n * All {@link ModuleMetadata} fields without `$schema` a with:\n * - `attributes` defaults to an empty array\n */\nexport type ModuleOptions = ModuleDetails & {\n /**\n * An arbitrary bag of attributes you wish to add to the metadata.\n */\n attributes?: MetadataAttribute[];\n};\n\n/**\n * Creates a valid ModuleMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = module({\n * name: 'My Open Action',\n * title: 'This is my Open Action',\n * description: 'Get ready for the future of social interaction!',\n * authors: ['awesome-dev@digi.xyz'],\n * initializeCalldataABI: JSON.stringify([\n * {\n * type: 'address',\n * name: 'address',\n * },\n * {\n * type: 'uint256',\n * name: 'price',\n * },\n * ]),\n * processCalldataABI: JSON.stringify([\n * {\n * type: 'address',\n * name: 'collector',\n * },\n * ]),\n * });\n * ```\n */\nexport function module({ attributes = [], ...others }: ModuleOptions): ModuleMetadata {\n return evaluate(\n ModuleMetadataSchema.safeParse({\n $schema: ModuleSchemaId.LATEST,\n attributes,\n ...others,\n }),\n );\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport {\n ProfileMetadata,\n ProfileMetadataDetails,\n ProfileMetadataSchema,\n ProfileSchemaId,\n} from '../profile';\nimport { Prettify } from '../utils.js';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ProfileDetails = Prettify>>;\n/**\n * All {@link ProfileMetadataDetails} fields with:\n */\nexport type ProfileOptions = ProfileDetails & {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * @defaultValue a UUID\n */\n id?: string;\n};\n/**\n * Creates a valid ProfileMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Global profile (no `appId`):\n * ```ts\n * const metadata = profile({\n * name: 'John Doe',\n * bio: `\n * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris.\n *\n * - Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n * - Donec a diam lectus.\n * `,\n * });\n * ```\n *\n * @example\n * App specific profile (with `appId`):\n * ```ts\n * const metadata = profile({\n * appId: 'com.example.app',\n * name: 'John Doe',\n * });\n * ```\n *\n * @example\n * With attributes:\n * ```ts\n * const metadata = profile({\n * name: 'John Doe',\n * picture: 'https://example.com/picture.png',\n * attributes: [\n * {\n * key: 'twitter',\n * type: MetadataAttributeType.STRING,\n * value: 'https://twitter.com/johndoe',\n * },\n * {\n * key: 'dob',\n * type: MetadataAttributeType.DATE,\n * value: '1990-01-01T00:00:00Z',\n * },\n * {\n * key: 'enabled',\n * type: MetadataAttributeType.BOOLEAN,\n * value: 'true',\n * },\n * {\n * key: 'height',\n * type: MetadataAttributeType.NUMBER,\n * value: '1.8',\n * },\n * {\n * key: 'settings',\n * type: MetadataAttributeType.JSON,\n * value: '{\"theme\": \"dark\"}',\n * },\n * ],\n * });\n * ```\n */\nexport function profile({ id = v4(), ...others }: ProfileOptions): ProfileMetadata {\n return evaluate(\n ProfileMetadataSchema.safeParse({\n $schema: ProfileSchemaId.LATEST,\n digi: {\n id,\n ...others,\n },\n }),\n );\n}\n","import { z } from 'zod';\n\nimport { ProfileSchemaId } from './ProfileSchemaId.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../MetadataAttribute.js';\nimport {\n AppId,\n AppIdSchema,\n Markdown,\n Signature,\n SignatureSchema,\n URI,\n markdown,\n nonEmptyStringSchema,\n uriSchema,\n} from '../primitives.js';\n\nexport type ProfileMetadataDetails = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this Profile details are relevant for.\n *\n * If omitted the data is considered to be the global Profile data.\n */\n appId?: AppId;\n /**\n * The profile display name.\n */\n name?: string;\n /**\n * The profile bio as markdown.\n */\n bio?: Markdown;\n /**\n * The profile picture.\n */\n picture?: URI;\n /**\n * The profile cover picture.\n */\n coverPicture?: URI;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n};\n/**\n * @internal\n */\nconst ProfileMetadataDetailsSchema: z.ZodType =\n z.object(\n {\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n name: nonEmptyStringSchema('The profile display name.').optional(),\n\n bio: markdown(nonEmptyStringSchema('The profile bio as markdown.')).optional(),\n\n picture: uriSchema('The profile picture.').optional(),\n\n coverPicture: uriSchema('The profile cover picture.').optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n appId: AppIdSchema.optional().describe(\n 'The App Id that this Profile data refers to. ' +\n 'If omitted the data is considered to be the global Profile data.',\n ),\n },\n { description: 'The DiGi specific metadata details.' },\n );\n\n/**\n * Use this to create Profile metadata objects.\n */\nexport type ProfileMetadata = {\n /**\n * The schema id.\n */\n $schema: ProfileSchemaId.LATEST;\n /**\n * The metadata details.\n */\n digi: ProfileMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * Profile Metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * ProfileMetadataSchema.parse(valid); // => ProfileMetadata\n *\n * ProfileMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * ProfileMetadataSchema.safeParse(valid);\n * // => { success: true, data: ProfileMetadata }\n *\n * ProfileMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const ProfileMetadataSchema: z.ZodType = z.object({\n $schema: z.literal(ProfileSchemaId.LATEST),\n digi: ProfileMetadataDetailsSchema,\n signature: SignatureSchema.optional(),\n});\n","import { SchemasRoot } from '../constants.js';\n\nexport enum ProfileSchemaId {\n LATEST = `${SchemasRoot}/profile/2.0.0.json`,\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand, InputForPublicationMetadataDetails } from './utils';\nimport { MarketplaceMetadata } from '../marketplace';\nimport {\n ThreeDMetadata,\n ThreeDSchema,\n AudioMetadata,\n AudioSchema,\n CheckingInMetadata,\n CheckingInSchema,\n EmbedMetadata,\n EmbedSchema,\n EventMetadata,\n EventSchema,\n ImageMetadata,\n ImageSchema,\n LinkMetadata,\n LinkSchema,\n LiveStreamMetadata,\n LiveStreamSchema,\n MintMetadata,\n MintSchema,\n PublicationMainFocus,\n PublicationSchemaId,\n SpaceMetadata,\n SpaceSchema,\n StoryMetadata,\n StorySchema,\n TextOnlyMetadata,\n TextOnlySchema,\n TransactionMetadata,\n TransactionSchema,\n VideoMetadata,\n VideoSchema,\n ArticleMetadataDetails,\n AudioMetadataDetails,\n CheckingInMetadataDetails,\n EmbedMetadataDetails,\n EventMetadataDetails,\n ImageMetadataDetails,\n LinkMetadataDetails,\n LiveStreamMetadataDetails,\n MintMetadataDetails,\n SpaceMetadataDetails,\n StoryMetadataDetails,\n TextOnlyMetadataDetails,\n ThreeDMetadataDetails,\n TransactionMetadataDetails,\n VideoMetadataDetails,\n ArticleMetadata,\n ArticleSchema,\n} from '../publication';\n\n/**\n * The default locale used by the builder helpers.\n */\nexport const DEFAULT_LOCALE = 'en';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype MarketplaceDetails = RecursiveUnbrand;\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype ArticleDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ArticleMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.ARTICLE_LATEST`\n */\nexport type ArticleOptions = ArticleDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ArticleMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = article({\n * title: 'Great Question'\n * content: `\n * ## Heading\n *\n * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris.\n *\n * ## Question\n *\n * What is the answer to life, the universe and everything?\n *\n * ## Answer\n *\n * 42\n *\n * ![The answer](https://example.com/answer.png)\n * `,\n * tags: ['question', '42'],\n * });\n * ```\n */\nexport function article({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ArticleOptions): ArticleMetadata {\n return evaluate(\n ArticleSchema.safeParse({\n $schema: PublicationSchemaId.ARTICLE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.ARTICLE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype AudioDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link AudioMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.AUDIO_LATEST`\n */\nexport type AudioOptions = AudioDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid AudioMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single track:\n * ```ts\n * const metadata = audio({\n * title: 'Great song!',\n * audio: {\n * item: 'https://example.com/song.mp3',\n * type: MediaAudioMimeType.MP3,\n * artist: 'John Doe',\n * cover: 'https://example.com/cover.png',\n * },\n * });\n * ```\n *\n * @example\n * Album:\n * ```ts\n * const metadata = audio({\n * title: 'Great song!',\n * audio: {\n * item: 'https://example.com/sample.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 60,\n * artist: 'John Doe',\n * cover: 'https://example.com/cover.png',\n * },\n * attachments: [\n * {\n * item: 'https://example.com/song-1.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 234,\n * },\n * {\n * item: 'https://example.com/song-2.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 345,\n * },\n * ],\n * });\n * ```\n */\nexport function audio({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: AudioOptions): AudioMetadata {\n return evaluate(\n AudioSchema.safeParse({\n $schema: PublicationSchemaId.AUDIO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.AUDIO,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype CheckingInDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link CheckingInMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.CHECKING_IN_LATEST`\n */\nexport type CheckingInOptions = CheckingInDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid CheckingInMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * With GPS coordinates:\n * ```ts\n * const metadata = checkingIn({\n * location: 'The Moon',\n * position: geoUri({\n * lat: 40.6892,\n * lng: -74.0444,\n * }),\n * });\n * ```\n * See {@link geoUri} for more details.\n *\n * @example\n * With a physical address:\n * ```ts\n * const metadata = checkingIn({\n * location: 'The Moon',\n * address: {\n * streetAddress: '1st Street',\n * locality: 'New York',\n * region: 'NY',\n * postalCode: '10001',\n * country: 'US',\n * },\n * });\n * ```\n */\nexport function checkingIn({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: CheckingInOptions): CheckingInMetadata {\n return evaluate(\n CheckingInSchema.safeParse({\n $schema: PublicationSchemaId.CHECKING_IN_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.CHECKING_IN,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype EmbedDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link EmbedMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.EMBED_LATEST`\n */\nexport type EmbedOptions = EmbedDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid EmbedMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = embed({\n * embed: 'https://example.com/embed.html',\n * });\n * ```\n */\nexport function embed({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: EmbedOptions): EmbedMetadata {\n return evaluate(\n EmbedSchema.safeParse({\n $schema: PublicationSchemaId.EMBED_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.EMBED,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype EventDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link EventMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.EVENT_LATEST`\n */\nexport type EventOptions = EventDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid EventMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * With GPS coordinates:\n * ```ts\n * const metadata = event({\n * location: 'The Moon',\n * position: geoUri({\n * lat: 40.6892,\n * lng: -74.0444,\n * }),\n * startsAt: '2028-10-01T00:00:00Z',\n * endsAt: '2028-10-01T01:00:00Z',\n * links: ['https://example.com/tickets.html'],\n * });\n * ```\n *\n * @example\n * With a physical address:\n * ```ts\n * const metadata = event({\n * location: 'The Moon',\n * address: {\n * streetAddress: '1st Street',\n * locality: 'New York',\n * region: 'NY',\n * postalCode: '10001',\n * country: 'US',\n * },\n * startsAt: '2028-10-01T00:00:00Z',\n * endsAt: '2028-10-01T01:00:00Z',\n * });\n * ```\n */\nexport function event({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: EventOptions): EventMetadata {\n return evaluate(\n EventSchema.safeParse({\n $schema: PublicationSchemaId.EVENT_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.EVENT,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ImageDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ImageMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.IMAGE_LATEST`\n */\nexport type ImageOptions = ImageDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ImageMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single image:\n *\n * ```ts\n * const metadata = image({\n * title: 'Touch grass',\n * image: {\n * item: 'https://example.com/image.png',\n * type: MediaImageMimeType.PNG,\n * altTag: 'Me touching grass',\n * license: MetadataLicenseType.CCO,\n * },\n * });\n * ```\n *\n * @example\n * A gallery:\n * ```ts\n * const metadata = image({\n * title: 'Touch grass',\n * image: {\n * item: 'https://example.com/cover.png',\n * type: MediaImageMimeType.PNG,\n * altTag: 'A collage of me touching grass',\n * license: MetadataLicenseType.CCO,\n * },\n * attachments: [\n * {\n * item: 'https://example.com/image-1.png',\n * type: MediaImageMimeType.PNG,\n * license: MetadataLicenseType.CC_BY_NC,\n * altTag: 'Me touching a tree',\n * },\n * {\n * item: 'https://example.com/image-2.png',\n * type: MediaImageMimeType.PNG,\n * license: MetadataLicenseType.CC_BY_NC,\n * altTag: 'The tree touching me',\n * },\n * ],\n * });\n * ```\n */\nexport function image({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ImageOptions): ImageMetadata {\n return evaluate(\n ImageSchema.safeParse({\n $schema: PublicationSchemaId.IMAGE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.IMAGE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype LinkDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link LinkMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.LINK_LATEST`\n */\nexport type LinkOptions = LinkDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid LinkMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = link({\n * sharingLink: 'https://example.com/embed.html',\n * content: 'Check out this cool website!',\n * });\n * ```\n */\nexport function link({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: LinkOptions): LinkMetadata {\n return evaluate(\n LinkSchema.safeParse({\n $schema: PublicationSchemaId.LINK_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.LINK,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype LiveStreamDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link LiveStreamMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.LIVESTREAM_LATEST`\n */\nexport type LiveStreamOptions = LiveStreamDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid LivestreamMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = liveStream({\n * title: 'Live stream #1',\n * liveUrl: 'https://example.com/live.html',\n * playbackUrl: 'https://example.com/playback.html',\n * startsAt: '2028-10-01T00:00:00Z',\n * });\n * ```\n */\nexport function liveStream({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: LiveStreamOptions): LiveStreamMetadata {\n return evaluate(\n LiveStreamSchema.safeParse({\n $schema: PublicationSchemaId.LIVESTREAM_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.LIVESTREAM,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype MintDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link MintMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.MINT_LATEST`\n */\nexport type MintOptions = MintDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid MintMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = mint({\n * content: 'Check out this NFT!',\n * mintLink:\n * 'https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/1234567890',\n * });\n * ```\n */\nexport function mint({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: MintOptions): MintMetadata {\n return evaluate(\n MintSchema.safeParse({\n $schema: PublicationSchemaId.MINT_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.MINT,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype SpaceDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link SpaceMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.SPACE_LATEST`\n */\nexport type SpaceOptions = SpaceDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid SpaceMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = space({\n * title: 'Space #1',\n * link: 'https://example.com/space.html',\n * startsAt: '2028-10-01T00:00:00Z',\n * });\n * ```\n */\nexport function space({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: SpaceOptions): SpaceMetadata {\n return evaluate(\n SpaceSchema.safeParse({\n $schema: PublicationSchemaId.SPACE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.SPACE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype StoryDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link StoryMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.STORY_LATEST`\n */\nexport type StoryOptions = StoryDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid StoryMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = story({\n * asset: {\n * item: 'https://example.com/story.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The story of my life',\n * },\n * });\n * ```\n */\nexport function story({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: StoryOptions): StoryMetadata {\n return evaluate(\n StorySchema.safeParse({\n $schema: PublicationSchemaId.STORY_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.STORY,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype TextOnlyDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link TextOnlyMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.TEXT_ONLY_LATEST`\n */\nexport type TextOnlyOptions = TextOnlyDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid TextOnlyMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = textOnly({\n * content: `Nice question!`,\n * });\n * ```\n */\nexport function textOnly({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: TextOnlyOptions): TextOnlyMetadata {\n return evaluate(\n TextOnlySchema.safeParse({\n $schema: PublicationSchemaId.TEXT_ONLY_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.TEXT_ONLY,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ThreeDDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ThreeDMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.THREE_D_LATEST`\n */\nexport type ThreeDOptions = ThreeDDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ThreeDMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = threeD({\n * content: 'Check out this 3D model!',\n * assets: [\n * {\n * format: ThreeDFormat.VRM,\n * playerUrl: 'https://example.com/player.html',\n * uri: 'https://example.com/model.zip',\n * zipPath: 'foo/model.vrm',\n * },\n * ],\n * tags: ['3d', 'vrm'],\n * });\n * ```\n */\nexport function threeD({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ThreeDOptions): ThreeDMetadata {\n return evaluate(\n ThreeDSchema.safeParse({\n $schema: PublicationSchemaId.THREE_D_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.THREE_D,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype TransactionDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link TransactionMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.TRANSACTION_LATEST`\n */\nexport type TransactionOptions = TransactionDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid TransactionMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = transaction({\n * chainId: 1,\n * txHash: '0x1234567890',\n * content: 'Check out this transaction!',\n * type: MetadataTransactionType.ERC20,\n * });\n * ```\n */\nexport function transaction({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: TransactionOptions): TransactionMetadata {\n return evaluate(\n TransactionSchema.safeParse({\n $schema: PublicationSchemaId.TRANSACTION_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.TRANSACTION,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype VideoDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link VideoMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.VIDEO_LATEST`\n */\nexport type VideoOptions = VideoDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid VideoMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single video:\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * },\n * content: `\n * In this video I will show you how to make a great video.\n *\n * And maybe I will show you how to make a great video about making a great video.\n * `\n * });\n * ```\n *\n * @example\n * Video with attachments:\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * },\n * attachments: [\n * {\n * item: 'https://example.com/soundtrack.mp3',\n * type: MediaAudioMimeType.MP3,\n * license: MetadataLicenseType.CCO,\n * }\n * ]\n * });\n * ```\n */\nexport function video({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: VideoOptions): VideoMetadata {\n return evaluate(\n VideoSchema.safeParse({\n $schema: PublicationSchemaId.VIDEO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.VIDEO,\n ...others,\n },\n }),\n );\n}\n\n/**\n * All {@link VideoMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.SHORT_VIDEO`\n */\nexport type ShortVideoOptions = VideoDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid VideoMetadata for a short.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * }\n * });\n * ```\n */\nexport function shortVideo({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ShortVideoOptions): VideoMetadata {\n return evaluate(\n VideoSchema.safeParse({\n $schema: PublicationSchemaId.VIDEO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.SHORT_VIDEO,\n ...others,\n },\n }),\n );\n}\n","import { ProfileMetadata } from './profile';\nimport { MirrorMetadata, PublicationMetadata } from './publication';\nimport { invariant } from './utils';\n\nconst schemaVersionRegex = /(\\d+\\.\\d+\\.\\d+)/;\n/**\n * Helper to extracts the version from the schema id of a metadata object.\n *\n * Most users will not need to use this function directly.\n *\n * @category Helpers\n * @experimental This function is experimental and may change or be removed in future versions.\n *\n * @example\n * Extract the version of a profile metadata object:\n * ```ts\n * const metadata = await ProfileMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '2.0.0'\n * ```\n *\n * @example\n * Extract the version of a mirror metadata object:\n * ```ts\n * const metadata = await MirrorMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '1.0.0'\n * ```\n *\n * @example\n * Extract the version of a publication metadata object:\n * ```ts\n * const metadata = await PublicationMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '3.0.0'\n * ```\n */\n\nexport function extractVersion(\n metadata: MirrorMetadata | ProfileMetadata | PublicationMetadata,\n): string {\n const result = schemaVersionRegex.exec(metadata.$schema);\n\n invariant(result !== null, `Invalid schema id: ${metadata.$schema}`);\n return result[0];\n}\n"]} \ No newline at end of file diff --git a/dist/index.d.cts b/dist/index.d.cts new file mode 100644 index 00000000..d3fafd55 --- /dev/null +++ b/dist/index.d.cts @@ -0,0 +1,3313 @@ +import { E as EncryptableURI, M as MetadataAttribute, a as EncryptableString, b as MetadataAttributeType, U as URI, c as EncryptedString, P as PublicationMetadataCommon, d as PublicationMainFocus, e as EncryptableMarkdown, f as MarketplaceMetadata, S as Signature, g as Markdown, h as MarketplaceMetadataAttribute, i as EncryptableGeoURI, j as PhysicalAddress, k as EncryptableDateTime, A as AppId, l as ShapeCheck, C as ChainId, m as CollectCondition, n as EoaOwnershipCondition, o as ConditionComparisonOperator, N as NetworkAddressDetails, p as Erc20OwnershipCondition, q as NftOwnershipCondition, r as ProfileOwnershipCondition, F as FollowCondition, s as AdvancedContractCondition, t as SimpleCondition, u as AndCondition, O as OrCondition, v as AnyCondition, w as AccessCondition, B as Brand, x as Overwrite, y as Prettify } from './index-BUp9r-lh.cjs'; +export { b7 as AccessConditionSchema, b4 as AdvancedContractConditionSchema, aH as Amount, aJ as AmountDetails, aI as AmountSchema, b5 as AndConditionSchema, aa as AppIdSchema, aE as Asset, aF as AssetSchema, I as BooleanAttribute, J as BooleanAttributeSchema, ay as ChainIdSchema, b3 as CollectConditionSchema, aY as ConditionType, K as DateAttribute, L as DateAttributeSchema, aq as DateTime, D as DistributiveOmit, bb as EncryptedPaths, a1 as EncryptedStringSchema, aW as EncryptionProvider, b0 as EoaOwnershipConditionSchema, a$ as Erc20OwnershipConditionSchema, au as EvmAddress, aw as EvmAddressSchema, b2 as FollowConditionSchema, ak as GeoPoint, al as GeoPointSchema, ai as GeoURI, aj as GeoURISchema, X as JSONAttribute, Y as JSONAttributeSchema, b8 as LitEncryptionKey, ba as LitEncryptionKeySchema, bc as LitEncryptionStrategy, bd as LitEncryptionStrategySchema, _ as Locale, a0 as LocaleSchema, z as MarketplaceMetadataAttributeDisplayType, G as MarketplaceMetadataAttributeSchema, H as MarketplaceMetadataSchema, Z as MetadataAttributeSchema, az as NetworkAddress, aA as NetworkAddressSchema, aX as NftContractType, a_ as NftOwnershipConditionSchema, Q as NumberAttribute, R as NumberAttributeSchema, b6 as OrConditionSchema, ap as PhysicalAddressSchema, aL as ProfileId, aN as ProfileIdSchema, b1 as ProfileOwnershipConditionSchema, aR as PublicationContentWarning, be as PublicationEncryptionStrategy, bf as PublicationEncryptionStrategySchema, aO as PublicationId, aQ as PublicationIdSchema, ac as SignatureSchema, V as StringAttribute, W as StringAttributeSchema, a6 as Tag, a8 as TagSchema, aB as TokenId, aD as TokenIdSchema, T as TwoAtLeastArray, aK as amount, aG as asset, as as datetimeSchema, a2 as encryptable, at as encryptableDateTimeSchema, ao as encryptableGeoUriSchema, a5 as encryptableStringSchema, ah as encryptableUriSchema, an as geoPoint, am as geoUri, aU as mainContentFocus, ae as markdown, aS as metadataDetailsWith, a3 as nonEmpty, a4 as nonEmptyStringSchema, aV as optionalContentSchema, aT as publicationWith, aZ as refineNftOwnershipCondition, a9 as toAppId, ax as toChainId, ar as toDateTime, av as toEvmAddress, b9 as toLitEncryptionKey, $ as toLocale, ad as toMarkdown, aM as toProfileId, aP as toPublicationId, ab as toSignature, a7 as toTag, aC as toTokenId, af as toUri, ag as uriSchema } from './index-BUp9r-lh.cjs'; +import { z } from 'zod'; + +/** + * The supported license types. + */ +declare enum MetadataLicenseType { + CCO = "CCO", + CC_BY = "CC BY", + CC_BY_ND = "CC BY-ND", + CC_BY_NC = "CC BY-NC", + TBNL_C_D_PL_Legal = "TBNL-C-D-PL-Legal", + TBNL_C_DT_PL_Legal = "TBNL-C-DT-PL-Legal", + TBNL_C_ND_PL_Legal = "TBNL-C-ND-PL-Legal", + TBNL_C_D_NPL_Legal = "TBNL-C-D-NPL-Legal", + TBNL_C_DT_NPL_Legal = "TBNL-C-DT-NPL-Legal", + TBNL_C_DTSA_PL_Legal = "TBNL-C-DTSA-PL-Legal", + TBNL_C_DTSA_NPL_Legal = "TBNL-C-DTSA-NPL-Legal", + TBNL_C_ND_NPL_Legal = "TBNL-C-ND-NPL-Legal", + TBNL_C_D_PL_Ledger = "TBNL-C-D-PL-Ledger", + TBNL_C_DT_PL_Ledger = "TBNL-C-DT-PL-Ledger", + TBNL_C_ND_PL_Ledger = "TBNL-C-ND-PL-Ledger", + TBNL_C_D_NPL_Ledger = "TBNL-C-D-NPL-Ledger", + TBNL_C_DT_NPL_Ledger = "TBNL-C-DT-NPL-Ledger", + TBNL_C_DTSA_PL_Ledger = "TBNL-C-DTSA-PL-Ledger", + TBNL_C_DTSA_NPL_Ledger = "TBNL-C-DTSA-NPL-Ledger", + TBNL_C_ND_NPL_Ledger = "TBNL-C-ND-NPL-Ledger", + TBNL_NC_D_PL_Legal = "TBNL-NC-D-PL-Legal", + TBNL_NC_DT_PL_Legal = "TBNL-NC-DT-PL-Legal", + TBNL_NC_ND_PL_Legal = "TBNL-NC-ND-PL-Legal", + TBNL_NC_D_NPL_Legal = "TBNL-NC-D-NPL-Legal", + TBNL_NC_DT_NPL_Legal = "TBNL-NC-DT-NPL-Legal", + TBNL_NC_DTSA_PL_Legal = "TBNL-NC-DTSA-PL-Legal", + TBNL_NC_DTSA_NPL_Legal = "TBNL-NC-DTSA-NPL-Legal", + TBNL_NC_ND_NPL_Legal = "TBNL-NC-ND-NPL-Legal", + TBNL_NC_D_PL_Ledger = "TBNL-NC-D-PL-Ledger", + TBNL_NC_DT_PL_Ledger = "TBNL-NC-DT-PL-Ledger", + TBNL_NC_ND_PL_Ledger = "TBNL-NC-ND-PL-Ledger", + TBNL_NC_D_NPL_Ledger = "TBNL-NC-D-NPL-Ledger", + TBNL_NC_DT_NPL_Ledger = "TBNL-NC-DT-NPL-Ledger", + TBNL_NC_DTSA_PL_Ledger = "TBNL-NC-DTSA-PL-Ledger", + TBNL_NC_DTSA_NPL_Ledger = "TBNL-NC-DTSA-NPL-Ledger", + TBNL_NC_ND_NPL_Ledger = "TBNL-NC-ND-NPL-Ledger" +} +/** + * @internal + */ +declare const MetadataLicenseTypeSchema: z.ZodNativeEnum; + +/** + * The kind of audio media. + */ +declare enum MediaAudioKind { + MUSIC = "MUSIC", + PODCAST = "PODCAST", + AUDIOBOOK = "AUDIOBOOK", + VOICE_NOTE = "VOICE_NOTE", + SOUND = "SOUND", + OTHER = "OTHER" +} +/** + * Audio mime type. + */ +declare enum MediaAudioMimeType { + WAV = "audio/wav", + WAV_VND = "audio/vnd.wave", + MP3 = "audio/mpeg", + OGG_AUDIO = "audio/ogg", + MP4_AUDIO = "audio/mp4", + AAC = "audio/aac", + WEBM_AUDIO = "audio/webm", + FLAC = "audio/flac" +} +type MediaAudio = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the audio. + */ + type: MediaAudioMimeType; + /** + * The cover image for the audio. + */ + cover?: EncryptableURI; + /** + * How long the the audio is in seconds. + */ + duration?: number; + /** + * The license for the audio. + */ + license?: MetadataLicenseType; + /** + * The credits for the audio. + */ + credits?: EncryptableString; + /** + * The name of the artist. + */ + artist?: EncryptableString; + /** + * The genre of the audio. + */ + genre?: EncryptableString; + /** + * The record label for the audio. + */ + recordLabel?: EncryptableString; + /** + * The type of audio. + */ + kind?: MediaAudioKind; + /** + * The lyrics for the audio. + */ + lyrics?: EncryptableURI; +}; +/** + * @internal + */ +declare const MediaAudioSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + cover: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; + duration: z.ZodOptional; + license: z.ZodOptional>; + credits: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + artist: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + genre: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + recordLabel: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + kind: z.ZodOptional>; + lyrics: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; +}, "strip", z.ZodTypeAny, { + type: MediaAudioMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + cover?: EncryptedString | URI | undefined; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; + credits?: string | EncryptedString | undefined; + artist?: string | EncryptedString | undefined; + genre?: string | EncryptedString | undefined; + recordLabel?: string | EncryptedString | undefined; + kind?: MediaAudioKind | undefined; + lyrics?: EncryptedString | URI | undefined; +}, { + type: MediaAudioMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + cover?: unknown; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; + credits?: unknown; + artist?: unknown; + genre?: unknown; + recordLabel?: unknown; + kind?: MediaAudioKind | undefined; + lyrics?: unknown; +}>; +/** + * Image mime type. + */ +declare enum MediaImageMimeType { + BMP = "image/bmp", + GIF = "image/gif", + HEIC = "image/heic", + JPEG = "image/jpeg", + PNG = "image/png", + SVG_XML = "image/svg+xml", + TIFF = "image/tiff", + WEBP = "image/webp", + X_MS_BMP = "image/x-ms-bmp" +} +type MediaImage = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the image. + */ + type: MediaImageMimeType; + /** + * The alt tag for accessibility. + */ + altTag?: EncryptableString; + /** + * The license for the image. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const MediaImageSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + altTag: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + license: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + type: MediaImageMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + altTag?: string | EncryptedString | undefined; + license?: MetadataLicenseType | undefined; +}, { + type: MediaImageMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + altTag?: unknown; + license?: MetadataLicenseType | undefined; +}>; +/** + * Video mime type. + */ +declare enum MediaVideoMimeType { + GLTF = "model/gltf+json", + GLTF_BINARY = "model/gltf-binary", + M4V = "video/x-m4v", + MOV = "video/mov", + MP4 = "video/mp4", + MPEG = "video/mpeg", + OGG = "video/ogg", + OGV = "video/ogv", + QUICKTIME = "video/quicktime", + WEBM = "video/webm" +} +type MediaVideo = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the video. + */ + type: MediaVideoMimeType; + /** + * The alt tag for accessibility. + */ + altTag?: string; + /** + * The cover image for the video. + */ + cover?: EncryptableURI; + /** + * How long the the video is in seconds. + */ + duration?: number; + /** + * The license for the video. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const MediaVideoSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + altTag: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + cover: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; + duration: z.ZodOptional; + license: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + type: MediaVideoMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + altTag?: string | EncryptedString | undefined; + cover?: EncryptedString | URI | undefined; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; +}, { + type: MediaVideoMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + altTag?: unknown; + cover?: unknown; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; +}>; +/** + * Any media type. + */ +type AnyMedia = MediaAudio | MediaImage | MediaVideo; +/** + * @internal + */ +declare const AnyMediaSchema: z.ZodType; + +declare const timezones: readonly ["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/La_Rioja", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Katmandu", "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis"]; +/** + * Timezone ID + */ +type TimezoneId = (typeof timezones)[number]; +/** + * @internal + */ +declare const TimezoneIdSchema: z.ZodEnum<["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/La_Rioja", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Katmandu", "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis"]>; + +/** + * A list of all the publication schema ids (past and present). + */ +declare enum PublicationSchemaId { + THREE_D_LATEST = "https://json-schemas.digiv3rse.xyz/publications/3d/3.0.0.json", + ARTICLE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/article/3.0.0.json", + AUDIO_LATEST = "https://json-schemas.digiv3rse.xyz/publications/audio/3.0.0.json", + CHECKING_IN_LATEST = "https://json-schemas.digiv3rse.xyz/publications/checking-in/3.0.0.json", + EMBED_LATEST = "https://json-schemas.digiv3rse.xyz/publications/embed/3.0.0.json", + EVENT_LATEST = "https://json-schemas.digiv3rse.xyz/publications/event/3.0.0.json", + IMAGE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/image/3.0.0.json", + LINK_LATEST = "https://json-schemas.digiv3rse.xyz/publications/link/3.0.0.json", + LIVESTREAM_LATEST = "https://json-schemas.digiv3rse.xyz/publications/livestream/3.0.0.json", + MINT_LATEST = "https://json-schemas.digiv3rse.xyz/publications/mint/3.0.0.json", + SPACE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/space/3.0.0.json", + STORY_LATEST = "https://json-schemas.digiv3rse.xyz/publications/story/3.0.0.json", + TRANSACTION_LATEST = "https://json-schemas.digiv3rse.xyz/publications/transaction/3.0.0.json", + TEXT_ONLY_LATEST = "https://json-schemas.digiv3rse.xyz/publications/text-only/3.0.0.json", + VIDEO_LATEST = "https://json-schemas.digiv3rse.xyz/publications/video/3.0.0.json" +} + +/** + * The 3D format type. + */ +declare enum ThreeDFormat { + GLTF = "gLTF/GLB", + FBX = "FBX", + VRM = "VRM", + OBJ = "OBJ" +} +/** + * A 3D asset. + */ +type ThreeDAsset = { + /** + * The URI of the 3D asset zip file. + */ + uri: URI; + /** + * The URL of the recommended web based 3D player to use to view the 3D asset. + */ + playerUrl: URI; + /** + * The 3D format of the asset. + */ + format: ThreeDFormat; + /** + * Path in extracted zip. Relative. 3D start point, MUST be 3D file type. + */ + zipPath?: string; + /** + * The license regulating the use of the 3D asset. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const ThreeDAssetSchema: z.ZodType; +type ThreeDMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.THREE_D; + /** + * The 3D items for the publication. + */ + assets: ThreeDAsset[]; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a 3D piece of art. + */ +type ThreeDMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.THREE_D_LATEST; + /** + * The metadata details. + */ + digi: ThreeDMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ThreeDSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type ArticleMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.ARTICLE; + /** + * Markdown content. + */ + content: EncryptableMarkdown; + /** + * The optional article title. + */ + title?: string; + /** + * Any attachment you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this model an article-like publication (e.g. blog, news, etc.) + */ +type ArticleMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.ARTICLE_LATEST; + /** + * The metadata details. + */ + digi: ArticleMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ArticleSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type AudioMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.AUDIO; + /** + * The audio. + */ + audio: MediaAudio; + /** + * The optional audio title. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where an audio is the main focus. + * + * Use the `digi.attachments` to include more media. + */ +type AudioMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.AUDIO_LATEST; + /** + * The metadata details. + */ + digi: AudioMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const AudioSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type CheckingInMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.CHECKING_IN; + /** + * Where you checking in from (free form text). + */ + location: EncryptableString; + /** + * The optional geographic position of the location. + */ + position?: EncryptableGeoURI; + /** + * The optional address of the location. + */ + address?: PhysicalAddress; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to notify your community that you are checking in from a location. + */ +type CheckingInMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.CHECKING_IN_LATEST; + /** + * The metadata details. + */ + digi: CheckingInMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const CheckingInSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type EmbedMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.EMBED; + /** + * The embed URL. + */ + embed: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication that embeds a resource such as a micro-app, a game, etc. + */ +type EmbedMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.EMBED_LATEST; + /** + * The metadata details. + */ + digi: EmbedMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const EmbedSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * An object intended to help with future events scheduling adjustments. + * + * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events + */ +type SchedulingAdjustments = { + /** + * Indicates a reference timezone for the event start and end times. + * If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer. + */ + timezoneId: TimezoneId; + /** + * Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. + * The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0). + */ + timezoneOffset: number; +}; +/** + * @internal + */ +declare const SchedulingAdjustmentsSchema: z.ZodType; +type EventMetadataDetails = PublicationMetadataCommon & { + /** + * The title of the event. + */ + title?: string; + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.EVENT; + location: EncryptableURI | EncryptableString; + /** + * The geographic position of the event. + */ + position?: EncryptableGeoURI; + /** + * The address of the event. + */ + address?: PhysicalAddress; + /** + * The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + endsAt: EncryptableDateTime; + /** + * Captures extra criteria to recompute correctly future start and end times. + * + * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events + */ + schedulingAdjustments?: SchedulingAdjustments; + /** + * The links you want to include with it. + */ + links?: EncryptableURI[]; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to create an event, virtual or physical. + */ +type EventMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.EVENT_LATEST; + /** + * The metadata details. + */ + digi: EventMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const EventSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type ImageMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.IMAGE; + /** + * The image. + */ + image: MediaImage; + /** + * A title for the image. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where an image is the main focus. + * + * Use the `digi.attachments` to include more images. + */ +type ImageMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.IMAGE_LATEST; + /** + * The metadata details. + */ + digi: ImageMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ImageSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type LinkMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.LINK; + /** + * The sharing link url. + */ + sharingLink: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a link to something you want to share. + */ +type LinkMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.LINK_LATEST; + /** + * The metadata details. + */ + digi: LinkMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const LinkSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type LiveStreamMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.LIVESTREAM; + /** + * The livestream title. + */ + title?: string; + /** + * The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + endsAt?: EncryptableDateTime; + /** + * Some livestream platforms have the playback url as a separate url. + * If not your case make sure `liveUrl` and `playbackUrl` are the same. + */ + playbackUrl: EncryptableURI; + /** + * Some livestream platforms have the live url as a separate url. + * If not your case make sure `liveUrl` and `playbackUrl` are the same. + */ + liveUrl: EncryptableURI; + /** + * The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check. + * + * Responses from this endpoint should conform to the following schema: + * + * ```json + * { + * "$schema": "http://json-schema.org/draft-07/schema#", + * "type": "object", + * "properties": { + * "isLive": { + * "type": "boolean" + * } + * }, + * "required": ["isLive"] + * } + * ``` + */ + checkLiveAPI?: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to notify your community of a livestream event. + */ +type LiveStreamMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.LIVESTREAM_LATEST; + /** + * The metadata details. + */ + digi: LiveStreamMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const LiveStreamSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type MintMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.MINT; + /** + * The mint item it can be a URL of the known provider like opensea + * https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 + * or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. + * + * The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata + */ + mintLink: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * Any attachment you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a link to mint an NFT. + */ +type MintMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.MINT_LATEST; + /** + * The metadata details. + */ + digi: MintMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const MintSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +declare enum MirrorSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/publications/mirror/1.0.0.json" +} + +type MirrorMetadataDetails = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this publication belongs to. + */ + appId: AppId; +}; +/** + * A Mirror metadata object. + */ +type MirrorMetadata = ShapeCheck<{ + /** + * The schema id. + */ + $schema: MirrorSchemaId.LATEST; + /** + * The metadata details. + */ + digi: MirrorMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}>; +/** + * Mirror metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * MirrorMetadata.parse(valid); // => MirrorMetadata + * + * MirrorMetadata.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * MirrorMetadata.safeParse(valid); + * // => { success: true, data: MirrorMetadata } + * + * MirrorMetadata.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const MirrorMetadataSchema: z.ZodType; + +type SpaceMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.SPACE; + /** + * The space title. + */ + title: string; + /** + * The space join link. + */ + link: EncryptableURI; + /** + * The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +declare const SpaceMetadataDetailsSchema: z.ZodType; +/** + * Use this to notify your community about a space you are hosting. + */ +type SpaceMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.SPACE_LATEST; + /** + * The metadata details. + */ + digi: SpaceMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const SpaceSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type StoryMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.STORY; + /** + * The story asset. + */ + asset: AnyMedia; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; +}; +/** + * Use this to model an Instagram-like story. + */ +type StoryMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.STORY_LATEST; + /** + * The metadata details. + */ + digi: StoryMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const StorySchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type TextOnlyMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.TEXT_ONLY; + /** + * The content for the publication as markdown. + */ + content: EncryptableMarkdown; +}; +/** + * Use this for a text-only publication. + * + * Most comments will fall into this category. + */ +type TextOnlyMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.TEXT_ONLY_LATEST; + /** + * The metadata details. + */ + digi: TextOnlyMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const TextOnlySchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * A way to classify the type of transaction. + */ +declare enum MetadataTransactionType { + ERC721 = "ERC721", + ERC20 = "ERC20", + OTHER = "OTHER" +} +type TransactionMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.TRANSACTION; + /** + * The transaction hash. + */ + txHash: EncryptableString; + /** + * The type of transaction. + */ + type: MetadataTransactionType; + /** + * The Chain Id. + */ + chainId: ChainId; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where a transaction is the main focus. + */ +type TransactionMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.TRANSACTION_LATEST; + /** + * The metadata details. + */ + digi: TransactionMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const TransactionSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type VideoMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.VIDEO | PublicationMainFocus.SHORT_VIDEO; + /** + * The video. + */ + video: MediaVideo; + /** + * The optional video title. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where a video is the main focus. + * + * Use the `digi.attachments` to include more media. + */ +type VideoMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.VIDEO_LATEST; + /** + * The metadata details. + */ + digi: VideoMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const VideoSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * `PublicationMetadata` is a discriminated union of all primary publication metadata. + * + * @example + * Use the `$schema` property to narrow down the type of the metadata: + * ```ts + * const metadata: PublicationMetadata = ... + * + * if (metadata.$schema === PublicationSchemaId.ARTICLE_LATEST) { + * // metadata is ArticleMetadata + * metadata.content; // => always string, not undefined + * } + * ``` + * + * @example + * Use the `$schema` property to determine the type of the metadata in an exhaustive switch statement: + * ```ts + * const metadata: PublicationMetadata = ... + * + * switch (metadata.$schema) { + * case PublicationSchemaId.ARTICLE_LATEST: + * // metadata is ArticleMetadata + * break; + * case PublicationSchemaId.AUDIO_LATEST: + * // metadata is AudioMetadata + * break; + * case PublicationSchemaId.IMAGE_LATEST: + * // metadata is ImageMetadata + * break; + * case PublicationSchemaId.TEXT_ONLY_LATEST: + * // metadata is TextOnlyMetadata + * break; + * // ... + * } + * ``` + */ +type PublicationMetadata = ShapeCheck; +/** + * A union of all publication metadata schemas. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * PublicationMetadataSchema.parse(valid); // => PublicationMetadata + * + * PublicationMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * PublicationMetadataSchema.safeParse(valid); + * // => { success: true, data: PublicationMetadata } + * + * PublicationMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const PublicationMetadataSchema: z.ZodType; + +type CollectConditionDetails = { + /** + * The Publication Id that needs to be collected to fulfill the condition. + */ + publicationId: string; + /** + * If the Publication Id refers to the current publication. + */ + thisPublication: boolean; +}; +/** + * Creates a Collect condition. + * + * @category Helpers + */ +declare function collectCondition(input: CollectConditionDetails): CollectCondition; +type EoaOwnershipConditionDetails = { + /** + * The EVM address to verify ownership of. + */ + address: string; +}; +/** + * Creates an EOA ownership condition. + * + * @category Helpers + */ +declare function eoaOwnershipCondition(input: EoaOwnershipConditionDetails): EoaOwnershipCondition; +type Erc20OwnershipConditionDetails = { + /** + * The comparison operator to use to compare the ERC-20 token balance. + */ + condition: ConditionComparisonOperator; + /** + * The ERC-20 token contract address details. + */ + contract: NetworkAddressDetails; + /** + * The ERC-20 token decimals (e.g. 18 for GHO) + */ + decimals: number; + /** + * The human readable amount to compare the ERC-20 token balance against using the comparison operator. + * + * @example + * 1.5 + * 42 + * 0.000002 + */ + value: string; +}; +/** + * Creates an ERC-20 token ownership condition. + * + * @category Helpers + * @param input - The ERC-20 token ownership condition details. + */ +declare function erc20OwnershipCondition({ condition, ...others }: Erc20OwnershipConditionDetails): Erc20OwnershipCondition; +type Erc721OwnershipConditionDetails = { + /** + * The NFT contract address details. + */ + contract: NetworkAddressDetails; + /** + * The list of token ids to verify ownership of. + */ + tokenIds?: string[]; +}; +/** + * Creates an ERC-721 NFT ownership condition. + * + * @category Helpers + */ +declare function erc721OwnershipCondition(input: Erc721OwnershipConditionDetails): NftOwnershipCondition; +type Erc1155OwnershipConditionDetails = { + /** + * The NFT contract address details. + */ + contract: NetworkAddressDetails; + /** + * The list of token ids to verify ownership of. + */ + tokenIds: string[]; +}; +/** + * Creates an ERC-1155 NFT ownership condition. + * + * @category Helpers + */ +declare function erc1155OwnershipCondition(input: Erc721OwnershipConditionDetails): NftOwnershipCondition; +type ProfileOwnershipConditionDetails = { + profileId: string; +}; +/** + * Creates a DiGi Profile ownership condition. + * + * @category Helpers + */ +declare function profileOwnershipCondition(input: ProfileOwnershipConditionDetails): ProfileOwnershipCondition; +type FollowConditionDetails = { + follow: string; +}; +/** + * Creates a follow DiGi Profile condition. + * + * @category Helpers + */ +declare function followCondition(input: FollowConditionDetails): FollowCondition; +type AdvancedContractConditionDetails = { + /** + * The contract information, including the chain id and the EVM address. + */ + contract: NetworkAddressDetails; + /** + * The function name to call. Has to be exactly the same as in the ABI. + */ + functionName: string; + /** + * The function ABI. Has to be in a human-readable string format, which you can convert using the ethers library. + * See here for more info https://docs.ethers.io/v5/api/utils/abi/fragments/#human-readable-abi + */ + abi: string; + /** + * The parameters to pass to the function. Has to be matching the arguments described in the ABI. + * In case of tuples and arrays, you have to pass the values as a stringified JSON array. + */ + params: string[]; + /** + * The comparison operator to use to compare the result of the function call. In case of integer outputs + * you can use any comparison operator. In case of boolean outputs, you can only use EQUAL and NOT_EQUAL. + */ + comparison: ConditionComparisonOperator; + /** + * The value to compare the result of the function call against. Can be a boolean or a BigNumber in string format. + */ + value: string; +}; +/** + * Creates an arbitrary on-chain condition based on the return value + * of a given contract view function. + * + * @category Helpers + * @experimental This feature is experimental and might change in the future. + */ +declare function advancedContractCondition(input: AdvancedContractConditionDetails): AdvancedContractCondition; +/** + * Creates an AND condition between two or more conditions. + * + * @category Helpers + */ +declare function andCondition(criteria: T): AndCondition; +/** + * Creates an OR condition between two or more conditions. + * + * @category Helpers + */ +declare function orCondition(criteria: T): OrCondition; +/** + * Creates the access condition specification for a given publication. + * + * @internal + */ +declare function accessCondition(criteria: AnyCondition[]): AccessCondition; + +/** + * @internal + */ +type BrandOf = [A] extends [Brand] ? R : never; +/** + * @internal + */ +type RecursiveUnbrand = T extends Brand> ? R : { + [K in keyof T]: RecursiveUnbrand; +}; +/** + * @internal + */ +type ExtractDiGiSpec = T['digi']; +/** + * @internal + */ +type OmitInferredPublicationFields = Omit; +/** + * @internal + */ +type PublicationDefaults
> = Overwrite-` or just ``, where: + * - `language` is a two-letter ISO 639-1 language code, e.g. `en` or `it` + * - `region` is a two-letter ISO 3166-1 alpha-2 region code, e.g. `US` or `IT` + * + * You can just pass in the language tag if you do not know the region or don't need to be specific. + * + * @defaultValue `en` + */ + locale?: string; +}>; +/** + * @internal + */ +type InputForPublicationMetadataDetails = RecursiveUnbrand>>; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type MirrorDetails = Prettify>>; +/** + * All {@link MirrorMetadataDetails} fields with: + * - `id` defaults to a UUID + */ +type MirrorOptions = MirrorDetails & { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * @defaultValue a UUID + */ + id?: string; +}; +/** + * Creates a valid MirrorMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = mirror({ + * appId: 'com.example.app', + * }); + * ``` + */ +declare function mirror({ id, ...others }: MirrorOptions): MirrorMetadata; + +declare enum ModuleSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/modules/1.0.0.json" +} + +/** + * The metadata standard for DiGi Modules + */ +type ModuleMetadata = { + /** + * The name of the module. + */ + name: string; + /** + * The human-friendly title for the module. + */ + title: string; + /** + * Markdown formatted description of the module. + * + * It should explain what this module does, how to use it, examples just + * like you would if you were building an NPM package. + * The more detail the better to allow dApp to easily integrate it. + */ + description: Markdown; + /** + * List of authors email addresses. + */ + authors: string[]; + /** + * The Solidity JSON ABI as JSON-string describing the initialization function calldata. + * + * This will be used to encode the calldata for the initialization function. + * + * It will also be used by the consumers of this module to decode the initialization + * calldata so to infer the initialization criteria. + */ + initializeCalldataABI: string; + /** + * The Solidity JSON ABI as JSON-string describing the initialization result data. + * + * This will be used by the consumers of this module to decode + * the result data from the initialization function so to infer the + * initialization result state. + */ + initializeResultDataABI?: string; + /** + * The Solidity JSON ABI as JSON-string describing the process function calldata. + * + * This will be used to encode the calldata for the process function. + * + * Some modules might non need to return any initialization result data. + */ + processCalldataABI: string; + /** + * An arbitrary bag of attributes you wish to add to the metadata. + */ + attributes: MetadataAttribute[]; + /** + * The schema ID. + */ + $schema: ModuleSchemaId.LATEST; +}; +declare const ModuleMetadataSchema: z.ZodType; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ModuleDetails = Prettify>>; +/** + * All {@link ModuleMetadata} fields without `$schema` a with: + * - `attributes` defaults to an empty array + */ +type ModuleOptions = ModuleDetails & { + /** + * An arbitrary bag of attributes you wish to add to the metadata. + */ + attributes?: MetadataAttribute[]; +}; +/** + * Creates a valid ModuleMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = module({ + * name: 'My Open Action', + * title: 'This is my Open Action', + * description: 'Get ready for the future of social interaction!', + * authors: ['awesome-dev@digi.xyz'], + * initializeCalldataABI: JSON.stringify([ + * { + * type: 'address', + * name: 'address', + * }, + * { + * type: 'uint256', + * name: 'price', + * }, + * ]), + * processCalldataABI: JSON.stringify([ + * { + * type: 'address', + * name: 'collector', + * }, + * ]), + * }); + * ``` + */ +declare function module({ attributes, ...others }: ModuleOptions): ModuleMetadata; + +declare enum ProfileSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/profile/2.0.0.json" +} + +type ProfileMetadataDetails = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this Profile details are relevant for. + * + * If omitted the data is considered to be the global Profile data. + */ + appId?: AppId; + /** + * The profile display name. + */ + name?: string; + /** + * The profile bio as markdown. + */ + bio?: Markdown; + /** + * The profile picture. + */ + picture?: URI; + /** + * The profile cover picture. + */ + coverPicture?: URI; + /** + * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. + * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged. + */ + attributes?: MetadataAttribute[]; +}; +/** + * Use this to create Profile metadata objects. + */ +type ProfileMetadata = { + /** + * The schema id. + */ + $schema: ProfileSchemaId.LATEST; + /** + * The metadata details. + */ + digi: ProfileMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * Profile Metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * ProfileMetadataSchema.parse(valid); // => ProfileMetadata + * + * ProfileMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * ProfileMetadataSchema.safeParse(valid); + * // => { success: true, data: ProfileMetadata } + * + * ProfileMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const ProfileMetadataSchema: z.ZodType; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ProfileDetails = Prettify>>; +/** + * All {@link ProfileMetadataDetails} fields with: + */ +type ProfileOptions = ProfileDetails & { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * @defaultValue a UUID + */ + id?: string; +}; +/** + * Creates a valid ProfileMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Global profile (no `appId`): + * ```ts + * const metadata = profile({ + * name: 'John Doe', + * bio: ` + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. + * + * - Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * - Donec a diam lectus. + * `, + * }); + * ``` + * + * @example + * App specific profile (with `appId`): + * ```ts + * const metadata = profile({ + * appId: 'com.example.app', + * name: 'John Doe', + * }); + * ``` + * + * @example + * With attributes: + * ```ts + * const metadata = profile({ + * name: 'John Doe', + * picture: 'https://example.com/picture.png', + * attributes: [ + * { + * key: 'twitter', + * type: MetadataAttributeType.STRING, + * value: 'https://twitter.com/johndoe', + * }, + * { + * key: 'dob', + * type: MetadataAttributeType.DATE, + * value: '1990-01-01T00:00:00Z', + * }, + * { + * key: 'enabled', + * type: MetadataAttributeType.BOOLEAN, + * value: 'true', + * }, + * { + * key: 'height', + * type: MetadataAttributeType.NUMBER, + * value: '1.8', + * }, + * { + * key: 'settings', + * type: MetadataAttributeType.JSON, + * value: '{"theme": "dark"}', + * }, + * ], + * }); + * ``` + */ +declare function profile({ id, ...others }: ProfileOptions): ProfileMetadata; + +/** + * The default locale used by the builder helpers. + */ +declare const DEFAULT_LOCALE = "en"; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type MarketplaceDetails = RecursiveUnbrand; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type ArticleDetails = InputForPublicationMetadataDetails; +/** + * All {@link ArticleMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.ARTICLE_LATEST` + */ +type ArticleOptions = ArticleDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ArticleMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = article({ + * title: 'Great Question' + * content: ` + * ## Heading + * + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. + * + * ## Question + * + * What is the answer to life, the universe and everything? + * + * ## Answer + * + * 42 + * + * ![The answer](https://example.com/answer.png) + * `, + * tags: ['question', '42'], + * }); + * ``` + */ +declare function article({ marketplace, locale, id, ...others }: ArticleOptions): ArticleMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type AudioDetails = InputForPublicationMetadataDetails; +/** + * All {@link AudioMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.AUDIO_LATEST` + */ +type AudioOptions = AudioDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid AudioMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single track: + * ```ts + * const metadata = audio({ + * title: 'Great song!', + * audio: { + * item: 'https://example.com/song.mp3', + * type: MediaAudioMimeType.MP3, + * artist: 'John Doe', + * cover: 'https://example.com/cover.png', + * }, + * }); + * ``` + * + * @example + * Album: + * ```ts + * const metadata = audio({ + * title: 'Great song!', + * audio: { + * item: 'https://example.com/sample.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 60, + * artist: 'John Doe', + * cover: 'https://example.com/cover.png', + * }, + * attachments: [ + * { + * item: 'https://example.com/song-1.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 234, + * }, + * { + * item: 'https://example.com/song-2.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 345, + * }, + * ], + * }); + * ``` + */ +declare function audio({ marketplace, locale, id, ...others }: AudioOptions): AudioMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type CheckingInDetails = InputForPublicationMetadataDetails; +/** + * All {@link CheckingInMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.CHECKING_IN_LATEST` + */ +type CheckingInOptions = CheckingInDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid CheckingInMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * With GPS coordinates: + * ```ts + * const metadata = checkingIn({ + * location: 'The Moon', + * position: geoUri({ + * lat: 40.6892, + * lng: -74.0444, + * }), + * }); + * ``` + * See {@link geoUri} for more details. + * + * @example + * With a physical address: + * ```ts + * const metadata = checkingIn({ + * location: 'The Moon', + * address: { + * streetAddress: '1st Street', + * locality: 'New York', + * region: 'NY', + * postalCode: '10001', + * country: 'US', + * }, + * }); + * ``` + */ +declare function checkingIn({ marketplace, locale, id, ...others }: CheckingInOptions): CheckingInMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type EmbedDetails = InputForPublicationMetadataDetails; +/** + * All {@link EmbedMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.EMBED_LATEST` + */ +type EmbedOptions = EmbedDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid EmbedMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = embed({ + * embed: 'https://example.com/embed.html', + * }); + * ``` + */ +declare function embed({ marketplace, locale, id, ...others }: EmbedOptions): EmbedMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type EventDetails = InputForPublicationMetadataDetails; +/** + * All {@link EventMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.EVENT_LATEST` + */ +type EventOptions = EventDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid EventMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * With GPS coordinates: + * ```ts + * const metadata = event({ + * location: 'The Moon', + * position: geoUri({ + * lat: 40.6892, + * lng: -74.0444, + * }), + * startsAt: '2028-10-01T00:00:00Z', + * endsAt: '2028-10-01T01:00:00Z', + * links: ['https://example.com/tickets.html'], + * }); + * ``` + * + * @example + * With a physical address: + * ```ts + * const metadata = event({ + * location: 'The Moon', + * address: { + * streetAddress: '1st Street', + * locality: 'New York', + * region: 'NY', + * postalCode: '10001', + * country: 'US', + * }, + * startsAt: '2028-10-01T00:00:00Z', + * endsAt: '2028-10-01T01:00:00Z', + * }); + * ``` + */ +declare function event({ marketplace, locale, id, ...others }: EventOptions): EventMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ImageDetails = InputForPublicationMetadataDetails; +/** + * All {@link ImageMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.IMAGE_LATEST` + */ +type ImageOptions = ImageDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ImageMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single image: + * + * ```ts + * const metadata = image({ + * title: 'Touch grass', + * image: { + * item: 'https://example.com/image.png', + * type: MediaImageMimeType.PNG, + * altTag: 'Me touching grass', + * license: MetadataLicenseType.CCO, + * }, + * }); + * ``` + * + * @example + * A gallery: + * ```ts + * const metadata = image({ + * title: 'Touch grass', + * image: { + * item: 'https://example.com/cover.png', + * type: MediaImageMimeType.PNG, + * altTag: 'A collage of me touching grass', + * license: MetadataLicenseType.CCO, + * }, + * attachments: [ + * { + * item: 'https://example.com/image-1.png', + * type: MediaImageMimeType.PNG, + * license: MetadataLicenseType.CC_BY_NC, + * altTag: 'Me touching a tree', + * }, + * { + * item: 'https://example.com/image-2.png', + * type: MediaImageMimeType.PNG, + * license: MetadataLicenseType.CC_BY_NC, + * altTag: 'The tree touching me', + * }, + * ], + * }); + * ``` + */ +declare function image({ marketplace, locale, id, ...others }: ImageOptions): ImageMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type LinkDetails = InputForPublicationMetadataDetails; +/** + * All {@link LinkMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.LINK_LATEST` + */ +type LinkOptions = LinkDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid LinkMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = link({ + * sharingLink: 'https://example.com/embed.html', + * content: 'Check out this cool website!', + * }); + * ``` + */ +declare function link({ marketplace, locale, id, ...others }: LinkOptions): LinkMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type LiveStreamDetails = InputForPublicationMetadataDetails; +/** + * All {@link LiveStreamMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.LIVESTREAM_LATEST` + */ +type LiveStreamOptions = LiveStreamDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid LivestreamMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = liveStream({ + * title: 'Live stream #1', + * liveUrl: 'https://example.com/live.html', + * playbackUrl: 'https://example.com/playback.html', + * startsAt: '2028-10-01T00:00:00Z', + * }); + * ``` + */ +declare function liveStream({ marketplace, locale, id, ...others }: LiveStreamOptions): LiveStreamMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type MintDetails = InputForPublicationMetadataDetails; +/** + * All {@link MintMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.MINT_LATEST` + */ +type MintOptions = MintDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid MintMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = mint({ + * content: 'Check out this NFT!', + * mintLink: + * 'https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/1234567890', + * }); + * ``` + */ +declare function mint({ marketplace, locale, id, ...others }: MintOptions): MintMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type SpaceDetails = InputForPublicationMetadataDetails; +/** + * All {@link SpaceMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.SPACE_LATEST` + */ +type SpaceOptions = SpaceDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid SpaceMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = space({ + * title: 'Space #1', + * link: 'https://example.com/space.html', + * startsAt: '2028-10-01T00:00:00Z', + * }); + * ``` + */ +declare function space({ marketplace, locale, id, ...others }: SpaceOptions): SpaceMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type StoryDetails = InputForPublicationMetadataDetails; +/** + * All {@link StoryMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.STORY_LATEST` + */ +type StoryOptions = StoryDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid StoryMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = story({ + * asset: { + * item: 'https://example.com/story.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The story of my life', + * }, + * }); + * ``` + */ +declare function story({ marketplace, locale, id, ...others }: StoryOptions): StoryMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type TextOnlyDetails = InputForPublicationMetadataDetails; +/** + * All {@link TextOnlyMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.TEXT_ONLY_LATEST` + */ +type TextOnlyOptions = TextOnlyDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid TextOnlyMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = textOnly({ + * content: `Nice question!`, + * }); + * ``` + */ +declare function textOnly({ marketplace, locale, id, ...others }: TextOnlyOptions): TextOnlyMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ThreeDDetails = InputForPublicationMetadataDetails; +/** + * All {@link ThreeDMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.THREE_D_LATEST` + */ +type ThreeDOptions = ThreeDDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ThreeDMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = threeD({ + * content: 'Check out this 3D model!', + * assets: [ + * { + * format: ThreeDFormat.VRM, + * playerUrl: 'https://example.com/player.html', + * uri: 'https://example.com/model.zip', + * zipPath: 'foo/model.vrm', + * }, + * ], + * tags: ['3d', 'vrm'], + * }); + * ``` + */ +declare function threeD({ marketplace, locale, id, ...others }: ThreeDOptions): ThreeDMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type TransactionDetails = InputForPublicationMetadataDetails; +/** + * All {@link TransactionMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.TRANSACTION_LATEST` + */ +type TransactionOptions = TransactionDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid TransactionMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = transaction({ + * chainId: 1, + * txHash: '0x1234567890', + * content: 'Check out this transaction!', + * type: MetadataTransactionType.ERC20, + * }); + * ``` + */ +declare function transaction({ marketplace, locale, id, ...others }: TransactionOptions): TransactionMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type VideoDetails = InputForPublicationMetadataDetails; +/** + * All {@link VideoMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.VIDEO_LATEST` + */ +type VideoOptions = VideoDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid VideoMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single video: + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * }, + * content: ` + * In this video I will show you how to make a great video. + * + * And maybe I will show you how to make a great video about making a great video. + * ` + * }); + * ``` + * + * @example + * Video with attachments: + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * }, + * attachments: [ + * { + * item: 'https://example.com/soundtrack.mp3', + * type: MediaAudioMimeType.MP3, + * license: MetadataLicenseType.CCO, + * } + * ] + * }); + * ``` + */ +declare function video({ marketplace, locale, id, ...others }: VideoOptions): VideoMetadata; +/** + * All {@link VideoMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.SHORT_VIDEO` + */ +type ShortVideoOptions = VideoDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid VideoMetadata for a short. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * } + * }); + * ``` + */ +declare function shortVideo({ marketplace, locale, id, ...others }: ShortVideoOptions): VideoMetadata; + +/** + * An error that occurs when an object does not match the expected shape. + */ +declare class ValidationError extends Error { + name: "ValidationError"; +} + +/** + * @internal + */ +declare const SchemasRoot = "https://json-schemas.digiv3rse.xyz"; + +/** + * Helper to extracts the version from the schema id of a metadata object. + * + * Most users will not need to use this function directly. + * + * @category Helpers + * @experimental This function is experimental and may change or be removed in future versions. + * + * @example + * Extract the version of a profile metadata object: + * ```ts + * const metadata = await ProfileMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '2.0.0' + * ``` + * + * @example + * Extract the version of a mirror metadata object: + * ```ts + * const metadata = await MirrorMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '1.0.0' + * ``` + * + * @example + * Extract the version of a publication metadata object: + * ```ts + * const metadata = await PublicationMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '3.0.0' + * ``` + */ +declare function extractVersion(metadata: MirrorMetadata | ProfileMetadata | PublicationMetadata): string; + +/** + * Formats a Zod parsing error into a human-readable string. + * + * The formatting is tailored to the DiGi Protocol Metadata use case. It may not be suitable for other use cases. + * + * @category Helpers + * + * @example + * ```ts + * const result = PublicationMetadataSchema.safeParse(invalid); + * + * if (!result.success) { + * throw new Error(formatZodError(result.error)); + * } + * ``` + */ +declare function formatZodError(zodError: z.ZodError): string; + +export { AccessCondition, AdvancedContractCondition, type AdvancedContractConditionDetails, AndCondition, AnyCondition, type AnyMedia, AnyMediaSchema, AppId, type ArticleMetadata, type ArticleMetadataDetails, type ArticleOptions, ArticleSchema, type AudioMetadata, type AudioMetadataDetails, type AudioOptions, AudioSchema, Brand, ChainId, type CheckingInMetadata, type CheckingInMetadataDetails, type CheckingInOptions, CheckingInSchema, CollectCondition, type CollectConditionDetails, ConditionComparisonOperator, DEFAULT_LOCALE, type EmbedMetadata, type EmbedMetadataDetails, type EmbedOptions, EmbedSchema, EncryptableDateTime, EncryptableGeoURI, EncryptableMarkdown, EncryptableString, EncryptableURI, EncryptedString, EoaOwnershipCondition, type EoaOwnershipConditionDetails, type Erc1155OwnershipConditionDetails, Erc20OwnershipCondition, type Erc20OwnershipConditionDetails, type Erc721OwnershipConditionDetails, type EventMetadata, type EventMetadataDetails, type EventOptions, EventSchema, FollowCondition, type FollowConditionDetails, type ImageMetadata, type ImageMetadataDetails, type ImageOptions, ImageSchema, type LinkMetadata, type LinkMetadataDetails, type LinkOptions, LinkSchema, type LiveStreamMetadata, type LiveStreamMetadataDetails, type LiveStreamOptions, LiveStreamSchema, Markdown, MarketplaceMetadata, MarketplaceMetadataAttribute, type MediaAudio, MediaAudioKind, MediaAudioMimeType, MediaAudioSchema, type MediaImage, MediaImageMimeType, MediaImageSchema, type MediaVideo, MediaVideoMimeType, MediaVideoSchema, MetadataAttribute, MetadataAttributeType, MetadataLicenseType, MetadataLicenseTypeSchema, MetadataTransactionType, type MintMetadata, type MintMetadataDetails, type MintOptions, MintSchema, type MirrorMetadata, type MirrorMetadataDetails, MirrorMetadataSchema, type MirrorOptions, MirrorSchemaId, type ModuleMetadata, ModuleMetadataSchema, type ModuleOptions, ModuleSchemaId, NetworkAddressDetails, NftOwnershipCondition, OrCondition, Overwrite, PhysicalAddress, Prettify, type ProfileMetadata, type ProfileMetadataDetails, ProfileMetadataSchema, type ProfileOptions, ProfileOwnershipCondition, type ProfileOwnershipConditionDetails, ProfileSchemaId, PublicationMainFocus, type PublicationMetadata, PublicationMetadataCommon, PublicationMetadataSchema, PublicationSchemaId, type SchedulingAdjustments, SchedulingAdjustmentsSchema, SchemasRoot, type ShortVideoOptions, Signature, SimpleCondition, type SpaceMetadata, type SpaceMetadataDetails, SpaceMetadataDetailsSchema, type SpaceOptions, SpaceSchema, type StoryMetadata, type StoryMetadataDetails, type StoryOptions, StorySchema, type TextOnlyMetadata, type TextOnlyMetadataDetails, type TextOnlyOptions, TextOnlySchema, type ThreeDAsset, ThreeDAssetSchema, ThreeDFormat, type ThreeDMetadata, type ThreeDMetadataDetails, type ThreeDOptions, ThreeDSchema, type TimezoneId, TimezoneIdSchema, type TransactionMetadata, type TransactionMetadataDetails, type TransactionOptions, TransactionSchema, URI, ValidationError, type VideoMetadata, type VideoMetadataDetails, type VideoOptions, VideoSchema, accessCondition, advancedContractCondition, andCondition, article, audio, checkingIn, collectCondition, embed, eoaOwnershipCondition, erc1155OwnershipCondition, erc20OwnershipCondition, erc721OwnershipCondition, event, extractVersion, followCondition, formatZodError, image, link, liveStream, mint, mirror, module, orCondition, profile, profileOwnershipCondition, shortVideo, space, story, textOnly, threeD, timezones, transaction, video }; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 00000000..28f93581 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3313 @@ +import { E as EncryptableURI, M as MetadataAttribute, a as EncryptableString, b as MetadataAttributeType, U as URI, c as EncryptedString, P as PublicationMetadataCommon, d as PublicationMainFocus, e as EncryptableMarkdown, f as MarketplaceMetadata, S as Signature, g as Markdown, h as MarketplaceMetadataAttribute, i as EncryptableGeoURI, j as PhysicalAddress, k as EncryptableDateTime, A as AppId, l as ShapeCheck, C as ChainId, m as CollectCondition, n as EoaOwnershipCondition, o as ConditionComparisonOperator, N as NetworkAddressDetails, p as Erc20OwnershipCondition, q as NftOwnershipCondition, r as ProfileOwnershipCondition, F as FollowCondition, s as AdvancedContractCondition, t as SimpleCondition, u as AndCondition, O as OrCondition, v as AnyCondition, w as AccessCondition, B as Brand, x as Overwrite, y as Prettify } from './index-BUp9r-lh.js'; +export { b7 as AccessConditionSchema, b4 as AdvancedContractConditionSchema, aH as Amount, aJ as AmountDetails, aI as AmountSchema, b5 as AndConditionSchema, aa as AppIdSchema, aE as Asset, aF as AssetSchema, I as BooleanAttribute, J as BooleanAttributeSchema, ay as ChainIdSchema, b3 as CollectConditionSchema, aY as ConditionType, K as DateAttribute, L as DateAttributeSchema, aq as DateTime, D as DistributiveOmit, bb as EncryptedPaths, a1 as EncryptedStringSchema, aW as EncryptionProvider, b0 as EoaOwnershipConditionSchema, a$ as Erc20OwnershipConditionSchema, au as EvmAddress, aw as EvmAddressSchema, b2 as FollowConditionSchema, ak as GeoPoint, al as GeoPointSchema, ai as GeoURI, aj as GeoURISchema, X as JSONAttribute, Y as JSONAttributeSchema, b8 as LitEncryptionKey, ba as LitEncryptionKeySchema, bc as LitEncryptionStrategy, bd as LitEncryptionStrategySchema, _ as Locale, a0 as LocaleSchema, z as MarketplaceMetadataAttributeDisplayType, G as MarketplaceMetadataAttributeSchema, H as MarketplaceMetadataSchema, Z as MetadataAttributeSchema, az as NetworkAddress, aA as NetworkAddressSchema, aX as NftContractType, a_ as NftOwnershipConditionSchema, Q as NumberAttribute, R as NumberAttributeSchema, b6 as OrConditionSchema, ap as PhysicalAddressSchema, aL as ProfileId, aN as ProfileIdSchema, b1 as ProfileOwnershipConditionSchema, aR as PublicationContentWarning, be as PublicationEncryptionStrategy, bf as PublicationEncryptionStrategySchema, aO as PublicationId, aQ as PublicationIdSchema, ac as SignatureSchema, V as StringAttribute, W as StringAttributeSchema, a6 as Tag, a8 as TagSchema, aB as TokenId, aD as TokenIdSchema, T as TwoAtLeastArray, aK as amount, aG as asset, as as datetimeSchema, a2 as encryptable, at as encryptableDateTimeSchema, ao as encryptableGeoUriSchema, a5 as encryptableStringSchema, ah as encryptableUriSchema, an as geoPoint, am as geoUri, aU as mainContentFocus, ae as markdown, aS as metadataDetailsWith, a3 as nonEmpty, a4 as nonEmptyStringSchema, aV as optionalContentSchema, aT as publicationWith, aZ as refineNftOwnershipCondition, a9 as toAppId, ax as toChainId, ar as toDateTime, av as toEvmAddress, b9 as toLitEncryptionKey, $ as toLocale, ad as toMarkdown, aM as toProfileId, aP as toPublicationId, ab as toSignature, a7 as toTag, aC as toTokenId, af as toUri, ag as uriSchema } from './index-BUp9r-lh.js'; +import { z } from 'zod'; + +/** + * The supported license types. + */ +declare enum MetadataLicenseType { + CCO = "CCO", + CC_BY = "CC BY", + CC_BY_ND = "CC BY-ND", + CC_BY_NC = "CC BY-NC", + TBNL_C_D_PL_Legal = "TBNL-C-D-PL-Legal", + TBNL_C_DT_PL_Legal = "TBNL-C-DT-PL-Legal", + TBNL_C_ND_PL_Legal = "TBNL-C-ND-PL-Legal", + TBNL_C_D_NPL_Legal = "TBNL-C-D-NPL-Legal", + TBNL_C_DT_NPL_Legal = "TBNL-C-DT-NPL-Legal", + TBNL_C_DTSA_PL_Legal = "TBNL-C-DTSA-PL-Legal", + TBNL_C_DTSA_NPL_Legal = "TBNL-C-DTSA-NPL-Legal", + TBNL_C_ND_NPL_Legal = "TBNL-C-ND-NPL-Legal", + TBNL_C_D_PL_Ledger = "TBNL-C-D-PL-Ledger", + TBNL_C_DT_PL_Ledger = "TBNL-C-DT-PL-Ledger", + TBNL_C_ND_PL_Ledger = "TBNL-C-ND-PL-Ledger", + TBNL_C_D_NPL_Ledger = "TBNL-C-D-NPL-Ledger", + TBNL_C_DT_NPL_Ledger = "TBNL-C-DT-NPL-Ledger", + TBNL_C_DTSA_PL_Ledger = "TBNL-C-DTSA-PL-Ledger", + TBNL_C_DTSA_NPL_Ledger = "TBNL-C-DTSA-NPL-Ledger", + TBNL_C_ND_NPL_Ledger = "TBNL-C-ND-NPL-Ledger", + TBNL_NC_D_PL_Legal = "TBNL-NC-D-PL-Legal", + TBNL_NC_DT_PL_Legal = "TBNL-NC-DT-PL-Legal", + TBNL_NC_ND_PL_Legal = "TBNL-NC-ND-PL-Legal", + TBNL_NC_D_NPL_Legal = "TBNL-NC-D-NPL-Legal", + TBNL_NC_DT_NPL_Legal = "TBNL-NC-DT-NPL-Legal", + TBNL_NC_DTSA_PL_Legal = "TBNL-NC-DTSA-PL-Legal", + TBNL_NC_DTSA_NPL_Legal = "TBNL-NC-DTSA-NPL-Legal", + TBNL_NC_ND_NPL_Legal = "TBNL-NC-ND-NPL-Legal", + TBNL_NC_D_PL_Ledger = "TBNL-NC-D-PL-Ledger", + TBNL_NC_DT_PL_Ledger = "TBNL-NC-DT-PL-Ledger", + TBNL_NC_ND_PL_Ledger = "TBNL-NC-ND-PL-Ledger", + TBNL_NC_D_NPL_Ledger = "TBNL-NC-D-NPL-Ledger", + TBNL_NC_DT_NPL_Ledger = "TBNL-NC-DT-NPL-Ledger", + TBNL_NC_DTSA_PL_Ledger = "TBNL-NC-DTSA-PL-Ledger", + TBNL_NC_DTSA_NPL_Ledger = "TBNL-NC-DTSA-NPL-Ledger", + TBNL_NC_ND_NPL_Ledger = "TBNL-NC-ND-NPL-Ledger" +} +/** + * @internal + */ +declare const MetadataLicenseTypeSchema: z.ZodNativeEnum; + +/** + * The kind of audio media. + */ +declare enum MediaAudioKind { + MUSIC = "MUSIC", + PODCAST = "PODCAST", + AUDIOBOOK = "AUDIOBOOK", + VOICE_NOTE = "VOICE_NOTE", + SOUND = "SOUND", + OTHER = "OTHER" +} +/** + * Audio mime type. + */ +declare enum MediaAudioMimeType { + WAV = "audio/wav", + WAV_VND = "audio/vnd.wave", + MP3 = "audio/mpeg", + OGG_AUDIO = "audio/ogg", + MP4_AUDIO = "audio/mp4", + AAC = "audio/aac", + WEBM_AUDIO = "audio/webm", + FLAC = "audio/flac" +} +type MediaAudio = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the audio. + */ + type: MediaAudioMimeType; + /** + * The cover image for the audio. + */ + cover?: EncryptableURI; + /** + * How long the the audio is in seconds. + */ + duration?: number; + /** + * The license for the audio. + */ + license?: MetadataLicenseType; + /** + * The credits for the audio. + */ + credits?: EncryptableString; + /** + * The name of the artist. + */ + artist?: EncryptableString; + /** + * The genre of the audio. + */ + genre?: EncryptableString; + /** + * The record label for the audio. + */ + recordLabel?: EncryptableString; + /** + * The type of audio. + */ + kind?: MediaAudioKind; + /** + * The lyrics for the audio. + */ + lyrics?: EncryptableURI; +}; +/** + * @internal + */ +declare const MediaAudioSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + cover: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; + duration: z.ZodOptional; + license: z.ZodOptional>; + credits: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + artist: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + genre: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + recordLabel: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + kind: z.ZodOptional>; + lyrics: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; +}, "strip", z.ZodTypeAny, { + type: MediaAudioMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + cover?: EncryptedString | URI | undefined; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; + credits?: string | EncryptedString | undefined; + artist?: string | EncryptedString | undefined; + genre?: string | EncryptedString | undefined; + recordLabel?: string | EncryptedString | undefined; + kind?: MediaAudioKind | undefined; + lyrics?: EncryptedString | URI | undefined; +}, { + type: MediaAudioMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + cover?: unknown; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; + credits?: unknown; + artist?: unknown; + genre?: unknown; + recordLabel?: unknown; + kind?: MediaAudioKind | undefined; + lyrics?: unknown; +}>; +/** + * Image mime type. + */ +declare enum MediaImageMimeType { + BMP = "image/bmp", + GIF = "image/gif", + HEIC = "image/heic", + JPEG = "image/jpeg", + PNG = "image/png", + SVG_XML = "image/svg+xml", + TIFF = "image/tiff", + WEBP = "image/webp", + X_MS_BMP = "image/x-ms-bmp" +} +type MediaImage = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the image. + */ + type: MediaImageMimeType; + /** + * The alt tag for accessibility. + */ + altTag?: EncryptableString; + /** + * The license for the image. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const MediaImageSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + altTag: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + license: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + type: MediaImageMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + altTag?: string | EncryptedString | undefined; + license?: MetadataLicenseType | undefined; +}, { + type: MediaImageMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + altTag?: unknown; + license?: MetadataLicenseType | undefined; +}>; +/** + * Video mime type. + */ +declare enum MediaVideoMimeType { + GLTF = "model/gltf+json", + GLTF_BINARY = "model/gltf-binary", + M4V = "video/x-m4v", + MOV = "video/mov", + MP4 = "video/mp4", + MPEG = "video/mpeg", + OGG = "video/ogg", + OGV = "video/ogv", + QUICKTIME = "video/quicktime", + WEBM = "video/webm" +} +type MediaVideo = { + /** + * The location of the file. + */ + item: EncryptableURI; + /** + * A bag of attributes that can be used to store any kind + * of metadata that is not currently supported by the standard. + */ + attributes?: MetadataAttribute[]; + /** + * The mime type of the video. + */ + type: MediaVideoMimeType; + /** + * The alt tag for accessibility. + */ + altTag?: string; + /** + * The cover image for the video. + */ + cover?: EncryptableURI; + /** + * How long the the video is in seconds. + */ + duration?: number; + /** + * The license for the video. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const MediaVideoSchema: z.ZodObject<{ + attributes: z.ZodOptional; + key: z.ZodType; + value: z.ZodEnum<["true", "false"]>; + }, "strip", z.ZodTypeAny, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + }, { + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.DATE; + key: string; + }, { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + }, { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.STRING; + key: string; + }, { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + }>, z.ZodObject<{ + type: z.ZodLiteral; + key: z.ZodType; + value: z.ZodType; + }, "strip", z.ZodTypeAny, { + value: string; + type: MetadataAttributeType.JSON; + key: string; + }, { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + }>]>, "many">>; + item: z.ZodEffects, z.ZodEffects]>>, EncryptedString | URI, unknown>; + type: z.ZodNativeEnum; + altTag: z.ZodOptional, z.ZodEffects]>>, string | EncryptedString, unknown>>; + cover: z.ZodOptional, z.ZodEffects]>>, EncryptedString | URI, unknown>>; + duration: z.ZodOptional; + license: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + type: MediaVideoMimeType; + item: (string & { + __type__: "EncryptedValue"; + }) | (string & { + __type__: "URI"; + }); + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key: string; + } | { + value: string; + type: MetadataAttributeType.DATE; + key: string; + } | { + value: string; + type: MetadataAttributeType.NUMBER; + key: string; + } | { + value: string; + type: MetadataAttributeType.STRING; + key: string; + } | { + value: string; + type: MetadataAttributeType.JSON; + key: string; + })[] | undefined; + altTag?: string | EncryptedString | undefined; + cover?: EncryptedString | URI | undefined; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; +}, { + type: MediaVideoMimeType; + attributes?: ({ + value: "true" | "false"; + type: MetadataAttributeType.BOOLEAN; + key?: unknown; + } | { + value: string; + type: MetadataAttributeType.DATE; + key?: unknown; + } | { + type: MetadataAttributeType.NUMBER; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.STRING; + key?: unknown; + value?: unknown; + } | { + type: MetadataAttributeType.JSON; + key?: unknown; + value?: unknown; + })[] | undefined; + item?: unknown; + altTag?: unknown; + cover?: unknown; + duration?: number | undefined; + license?: MetadataLicenseType | undefined; +}>; +/** + * Any media type. + */ +type AnyMedia = MediaAudio | MediaImage | MediaVideo; +/** + * @internal + */ +declare const AnyMediaSchema: z.ZodType; + +declare const timezones: readonly ["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/La_Rioja", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Katmandu", "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis"]; +/** + * Timezone ID + */ +type TimezoneId = (typeof timezones)[number]; +/** + * @internal + */ +declare const TimezoneIdSchema: z.ZodEnum<["Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/La_Rioja", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Fort_Nelson", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Monticello", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Colombo", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Hebron", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Katmandu", "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ulaanbaatar", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis"]>; + +/** + * A list of all the publication schema ids (past and present). + */ +declare enum PublicationSchemaId { + THREE_D_LATEST = "https://json-schemas.digiv3rse.xyz/publications/3d/3.0.0.json", + ARTICLE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/article/3.0.0.json", + AUDIO_LATEST = "https://json-schemas.digiv3rse.xyz/publications/audio/3.0.0.json", + CHECKING_IN_LATEST = "https://json-schemas.digiv3rse.xyz/publications/checking-in/3.0.0.json", + EMBED_LATEST = "https://json-schemas.digiv3rse.xyz/publications/embed/3.0.0.json", + EVENT_LATEST = "https://json-schemas.digiv3rse.xyz/publications/event/3.0.0.json", + IMAGE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/image/3.0.0.json", + LINK_LATEST = "https://json-schemas.digiv3rse.xyz/publications/link/3.0.0.json", + LIVESTREAM_LATEST = "https://json-schemas.digiv3rse.xyz/publications/livestream/3.0.0.json", + MINT_LATEST = "https://json-schemas.digiv3rse.xyz/publications/mint/3.0.0.json", + SPACE_LATEST = "https://json-schemas.digiv3rse.xyz/publications/space/3.0.0.json", + STORY_LATEST = "https://json-schemas.digiv3rse.xyz/publications/story/3.0.0.json", + TRANSACTION_LATEST = "https://json-schemas.digiv3rse.xyz/publications/transaction/3.0.0.json", + TEXT_ONLY_LATEST = "https://json-schemas.digiv3rse.xyz/publications/text-only/3.0.0.json", + VIDEO_LATEST = "https://json-schemas.digiv3rse.xyz/publications/video/3.0.0.json" +} + +/** + * The 3D format type. + */ +declare enum ThreeDFormat { + GLTF = "gLTF/GLB", + FBX = "FBX", + VRM = "VRM", + OBJ = "OBJ" +} +/** + * A 3D asset. + */ +type ThreeDAsset = { + /** + * The URI of the 3D asset zip file. + */ + uri: URI; + /** + * The URL of the recommended web based 3D player to use to view the 3D asset. + */ + playerUrl: URI; + /** + * The 3D format of the asset. + */ + format: ThreeDFormat; + /** + * Path in extracted zip. Relative. 3D start point, MUST be 3D file type. + */ + zipPath?: string; + /** + * The license regulating the use of the 3D asset. + */ + license?: MetadataLicenseType; +}; +/** + * @internal + */ +declare const ThreeDAssetSchema: z.ZodType; +type ThreeDMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.THREE_D; + /** + * The 3D items for the publication. + */ + assets: ThreeDAsset[]; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a 3D piece of art. + */ +type ThreeDMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.THREE_D_LATEST; + /** + * The metadata details. + */ + digi: ThreeDMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ThreeDSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type ArticleMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.ARTICLE; + /** + * Markdown content. + */ + content: EncryptableMarkdown; + /** + * The optional article title. + */ + title?: string; + /** + * Any attachment you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this model an article-like publication (e.g. blog, news, etc.) + */ +type ArticleMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.ARTICLE_LATEST; + /** + * The metadata details. + */ + digi: ArticleMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ArticleSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type AudioMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.AUDIO; + /** + * The audio. + */ + audio: MediaAudio; + /** + * The optional audio title. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where an audio is the main focus. + * + * Use the `digi.attachments` to include more media. + */ +type AudioMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.AUDIO_LATEST; + /** + * The metadata details. + */ + digi: AudioMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const AudioSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type CheckingInMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.CHECKING_IN; + /** + * Where you checking in from (free form text). + */ + location: EncryptableString; + /** + * The optional geographic position of the location. + */ + position?: EncryptableGeoURI; + /** + * The optional address of the location. + */ + address?: PhysicalAddress; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to notify your community that you are checking in from a location. + */ +type CheckingInMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.CHECKING_IN_LATEST; + /** + * The metadata details. + */ + digi: CheckingInMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const CheckingInSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type EmbedMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.EMBED; + /** + * The embed URL. + */ + embed: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication that embeds a resource such as a micro-app, a game, etc. + */ +type EmbedMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.EMBED_LATEST; + /** + * The metadata details. + */ + digi: EmbedMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const EmbedSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * An object intended to help with future events scheduling adjustments. + * + * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events + */ +type SchedulingAdjustments = { + /** + * Indicates a reference timezone for the event start and end times. + * If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer. + */ + timezoneId: TimezoneId; + /** + * Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. + * The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0). + */ + timezoneOffset: number; +}; +/** + * @internal + */ +declare const SchedulingAdjustmentsSchema: z.ZodType; +type EventMetadataDetails = PublicationMetadataCommon & { + /** + * The title of the event. + */ + title?: string; + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.EVENT; + location: EncryptableURI | EncryptableString; + /** + * The geographic position of the event. + */ + position?: EncryptableGeoURI; + /** + * The address of the event. + */ + address?: PhysicalAddress; + /** + * The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + endsAt: EncryptableDateTime; + /** + * Captures extra criteria to recompute correctly future start and end times. + * + * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events + */ + schedulingAdjustments?: SchedulingAdjustments; + /** + * The links you want to include with it. + */ + links?: EncryptableURI[]; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to create an event, virtual or physical. + */ +type EventMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.EVENT_LATEST; + /** + * The metadata details. + */ + digi: EventMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const EventSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type ImageMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.IMAGE; + /** + * The image. + */ + image: MediaImage; + /** + * A title for the image. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where an image is the main focus. + * + * Use the `digi.attachments` to include more images. + */ +type ImageMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.IMAGE_LATEST; + /** + * The metadata details. + */ + digi: ImageMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const ImageSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type LinkMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.LINK; + /** + * The sharing link url. + */ + sharingLink: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a link to something you want to share. + */ +type LinkMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.LINK_LATEST; + /** + * The metadata details. + */ + digi: LinkMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const LinkSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type LiveStreamMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.LIVESTREAM; + /** + * The livestream title. + */ + title?: string; + /** + * The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + endsAt?: EncryptableDateTime; + /** + * Some livestream platforms have the playback url as a separate url. + * If not your case make sure `liveUrl` and `playbackUrl` are the same. + */ + playbackUrl: EncryptableURI; + /** + * Some livestream platforms have the live url as a separate url. + * If not your case make sure `liveUrl` and `playbackUrl` are the same. + */ + liveUrl: EncryptableURI; + /** + * The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check. + * + * Responses from this endpoint should conform to the following schema: + * + * ```json + * { + * "$schema": "http://json-schema.org/draft-07/schema#", + * "type": "object", + * "properties": { + * "isLive": { + * "type": "boolean" + * } + * }, + * "required": ["isLive"] + * } + * ``` + */ + checkLiveAPI?: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to notify your community of a livestream event. + */ +type LiveStreamMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.LIVESTREAM_LATEST; + /** + * The metadata details. + */ + digi: LiveStreamMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const LiveStreamSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type MintMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.MINT; + /** + * The mint item it can be a URL of the known provider like opensea + * https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 + * or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. + * + * The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata + */ + mintLink: EncryptableURI; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * Any attachment you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to share a link to mint an NFT. + */ +type MintMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.MINT_LATEST; + /** + * The metadata details. + */ + digi: MintMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const MintSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +declare enum MirrorSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/publications/mirror/1.0.0.json" +} + +type MirrorMetadataDetails = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this publication belongs to. + */ + appId: AppId; +}; +/** + * A Mirror metadata object. + */ +type MirrorMetadata = ShapeCheck<{ + /** + * The schema id. + */ + $schema: MirrorSchemaId.LATEST; + /** + * The metadata details. + */ + digi: MirrorMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}>; +/** + * Mirror metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * MirrorMetadata.parse(valid); // => MirrorMetadata + * + * MirrorMetadata.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * MirrorMetadata.safeParse(valid); + * // => { success: true, data: MirrorMetadata } + * + * MirrorMetadata.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const MirrorMetadataSchema: z.ZodType; + +type SpaceMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.SPACE; + /** + * The space title. + */ + title: string; + /** + * The space join link. + */ + link: EncryptableURI; + /** + * The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`). + */ + startsAt: EncryptableDateTime; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +declare const SpaceMetadataDetailsSchema: z.ZodType; +/** + * Use this to notify your community about a space you are hosting. + */ +type SpaceMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.SPACE_LATEST; + /** + * The metadata details. + */ + digi: SpaceMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const SpaceSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type StoryMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.STORY; + /** + * The story asset. + */ + asset: AnyMedia; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; +}; +/** + * Use this to model an Instagram-like story. + */ +type StoryMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.STORY_LATEST; + /** + * The metadata details. + */ + digi: StoryMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const StorySchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type TextOnlyMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.TEXT_ONLY; + /** + * The content for the publication as markdown. + */ + content: EncryptableMarkdown; +}; +/** + * Use this for a text-only publication. + * + * Most comments will fall into this category. + */ +type TextOnlyMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.TEXT_ONLY_LATEST; + /** + * The metadata details. + */ + digi: TextOnlyMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const TextOnlySchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * A way to classify the type of transaction. + */ +declare enum MetadataTransactionType { + ERC721 = "ERC721", + ERC20 = "ERC20", + OTHER = "OTHER" +} +type TransactionMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.TRANSACTION; + /** + * The transaction hash. + */ + txHash: EncryptableString; + /** + * The type of transaction. + */ + type: MetadataTransactionType; + /** + * The Chain Id. + */ + chainId: ChainId; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where a transaction is the main focus. + */ +type TransactionMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.TRANSACTION_LATEST; + /** + * The metadata details. + */ + digi: TransactionMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const TransactionSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +type VideoMetadataDetails = PublicationMetadataCommon & { + /** + * The main focus of the publication. + */ + mainContentFocus: PublicationMainFocus.VIDEO | PublicationMainFocus.SHORT_VIDEO; + /** + * The video. + */ + video: MediaVideo; + /** + * The optional video title. + */ + title?: string; + /** + * Optional markdown content. + */ + content?: EncryptableMarkdown; + /** + * The other attachments you want to include with it. + */ + attachments?: AnyMedia[]; +}; +/** + * Use this to model a publication where a video is the main focus. + * + * Use the `digi.attachments` to include more media. + */ +type VideoMetadata = MarketplaceMetadata & { + /** + * The schema id. + */ + $schema: PublicationSchemaId.VIDEO_LATEST; + /** + * The metadata details. + */ + digi: VideoMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * @internal + */ +declare const VideoSchema: z.ZodObject<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + description: z.ZodCatch>>>; + external_url: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + signature: z.ZodOptional>; + $schema: z.ZodLiteral; + digi: z.ZodType; +}, z.ZodTypeAny, "passthrough">>; + +/** + * `PublicationMetadata` is a discriminated union of all primary publication metadata. + * + * @example + * Use the `$schema` property to narrow down the type of the metadata: + * ```ts + * const metadata: PublicationMetadata = ... + * + * if (metadata.$schema === PublicationSchemaId.ARTICLE_LATEST) { + * // metadata is ArticleMetadata + * metadata.content; // => always string, not undefined + * } + * ``` + * + * @example + * Use the `$schema` property to determine the type of the metadata in an exhaustive switch statement: + * ```ts + * const metadata: PublicationMetadata = ... + * + * switch (metadata.$schema) { + * case PublicationSchemaId.ARTICLE_LATEST: + * // metadata is ArticleMetadata + * break; + * case PublicationSchemaId.AUDIO_LATEST: + * // metadata is AudioMetadata + * break; + * case PublicationSchemaId.IMAGE_LATEST: + * // metadata is ImageMetadata + * break; + * case PublicationSchemaId.TEXT_ONLY_LATEST: + * // metadata is TextOnlyMetadata + * break; + * // ... + * } + * ``` + */ +type PublicationMetadata = ShapeCheck; +/** + * A union of all publication metadata schemas. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * PublicationMetadataSchema.parse(valid); // => PublicationMetadata + * + * PublicationMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * PublicationMetadataSchema.safeParse(valid); + * // => { success: true, data: PublicationMetadata } + * + * PublicationMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const PublicationMetadataSchema: z.ZodType; + +type CollectConditionDetails = { + /** + * The Publication Id that needs to be collected to fulfill the condition. + */ + publicationId: string; + /** + * If the Publication Id refers to the current publication. + */ + thisPublication: boolean; +}; +/** + * Creates a Collect condition. + * + * @category Helpers + */ +declare function collectCondition(input: CollectConditionDetails): CollectCondition; +type EoaOwnershipConditionDetails = { + /** + * The EVM address to verify ownership of. + */ + address: string; +}; +/** + * Creates an EOA ownership condition. + * + * @category Helpers + */ +declare function eoaOwnershipCondition(input: EoaOwnershipConditionDetails): EoaOwnershipCondition; +type Erc20OwnershipConditionDetails = { + /** + * The comparison operator to use to compare the ERC-20 token balance. + */ + condition: ConditionComparisonOperator; + /** + * The ERC-20 token contract address details. + */ + contract: NetworkAddressDetails; + /** + * The ERC-20 token decimals (e.g. 18 for GHO) + */ + decimals: number; + /** + * The human readable amount to compare the ERC-20 token balance against using the comparison operator. + * + * @example + * 1.5 + * 42 + * 0.000002 + */ + value: string; +}; +/** + * Creates an ERC-20 token ownership condition. + * + * @category Helpers + * @param input - The ERC-20 token ownership condition details. + */ +declare function erc20OwnershipCondition({ condition, ...others }: Erc20OwnershipConditionDetails): Erc20OwnershipCondition; +type Erc721OwnershipConditionDetails = { + /** + * The NFT contract address details. + */ + contract: NetworkAddressDetails; + /** + * The list of token ids to verify ownership of. + */ + tokenIds?: string[]; +}; +/** + * Creates an ERC-721 NFT ownership condition. + * + * @category Helpers + */ +declare function erc721OwnershipCondition(input: Erc721OwnershipConditionDetails): NftOwnershipCondition; +type Erc1155OwnershipConditionDetails = { + /** + * The NFT contract address details. + */ + contract: NetworkAddressDetails; + /** + * The list of token ids to verify ownership of. + */ + tokenIds: string[]; +}; +/** + * Creates an ERC-1155 NFT ownership condition. + * + * @category Helpers + */ +declare function erc1155OwnershipCondition(input: Erc721OwnershipConditionDetails): NftOwnershipCondition; +type ProfileOwnershipConditionDetails = { + profileId: string; +}; +/** + * Creates a DiGi Profile ownership condition. + * + * @category Helpers + */ +declare function profileOwnershipCondition(input: ProfileOwnershipConditionDetails): ProfileOwnershipCondition; +type FollowConditionDetails = { + follow: string; +}; +/** + * Creates a follow DiGi Profile condition. + * + * @category Helpers + */ +declare function followCondition(input: FollowConditionDetails): FollowCondition; +type AdvancedContractConditionDetails = { + /** + * The contract information, including the chain id and the EVM address. + */ + contract: NetworkAddressDetails; + /** + * The function name to call. Has to be exactly the same as in the ABI. + */ + functionName: string; + /** + * The function ABI. Has to be in a human-readable string format, which you can convert using the ethers library. + * See here for more info https://docs.ethers.io/v5/api/utils/abi/fragments/#human-readable-abi + */ + abi: string; + /** + * The parameters to pass to the function. Has to be matching the arguments described in the ABI. + * In case of tuples and arrays, you have to pass the values as a stringified JSON array. + */ + params: string[]; + /** + * The comparison operator to use to compare the result of the function call. In case of integer outputs + * you can use any comparison operator. In case of boolean outputs, you can only use EQUAL and NOT_EQUAL. + */ + comparison: ConditionComparisonOperator; + /** + * The value to compare the result of the function call against. Can be a boolean or a BigNumber in string format. + */ + value: string; +}; +/** + * Creates an arbitrary on-chain condition based on the return value + * of a given contract view function. + * + * @category Helpers + * @experimental This feature is experimental and might change in the future. + */ +declare function advancedContractCondition(input: AdvancedContractConditionDetails): AdvancedContractCondition; +/** + * Creates an AND condition between two or more conditions. + * + * @category Helpers + */ +declare function andCondition(criteria: T): AndCondition; +/** + * Creates an OR condition between two or more conditions. + * + * @category Helpers + */ +declare function orCondition(criteria: T): OrCondition; +/** + * Creates the access condition specification for a given publication. + * + * @internal + */ +declare function accessCondition(criteria: AnyCondition[]): AccessCondition; + +/** + * @internal + */ +type BrandOf = [A] extends [Brand] ? R : never; +/** + * @internal + */ +type RecursiveUnbrand = T extends Brand> ? R : { + [K in keyof T]: RecursiveUnbrand; +}; +/** + * @internal + */ +type ExtractDiGiSpec = T['digi']; +/** + * @internal + */ +type OmitInferredPublicationFields = Omit; +/** + * @internal + */ +type PublicationDefaults
> = Overwrite-` or just ``, where: + * - `language` is a two-letter ISO 639-1 language code, e.g. `en` or `it` + * - `region` is a two-letter ISO 3166-1 alpha-2 region code, e.g. `US` or `IT` + * + * You can just pass in the language tag if you do not know the region or don't need to be specific. + * + * @defaultValue `en` + */ + locale?: string; +}>; +/** + * @internal + */ +type InputForPublicationMetadataDetails = RecursiveUnbrand>>; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type MirrorDetails = Prettify>>; +/** + * All {@link MirrorMetadataDetails} fields with: + * - `id` defaults to a UUID + */ +type MirrorOptions = MirrorDetails & { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * @defaultValue a UUID + */ + id?: string; +}; +/** + * Creates a valid MirrorMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = mirror({ + * appId: 'com.example.app', + * }); + * ``` + */ +declare function mirror({ id, ...others }: MirrorOptions): MirrorMetadata; + +declare enum ModuleSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/modules/1.0.0.json" +} + +/** + * The metadata standard for DiGi Modules + */ +type ModuleMetadata = { + /** + * The name of the module. + */ + name: string; + /** + * The human-friendly title for the module. + */ + title: string; + /** + * Markdown formatted description of the module. + * + * It should explain what this module does, how to use it, examples just + * like you would if you were building an NPM package. + * The more detail the better to allow dApp to easily integrate it. + */ + description: Markdown; + /** + * List of authors email addresses. + */ + authors: string[]; + /** + * The Solidity JSON ABI as JSON-string describing the initialization function calldata. + * + * This will be used to encode the calldata for the initialization function. + * + * It will also be used by the consumers of this module to decode the initialization + * calldata so to infer the initialization criteria. + */ + initializeCalldataABI: string; + /** + * The Solidity JSON ABI as JSON-string describing the initialization result data. + * + * This will be used by the consumers of this module to decode + * the result data from the initialization function so to infer the + * initialization result state. + */ + initializeResultDataABI?: string; + /** + * The Solidity JSON ABI as JSON-string describing the process function calldata. + * + * This will be used to encode the calldata for the process function. + * + * Some modules might non need to return any initialization result data. + */ + processCalldataABI: string; + /** + * An arbitrary bag of attributes you wish to add to the metadata. + */ + attributes: MetadataAttribute[]; + /** + * The schema ID. + */ + $schema: ModuleSchemaId.LATEST; +}; +declare const ModuleMetadataSchema: z.ZodType; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ModuleDetails = Prettify>>; +/** + * All {@link ModuleMetadata} fields without `$schema` a with: + * - `attributes` defaults to an empty array + */ +type ModuleOptions = ModuleDetails & { + /** + * An arbitrary bag of attributes you wish to add to the metadata. + */ + attributes?: MetadataAttribute[]; +}; +/** + * Creates a valid ModuleMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = module({ + * name: 'My Open Action', + * title: 'This is my Open Action', + * description: 'Get ready for the future of social interaction!', + * authors: ['awesome-dev@digi.xyz'], + * initializeCalldataABI: JSON.stringify([ + * { + * type: 'address', + * name: 'address', + * }, + * { + * type: 'uint256', + * name: 'price', + * }, + * ]), + * processCalldataABI: JSON.stringify([ + * { + * type: 'address', + * name: 'collector', + * }, + * ]), + * }); + * ``` + */ +declare function module({ attributes, ...others }: ModuleOptions): ModuleMetadata; + +declare enum ProfileSchemaId { + LATEST = "https://json-schemas.digiv3rse.xyz/profile/2.0.0.json" +} + +type ProfileMetadataDetails = { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure. + */ + id: string; + /** + * The App Id that this Profile details are relevant for. + * + * If omitted the data is considered to be the global Profile data. + */ + appId?: AppId; + /** + * The profile display name. + */ + name?: string; + /** + * The profile bio as markdown. + */ + bio?: Markdown; + /** + * The profile picture. + */ + picture?: URI; + /** + * The profile cover picture. + */ + coverPicture?: URI; + /** + * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. + * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged. + */ + attributes?: MetadataAttribute[]; +}; +/** + * Use this to create Profile metadata objects. + */ +type ProfileMetadata = { + /** + * The schema id. + */ + $schema: ProfileSchemaId.LATEST; + /** + * The metadata details. + */ + digi: ProfileMetadataDetails; + /** + * A cryptographic signature of the `digi` data. + * + * @experimental DO NOT use yet + */ + signature?: Signature; +}; +/** + * Profile Metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * ProfileMetadataSchema.parse(valid); // => ProfileMetadata + * + * ProfileMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * ProfileMetadataSchema.safeParse(valid); + * // => { success: true, data: ProfileMetadata } + * + * ProfileMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const ProfileMetadataSchema: z.ZodType; + +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ProfileDetails = Prettify>>; +/** + * All {@link ProfileMetadataDetails} fields with: + */ +type ProfileOptions = ProfileDetails & { + /** + * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. + * + * @defaultValue a UUID + */ + id?: string; +}; +/** + * Creates a valid ProfileMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Global profile (no `appId`): + * ```ts + * const metadata = profile({ + * name: 'John Doe', + * bio: ` + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. + * + * - Lorem ipsum dolor sit amet, consectetur adipiscing elit. + * - Donec a diam lectus. + * `, + * }); + * ``` + * + * @example + * App specific profile (with `appId`): + * ```ts + * const metadata = profile({ + * appId: 'com.example.app', + * name: 'John Doe', + * }); + * ``` + * + * @example + * With attributes: + * ```ts + * const metadata = profile({ + * name: 'John Doe', + * picture: 'https://example.com/picture.png', + * attributes: [ + * { + * key: 'twitter', + * type: MetadataAttributeType.STRING, + * value: 'https://twitter.com/johndoe', + * }, + * { + * key: 'dob', + * type: MetadataAttributeType.DATE, + * value: '1990-01-01T00:00:00Z', + * }, + * { + * key: 'enabled', + * type: MetadataAttributeType.BOOLEAN, + * value: 'true', + * }, + * { + * key: 'height', + * type: MetadataAttributeType.NUMBER, + * value: '1.8', + * }, + * { + * key: 'settings', + * type: MetadataAttributeType.JSON, + * value: '{"theme": "dark"}', + * }, + * ], + * }); + * ``` + */ +declare function profile({ id, ...others }: ProfileOptions): ProfileMetadata; + +/** + * The default locale used by the builder helpers. + */ +declare const DEFAULT_LOCALE = "en"; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type MarketplaceDetails = RecursiveUnbrand; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type ArticleDetails = InputForPublicationMetadataDetails; +/** + * All {@link ArticleMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.ARTICLE_LATEST` + */ +type ArticleOptions = ArticleDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ArticleMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = article({ + * title: 'Great Question' + * content: ` + * ## Heading + * + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. + * + * ## Question + * + * What is the answer to life, the universe and everything? + * + * ## Answer + * + * 42 + * + * ![The answer](https://example.com/answer.png) + * `, + * tags: ['question', '42'], + * }); + * ``` + */ +declare function article({ marketplace, locale, id, ...others }: ArticleOptions): ArticleMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type AudioDetails = InputForPublicationMetadataDetails; +/** + * All {@link AudioMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.AUDIO_LATEST` + */ +type AudioOptions = AudioDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid AudioMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single track: + * ```ts + * const metadata = audio({ + * title: 'Great song!', + * audio: { + * item: 'https://example.com/song.mp3', + * type: MediaAudioMimeType.MP3, + * artist: 'John Doe', + * cover: 'https://example.com/cover.png', + * }, + * }); + * ``` + * + * @example + * Album: + * ```ts + * const metadata = audio({ + * title: 'Great song!', + * audio: { + * item: 'https://example.com/sample.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 60, + * artist: 'John Doe', + * cover: 'https://example.com/cover.png', + * }, + * attachments: [ + * { + * item: 'https://example.com/song-1.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 234, + * }, + * { + * item: 'https://example.com/song-2.mp3', + * type: MediaAudioMimeType.MP3, + * duration: 345, + * }, + * ], + * }); + * ``` + */ +declare function audio({ marketplace, locale, id, ...others }: AudioOptions): AudioMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs + */ +type CheckingInDetails = InputForPublicationMetadataDetails; +/** + * All {@link CheckingInMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.CHECKING_IN_LATEST` + */ +type CheckingInOptions = CheckingInDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid CheckingInMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * With GPS coordinates: + * ```ts + * const metadata = checkingIn({ + * location: 'The Moon', + * position: geoUri({ + * lat: 40.6892, + * lng: -74.0444, + * }), + * }); + * ``` + * See {@link geoUri} for more details. + * + * @example + * With a physical address: + * ```ts + * const metadata = checkingIn({ + * location: 'The Moon', + * address: { + * streetAddress: '1st Street', + * locality: 'New York', + * region: 'NY', + * postalCode: '10001', + * country: 'US', + * }, + * }); + * ``` + */ +declare function checkingIn({ marketplace, locale, id, ...others }: CheckingInOptions): CheckingInMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type EmbedDetails = InputForPublicationMetadataDetails; +/** + * All {@link EmbedMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.EMBED_LATEST` + */ +type EmbedOptions = EmbedDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid EmbedMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = embed({ + * embed: 'https://example.com/embed.html', + * }); + * ``` + */ +declare function embed({ marketplace, locale, id, ...others }: EmbedOptions): EmbedMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type EventDetails = InputForPublicationMetadataDetails; +/** + * All {@link EventMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.EVENT_LATEST` + */ +type EventOptions = EventDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid EventMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * With GPS coordinates: + * ```ts + * const metadata = event({ + * location: 'The Moon', + * position: geoUri({ + * lat: 40.6892, + * lng: -74.0444, + * }), + * startsAt: '2028-10-01T00:00:00Z', + * endsAt: '2028-10-01T01:00:00Z', + * links: ['https://example.com/tickets.html'], + * }); + * ``` + * + * @example + * With a physical address: + * ```ts + * const metadata = event({ + * location: 'The Moon', + * address: { + * streetAddress: '1st Street', + * locality: 'New York', + * region: 'NY', + * postalCode: '10001', + * country: 'US', + * }, + * startsAt: '2028-10-01T00:00:00Z', + * endsAt: '2028-10-01T01:00:00Z', + * }); + * ``` + */ +declare function event({ marketplace, locale, id, ...others }: EventOptions): EventMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ImageDetails = InputForPublicationMetadataDetails; +/** + * All {@link ImageMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.IMAGE_LATEST` + */ +type ImageOptions = ImageDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ImageMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single image: + * + * ```ts + * const metadata = image({ + * title: 'Touch grass', + * image: { + * item: 'https://example.com/image.png', + * type: MediaImageMimeType.PNG, + * altTag: 'Me touching grass', + * license: MetadataLicenseType.CCO, + * }, + * }); + * ``` + * + * @example + * A gallery: + * ```ts + * const metadata = image({ + * title: 'Touch grass', + * image: { + * item: 'https://example.com/cover.png', + * type: MediaImageMimeType.PNG, + * altTag: 'A collage of me touching grass', + * license: MetadataLicenseType.CCO, + * }, + * attachments: [ + * { + * item: 'https://example.com/image-1.png', + * type: MediaImageMimeType.PNG, + * license: MetadataLicenseType.CC_BY_NC, + * altTag: 'Me touching a tree', + * }, + * { + * item: 'https://example.com/image-2.png', + * type: MediaImageMimeType.PNG, + * license: MetadataLicenseType.CC_BY_NC, + * altTag: 'The tree touching me', + * }, + * ], + * }); + * ``` + */ +declare function image({ marketplace, locale, id, ...others }: ImageOptions): ImageMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type LinkDetails = InputForPublicationMetadataDetails; +/** + * All {@link LinkMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.LINK_LATEST` + */ +type LinkOptions = LinkDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid LinkMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = link({ + * sharingLink: 'https://example.com/embed.html', + * content: 'Check out this cool website!', + * }); + * ``` + */ +declare function link({ marketplace, locale, id, ...others }: LinkOptions): LinkMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type LiveStreamDetails = InputForPublicationMetadataDetails; +/** + * All {@link LiveStreamMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.LIVESTREAM_LATEST` + */ +type LiveStreamOptions = LiveStreamDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid LivestreamMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = liveStream({ + * title: 'Live stream #1', + * liveUrl: 'https://example.com/live.html', + * playbackUrl: 'https://example.com/playback.html', + * startsAt: '2028-10-01T00:00:00Z', + * }); + * ``` + */ +declare function liveStream({ marketplace, locale, id, ...others }: LiveStreamOptions): LiveStreamMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type MintDetails = InputForPublicationMetadataDetails; +/** + * All {@link MintMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.MINT_LATEST` + */ +type MintOptions = MintDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid MintMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = mint({ + * content: 'Check out this NFT!', + * mintLink: + * 'https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/1234567890', + * }); + * ``` + */ +declare function mint({ marketplace, locale, id, ...others }: MintOptions): MintMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type SpaceDetails = InputForPublicationMetadataDetails; +/** + * All {@link SpaceMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.SPACE_LATEST` + */ +type SpaceOptions = SpaceDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid SpaceMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = space({ + * title: 'Space #1', + * link: 'https://example.com/space.html', + * startsAt: '2028-10-01T00:00:00Z', + * }); + * ``` + */ +declare function space({ marketplace, locale, id, ...others }: SpaceOptions): SpaceMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type StoryDetails = InputForPublicationMetadataDetails; +/** + * All {@link StoryMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.STORY_LATEST` + */ +type StoryOptions = StoryDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid StoryMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = story({ + * asset: { + * item: 'https://example.com/story.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The story of my life', + * }, + * }); + * ``` + */ +declare function story({ marketplace, locale, id, ...others }: StoryOptions): StoryMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type TextOnlyDetails = InputForPublicationMetadataDetails; +/** + * All {@link TextOnlyMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.TEXT_ONLY_LATEST` + */ +type TextOnlyOptions = TextOnlyDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid TextOnlyMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = textOnly({ + * content: `Nice question!`, + * }); + * ``` + */ +declare function textOnly({ marketplace, locale, id, ...others }: TextOnlyOptions): TextOnlyMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type ThreeDDetails = InputForPublicationMetadataDetails; +/** + * All {@link ThreeDMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.THREE_D_LATEST` + */ +type ThreeDOptions = ThreeDDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid ThreeDMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = threeD({ + * content: 'Check out this 3D model!', + * assets: [ + * { + * format: ThreeDFormat.VRM, + * playerUrl: 'https://example.com/player.html', + * uri: 'https://example.com/model.zip', + * zipPath: 'foo/model.vrm', + * }, + * ], + * tags: ['3d', 'vrm'], + * }); + * ``` + */ +declare function threeD({ marketplace, locale, id, ...others }: ThreeDOptions): ThreeDMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type TransactionDetails = InputForPublicationMetadataDetails; +/** + * All {@link TransactionMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.TRANSACTION_LATEST` + */ +type TransactionOptions = TransactionDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid TransactionMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = transaction({ + * chainId: 1, + * txHash: '0x1234567890', + * content: 'Check out this transaction!', + * type: MetadataTransactionType.ERC20, + * }); + * ``` + */ +declare function transaction({ marketplace, locale, id, ...others }: TransactionOptions): TransactionMetadata; +/** + * @private + * @privateRemarks MUST stay very @private to produce usable docs + */ +type VideoDetails = InputForPublicationMetadataDetails; +/** + * All {@link VideoMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.VIDEO_LATEST` + */ +type VideoOptions = VideoDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid VideoMetadata. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * Single video: + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * }, + * content: ` + * In this video I will show you how to make a great video. + * + * And maybe I will show you how to make a great video about making a great video. + * ` + * }); + * ``` + * + * @example + * Video with attachments: + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * }, + * attachments: [ + * { + * item: 'https://example.com/soundtrack.mp3', + * type: MediaAudioMimeType.MP3, + * license: MetadataLicenseType.CCO, + * } + * ] + * }); + * ``` + */ +declare function video({ marketplace, locale, id, ...others }: VideoOptions): VideoMetadata; +/** + * All {@link VideoMetadataDetails} fields with: + * - `id` defaults to a UUID + * - `locale` defaults to `en` + * - `mainContentFocus` automatically set to `PublicationSchemaId.SHORT_VIDEO` + */ +type ShortVideoOptions = VideoDetails & { + /** + * All the {@link MarketplaceMetadata} fields. + */ + marketplace?: MarketplaceDetails; +}; +/** + * Creates a valid VideoMetadata for a short. + * + * @category Compose + * @param input - Use your IDE suggestions for an enhanced development experience + * + * @example + * ```ts + * const metadata = video({ + * title: 'Great video!', + * video: { + * item: 'https://example.com/video.mp4', + * type: MediaVideoMimeType.MP4, + * cover: 'https://example.com/thumbnail.png', + * duration: 123, + * altTag: 'The video of my life', + * license: MetadataLicenseType.CCO, + * } + * }); + * ``` + */ +declare function shortVideo({ marketplace, locale, id, ...others }: ShortVideoOptions): VideoMetadata; + +/** + * An error that occurs when an object does not match the expected shape. + */ +declare class ValidationError extends Error { + name: "ValidationError"; +} + +/** + * @internal + */ +declare const SchemasRoot = "https://json-schemas.digiv3rse.xyz"; + +/** + * Helper to extracts the version from the schema id of a metadata object. + * + * Most users will not need to use this function directly. + * + * @category Helpers + * @experimental This function is experimental and may change or be removed in future versions. + * + * @example + * Extract the version of a profile metadata object: + * ```ts + * const metadata = await ProfileMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '2.0.0' + * ``` + * + * @example + * Extract the version of a mirror metadata object: + * ```ts + * const metadata = await MirrorMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '1.0.0' + * ``` + * + * @example + * Extract the version of a publication metadata object: + * ```ts + * const metadata = await PublicationMetadataSchema.parse(valid); + * + * const version = extractVersion(metadata); // '3.0.0' + * ``` + */ +declare function extractVersion(metadata: MirrorMetadata | ProfileMetadata | PublicationMetadata): string; + +/** + * Formats a Zod parsing error into a human-readable string. + * + * The formatting is tailored to the DiGi Protocol Metadata use case. It may not be suitable for other use cases. + * + * @category Helpers + * + * @example + * ```ts + * const result = PublicationMetadataSchema.safeParse(invalid); + * + * if (!result.success) { + * throw new Error(formatZodError(result.error)); + * } + * ``` + */ +declare function formatZodError(zodError: z.ZodError): string; + +export { AccessCondition, AdvancedContractCondition, type AdvancedContractConditionDetails, AndCondition, AnyCondition, type AnyMedia, AnyMediaSchema, AppId, type ArticleMetadata, type ArticleMetadataDetails, type ArticleOptions, ArticleSchema, type AudioMetadata, type AudioMetadataDetails, type AudioOptions, AudioSchema, Brand, ChainId, type CheckingInMetadata, type CheckingInMetadataDetails, type CheckingInOptions, CheckingInSchema, CollectCondition, type CollectConditionDetails, ConditionComparisonOperator, DEFAULT_LOCALE, type EmbedMetadata, type EmbedMetadataDetails, type EmbedOptions, EmbedSchema, EncryptableDateTime, EncryptableGeoURI, EncryptableMarkdown, EncryptableString, EncryptableURI, EncryptedString, EoaOwnershipCondition, type EoaOwnershipConditionDetails, type Erc1155OwnershipConditionDetails, Erc20OwnershipCondition, type Erc20OwnershipConditionDetails, type Erc721OwnershipConditionDetails, type EventMetadata, type EventMetadataDetails, type EventOptions, EventSchema, FollowCondition, type FollowConditionDetails, type ImageMetadata, type ImageMetadataDetails, type ImageOptions, ImageSchema, type LinkMetadata, type LinkMetadataDetails, type LinkOptions, LinkSchema, type LiveStreamMetadata, type LiveStreamMetadataDetails, type LiveStreamOptions, LiveStreamSchema, Markdown, MarketplaceMetadata, MarketplaceMetadataAttribute, type MediaAudio, MediaAudioKind, MediaAudioMimeType, MediaAudioSchema, type MediaImage, MediaImageMimeType, MediaImageSchema, type MediaVideo, MediaVideoMimeType, MediaVideoSchema, MetadataAttribute, MetadataAttributeType, MetadataLicenseType, MetadataLicenseTypeSchema, MetadataTransactionType, type MintMetadata, type MintMetadataDetails, type MintOptions, MintSchema, type MirrorMetadata, type MirrorMetadataDetails, MirrorMetadataSchema, type MirrorOptions, MirrorSchemaId, type ModuleMetadata, ModuleMetadataSchema, type ModuleOptions, ModuleSchemaId, NetworkAddressDetails, NftOwnershipCondition, OrCondition, Overwrite, PhysicalAddress, Prettify, type ProfileMetadata, type ProfileMetadataDetails, ProfileMetadataSchema, type ProfileOptions, ProfileOwnershipCondition, type ProfileOwnershipConditionDetails, ProfileSchemaId, PublicationMainFocus, type PublicationMetadata, PublicationMetadataCommon, PublicationMetadataSchema, PublicationSchemaId, type SchedulingAdjustments, SchedulingAdjustmentsSchema, SchemasRoot, type ShortVideoOptions, Signature, SimpleCondition, type SpaceMetadata, type SpaceMetadataDetails, SpaceMetadataDetailsSchema, type SpaceOptions, SpaceSchema, type StoryMetadata, type StoryMetadataDetails, type StoryOptions, StorySchema, type TextOnlyMetadata, type TextOnlyMetadataDetails, type TextOnlyOptions, TextOnlySchema, type ThreeDAsset, ThreeDAssetSchema, ThreeDFormat, type ThreeDMetadata, type ThreeDMetadataDetails, type ThreeDOptions, ThreeDSchema, type TimezoneId, TimezoneIdSchema, type TransactionMetadata, type TransactionMetadataDetails, type TransactionOptions, TransactionSchema, URI, ValidationError, type VideoMetadata, type VideoMetadataDetails, type VideoOptions, VideoSchema, accessCondition, advancedContractCondition, andCondition, article, audio, checkingIn, collectCondition, embed, eoaOwnershipCondition, erc1155OwnershipCondition, erc20OwnershipCondition, erc721OwnershipCondition, event, extractVersion, followCondition, formatZodError, image, link, liveStream, mint, mirror, module, orCondition, profile, profileOwnershipCondition, shortVideo, space, story, textOnly, threeD, timezones, transaction, video }; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 00000000..790d53cf --- /dev/null +++ b/dist/index.js @@ -0,0 +1,12 @@ +import { z as z$1 } from 'zod'; +import { v4 } from 'uuid'; + +var ee=class extends Error{name="InvariantError"};function te(e,t){if(!e)throw new ee(t)}function Qe(e="Unexpected call to never()"){throw new ee(e)}function ae(e){return e.length>0}function j(e){return e.length>=2}var Lt=99,_e=` +`,ke="\xB7 ";function Pt(e){return e.replace(/"/g,'\\"')}var xt=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function Oe(e){return e.length===1?e[0].toString():e.reduce((t,a)=>{if(typeof a=="number")return t+"["+a.toString()+"]";if(a.includes('"'))return t+'["'+Pt(a)+'"]';if(!xt.test(a))return t+'["'+a+'"]';let i=t.length===0?"":".";return t+i+a},"")}function Nt(e){let t=e.unionErrors.map(g=>g.issues.map(A=>ae(A.path)?`"${Oe(A.path)}": ${A.message}`:A.message)),a=[...new Set(t.map(g=>g.join("; ")))],i=Array.isArray(e.path)?e.path:[e.path],S=ae(i)?`"${Oe(i)}": `:"";return j(a)?`${ke}${S}expected to match one of the following groups: + ${a.join(`${_e} OR:${_e} `)}`:`${ke}${S}${a[0]}`}function _t(e){return e.code===z$1.ZodIssueCode.invalid_union?Nt(e):ae(e.path)?`${ke}"${Oe(e.path)}": ${e.message}`:e.message}function ie(e){let t=e.errors.slice(0,Lt).map(a=>_t(a)).join(_e);return t.length===0?`invalid argument, it was not possible to determine a more detailed reason. +Check the input you provided and try again.`:`fix the following issues +${t}`}var oe=class extends Error{name="ValidationError"};function s(e){if(e.success)return e.data;throw new oe(ie(e.error))}function kt(e){return e}var Ot=/^[a-z]{2}(?:-[a-zA-Z]{2})?$/,vt=/^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i,Xe=z$1.string({description:"A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."}).regex(Ot,"Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."),et=Xe.catch(e=>{let t=vt.exec(e.input);return t?t[1]:e.input}).superRefine((e,t)=>{let a=Xe.safeParse(e);return a.success||a.error.issues.forEach(i=>{t.addIssue(i);}),z$1.NEVER}).transform(kt);function wt(e){return e}function Rt(e){return e.every(t=>!t.success)}var zt=z$1.string().describe("An encrypted value.").regex(/^\S+$/,"Should be a valid encrypted value.").transform(wt);function k(e){let t=[e,zt];return z$1.union(t).catch(a=>a.input).superRefine((a,i)=>{let S=t.map(g=>g.safeParse(a));return Rt(S)&&i.addIssue({code:z$1.ZodIssueCode.invalid_union,unionErrors:S.map(g=>g.error)}),z$1.NEVER})}function we(e){return z$1.preprocess((t,a)=>{let i=z$1.string().safeParse(t);return i.success?i.data.replace(/^[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*/,"").replace(/[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*$/,"").trim():(i.error.issues.forEach(S=>{a.addIssue(S);}),z$1.NEVER)},e.min(1))}function n(e){return we(z$1.string({description:e}))}function T(e){return k(n(e))}function di(e){return e}var Re=z$1.string().describe("An arbitrary tag.").min(1).max(50).transform(e=>e.toLowerCase());function Bt(e){return e}var U=z$1.string().describe("A DiGi App identifier.").min(1).max(200).transform(Bt);function Ut(e){return e}var F=z$1.string().min(1).describe("A cryptographic signature of the DiGi metadata.").transform(Ut);function Ft(e){return e}function P(e){return e.transform(Ft)}function Zt(e){return e}function x(e="A Uniform Resource Identifier. "){return z$1.string({description:e}).min(6).url({message:"Should be a valid URI"}).transform(Zt)}function y(e){return k(x(e))}var ve=/^geo:(-?\d+\.?\d*),(-?\d+\.?\d*)$/,tt=z$1.coerce.number({description:"The latitude."}).min(-90).max(90),at=z$1.coerce.number({description:"The longitude."}).min(-180).max(180),it=z$1.string().describe("A Geographic coordinate as subset of Geo URI (RFC 5870). Currently only supports the `geo:lat,lng` format.").regex(ve,"Should be a Geo URI. Expected `geo:lat,lng`.").superRefine((e,t)=>{let a=ve.exec(e);if(!a)return z$1.NEVER;let[,i="",S=""]=a,g=tt.safeParse(i);g.success||g.error.issues.forEach(Ne=>t.addIssue({...Ne,path:[...t.path,"lat"]}));let A=at.safeParse(S);return A.success||A.error.issues.forEach(Ne=>t.addIssue({...Ne,path:[...t.path,"lng"]})),z$1.NEVER}),ot=z$1.object({lat:tt,lng:at});function mi(e){let t=ot.safeParse(e);if(t.success){let{lat:a,lng:i}=t.data;return `geo:${a},${i}`}Qe(ie(t.error));}function pi(e){let t=it.parse(e),a=ve.exec(t);te(a,"Invalid Geo URI format. Expected `geo:lat,lng`.");let[,i="",S=""]=a;return ot.parse({lat:i,lng:S})}function ne(e){return k(it.describe(e))}var re=z$1.object({formatted:T("The full mailing address formatted for display.").optional(),streetAddress:T("The street address including house number, street name, P.O. Box, apartment or unit number and extended multi-line address information.").optional(),locality:T("The city or locality."),region:T("The state or region.").optional(),postalCode:T("The zip or postal code.").optional(),country:T("The country name component.")});function Vt(e){return e}function jt(e){return z$1.string({description:e}).datetime().transform(Vt)}function v(e){return k(jt(e))}function Gt(e){return e}var ze=z$1.string().length(42).describe("An EVM compatible address.").transform(Gt);function $t(e){return e}var Be=z$1.number().positive().transform($t),se=z$1.object({chainId:Be,address:ze},{description:"An EVM compatible address on a specific chain."});function Ht(e){return e}var nt=z$1.string().min(1).transform(Ht),rt=z$1.object({contract:se,decimals:z$1.number({description:"The number of decimals of the asset."}).int().nonnegative()});function Wt(e,t){return rt.parse({contract:e,decimals:t})}var Ue=z$1.object({asset:rt,value:n("The amount in the smallest unit of the given asset (e.g. wei for ETH).")},{description:"An amount of a specific asset."});function st(e){return Ue.parse({asset:Wt(e.contract,e.decimals),value:e.value})}function Kt(e){return e}var Fe=z$1.string().min(4).transform(Kt);function Yt(e){return e}var ct=z$1.string().min(9).transform(Yt);var Jt=(t=>(t.LIT_PROTOCOL="LIT_PROTOCOL",t))(Jt||{}),Ze=(a=>(a.ERC721="ERC721",a.ERC1155="ERC1155",a))(Ze||{}),dt=(f=>(f.NFT_OWNERSHIP="NFT_OWNERSHIP",f.ERC20_OWNERSHIP="ERC20_OWNERSHIP",f.EOA_OWNERSHIP="EOA_OWNERSHIP",f.PROFILE_OWNERSHIP="PROFILE_OWNERSHIP",f.FOLLOW="FOLLOW",f.COLLECT="COLLECT",f.ADVANCED_CONTRACT="ADVANCED_CONTRACT",f.AND="AND",f.OR="OR",f))(dt||{});function ce(e,t){e.contractType==="ERC1155"&&(e.tokenIds===void 0||e.tokenIds.length===0)&&t.addIssue({code:z$1.ZodIssueCode.custom,message:"ERC1155 requires at least one token id.",path:[...t.path,"tokenIds"]});}var Z=z$1.object({type:z$1.literal("NFT_OWNERSHIP"),contract:se,contractType:z$1.nativeEnum(Ze),tokenIds:nt.array().min(1).optional().describe("A list of token IDs you want to check ownership of. The list is optional for ERC721, you MUST provide a list of token IDs for ERC1155.")}),Ve=(A=>(A.EQUAL="EQUAL",A.NOT_EQUAL="NOT_EQUAL",A.GREATER_THAN="GREATER_THAN",A.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",A.LESS_THAN="LESS_THAN",A.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",A))(Ve||{}),G=z$1.object({type:z$1.literal("ERC20_OWNERSHIP"),amount:Ue,condition:z$1.nativeEnum(Ve)}),$=z$1.object({type:z$1.literal("EOA_OWNERSHIP"),address:ze}),H=z$1.object({type:z$1.literal("PROFILE_OWNERSHIP"),profileId:Fe}),W=z$1.object({type:z$1.literal("FOLLOW"),follow:Fe}),K=z$1.object({type:z$1.literal("COLLECT"),publicationId:ct,thisPublication:z$1.boolean().optional().default(!1)}),Y=z$1.object({type:z$1.literal("ADVANCED_CONTRACT"),contract:se.describe("The contract address and chain id"),functionName:z$1.string().min(1).describe("The name of the function you want to call"),abi:z$1.string().min(1).describe("The contract ABI. Has to be in human readable single string format containing the signature of the function you want to call. See https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info"),params:z$1.string().array().describe("The parameters to pass to the function. Must be exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays."),comparison:z$1.nativeEnum(Ve).describe("The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL"),value:z$1.string().regex(/^(true|false|\d{1,70})$/).describe("The comparison value. Accepts 'true', 'false' or a number")});function qt(e){return z$1.object({type:z$1.literal("AND"),criteria:z$1.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(j,"Should have at least 2 conditions")})}var je=qt([Z,G,$,H,W,K,Y]);function mt(e){return z$1.object({type:z$1.literal("OR"),criteria:z$1.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(j,"Should have at least 2 conditions")})}var Ge=mt([Z,G,$,H,W,K,Y]);function pt(e,t){(e.type==="AND"||e.type==="OR")&&e.criteria.forEach((a,i)=>pt(a,{...t,path:[...t.path,"criteria",i]})),e.type==="NFT_OWNERSHIP"&&ce(e,t);}var $e=mt([je,K,Y,$,G,W,Z,Ge,H]).superRefine((e,t)=>(e.criteria.forEach((a,i)=>{pt(a,{...t,path:[...t.path,"criteria",i]});}),z$1.NEVER));function Qt(e){return e}var Xt=z$1.string().describe("A symmetric encryption key.").length(368,"Encryption key should be 368 characters long.").transform(Qt),ea=n("An encrypted path is a string of keys separated by . that describe a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).").array().min(1),ta=z$1.object({provider:z$1.literal("LIT_PROTOCOL"),encryptionKey:Xt,accessCondition:$e,encryptedPaths:ea},{description:"Publication encryption strategy powered by the LIT Protocol."}),lt=z$1.discriminatedUnion("provider",[ta]);var aa=(g=>(g.BOOLEAN="Boolean",g.DATE="Date",g.NUMBER="Number",g.STRING="String",g.JSON="JSON",g))(aa||{}),ia=z$1.object({type:z$1.literal("Boolean"),key:n("The attribute's unique identifier."),value:z$1.enum(["true","false"]).describe("A JS boolean value serialized as string. It's consumer responsibility to parse it.")}),oa=z$1.object({type:z$1.literal("Date"),key:n("The attribute's unique identifier."),value:z$1.string().datetime().describe("A valid ISO 8601 date string. It's consumer responsibility to parse it.")}),na=z$1.object({type:z$1.literal("Number"),key:n("The attribute's unique identifier."),value:n("A valid JS number serialized as string. It's consumer responsibility to parse it.")}),ra=z$1.object({type:z$1.literal("String"),key:n("The attribute's unique identifier."),value:n("A string value.")}),sa=z$1.object({type:z$1.literal("JSON"),key:n("The attribute's unique identifier."),value:n("A JSON string. It's consumer responsibility to validate and parse it.")}),w=z$1.discriminatedUnion("type",[ia,oa,na,ra,sa]);var ut=(i=>(i.NUMBER="number",i.STRING="string",i.DATE="date",i))(ut||{}),ca=z$1.object({display_type:z$1.nativeEnum(ut).optional(),trait_type:n("The name of the trait.").optional(),value:z$1.union([z$1.string(),z$1.number()]).optional()}).passthrough(),ht=z$1.object({description:P(z$1.string({description:"A human-readable description of the item. It could be plain text or markdown."})).optional().nullable().catch(null),external_url:x("This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.").optional().nullable().catch(null),name:z$1.string({description:"Name of the NFT item."}).optional(),attributes:ca.array().optional().describe("These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.").catch([]),image:x("Marketplaces will store any NFT image here.").optional().nullable().catch(null),animation_url:x("A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.").optional().nullable().catch(null)}).passthrough();var At=(r=>(r.CCO="CCO",r.CC_BY="CC BY",r.CC_BY_ND="CC BY-ND",r.CC_BY_NC="CC BY-NC",r.TBNL_C_D_PL_Legal="TBNL-C-D-PL-Legal",r.TBNL_C_DT_PL_Legal="TBNL-C-DT-PL-Legal",r.TBNL_C_ND_PL_Legal="TBNL-C-ND-PL-Legal",r.TBNL_C_D_NPL_Legal="TBNL-C-D-NPL-Legal",r.TBNL_C_DT_NPL_Legal="TBNL-C-DT-NPL-Legal",r.TBNL_C_DTSA_PL_Legal="TBNL-C-DTSA-PL-Legal",r.TBNL_C_DTSA_NPL_Legal="TBNL-C-DTSA-NPL-Legal",r.TBNL_C_ND_NPL_Legal="TBNL-C-ND-NPL-Legal",r.TBNL_C_D_PL_Ledger="TBNL-C-D-PL-Ledger",r.TBNL_C_DT_PL_Ledger="TBNL-C-DT-PL-Ledger",r.TBNL_C_ND_PL_Ledger="TBNL-C-ND-PL-Ledger",r.TBNL_C_D_NPL_Ledger="TBNL-C-D-NPL-Ledger",r.TBNL_C_DT_NPL_Ledger="TBNL-C-DT-NPL-Ledger",r.TBNL_C_DTSA_PL_Ledger="TBNL-C-DTSA-PL-Ledger",r.TBNL_C_DTSA_NPL_Ledger="TBNL-C-DTSA-NPL-Ledger",r.TBNL_C_ND_NPL_Ledger="TBNL-C-ND-NPL-Ledger",r.TBNL_NC_D_PL_Legal="TBNL-NC-D-PL-Legal",r.TBNL_NC_DT_PL_Legal="TBNL-NC-DT-PL-Legal",r.TBNL_NC_ND_PL_Legal="TBNL-NC-ND-PL-Legal",r.TBNL_NC_D_NPL_Legal="TBNL-NC-D-NPL-Legal",r.TBNL_NC_DT_NPL_Legal="TBNL-NC-DT-NPL-Legal",r.TBNL_NC_DTSA_PL_Legal="TBNL-NC-DTSA-PL-Legal",r.TBNL_NC_DTSA_NPL_Legal="TBNL-NC-DTSA-NPL-Legal",r.TBNL_NC_ND_NPL_Legal="TBNL-NC-ND-NPL-Legal",r.TBNL_NC_D_PL_Ledger="TBNL-NC-D-PL-Ledger",r.TBNL_NC_DT_PL_Ledger="TBNL-NC-DT-PL-Ledger",r.TBNL_NC_ND_PL_Ledger="TBNL-NC-ND-PL-Ledger",r.TBNL_NC_D_NPL_Ledger="TBNL-NC-D-NPL-Ledger",r.TBNL_NC_DT_NPL_Ledger="TBNL-NC-DT-NPL-Ledger",r.TBNL_NC_DTSA_PL_Ledger="TBNL-NC-DTSA-PL-Ledger",r.TBNL_NC_DTSA_NPL_Ledger="TBNL-NC-DTSA-NPL-Ledger",r.TBNL_NC_ND_NPL_Ledger="TBNL-NC-ND-NPL-Ledger",r))(At||{}),V=z$1.nativeEnum(At);var We=z$1.object({item:y("The location of the file."),attributes:w.array().min(1).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.")}),yt=(A=>(A.MUSIC="MUSIC",A.PODCAST="PODCAST",A.AUDIOBOOK="AUDIOBOOK",A.VOICE_NOTE="VOICE_NOTE",A.SOUND="SOUND",A.OTHER="OTHER",A))(yt||{}),de=(O=>(O.WAV="audio/wav",O.WAV_VND="audio/vnd.wave",O.MP3="audio/mpeg",O.OGG_AUDIO="audio/ogg",O.MP4_AUDIO="audio/mp4",O.AAC="audio/aac",O.WEBM_AUDIO="audio/webm",O.FLAC="audio/flac",O))(de||{}),me=We.extend({type:z$1.nativeEnum(de,{description:"The mime type of the audio file."}),cover:y("The cover image for the audio.").optional(),duration:z$1.number({description:"How long the the audio is in seconds."}).positive().int().optional(),license:V.optional().describe("The license for the audio."),credits:T("The credits for the audio.").optional(),artist:T("The name of the artist.").optional(),genre:T("The genre of the audio").optional(),recordLabel:T("The record label for the audio.").optional(),kind:z$1.nativeEnum(yt,{description:"The type of audio."}).optional(),lyrics:y("The lyrics for the audio.").optional()}),pe=(f=>(f.BMP="image/bmp",f.GIF="image/gif",f.HEIC="image/heic",f.JPEG="image/jpeg",f.PNG="image/png",f.SVG_XML="image/svg+xml",f.TIFF="image/tiff",f.WEBP="image/webp",f.X_MS_BMP="image/x-ms-bmp",f))(pe||{}),le=We.extend({type:z$1.nativeEnum(pe,{description:"The mime type of the image"}),altTag:T("The alt tag for accessibility").optional(),license:V.optional().describe("The license for the image")}),ue=(_=>(_.GLTF="model/gltf+json",_.GLTF_BINARY="model/gltf-binary",_.M4V="video/x-m4v",_.MOV="video/mov",_.MP4="video/mp4",_.MPEG="video/mpeg",_.OGG="video/ogg",_.OGV="video/ogv",_.QUICKTIME="video/quicktime",_.WEBM="video/webm",_))(ue||{}),he=We.extend({type:z$1.nativeEnum(ue,{description:"The mime type of the video"}),altTag:T("The alt tag for accessibility").optional(),cover:y("The cover image for the video").optional(),duration:z$1.number({description:"How long the the video is in seconds"}).positive().int().optional(),license:V.optional().describe("The license for the video")}),ma={...de,...pe,...ue},He=z$1.object({type:z$1.nativeEnum(ma)});function pa(e){return He.safeParse(e).success}function la(e){if(!pa(e))return He;switch(e.type){case"audio/wav":case"audio/vnd.wave":case"audio/mpeg":case"audio/ogg":case"audio/mp4":case"audio/aac":case"audio/webm":case"audio/flac":return me;case"image/bmp":case"image/gif":case"image/heic":case"image/jpeg":case"image/png":case"image/svg+xml":case"image/tiff":case"image/webp":case"image/x-ms-bmp":return le;case"model/gltf+json":case"model/gltf-binary":case"video/x-m4v":case"video/mov":case"video/mp4":case"video/mpeg":case"video/ogg":case"video/ogv":case"video/quicktime":case"video/webm":return he}return He}var u=z$1.discriminatedUnion("type",[me,le,he]).catch(e=>e.input).superRefine((e,t)=>{let a=la(e);if(!a)return t.addIssue({code:z$1.ZodIssueCode.invalid_union_discriminator,options:[...new Set([Object.values(de),Object.values(pe),Object.values(ue)].flat())],message:"Invalid discriminator value. Expected one of `MediaAudioMimeType`, `MediaImageMimeType`, `MediaVideoMimeType` values."}),z$1.NEVER;let i=a.safeParse(e);return i.success||i.error.issues.forEach(S=>{t.addIssue(S);}),z$1.NEVER});var ha=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],ft=z$1.enum(ha);var Tt=(i=>(i.NSFW="NSFW",i.SENSITIVE="SENSITIVE",i.SPOILER="SPOILER",i))(Tt||{}),Aa=z$1.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:U.optional().describe("The App Id that this publication belongs to."),hideFromFeed:z$1.boolean({description:"Determine if the publication should not be shown in any feed."}).optional(),attributes:w.array().min(1).max(20).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),locale:et,encryptedWith:lt.optional(),tags:z$1.set(Re).max(20).catch(e=>e.input).superRefine((e,t)=>{let a=z$1.array(Re).max(20).safeParse(e);if(a.success){let i=[...new Set(a.data)];return a.data.length>i.length&&t.addIssue({code:z$1.ZodIssueCode.custom,fatal:!0,message:`Duplicate tags are not allowed: ${a.data.join(", ")}`}),z$1.NEVER}a.error.issues.forEach(i=>{t.addIssue(i);});}).transform(e=>[...e]).optional().describe("An arbitrary list of tags."),contentWarning:z$1.nativeEnum(Tt,{description:"Specify a content warning."}).optional()});function m(e){return Aa.extend(e)}function p(e){return ht.extend({signature:F.optional(),...e})}function l(...e){let t="The main focus of the publication.";if(e.length>1){let a=e.map(i=>z$1.literal(i));return z$1.union(a,{description:t})}return z$1.literal(e[0],{description:t})}function h(){return k(P(z$1.string({description:"Optional markdown content."}))).optional()}var St=(M=>(M.VIDEO="VIDEO",M.IMAGE="IMAGE",M.ARTICLE="ARTICLE",M.TEXT_ONLY="TEXT_ONLY",M.AUDIO="AUDIO",M.LINK="LINK",M.EMBED="EMBED",M.CHECKING_IN="CHECKING_IN",M.EVENT="EVENT",M.MINT="MINT",M.TRANSACTION="TRANSACTION",M.LIVESTREAM="LIVESTREAM",M.SHORT_VIDEO="SHORT_VIDEO",M.THREE_D="3D",M.STORY="STORY",M.SPACE="SPACE",M))(St||{});var z="https://json-schemas.digiv3rse.xyz";var D=`${z}/publications`,o=(C=>(C.THREE_D_LATEST=`${D}/3d/3.0.0.json`,C.ARTICLE_LATEST=`${D}/article/3.0.0.json`,C.AUDIO_LATEST=`${D}/audio/3.0.0.json`,C.CHECKING_IN_LATEST=`${D}/checking-in/3.0.0.json`,C.EMBED_LATEST=`${D}/embed/3.0.0.json`,C.EVENT_LATEST=`${D}/event/3.0.0.json`,C.IMAGE_LATEST=`${D}/image/3.0.0.json`,C.LINK_LATEST=`${D}/link/3.0.0.json`,C.LIVESTREAM_LATEST=`${D}/livestream/3.0.0.json`,C.MINT_LATEST=`${D}/mint/3.0.0.json`,C.SPACE_LATEST=`${D}/space/3.0.0.json`,C.STORY_LATEST=`${D}/story/3.0.0.json`,C.TRANSACTION_LATEST=`${D}/transaction/3.0.0.json`,C.TEXT_ONLY_LATEST=`${D}/text-only/3.0.0.json`,C.VIDEO_LATEST=`${D}/video/3.0.0.json`,C))(o||{});var gt=(S=>(S.GLTF="gLTF/GLB",S.FBX="FBX",S.VRM="VRM",S.OBJ="OBJ",S))(gt||{}),ya=z$1.object({uri:x("The URI of the 3D asset zip file."),zipPath:n().optional().describe("Path in extracted zip. Relative. 3D start point, MUST be 3D file type."),playerUrl:x("The URL of the recommended web based 3D player to use to view the 3D asset."),format:z$1.nativeEnum(gt).describe("The 3D format of the asset."),license:V.optional().describe("The license regulating the use of the 3D asset.")}),fa=m({mainContentFocus:l("3D"),assets:ya.array().min(1).describe("The 3D items for the publication"),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ae=p({$schema:z$1.literal(o.THREE_D_LATEST),digi:fa});var Sa=m({mainContentFocus:l("ARTICLE"),content:k(P(n("The content for the publication as markdown."))),title:n("The optional article title.").optional(),attachments:u.array().min(1).optional().describe("Any attachment you want to include with it.")}),ye=p({$schema:z$1.literal(o.ARTICLE_LATEST),digi:Sa});var Ma=m({mainContentFocus:l("AUDIO"),audio:me,title:n("The optional audio title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),fe=p({$schema:z$1.literal(o.AUDIO_LATEST),digi:Ma});var Ea=m({mainContentFocus:l("CHECKING_IN"),location:T("Where you checking in from (free form text)."),position:ne("The optional geographic position of the location.").optional(),address:re.optional().describe("The optional address of the location."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Te=p({$schema:z$1.literal(o.CHECKING_IN_LATEST),digi:Ea});var Da=m({mainContentFocus:l("EMBED"),embed:y("The embed URL."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Se=p({$schema:z$1.literal(o.EMBED_LATEST),digi:Da});var Ia=z$1.object({timezoneId:ft.describe("Indicates a reference timezone for the event start and end times. If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer."),timezoneOffset:z$1.number().describe("Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).")}),La=m({title:n().describe("The title of the event.").optional(),mainContentFocus:l("EVENT"),location:z$1.union([y("A virtual location."),T("The event location (free form text).")]).describe("The location of the event."),position:ne("The geographic position of the event.").optional(),address:re.optional().describe("The address of the event."),startsAt:v("The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),endsAt:v("The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),schedulingAdjustments:Ia.optional().describe("Captures extra criteria to recompute correctly future start and end times.See: https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events"),links:y().array().min(1).optional().describe("The links you want to include with it."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Me=p({$schema:z$1.literal(o.EVENT_LATEST),digi:La});var xa=m({mainContentFocus:l("IMAGE"),image:le,title:n("The optional image title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),be=p({$schema:z$1.literal(o.IMAGE_LATEST),digi:xa});var _a=m({mainContentFocus:l("LINK"),sharingLink:y("The sharing link url."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ee=p({$schema:z$1.literal(o.LINK_LATEST),digi:_a});var Oa=m({mainContentFocus:l("LIVESTREAM"),title:n().optional().describe("The livestream title."),startsAt:v("The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),endsAt:v("The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)").optional(),playbackUrl:y("Some livestream platforms have the playback url as a separate url. If not your case make sure `liveUrl` and `playbackUrl` are the same."),liveUrl:y("Some livestream platforms have the live url as a separate url. If not your case make sure `liveUrl` and `playbackUrl` are the same."),checkLiveAPI:y("The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ce=p({$schema:z$1.literal(o.LIVESTREAM_LATEST),digi:Oa});var wa=m({mainContentFocus:l("MINT"),mintLink:y("The mint item it can be a URL of the known provider like opensea https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata"),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),De=p({$schema:z$1.literal(o.MINT_LATEST),digi:wa});var J=(t=>(t.LATEST=`${z}/publications/mirror/1.0.0.json`,t))(J||{});var Ra=z$1.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:U.describe("The App Id that this publication belongs to.")},{description:"The DiGi operational metadata fields."}),Mt=z$1.object({$schema:z$1.literal(J.LATEST),digi:Ra,signature:F.optional()});var Ba=m({mainContentFocus:l("SPACE"),title:n().describe("The space title."),link:y("The space join link."),startsAt:v("The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),Ie=p({$schema:z$1.literal(o.SPACE_LATEST),digi:Ba});var Fa=m({mainContentFocus:l("STORY"),asset:u.describe("The story asset."),content:h()}),Le=p({$schema:z$1.literal(o.STORY_LATEST),digi:Fa});var Va=m({mainContentFocus:l("TEXT_ONLY"),content:k(P(n("The content for the publication as markdown.")))}),Pe=p({$schema:z$1.literal(o.TEXT_ONLY_LATEST),digi:Va});var Et=(i=>(i.ERC721="ERC721",i.ERC20="ERC20",i.OTHER="OTHER",i))(Et||{}),ja=m({mainContentFocus:l("TRANSACTION"),txHash:T("The transaction hash."),type:z$1.nativeEnum(Et).describe("The type of transaction."),chainId:Be.describe("The Chain Id."),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),xe=p({$schema:z$1.literal(o.TRANSACTION_LATEST),digi:ja});var $a=m({mainContentFocus:l("SHORT_VIDEO","VIDEO"),video:he,title:n("The optional video title.").optional(),content:h(),attachments:u.array().min(1).optional().describe("The other attachments you want to include with it.")}),q=p({$schema:z$1.literal(o.VIDEO_LATEST),digi:$a});var Gs=z$1.discriminatedUnion("$schema",[ye,fe,Te,Se,Me,be,Ee,Ce,De,Ie,Pe,Le,xe,Ae,q]);function xc(e){return s(K.safeParse({type:"COLLECT",...e}))}function Nc(e){return s($.safeParse({type:"EOA_OWNERSHIP",...e}))}function _c({condition:e,...t}){return s(G.safeParse({type:"ERC20_OWNERSHIP",amount:st(t),condition:e}))}function kc(e){return s(Z.superRefine(ce).safeParse({type:"NFT_OWNERSHIP",contractType:"ERC721",...e}))}function Oc(e){return s(Z.superRefine(ce).safeParse({type:"NFT_OWNERSHIP",contractType:"ERC1155",...e}))}function vc(e){return s(H.safeParse({type:"PROFILE_OWNERSHIP",...e}))}function wc(e){return s(W.safeParse({type:"FOLLOW",...e}))}function Rc(e){return s(Y.safeParse({type:"ADVANCED_CONTRACT",...e}))}function zc(e){return s(je.safeParse({type:"AND",criteria:e}))}function Bc(e){return s(Ge.safeParse({type:"OR",criteria:e}))}function Uc(e){return s($e.safeParse({type:"OR",criteria:e}))}function Hc({id:e=v4(),...t}){return s(Mt.safeParse({$schema:J.LATEST,digi:{id:e,...t}}))}var Q=(t=>(t.LATEST=`${z}/modules/1.0.0.json`,t))(Q||{});function Ka(e){try{JSON.parse(e);}catch{return !1}return !0}function Je(e){return z$1.string({description:e}).refine(Ka,{message:"Invalid JSON string"})}var Ct=z$1.object({name:we(z$1.string().max(200)).describe("The name of the module."),title:n("The human-friendly title for the module."),description:P(n("Markdown formatted description of the module.")),authors:z$1.array(z$1.string().email("Authors list should only contain valid emails")).min(1,"You must supply at least one author").describe("List of authors email addresses."),initializeCalldataABI:Je("The Solidity JSON ABI as JSON-string describing the initialization function calldata."),initializeResultDataABI:Je("The Solidity JSON ABI as JSON-string describing the initialization result data.").optional(),processCalldataABI:Je("The Solidity JSON ABI as JSON-string describing the process function calldata."),attributes:z$1.array(w).describe("An arbitrary bag of attributes."),$schema:z$1.literal(Q.LATEST)});function rd({attributes:e=[],...t}){return s(Ct.safeParse({$schema:Q.LATEST,attributes:e,...t}))}var X=(t=>(t.LATEST=`${z}/profile/2.0.0.json`,t))(X||{});var Ya=z$1.object({id:n("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),name:n("The profile display name.").optional(),bio:P(n("The profile bio as markdown.")).optional(),picture:x("The profile picture.").optional(),coverPicture:x("The profile cover picture.").optional(),attributes:w.array().min(1).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),appId:U.optional().describe("The App Id that this Profile data refers to. If omitted the data is considered to be the global Profile data.")},{description:"The DiGi specific metadata details."}),Dt=z$1.object({$schema:z$1.literal(X.LATEST),digi:Ya,signature:F.optional()});function Dd({id:e=v4(),...t}){return s(Dt.safeParse({$schema:X.LATEST,digi:{id:e,...t}}))}var E="en";function rm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(ye.safeParse({$schema:o.ARTICLE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"ARTICLE",...i}}))}function sm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(fe.safeParse({$schema:o.AUDIO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"AUDIO",...i}}))}function cm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Te.safeParse({$schema:o.CHECKING_IN_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"CHECKING_IN",...i}}))}function dm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Se.safeParse({$schema:o.EMBED_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"EMBED",...i}}))}function mm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Me.safeParse({$schema:o.EVENT_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"EVENT",...i}}))}function pm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(be.safeParse({$schema:o.IMAGE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"IMAGE",...i}}))}function lm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Ee.safeParse({$schema:o.LINK_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"LINK",...i}}))}function um({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Ce.safeParse({$schema:o.LIVESTREAM_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"LIVESTREAM",...i}}))}function hm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(De.safeParse({$schema:o.MINT_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"MINT",...i}}))}function Am({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Ie.safeParse({$schema:o.SPACE_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"SPACE",...i}}))}function ym({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Le.safeParse({$schema:o.STORY_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"STORY",...i}}))}function fm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Pe.safeParse({$schema:o.TEXT_ONLY_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"TEXT_ONLY",...i}}))}function Tm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(Ae.safeParse({$schema:o.THREE_D_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"3D",...i}}))}function Sm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(xe.safeParse({$schema:o.TRANSACTION_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"TRANSACTION",...i}}))}function gm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(q.safeParse({$schema:o.VIDEO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"VIDEO",...i}}))}function Mm({marketplace:e,locale:t=E,id:a=v4(),...i}){return s(q.safeParse({$schema:o.VIDEO_LATEST,...e,digi:{id:a,locale:t,mainContentFocus:"SHORT_VIDEO",...i}}))}var qa=/(\d+\.\d+\.\d+)/;function _m(e){let t=qa.exec(e.$schema);return te(t!==null,`Invalid schema id: ${e.$schema}`),t[0]} + +export { $e as AccessConditionSchema, Y as AdvancedContractConditionSchema, Ue as AmountSchema, je as AndConditionSchema, u as AnyMediaSchema, U as AppIdSchema, ye as ArticleSchema, rt as AssetSchema, fe as AudioSchema, ia as BooleanAttributeSchema, Be as ChainIdSchema, Te as CheckingInSchema, K as CollectConditionSchema, Ve as ConditionComparisonOperator, dt as ConditionType, E as DEFAULT_LOCALE, oa as DateAttributeSchema, Se as EmbedSchema, ea as EncryptedPaths, zt as EncryptedStringSchema, Jt as EncryptionProvider, $ as EoaOwnershipConditionSchema, G as Erc20OwnershipConditionSchema, Me as EventSchema, ze as EvmAddressSchema, W as FollowConditionSchema, ot as GeoPointSchema, it as GeoURISchema, be as ImageSchema, sa as JSONAttributeSchema, Ee as LinkSchema, Xt as LitEncryptionKeySchema, ta as LitEncryptionStrategySchema, Ce as LiveStreamSchema, et as LocaleSchema, ut as MarketplaceMetadataAttributeDisplayType, ca as MarketplaceMetadataAttributeSchema, ht as MarketplaceMetadataSchema, yt as MediaAudioKind, de as MediaAudioMimeType, me as MediaAudioSchema, pe as MediaImageMimeType, le as MediaImageSchema, ue as MediaVideoMimeType, he as MediaVideoSchema, w as MetadataAttributeSchema, aa as MetadataAttributeType, At as MetadataLicenseType, V as MetadataLicenseTypeSchema, Et as MetadataTransactionType, De as MintSchema, Mt as MirrorMetadataSchema, J as MirrorSchemaId, Ct as ModuleMetadataSchema, Q as ModuleSchemaId, se as NetworkAddressSchema, Ze as NftContractType, Z as NftOwnershipConditionSchema, na as NumberAttributeSchema, Ge as OrConditionSchema, re as PhysicalAddressSchema, Fe as ProfileIdSchema, Dt as ProfileMetadataSchema, H as ProfileOwnershipConditionSchema, X as ProfileSchemaId, Tt as PublicationContentWarning, lt as PublicationEncryptionStrategySchema, ct as PublicationIdSchema, St as PublicationMainFocus, Gs as PublicationMetadataSchema, o as PublicationSchemaId, Ia as SchedulingAdjustmentsSchema, z as SchemasRoot, F as SignatureSchema, Ba as SpaceMetadataDetailsSchema, Ie as SpaceSchema, Le as StorySchema, ra as StringAttributeSchema, Re as TagSchema, Pe as TextOnlySchema, ya as ThreeDAssetSchema, gt as ThreeDFormat, Ae as ThreeDSchema, ft as TimezoneIdSchema, nt as TokenIdSchema, xe as TransactionSchema, oe as ValidationError, q as VideoSchema, Uc as accessCondition, Rc as advancedContractCondition, st as amount, zc as andCondition, rm as article, Wt as asset, sm as audio, cm as checkingIn, xc as collectCondition, jt as datetimeSchema, dm as embed, k as encryptable, v as encryptableDateTimeSchema, ne as encryptableGeoUriSchema, T as encryptableStringSchema, y as encryptableUriSchema, Nc as eoaOwnershipCondition, Oc as erc1155OwnershipCondition, _c as erc20OwnershipCondition, kc as erc721OwnershipCondition, mm as event, _m as extractVersion, wc as followCondition, ie as formatZodError, pi as geoPoint, mi as geoUri, pm as image, lm as link, um as liveStream, l as mainContentFocus, P as markdown, m as metadataDetailsWith, hm as mint, Hc as mirror, rd as module, we as nonEmpty, n as nonEmptyStringSchema, h as optionalContentSchema, Bc as orCondition, Dd as profile, vc as profileOwnershipCondition, p as publicationWith, ce as refineNftOwnershipCondition, Mm as shortVideo, Am as space, ym as story, fm as textOnly, Tm as threeD, ha as timezones, Bt as toAppId, $t as toChainId, Vt as toDateTime, Gt as toEvmAddress, Qt as toLitEncryptionKey, kt as toLocale, Ft as toMarkdown, Kt as toProfileId, Yt as toPublicationId, Ut as toSignature, di as toTag, Ht as toTokenId, Zt as toUri, Sm as transaction, x as uriSchema, gm as video }; +//# sourceMappingURL=out.js.map +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 00000000..b8b56634 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/formatters.ts","../src/utils.ts","../src/builders/ValidationError.ts","../src/primitives.ts","../src/publication/index.ts","../src/publication/common/index.ts","../src/publication/common/encryption.ts","../src/MetadataAttribute.ts","../src/marketplace.ts","../src/publication/common/license.ts","../src/publication/common/media.ts","../src/publication/common/timezones.ts","../src/publication/3D.ts","../src/publication/PublicationMainFocus.ts","../src/constants.ts","../src/publication/PublicationSchemaId.ts","../src/publication/ArticleSchema.ts","../src/publication/AudioSchema.ts","../src/publication/CheckingInSchema.ts","../src/publication/EmbedSchema.ts","../src/publication/EventSchema.ts","../src/publication/ImageSchema.ts","../src/publication/LinkSchema.ts","../src/publication/LiveStreamSchema.ts","../src/publication/MintSchema.ts","../src/publication/MirrorSchemaId.ts","../src/publication/MirrorMetadataSchema.ts","../src/publication/SpaceSchema.ts","../src/publication/StorySchema.ts","../src/publication/TextOnlySchema.ts","../src/publication/TransactionSchema.ts","../src/publication/VideoSchema.ts","../src/builders/encryption.ts","../src/builders/mirror.ts","../src/module/ModuleMetadataSchema.ts","../src/module/ModuleSchemaId.ts","../src/builders/modules.ts","../src/builders/profile.ts","../src/profile/ProfileMetadataSchema.ts","../src/profile/ProfileSchemaId.ts","../src/builders/publications.ts","../src/extractVersion.ts"],"names":["z","InvariantError","invariant","condition","message","never","hasAtLeastOne","items","hasTwoOrMore","maxIssuesInMessage","issueSeparator","bulletPoint","escapeQuotes","str","identifierRegex","formatPath","path","acc","item","separator","formatZozInvalidUnionIssue","issue","groups","zodError","nested","uniqueGroups","group","prefix","formatZodIssue","formatZodError","reason","ValidationError","evaluate","result","toLocale","value","localeRegex","localeLikeRegex","LocaleRegexSchema","LocaleSchema","ctx","match","val","exact","toEncryptedString","allFailed","results","r","EncryptedStringSchema","encryptable","schema","options","s","nonEmpty","nonEmptyStringSchema","description","encryptableStringSchema","toTag","TagSchema","toAppId","AppIdSchema","toSignature","SignatureSchema","toMarkdown","markdown","toUri","uriSchema","encryptableUriSchema","geoUriRegex","LatitudeSchema","LongitudeSchema","GeoURISchema","latitude","longitude","latResult","lngResult","GeoPointSchema","geoUri","point","lat","lng","geoPoint","uri","encryptableGeoUriSchema","PhysicalAddressSchema","toDateTime","datetimeSchema","encryptableDateTimeSchema","toEvmAddress","EvmAddressSchema","toChainId","ChainIdSchema","NetworkAddressSchema","toTokenId","TokenIdSchema","AssetSchema","asset","contract","decimals","AmountSchema","amount","input","toProfileId","ProfileIdSchema","toPublicationId","PublicationIdSchema","EncryptionProvider","NftContractType","ConditionType","refineNftOwnershipCondition","NftOwnershipConditionSchema","ConditionComparisonOperator","Erc20OwnershipConditionSchema","EoaOwnershipConditionSchema","ProfileOwnershipConditionSchema","FollowConditionSchema","CollectConditionSchema","AdvancedContractConditionSchema","andConditionSchema","AndConditionSchema","orConditionSchema","OrConditionSchema","refineAnyCondition","c","idx","AccessConditionSchema","root","toLitEncryptionKey","LitEncryptionKeySchema","EncryptedPaths","LitEncryptionStrategySchema","PublicationEncryptionStrategySchema","MetadataAttributeType","BooleanAttributeSchema","DateAttributeSchema","NumberAttributeSchema","StringAttributeSchema","JSONAttributeSchema","MetadataAttributeSchema","MarketplaceMetadataAttributeDisplayType","MarketplaceMetadataAttributeSchema","MarketplaceMetadataSchema","MetadataLicenseType","MetadataLicenseTypeSchema","MediaCommonSchema","MediaAudioKind","MediaAudioMimeType","MediaAudioSchema","MediaImageMimeType","MediaImageSchema","MediaVideoMimeType","MediaVideoSchema","AnyMediaImageMimeType","AnyMediaShapeScheme","isAnyMediaShape","resolveAnyMediaSchema","AnyMediaSchema","Schema","timezones","TimezoneIdSchema","PublicationContentWarning","PublicationMetadataCommonSchema","uniqueTags","metadataDetailsWith","augmentation","publicationWith","mainContentFocus","focuses","literals","optionalContentSchema","PublicationMainFocus","SchemasRoot","location","PublicationSchemaId","ThreeDFormat","ThreeDAssetSchema","ThreeDMetadataDetailsSchema","ThreeDSchema","ArticleMetadataDetailsSchema","ArticleSchema","AudioMetadataDetailsSchema","AudioSchema","CheckingInMetadataDetailsSchema","CheckingInSchema","EmbedMetadataDetailsSchema","EmbedSchema","SchedulingAdjustmentsSchema","EventMetadataDetailsSchema","EventSchema","ImageMetadataDetailsSchema","ImageSchema","LinkMetadataDetailsSchema","LinkSchema","LiveStreamMetadataDetailsSchema","LiveStreamSchema","MintMetadataDetailsSchema","MintSchema","MirrorSchemaId","MirrorMetadataDetailsSchema","MirrorMetadataSchema","SpaceMetadataDetailsSchema","SpaceSchema","StoryMetadataDetailsSchema","StorySchema","TextOnlyMetadataDetailsSchema","TextOnlySchema","MetadataTransactionType","TransactionMetadataDetailsSchema","TransactionSchema","VideoMetadataDetailsSchema","VideoSchema","PublicationMetadataSchema","collectCondition","eoaOwnershipCondition","erc20OwnershipCondition","others","erc721OwnershipCondition","erc1155OwnershipCondition","profileOwnershipCondition","followCondition","advancedContractCondition","andCondition","criteria","orCondition","accessCondition","v4","mirror","id","ModuleSchemaId","isValidJsonString","jsonString","ModuleMetadataSchema","module","attributes","ProfileSchemaId","ProfileMetadataDetailsSchema","ProfileMetadataSchema","profile","DEFAULT_LOCALE","article","marketplace","locale","audio","checkingIn","embed","event","image","link","liveStream","mint","space","story","textOnly","threeD","transaction","video","shortVideo","schemaVersionRegex","extractVersion","metadata"],"mappings":"AACA,OAAS,KAAAA,OAAS,MC8BX,IAAMC,GAAN,cAA6B,KAAM,CACxC,KAAO,gBACT,EASO,SAASC,GAAUC,EAAoBC,EAAoC,CAChF,GAAI,CAACD,EAC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AI,SAASnB,CAAK,CACpB,CAAC,EAGIrB,EAAE,KACX,CAAC,EC5UH,OAAS,KAAAA,OAAS,MAEX,IAAM8J,GAAY,CACvB,iBACA,eACA,qBACA,iBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,qBACA,mBACA,eACA,oBACA,eACA,iBACA,eACA,uBACA,kBACA,gBACA,kBACA,kBACA,kBACA,gBACA,sBACA,cACA,iBACA,kBACA,gBACA,kBACA,eACA,oBACA,cACA,gBACA,oBACA,gBACA,gBACA,gBACA,gBACA,iBACA,mBACA,kBACA,iBACA,kBACA,gBACA,oBACA,qBACA,oBACA,kBACA,iBACA,eACA,kBACA,eACA,oBACA,mBACA,kBACA,oBACA,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,gBACA,mBACA,gBACA,yBACA,mBACA,gBACA,iBACA,uBACA,oBACA,iBACA,gBACA,uBACA,wBACA,uBACA,iBACA,kBACA,oBACA,kBACA,iBACA,kBACA,oBACA,wBACA,wBACA,kBACA,qBACA,kBACA,iBACA,kBACA,uBACA,iBACA,uBACA,iBACA,kBACA,mBACA,mBACA,mBACA,sBACA,sBACA,oBACA,oBACA,kBACA,oBACA,qBACA,kBACA,qBACA,oBACA,oBACA,iBACA,kBACA,iBACA,qBACA,uBACA,0BACA,6BACA,4BACA,wBACA,4BACA,0BACA,uBACA,iBACA,kBACA,kBACA,gBACA,iBACA,8BACA,qBACA,iBACA,eACA,sBACA,qBACA,wBACA,iBACA,kBACA,iBACA,kBACA,qBACA,oBACA,mBACA,kBACA,oBACA,iBACA,qBACA,sBACA,mBACA,kBACA,oBACA,qBACA,qBACA,iBACA,mBACA,kBACA,eACA,kBACA,8BACA,8BACA,iCACA,kBACA,iBACA,sBACA,qBACA,kBACA,yBACA,wBACA,sBACA,sBACA,uBACA,sBACA,uBACA,iBACA,iBACA,mBACA,qBACA,uBACA,mBACA,mBACA,wBACA,oBACA,uBACA,gBACA,wBACA,mBACA,mBACA,mBACA,oBACA,qBACA,wBACA,sBACA,gBACA,sBACA,kBACA,kBACA,kBACA,oBACA,qBACA,mBACA,kBACA,sBACA,mBACA,mBACA,4BACA,uBACA,oBACA,qBACA,oBACA,qBACA,mBACA,mBACA,oBACA,sBACA,YACA,cACA,aACA,cACA,aACA,cACA,gBACA,cACA,eACA,eACA,YACA,eACA,eACA,cACA,eACA,cACA,gBACA,aACA,kBACA,eACA,gBACA,aACA,YACA,aACA,gBACA,iBACA,YACA,cACA,iBACA,YACA,eACA,eACA,gBACA,iBACA,aACA,iBACA,eACA,gBACA,gBACA,mBACA,oBACA,eACA,cACA,aACA,eACA,gBACA,cACA,cACA,eACA,oBACA,mBACA,YACA,YACA,kBACA,iBACA,iBACA,aACA,gBACA,iBACA,eACA,cACA,cACA,gBACA,iBACA,aACA,gBACA,iBACA,qBACA,cACA,gBACA,eACA,cACA,eACA,aACA,aACA,mBACA,cACA,gBACA,iBACA,mBACA,eACA,qBACA,eACA,kBACA,mBACA,kBACA,sBACA,kBACA,mBACA,qBACA,yBACA,qBACA,mBACA,qBACA,qBACA,wBACA,mBACA,mBACA,kBACA,mBACA,qBACA,sBACA,sBACA,kBACA,mBACA,mBACA,iBACA,mBACA,gBACA,kBACA,gBACA,oBACA,kBACA,mBACA,kBACA,kBACA,kBACA,oBACA,gBACA,mBACA,kBACA,kBACA,qBACA,kBACA,gBACA,qBACA,cACA,eACA,gBACA,mBACA,gBACA,oBACA,gBACA,eACA,mBACA,eACA,gBACA,gBACA,cACA,eACA,mBACA,gBACA,cACA,cACA,gBACA,oBACA,kBACA,iBACA,oBACA,gBACA,eACA,mBACA,iBACA,gBACA,mBACA,kBACA,eACA,iBACA,gBACA,iBACA,mBACA,gBACA,gBACA,oBACA,gBACA,sBACA,gBACA,mBACA,eACA,gBACA,mBACA,cACA,kBACA,mBACA,iBACA,iBACA,eACA,mBACA,uBACA,kBACA,iBACA,gBACA,oBACA,kBACA,eACA,mBACA,oBACA,kBACA,sBACA,eACA,mBACA,mBACA,qBACA,iBACA,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CACL,CACF,CAAC,CACH,CACF,CAmCO,SAASuC,GAAY,CAC1B,YAAAd,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAA4C,CAC1C,OAAOvL,EACLgL,GAAkB,UAAU,CAC1B,QAASnC,EAAoB,mBAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,+BACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CAqEO,SAASwC,GAAM,CACpB,YAAAf,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAAgC,CAC9B,OAAOvL,EACLkL,EAAY,UAAU,CACpB,QAASrC,EAAoB,aAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,yBACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CAmCO,SAASyC,GAAW,CACzB,YAAAhB,EACA,OAAAC,EAASH,EACT,GAAAX,EAAKF,EAAG,EACR,GAAGV,CACL,EAAqC,CACnC,OAAOvL,EACLkL,EAAY,UAAU,CACpB,QAASrC,EAAoB,aAC7B,GAAGmE,EACH,KAAM,CACJ,GAAAb,EACA,OAAAc,EACA,+BACA,GAAG1B,CACL,CACF,CAAC,CACH,CACF,CCliCA,IAAM0C,GAAqB,kBAkCpB,SAASC,GACdC,EACQ,CACR,IAAMlO,EAASgO,GAAmB,KAAKE,EAAS,OAAO,EAEvD,OAAAjQ,GAAU+B,IAAW,KAAM,sBAAsBkO,EAAS,OAAO,EAAE,EAC5DlO,EAAO,CAAC,CACjB","sourcesContent":["// Heavily customized and simplified version of https://www.npmjs.com/package/zod-validation-error\nimport { z } from 'zod';\n\nimport { NonEmptyArray, hasAtLeastOne, hasTwoOrMore } from './utils.js';\n\nconst maxIssuesInMessage = 99;\nconst issueSeparator = '\\n';\nconst bulletPoint = '· ';\n\nfunction escapeQuotes(str: string): string {\n return str.replace(/\"/g, '\\\\\"');\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers\n */\nconst identifierRegex = /[$_\\p{ID_Start}][$\\u200c\\u200d\\p{ID_Continue}]*/u;\n\nfunction formatPath(path: NonEmptyArray): string {\n if (path.length === 1) {\n return path[0].toString();\n }\n\n return path.reduce((acc, item) => {\n // handle numeric indices\n if (typeof item === 'number') {\n return acc + '[' + item.toString() + ']';\n }\n\n // handle quoted values\n if (item.includes('\"')) {\n return acc + '[\"' + escapeQuotes(item) + '\"]';\n }\n\n // handle special characters\n if (!identifierRegex.test(item)) {\n return acc + '[\"' + item + '\"]';\n }\n\n // handle normal values\n const separator = acc.length === 0 ? '' : '.';\n return acc + separator + item;\n }, '');\n}\n\nfunction formatZozInvalidUnionIssue(issue: z.ZodInvalidUnionIssue): string {\n const groups = issue.unionErrors.map((zodError) =>\n zodError.issues.map((nested) => {\n if (hasAtLeastOne(nested.path)) {\n return `\"${formatPath(nested.path)}\": ${nested.message}`;\n }\n return nested.message;\n }),\n );\n\n const uniqueGroups = [...new Set(groups.map((group) => group.join('; ')))];\n\n const path = Array.isArray(issue.path) ? issue.path : [issue.path];\n const prefix = hasAtLeastOne(path) ? `\"${formatPath(path)}\": ` : '';\n\n if (hasTwoOrMore(uniqueGroups)) {\n return (\n `${bulletPoint}${prefix}expected to match one of the following groups:\\n` +\n `\\t\\t${uniqueGroups.join(`${issueSeparator}\\tOR:${issueSeparator}\\t\\t`)}`\n );\n }\n\n return `${bulletPoint}${prefix}${uniqueGroups[0]}`;\n}\n\nfunction formatZodIssue(issue: z.ZodIssue): string {\n if (issue.code === z.ZodIssueCode.invalid_union) {\n return formatZozInvalidUnionIssue(issue);\n }\n\n if (hasAtLeastOne(issue.path)) {\n return `${bulletPoint}\"${formatPath(issue.path)}\": ${issue.message}`;\n }\n\n return issue.message;\n}\n\n/**\n * Formats a Zod parsing error into a human-readable string.\n *\n * The formatting is tailored to the DiGi Protocol Metadata use case. It may not be suitable for other use cases.\n *\n * @category Helpers\n *\n * @example\n * ```ts\n * const result = PublicationMetadataSchema.safeParse(invalid);\n *\n * if (!result.success) {\n * throw new Error(formatZodError(result.error));\n * }\n * ```\n */\nexport function formatZodError(zodError: z.ZodError): string {\n const reason = zodError.errors\n // limit max number of issues printed in the reason section\n .slice(0, maxIssuesInMessage)\n // format error message\n .map((issue) => formatZodIssue(issue))\n // concat as string\n .join(issueSeparator);\n\n if (reason.length === 0) {\n return (\n 'invalid argument, it was not possible to determine a more detailed reason.\\n' +\n 'Check the input you provided and try again.'\n );\n }\n\n return `fix the following issues\\n${reason}`;\n}\n","import { Signature } from './primitives';\n\n/**\n * Branding helper type.\n *\n * @internal\n */\nexport type Brand = T & {\n [K in ReservedName]: TBrand;\n};\n\n/**\n * Omits properties from an union type, preserving the union.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit = T extends any ? Omit : never;\n\n/**\n * Overwrites properties from T1 with one from T2\n * @internal\n * @example\n * ```ts\n * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string }\n * ```\n */\nexport type Overwrite = DistributiveOmit & T2;\n\n/**\n * An error that occurs when a task violates a logical condition that is assumed to be true at all times.\n */\nexport class InvariantError extends Error {\n name = 'InvariantError' as const;\n}\n\n/**\n * Asserts that the given condition is truthy\n * @internal\n *\n * @param condition - Either truthy or falsy value\n * @param message - An error message\n */\nexport function invariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n/**\n * A function that throws when called.\n *\n * @param message - An error message\n */\nexport function never(message = 'Unexpected call to never()'): never {\n throw new InvariantError(message);\n}\n\n/**\n * Specifies an object with unknown keys\n *\n * Useful when you don't care about exact props passed to the component.\n * @privateRemarks Don't use `{}` as a type. `{}` actually means \"any non-nullish value\".\n */\nexport type UnknownObject = Record;\n\n/**\n * Declares an array of at least one element of the specified type.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasAtLeastOne(items: ReadonlyArray): items is NonEmptyArray {\n return items.length > 0;\n}\n\n/**\n * Declares an array of at least two elements of the specified type.\n */\nexport type TwoAtLeastArray = [T, T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasTwoOrMore(items: ReadonlyArray): items is TwoAtLeastArray {\n return items.length >= 2;\n}\n\n/**\n * Beautify the readout of all of the members of that intersection.\n *\n * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697\n *\n * @internal\n */\nexport type Prettify = {\n [K in keyof T]: T[K];\n // eslint-disable-next-line @typescript-eslint/ban-types\n} & {};\n\n/**\n * @internal\n */\nexport type ShapeCheck = T extends {\n $schema: string;\n\n digi: unknown;\n\n signature?: Signature;\n}\n ? T\n : never;\n","import { z } from 'zod';\n\nimport { formatZodError } from '../formatters';\n\n/**\n * An error that occurs when an object does not match the expected shape.\n */\nexport class ValidationError extends Error {\n name = 'ValidationError' as const;\n}\n\n/**\n * @internal\n */\nexport function evaluate(result: z.SafeParseReturnType): Output {\n if (result.success) {\n return result.data;\n }\n throw new ValidationError(formatZodError(result.error));\n}\n","import { z } from 'zod';\n\nimport { formatZodError } from './formatters.js';\nimport { Brand, invariant, never } from './utils.js';\n\n/**\n * A locale identifier.\n *\n * Syntax: [language]-[region] where:\n * - [language] is a lowercase ISO 639-1 language code\n * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code\n *\n * You can pass just the language code, or both the language and region codes.\n *\n * @example\n * - `en` any English\n * - `en-US` English as used in the United States\n * - `en-GB` English as used in the United Kingdom\n */\nexport type Locale = Brand;\n/**\n * @internal\n */\nexport function toLocale(value: string): Locale {\n return value as Locale;\n}\n\n// using ranges instead of `i` flag so that resulting JSON Schema includes case-insensitivity.\nconst localeRegex = /^[a-z]{2}(?:-[a-zA-Z]{2})?$/;\nconst localeLikeRegex = /^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i;\n\nconst LocaleRegexSchema = z\n .string({\n description:\n 'A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n })\n .regex(\n localeRegex,\n 'Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n );\n\n/**\n * @internal\n */\nexport const LocaleSchema: z.ZodType = LocaleRegexSchema.catch(\n (ctx) => {\n // attempts to recover the language code at least\n const match = localeLikeRegex.exec(ctx.input);\n if (match) {\n return match[1] as string;\n }\n return ctx.input;\n },\n)\n .superRefine((val, ctx): val is Locale => {\n const exact = LocaleRegexSchema.safeParse(val);\n\n if (!exact.success) {\n exact.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n return z.NEVER;\n })\n .transform(toLocale);\n\n/**\n * A base64 encoded encrypted string value.\n */\nexport type EncryptedString = Brand;\nfunction toEncryptedString(value: string): EncryptedString {\n return value as EncryptedString;\n}\n\nfunction allFailed(\n results: z.SafeParseReturnType[],\n): results is z.SafeParseError[] {\n return results.every((r) => !r.success);\n}\n/**\n * @internal\n */\nexport const EncryptedStringSchema = z\n .string()\n .describe('An encrypted value.')\n .regex(\n /^\\S+$/, // Approximation of Lit Encrypted value\n 'Should be a valid encrypted value.',\n )\n .transform(toEncryptedString);\n\n/**\n * Modifies a schema to accept an encrypted string value as well as its decrypted version.\n *\n * @internal\n */\nexport function encryptable(schema: z.ZodType) {\n const options = [schema, EncryptedStringSchema] as const;\n return z\n .union(options)\n .catch((ctx) => ctx.input as T)\n .superRefine((val, ctx): val is T | EncryptedString => {\n const results = options.map((s) => s.safeParse(val));\n\n if (allFailed(results)) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union,\n unionErrors: results.map((r) => r.error),\n });\n }\n return z.NEVER;\n });\n}\n\n/**\n * @internal\n */\nexport function nonEmpty(schema: z.ZodString): z.ZodType {\n return z.preprocess((val, ctx) => {\n const result = z.string().safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return result.data\n .replace(\n // eslint-disable-next-line no-control-regex\n /^[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*/,\n '',\n )\n .replace(\n // eslint-disable-next-line no-control-regex\n /[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*$/,\n '',\n )\n .trim();\n }, schema.min(1));\n}\n/**\n * @internal\n */\nexport function nonEmptyStringSchema(description?: string) {\n return nonEmpty(z.string({ description }));\n}\n/**\n * @internal\n */\nexport function encryptableStringSchema(description: string) {\n return encryptable(nonEmptyStringSchema(description));\n}\n\n/**\n * An arbitrary string or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableString = string | EncryptedString;\n\n/**\n * An arbitrary label.\n *\n * All lowercased, 50 characters max.\n */\nexport type Tag = Brand;\n/**\n * @internal\n */\nexport function toTag(value: string): Tag {\n return value as Tag;\n}\n/**\n * @internal\n */\nexport const TagSchema: z.ZodType = z\n .string()\n .describe('An arbitrary tag.')\n .min(1)\n .max(50)\n .transform((value) => toTag(value.toLowerCase()));\n\n/**\n * A unique DiGi App identifier.\n */\nexport type AppId = Brand;\n/**\n * @internal\n */\nexport function toAppId(value: string): AppId {\n return value as AppId;\n}\n/**\n * @internal\n */\nexport const AppIdSchema: z.ZodType = z\n .string()\n .describe('A DiGi App identifier.')\n .min(1)\n .max(200)\n .transform(toAppId);\n\n/**\n * A cryptographic signature.\n */\nexport type Signature = Brand;\n/**\n * @internal\n */\nexport function toSignature(value: string): Signature {\n return value as Signature;\n}\n/**\n * @internal\n */\nexport const SignatureSchema: z.ZodType = z\n .string()\n .min(1)\n .describe('A cryptographic signature of the DiGi metadata.')\n .transform(toSignature);\n\n/**\n * A markdown text.\n */\nexport type Markdown = Brand;\n/**\n * @internal\n */\nexport function toMarkdown(value: string): Markdown {\n return value as Markdown;\n}\n\n/**\n * @internal\n */\nexport function markdown(\n schema: z.ZodType,\n): z.ZodType {\n return schema.transform(toMarkdown);\n}\n\n/**\n * A markdown text or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableMarkdown = Markdown | EncryptedString;\n\n/**\n * A Uniform Resource Identifier.\n *\n * It could be a URL pointing to a specific resource,\n * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...).\n */\nexport type URI = Brand;\n/**\n * @internal\n */\nexport function toUri(value: string): URI {\n return value as URI;\n}\n/**\n * @internal\n */\nexport function uriSchema(\n description: string = 'A Uniform Resource Identifier. ',\n): z.ZodType {\n return z\n .string({ description })\n .min(6) // [ar://.]\n .url({ message: 'Should be a valid URI' }) // reads url() but works well with URIs too and uses format: 'uri' in the JSON schema\n .transform(toUri);\n}\n/**\n * @internal\n */\nexport function encryptableUriSchema(description?: string) {\n return encryptable(uriSchema(description));\n}\n\n/**\n * A URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableURI = URI | EncryptedString;\n\nconst geoUriRegex = /^geo:(-?\\d+\\.?\\d*),(-?\\d+\\.?\\d*)$/;\n\nconst LatitudeSchema = z.coerce.number({ description: 'The latitude.' }).min(-90).max(90);\n\nconst LongitudeSchema = z.coerce.number({ description: 'The longitude.' }).min(-180).max(180);\n\n/**\n * A Geographic coordinate as subset of Geo URI (RFC 5870).\n *\n * Currently only supports the `geo:lat,lng` format.\n *\n * Use the {@link geoUri} helper to create one, do not attempt to create one manually.\n *\n * @example\n * ```ts\n * 'geo:40.689247,-74.044502'\n *\n * 'geo:41.890209,12.492231'\n * ```\n *\n * @see https://tools.ietf.org/html/rfc5870\n */\nexport type GeoURI = `geo:${number},${number}`;\n/**\n * @internal\n */\nexport const GeoURISchema = z\n .string()\n .describe(\n 'A Geographic coordinate as subset of Geo URI (RFC 5870). ' +\n 'Currently only supports the `geo:lat,lng` format.',\n )\n .regex(geoUriRegex, 'Should be a Geo URI. Expected `geo:lat,lng`.')\n .superRefine((val, ctx): val is GeoURI => {\n const match = geoUriRegex.exec(val);\n\n if (!match) {\n // should never happen\n return z.NEVER;\n }\n\n const [, latitude = '', longitude = ''] = match;\n\n const latResult = LatitudeSchema.safeParse(latitude);\n if (!latResult.success) {\n latResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lat'],\n }),\n );\n }\n\n const lngResult = LongitudeSchema.safeParse(longitude);\n if (!lngResult.success) {\n lngResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lng'],\n }),\n );\n }\n\n return z.NEVER;\n });\n\n/**\n * A geographic point on the Earth.\n */\nexport type GeoPoint = {\n /**\n * The latitude in decimal degrees (from -90° to +90°).\n */\n lat: number;\n\n /**\n * The longitude in decimal degrees (from -180° to +180°).\n */\n lng: number;\n};\n/**\n * @internal\n */\nexport const GeoPointSchema: z.ZodType = z.object({\n lat: LatitudeSchema,\n lng: LongitudeSchema,\n});\n\n/**\n * Helper to create a Geo URI from a {@link GeoPoint}.\n *\n * @category Helpers\n * @example\n * ```ts\n * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502'\n *\n * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231'\n * ```\n */\nexport function geoUri(point: GeoPoint): GeoURI {\n const result = GeoPointSchema.safeParse(point);\n\n if (result.success) {\n const { lat, lng } = result.data;\n return `geo:${lat},${lng}`;\n }\n\n never(formatZodError(result.error));\n}\n\n/**\n * Helper to parse a {@link GeoPoint} from a {@link GeoURI}.\n *\n * @category Helpers\n */\nexport function geoPoint(value: GeoURI): GeoPoint {\n const uri = GeoURISchema.parse(value);\n\n const match = geoUriRegex.exec(uri);\n\n invariant(match, 'Invalid Geo URI format. Expected `geo:lat,lng`.');\n\n const [, lat = '', lng = ''] = match;\n return GeoPointSchema.parse({ lat, lng });\n}\n/**\n * @internal\n */\nexport function encryptableGeoUriSchema(description: string) {\n return encryptable(GeoURISchema.describe(description));\n}\n\n/**\n * A Geo URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableGeoURI = GeoURI | EncryptedString;\n\n/**\n * The address of a physical location.\n */\nexport type PhysicalAddress = {\n /**\n * The full mailing address formatted for display.\n */\n formatted?: EncryptableString;\n /**\n * The street address including house number, street name, P.O. Box,\n * apartment or unit number and extended multi-line address information.\n */\n streetAddress?: EncryptableString;\n /**\n * The city or locality.\n */\n locality: EncryptableString;\n /**\n * The state or region.\n */\n region?: EncryptableString;\n /**\n * The zip or postal code.\n */\n postalCode?: EncryptableString;\n /**\n * The country name component.\n */\n country: EncryptableString;\n};\n/**\n * @internal\n */\nexport const PhysicalAddressSchema: z.ZodType = z.object({\n formatted: encryptableStringSchema('The full mailing address formatted for display.').optional(),\n streetAddress: encryptableStringSchema(\n 'The street address including house number, street name, P.O. Box, ' +\n 'apartment or unit number and extended multi-line address information.',\n ).optional(),\n locality: encryptableStringSchema('The city or locality.'),\n region: encryptableStringSchema('The state or region.').optional(),\n postalCode: encryptableStringSchema('The zip or postal code.').optional(),\n country: encryptableStringSchema('The country name component.'),\n});\n\n/**\n * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`.\n */\nexport type DateTime = Brand;\n/**\n * @internal\n */\nexport function toDateTime(value: string): DateTime {\n return value as DateTime;\n}\n/**\n * @internal\n */\nexport function datetimeSchema(description: string): z.ZodType {\n return z.string({ description }).datetime().transform(toDateTime);\n}\n/**\n * @internal\n */\nexport function encryptableDateTimeSchema(description: string) {\n return encryptable(datetimeSchema(description));\n}\n\n/**\n * A DateTime or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableDateTime = DateTime | EncryptedString;\n\n/**\n * An EVM compatible address.\n */\nexport type EvmAddress = Brand;\n/**\n * @internal\n */\nexport function toEvmAddress(value: string): EvmAddress {\n return value as EvmAddress;\n}\n/**\n * @internal\n */\nexport const EvmAddressSchema: z.ZodType = z\n .string()\n .length(42)\n .describe('An EVM compatible address.')\n .transform(toEvmAddress);\n\n/**\n * An EVM compatible Chain Id.\n */\nexport type ChainId = Brand;\n/**\n * @internal\n */\nexport function toChainId(value: number): ChainId {\n return value as ChainId;\n}\n/**\n * @internal\n */\nexport const ChainIdSchema: z.ZodType = z\n .number()\n .positive()\n .transform(toChainId);\n\n/**\n * An EVM compatible address on a specific chain.\n */\nexport type NetworkAddress = {\n /**\n * The chain id.\n */\n chainId: ChainId;\n /**\n * The EVM address.\n */\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const NetworkAddressSchema: z.ZodType = z.object(\n {\n chainId: ChainIdSchema,\n address: EvmAddressSchema,\n },\n {\n description: 'An EVM compatible address on a specific chain.',\n },\n);\n\n/**\n * An NFT token identifier.\n */\nexport type TokenId = Brand;\n/**\n * @internal\n */\nexport function toTokenId(value: string): TokenId {\n return value as TokenId;\n}\n/**\n * @internal\n */\nexport const TokenIdSchema: z.ZodType = z\n .string()\n .min(1)\n .transform(toTokenId);\n\n/**\n * A Fungible Tokens. Usually an ERC20 token.\n */\nexport type Asset = {\n /**\n * The asset contract address.\n */\n contract: NetworkAddress;\n /**\n * The number of decimals of the asset (e.g. 18 for WETH)\n */\n decimals: number;\n};\n/**\n * @internal\n */\nexport const AssetSchema: z.ZodType = z.object({\n contract: NetworkAddressSchema,\n decimals: z.number({ description: 'The number of decimals of the asset.' }).int().nonnegative(),\n});\n/**\n * Creates an {@link Asset}.\n *\n * @internal\n */\nexport function asset(contract: NetworkAddressDetails, decimals: number): Asset {\n return AssetSchema.parse({ contract, decimals });\n}\n\n/**\n * An amount of a specific asset.\n */\nexport type Amount = {\n /**\n * The asset.\n *\n * See {@link asset} helper to create one.\n */\n asset: Asset;\n /**\n * The amount in the smallest unit of the given asset (e.g. wei for ETH).\n */\n value: string;\n};\n/**\n * @internal\n */\nexport const AmountSchema: z.ZodType = z.object(\n {\n asset: AssetSchema,\n value: nonEmptyStringSchema(\n 'The amount in the smallest unit of the given asset (e.g. wei for ETH).',\n ),\n },\n {\n description: 'An amount of a specific asset.',\n },\n);\n\nexport type NetworkAddressDetails = {\n /**\n * The chain id.\n */\n chainId: number;\n /**\n * The EVM address.\n */\n address: string;\n};\n\n/**\n * @internal\n */\nexport type AmountDetails = {\n contract: NetworkAddressDetails;\n decimals: number;\n value: string;\n};\n/**\n * @internal\n */\nexport function amount(input: AmountDetails): Amount {\n return AmountSchema.parse({\n asset: asset(input.contract, input.decimals),\n value: input.value,\n });\n}\n\n/**\n * A DiGi Profile identifier.\n *\n * @example\n * ```\n * 0x01\n * ```\n */\nexport type ProfileId = Brand;\n/**\n * @internal\n */\nexport function toProfileId(value: string): ProfileId {\n return value as ProfileId;\n}\n/**\n * @internal\n */\nexport const ProfileIdSchema: z.ZodType = z\n .string()\n .min(4)\n .transform(toProfileId);\n\n/**\n * A DiGi Publication identifier.\n *\n * No Momoka publications for now.\n *\n * @example\n * ```\n * 0x01-0x01\n * ```\n */\nexport type PublicationId = Brand;\n/**\n * @internal\n */\nexport function toPublicationId(value: string): PublicationId {\n return value as PublicationId;\n}\n/**\n * @internal\n */\nexport const PublicationIdSchema: z.ZodType = z\n .string()\n .min(9)\n .transform(toPublicationId);\n","import { z } from 'zod';\n\nexport * from './common';\nexport * from './3D.js';\nexport * from './ArticleSchema.js';\nexport * from './AudioSchema.js';\nexport * from './CheckingInSchema.js';\nexport * from './EmbedSchema.js';\nexport * from './EventSchema.js';\nexport * from './ImageSchema.js';\nexport * from './LinkSchema.js';\nexport * from './LiveStreamSchema.js';\nexport * from './MintSchema.js';\nexport * from './MirrorSchemaId.js';\nexport * from './MirrorMetadataSchema.js';\nexport * from './PublicationMainFocus.js';\nexport * from './PublicationSchemaId.js';\nexport * from './SpaceSchema.js';\nexport * from './StorySchema.js';\nexport * from './TextOnlySchema.js';\nexport * from './TransactionSchema.js';\nexport * from './VideoSchema.js';\n\nimport { ThreeDMetadata, ThreeDSchema } from './3D.js';\nimport { ArticleMetadata, ArticleSchema } from './ArticleSchema.js';\nimport { AudioMetadata, AudioSchema } from './AudioSchema.js';\nimport { CheckingInMetadata, CheckingInSchema } from './CheckingInSchema.js';\nimport { EmbedMetadata, EmbedSchema } from './EmbedSchema';\nimport { EventMetadata, EventSchema } from './EventSchema.js';\nimport { ImageMetadata, ImageSchema } from './ImageSchema.js';\nimport { LinkMetadata, LinkSchema } from './LinkSchema.js';\nimport { LiveStreamMetadata, LiveStreamSchema } from './LiveStreamSchema.js';\nimport { MintMetadata, MintSchema } from './MintSchema.js';\nimport { SpaceMetadata, SpaceSchema } from './SpaceSchema.js';\nimport { StoryMetadata, StorySchema } from './StorySchema.js';\nimport { TextOnlyMetadata, TextOnlySchema } from './TextOnlySchema.js';\nimport { TransactionMetadata, TransactionSchema } from './TransactionSchema.js';\nimport { VideoMetadata, VideoSchema } from './VideoSchema.js';\nimport { ShapeCheck } from '../utils';\n\n/**\n * `PublicationMetadata` is a discriminated union of all primary publication metadata.\n *\n * @example\n * Use the `$schema` property to narrow down the type of the metadata:\n * ```ts\n * const metadata: PublicationMetadata = ...\n *\n * if (metadata.$schema === PublicationSchemaId.ARTICLE_LATEST) {\n * // metadata is ArticleMetadata\n * metadata.content; // => always string, not undefined\n * }\n * ```\n *\n * @example\n * Use the `$schema` property to determine the type of the metadata in an exhaustive switch statement:\n * ```ts\n * const metadata: PublicationMetadata = ...\n *\n * switch (metadata.$schema) {\n * case PublicationSchemaId.ARTICLE_LATEST:\n * // metadata is ArticleMetadata\n * break;\n * case PublicationSchemaId.AUDIO_LATEST:\n * // metadata is AudioMetadata\n * break;\n * case PublicationSchemaId.IMAGE_LATEST:\n * // metadata is ImageMetadata\n * break;\n * case PublicationSchemaId.TEXT_ONLY_LATEST:\n * // metadata is TextOnlyMetadata\n * break;\n * // ...\n * }\n * ```\n */\nexport type PublicationMetadata = ShapeCheck<\n | ArticleMetadata\n | AudioMetadata\n | CheckingInMetadata\n | EmbedMetadata\n | EventMetadata\n | ImageMetadata\n | LinkMetadata\n | LiveStreamMetadata\n | MintMetadata\n | SpaceMetadata\n | TextOnlyMetadata\n | StoryMetadata\n | TransactionMetadata\n | ThreeDMetadata\n | VideoMetadata\n>;\n\n/**\n * A union of all publication metadata schemas.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * PublicationMetadataSchema.parse(valid); // => PublicationMetadata\n *\n * PublicationMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * PublicationMetadataSchema.safeParse(valid);\n * // => { success: true, data: PublicationMetadata }\n *\n * PublicationMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const PublicationMetadataSchema: z.ZodType =\n z.discriminatedUnion('$schema', [\n ArticleSchema,\n AudioSchema,\n CheckingInSchema,\n EmbedSchema,\n EventSchema,\n ImageSchema,\n LinkSchema,\n LiveStreamSchema,\n MintSchema,\n SpaceSchema,\n TextOnlySchema,\n StorySchema,\n TransactionSchema,\n ThreeDSchema,\n VideoSchema,\n ]);\n","import { z } from 'zod';\n\nimport {\n PublicationEncryptionStrategy,\n PublicationEncryptionStrategySchema,\n} from './encryption.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport { MarketplaceMetadataSchema } from '../../marketplace.js';\nimport {\n AppIdSchema,\n LocaleSchema,\n TagSchema,\n nonEmptyStringSchema,\n SignatureSchema,\n AppId,\n Locale,\n Tag,\n encryptable,\n markdown,\n} from '../../primitives.js';\nimport { PublicationMainFocus } from '../PublicationMainFocus.js';\n\nexport * from './encryption.js';\nexport * from './license.js';\nexport * from './media.js';\nexport * from './timezones.js';\n\nexport enum PublicationContentWarning {\n NSFW = 'NSFW',\n SENSITIVE = 'SENSITIVE',\n SPOILER = 'SPOILER',\n}\n\n/**\n * Common fields of a DiGi primary publication.\n */\nexport type PublicationMetadataCommon = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId?: AppId;\n /**\n * Determine if the publication should not be shown in any feed.\n *\n * @defaultValue false\n */\n hideFromFeed?: boolean;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n /**\n * The locale of the metadata.\n */\n locale: Locale;\n /**\n * The encryption strategy used to encrypt the publication.\n *\n * If not present, the publication is presumed to be unencrypted.\n */\n encryptedWith?: PublicationEncryptionStrategy;\n /**\n * An arbitrary list of tags.\n */\n tags?: Tag[];\n /**\n * Specify a content warning.\n */\n contentWarning?: PublicationContentWarning;\n};\n\nconst PublicationMetadataCommonSchema = z.object({\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.optional().describe('The App Id that this publication belongs to.'),\n\n hideFromFeed: z\n .boolean({\n description: 'Determine if the publication should not be shown in any feed.',\n })\n .optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .max(20)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n locale: LocaleSchema,\n\n encryptedWith: PublicationEncryptionStrategySchema.optional(),\n\n tags: z\n .set(TagSchema) // z.set(...) sets uniqueItems: true in generated JSON Schemas\n .max(20)\n .catch((ctx) => ctx.input as Set)\n .superRefine((input, ctx) => {\n // but needs to be corrected in code\n const result = z.array(TagSchema).max(20).safeParse(input);\n\n if (result.success) {\n const uniqueTags = [...new Set(result.data)];\n if (result.data.length > uniqueTags.length) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: `Duplicate tags are not allowed: ${result.data.join(', ')}`,\n });\n }\n return z.NEVER;\n }\n\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n })\n .transform((value) => [...value]) // type coercion\n .optional()\n .describe('An arbitrary list of tags.'),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional(),\n});\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function metadataDetailsWith<\n Augmentation extends {\n mainContentFocus:\n | z.ZodLiteral\n | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>;\n },\n>(augmentation: Augmentation) {\n return PublicationMetadataCommonSchema.extend(augmentation);\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function publicationWith<\n Augmentation extends {\n $schema: z.ZodLiteral;\n digi: ReturnType;\n },\n>(augmentation: Augmentation) {\n return MarketplaceMetadataSchema.extend({\n signature: SignatureSchema.optional(),\n ...augmentation,\n });\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function mainContentFocus(focus: T): z.ZodLiteral;\nexport function mainContentFocus(\n ...focuses: [T, O]\n): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>;\nexport function mainContentFocus(...focuses: [PublicationMainFocus, ...PublicationMainFocus[]]) {\n const description = 'The main focus of the publication.';\n if (focuses.length > 1) {\n const literals = focuses.map((value) => z.literal(value)) as [\n z.ZodLiteral,\n z.ZodLiteral,\n ...z.ZodLiteral[],\n ];\n return z.union(literals, { description });\n }\n return z.literal(focuses[0], { description });\n}\n\n/**\n * @internal\n */\nexport function optionalContentSchema() {\n return encryptable(markdown(z.string({ description: 'Optional markdown content.' }))).optional();\n}\n","/* eslint-disable no-case-declarations */\nimport { z } from 'zod';\n\nimport {\n Amount,\n AmountSchema,\n EvmAddress,\n EvmAddressSchema,\n NetworkAddress,\n NetworkAddressSchema,\n ProfileId,\n ProfileIdSchema,\n PublicationId,\n PublicationIdSchema,\n TokenId,\n TokenIdSchema,\n nonEmptyStringSchema,\n} from '../../primitives.js';\nimport { hasTwoOrMore, Brand, TwoAtLeastArray } from '../../utils.js';\n\nexport enum EncryptionProvider {\n LIT_PROTOCOL = 'LIT_PROTOCOL',\n}\n\nexport enum NftContractType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n}\n\nexport enum ConditionType {\n NFT_OWNERSHIP = 'NFT_OWNERSHIP',\n ERC20_OWNERSHIP = 'ERC20_OWNERSHIP',\n EOA_OWNERSHIP = 'EOA_OWNERSHIP',\n PROFILE_OWNERSHIP = 'PROFILE_OWNERSHIP',\n FOLLOW = 'FOLLOW',\n COLLECT = 'COLLECT',\n ADVANCED_CONTRACT = 'ADVANCED_CONTRACT',\n AND = 'AND',\n OR = 'OR',\n}\n\nexport type NftOwnershipCondition = {\n type: ConditionType.NFT_OWNERSHIP;\n contractType: NftContractType;\n contract: NetworkAddress;\n tokenIds?: TokenId[];\n};\n\n/**\n * @private\n */\nexport function refineNftOwnershipCondition(\n condition: NftOwnershipCondition,\n ctx: z.RefinementCtx,\n) {\n if (condition.contractType === NftContractType.ERC1155) {\n if (condition.tokenIds === undefined || condition.tokenIds.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'ERC1155 requires at least one token id.',\n path: [...ctx.path, 'tokenIds'],\n });\n }\n }\n}\n\n/**\n * @internal\n */\nexport const NftOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.NFT_OWNERSHIP),\n contract: NetworkAddressSchema,\n contractType: z.nativeEnum(NftContractType),\n tokenIds: TokenIdSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A list of token IDs you want to check ownership of. The list is optional for ERC721, ' +\n 'you MUST provide a list of token IDs for ERC1155.',\n ),\n});\n\nexport enum ConditionComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n}\n\nexport type Erc20OwnershipCondition = {\n type: ConditionType.ERC20_OWNERSHIP;\n amount: Amount;\n condition: ConditionComparisonOperator;\n};\n/**\n * @internal\n */\nexport const Erc20OwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.ERC20_OWNERSHIP),\n amount: AmountSchema,\n condition: z.nativeEnum(ConditionComparisonOperator),\n});\n\nexport type EoaOwnershipCondition = {\n type: ConditionType.EOA_OWNERSHIP;\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const EoaOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.EOA_OWNERSHIP),\n address: EvmAddressSchema,\n});\n\nexport type ProfileOwnershipCondition = {\n type: ConditionType.PROFILE_OWNERSHIP;\n profileId: ProfileId;\n};\n/**\n * @internal\n */\nexport const ProfileOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.PROFILE_OWNERSHIP),\n profileId: ProfileIdSchema,\n});\n\nexport type FollowCondition = {\n type: ConditionType.FOLLOW;\n follow: ProfileId;\n};\n/**\n * @internal\n */\nexport const FollowConditionSchema = z.object({\n type: z.literal(ConditionType.FOLLOW),\n follow: ProfileIdSchema,\n});\n\nexport type CollectCondition = {\n type: ConditionType.COLLECT;\n publicationId: PublicationId;\n thisPublication: boolean;\n};\n/**\n * @internal\n */\nexport const CollectConditionSchema = z.object({\n type: z.literal(ConditionType.COLLECT),\n publicationId: PublicationIdSchema, // TODO check on-chain publication ID\n thisPublication: z.boolean().optional().default(false),\n});\n\nexport type AdvancedContractCondition = {\n type: ConditionType.ADVANCED_CONTRACT;\n contract: NetworkAddress;\n functionName: string;\n abi: string;\n params: string[];\n comparison: ConditionComparisonOperator;\n value: string;\n};\n\n/**\n * @internal\n */\nexport const AdvancedContractConditionSchema = z.object({\n type: z.literal(ConditionType.ADVANCED_CONTRACT),\n contract: NetworkAddressSchema.describe('The contract address and chain id'),\n functionName: z.string().min(1).describe('The name of the function you want to call'),\n abi: z\n .string()\n .min(1)\n .describe(\n 'The contract ABI. Has to be in human readable ' +\n 'single string format containing the signature of the function you want to call. See ' +\n 'https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info',\n ),\n params: z\n .string()\n .array()\n .describe(\n 'The parameters to pass to the function. Must be ' +\n 'exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to ' +\n 'represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays.',\n ),\n comparison: z\n .nativeEnum(ConditionComparisonOperator)\n .describe(\n 'The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL',\n ),\n value: z\n .string()\n .regex(/^(true|false|\\d{1,70})$/)\n .describe(`The comparison value. Accepts 'true', 'false' or a number`),\n});\n\nexport type SimpleCondition =\n | CollectCondition\n | AdvancedContractCondition\n | EoaOwnershipCondition\n | Erc20OwnershipCondition\n | FollowCondition\n | NftOwnershipCondition\n | ProfileOwnershipCondition;\n\ntype BaseCondition = {\n type: ConditionType;\n};\n\ntype ComposableConditionSchema = z.ZodObject<\n {\n type: z.ZodTypeAny;\n } & z.ZodRawShape,\n z.UnknownKeysParam,\n z.ZodTypeAny,\n T\n>;\n\nexport type AndCondition = {\n type: ConditionType.AND;\n criteria: TwoAtLeastArray;\n};\n\nfunction andConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.AND),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const AndConditionSchema = andConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type OrCondition = {\n type: ConditionType.OR;\n criteria: TwoAtLeastArray;\n};\n\nfunction orConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.OR),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const OrConditionSchema = orConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type AnyCondition =\n | SimpleCondition\n | AndCondition\n | OrCondition;\n\nfunction refineAnyCondition(condition: AnyCondition, ctx: z.RefinementCtx) {\n if (condition.type === ConditionType.AND || condition.type === ConditionType.OR) {\n condition.criteria.forEach((c, idx) =>\n refineAnyCondition(c, { ...ctx, path: [...ctx.path, 'criteria', idx] }),\n );\n }\n if (condition.type === ConditionType.NFT_OWNERSHIP) {\n refineNftOwnershipCondition(condition, ctx);\n }\n}\n\nexport type AccessCondition = OrCondition;\n/**\n * @internal\n */\nexport const AccessConditionSchema: z.ZodType =\n orConditionSchema([\n AndConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n EoaOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n FollowConditionSchema,\n NftOwnershipConditionSchema,\n OrConditionSchema,\n ProfileOwnershipConditionSchema,\n ]).superRefine((root, ctx): root is AccessCondition => {\n root.criteria.forEach((condition, idx) => {\n refineAnyCondition(condition, {\n ...ctx,\n path: [...ctx.path, 'criteria', idx],\n });\n });\n return z.NEVER;\n });\n\n/**\n * A symmetric encryption key.\n */\nexport type LitEncryptionKey = Brand;\n/**\n * @internal\n */\nexport function toLitEncryptionKey(value: string): LitEncryptionKey {\n return value as LitEncryptionKey;\n}\n/**\n * @internal\n */\nexport const LitEncryptionKeySchema: z.Schema = z\n .string()\n .describe('A symmetric encryption key.')\n .length(368, 'Encryption key should be 368 characters long.')\n .transform(toLitEncryptionKey);\n\n/**\n * @internal\n */\nexport const EncryptedPaths = nonEmptyStringSchema(\n 'An encrypted path is a string of keys separated by . that describe ' +\n 'a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).',\n)\n .array()\n .min(1);\nexport type EncryptedPaths = z.infer;\n\nexport type LitEncryptionStrategy = {\n provider: EncryptionProvider;\n encryptionKey: LitEncryptionKey;\n accessCondition: AccessCondition;\n encryptedPaths: string[];\n};\n/**\n * @internal\n */\nexport const LitEncryptionStrategySchema = z.object(\n {\n provider: z.literal(EncryptionProvider.LIT_PROTOCOL),\n encryptionKey: LitEncryptionKeySchema,\n accessCondition: AccessConditionSchema,\n encryptedPaths: EncryptedPaths,\n },\n {\n description: 'Publication encryption strategy powered by the LIT Protocol.',\n },\n);\n\n/**\n * The publication encryption strategy.\n *\n * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly.\n */\nexport type PublicationEncryptionStrategy = LitEncryptionStrategy;\n\n/**\n * @internal\n */\nexport const PublicationEncryptionStrategySchema: z.ZodType<\n PublicationEncryptionStrategy,\n z.ZodTypeDef,\n object\n> = z.discriminatedUnion('provider', [LitEncryptionStrategySchema]);\n","import { z } from 'zod';\n\nimport { nonEmptyStringSchema } from './primitives.js';\n\n/**\n * The type of a metadata attribute.\n */\nexport enum MetadataAttributeType {\n BOOLEAN = 'Boolean',\n DATE = 'Date',\n NUMBER = 'Number',\n STRING = 'String',\n JSON = 'JSON',\n}\n\nexport type BooleanAttribute = {\n /**\n * A JS boolean value serialized as string. It's consumer responsibility to parse it.\n */\n value: 'true' | 'false';\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.BOOLEAN;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const BooleanAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.BOOLEAN),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .enum(['true', 'false'])\n .describe(\"A JS boolean value serialized as string. It's consumer responsibility to parse it.\"),\n});\n\nexport type DateAttribute = {\n /**\n * A valid ISO 8601 date string. It's consumer responsibility to parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.DATE;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const DateAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.DATE),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .string()\n .datetime()\n .describe(\"A valid ISO 8601 date string. It's consumer responsibility to parse it.\"),\n});\n\nexport type NumberAttribute = {\n /**\n * A valid JS number serialized as string. It's consumer responsibility to parse it.\n *\n * @example\n * ```ts\n * '42'\n *\n * '42n'\n *\n * '42.42'\n * ```\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.NUMBER;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const NumberAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.NUMBER),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"), // TODO generalize and share\n value: nonEmptyStringSchema(\n \"A valid JS number serialized as string. It's consumer responsibility to parse it.\",\n ),\n});\n\nexport type StringAttribute = {\n /**\n * Any string value.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.STRING;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const StringAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.STRING),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema('A string value.'),\n});\n\nexport type JSONAttribute = {\n /**\n * A JSON string. It's consumer responsibility to validate and parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.JSON;\n /**\n * Union discriminant.\n */\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const JSONAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.JSON),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema(\n \"A JSON string. It's consumer responsibility to validate and parse it.\",\n ),\n});\n\n/**\n * A DiGi metadata attribute.\n */\nexport type MetadataAttribute =\n | BooleanAttribute\n | DateAttribute\n | NumberAttribute\n | StringAttribute\n | JSONAttribute;\n\nexport const MetadataAttributeSchema = z.discriminatedUnion('type', [\n BooleanAttributeSchema,\n DateAttributeSchema,\n NumberAttributeSchema,\n StringAttributeSchema,\n JSONAttributeSchema,\n]);\n","import { z } from 'zod';\n\nimport { Markdown, URI, markdown, nonEmptyStringSchema, uriSchema } from './primitives.js';\n\n/**\n * The display type of a marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport enum MarketplaceMetadataAttributeDisplayType {\n NUMBER = 'number',\n STRING = 'string',\n DATE = 'date',\n}\n\n/**\n * A marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport type MarketplaceMetadataAttribute = {\n value?: string | number | undefined;\n display_type?: MarketplaceMetadataAttributeDisplayType | undefined;\n trait_type?: string | undefined;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataAttributeSchema: z.ZodType<\n MarketplaceMetadataAttribute,\n z.ZodTypeDef,\n object\n> = z\n .object({\n display_type: z.nativeEnum(MarketplaceMetadataAttributeDisplayType).optional(),\n trait_type: nonEmptyStringSchema('The name of the trait.').optional(),\n value: z.union([z.string(), z.number()]).optional(),\n })\n .passthrough(); // make it more loose to allow for future marketplace extensions\n\n/**\n * The metadata standard for marketplace(s).\n *\n * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure\n */\nexport type MarketplaceMetadata = {\n /**\n * A human-readable description of the item. It could be plain text or markdown.\n */\n description?: Markdown | null;\n /**\n * This is the URL that will appear below the asset's image on OpenSea and others etc.\n * and will allow users to leave OpenSea and view the item on the site.\n */\n external_url?: URI | null;\n /**\n * Name of the NFT item.\n */\n name?: string;\n /**\n * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\n attributes?: MarketplaceMetadataAttribute[];\n /**\n * Marketplaces will store any NFT image here.\n */\n image?: URI | null;\n /**\n * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV,\n * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas,\n * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.\n */\n animation_url?: URI | null;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataSchema = z\n .object({\n description: markdown(\n z.string({\n description:\n 'A human-readable description of the item. It could be plain text or markdown.',\n }),\n )\n .optional()\n .nullable()\n .catch(null),\n\n external_url: uriSchema(\n `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n 'and will allow users to leave OpenSea and view the item on the site.',\n )\n .optional()\n .nullable()\n .catch(null),\n\n name: z.string({ description: 'Name of the NFT item.' }).optional(),\n\n attributes: MarketplaceMetadataAttributeSchema.array()\n .optional()\n .describe(\n 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n )\n .catch([]),\n\n image: uriSchema('Marketplaces will store any NFT image here.')\n .optional()\n .nullable()\n .catch(null),\n\n animation_url: uriSchema(\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n )\n .optional()\n .nullable()\n .catch(null),\n })\n .passthrough(); // loose validation for any unknown fields;\n","import { z } from 'zod';\n\n/**\n * The supported license types.\n */\nexport enum MetadataLicenseType {\n CCO = 'CCO',\n CC_BY = 'CC BY',\n CC_BY_ND = 'CC BY-ND',\n CC_BY_NC = 'CC BY-NC',\n TBNL_C_D_PL_Legal = 'TBNL-C-D-PL-Legal',\n TBNL_C_DT_PL_Legal = 'TBNL-C-DT-PL-Legal',\n TBNL_C_ND_PL_Legal = 'TBNL-C-ND-PL-Legal',\n TBNL_C_D_NPL_Legal = 'TBNL-C-D-NPL-Legal',\n TBNL_C_DT_NPL_Legal = 'TBNL-C-DT-NPL-Legal',\n TBNL_C_DTSA_PL_Legal = 'TBNL-C-DTSA-PL-Legal',\n TBNL_C_DTSA_NPL_Legal = 'TBNL-C-DTSA-NPL-Legal',\n TBNL_C_ND_NPL_Legal = 'TBNL-C-ND-NPL-Legal',\n TBNL_C_D_PL_Ledger = 'TBNL-C-D-PL-Ledger',\n TBNL_C_DT_PL_Ledger = 'TBNL-C-DT-PL-Ledger',\n TBNL_C_ND_PL_Ledger = 'TBNL-C-ND-PL-Ledger',\n TBNL_C_D_NPL_Ledger = 'TBNL-C-D-NPL-Ledger',\n TBNL_C_DT_NPL_Ledger = 'TBNL-C-DT-NPL-Ledger',\n TBNL_C_DTSA_PL_Ledger = 'TBNL-C-DTSA-PL-Ledger',\n TBNL_C_DTSA_NPL_Ledger = 'TBNL-C-DTSA-NPL-Ledger',\n TBNL_C_ND_NPL_Ledger = 'TBNL-C-ND-NPL-Ledger',\n TBNL_NC_D_PL_Legal = 'TBNL-NC-D-PL-Legal',\n TBNL_NC_DT_PL_Legal = 'TBNL-NC-DT-PL-Legal',\n TBNL_NC_ND_PL_Legal = 'TBNL-NC-ND-PL-Legal',\n TBNL_NC_D_NPL_Legal = 'TBNL-NC-D-NPL-Legal',\n TBNL_NC_DT_NPL_Legal = 'TBNL-NC-DT-NPL-Legal',\n TBNL_NC_DTSA_PL_Legal = 'TBNL-NC-DTSA-PL-Legal',\n TBNL_NC_DTSA_NPL_Legal = 'TBNL-NC-DTSA-NPL-Legal',\n TBNL_NC_ND_NPL_Legal = 'TBNL-NC-ND-NPL-Legal',\n TBNL_NC_D_PL_Ledger = 'TBNL-NC-D-PL-Ledger',\n TBNL_NC_DT_PL_Ledger = 'TBNL-NC-DT-PL-Ledger',\n TBNL_NC_ND_PL_Ledger = 'TBNL-NC-ND-PL-Ledger',\n TBNL_NC_D_NPL_Ledger = 'TBNL-NC-D-NPL-Ledger',\n TBNL_NC_DT_NPL_Ledger = 'TBNL-NC-DT-NPL-Ledger',\n TBNL_NC_DTSA_PL_Ledger = 'TBNL-NC-DTSA-PL-Ledger',\n TBNL_NC_DTSA_NPL_Ledger = 'TBNL-NC-DTSA-NPL-Ledger',\n TBNL_NC_ND_NPL_Ledger = 'TBNL-NC-ND-NPL-Ledger',\n}\n\n/**\n * @internal\n */\nexport const MetadataLicenseTypeSchema = z.nativeEnum(MetadataLicenseType);\n","import { z } from 'zod';\n\nimport { MetadataLicenseType, MetadataLicenseTypeSchema } from './license.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport {\n EncryptableString,\n EncryptableURI,\n encryptableStringSchema,\n encryptableUriSchema,\n} from '../../primitives.js';\n\nconst MediaCommonSchema = z.object({\n item: encryptableUriSchema('The location of the file.'),\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',\n ),\n});\n\n/**\n * The kind of audio media.\n */\nexport enum MediaAudioKind {\n MUSIC = 'MUSIC',\n PODCAST = 'PODCAST',\n AUDIOBOOK = 'AUDIOBOOK',\n VOICE_NOTE = 'VOICE_NOTE',\n SOUND = 'SOUND',\n OTHER = 'OTHER',\n}\n\n/**\n * Audio mime type.\n */\nexport enum MediaAudioMimeType {\n WAV = 'audio/wav',\n WAV_VND = 'audio/vnd.wave',\n MP3 = 'audio/mpeg',\n OGG_AUDIO = 'audio/ogg',\n MP4_AUDIO = 'audio/mp4',\n AAC = 'audio/aac',\n WEBM_AUDIO = 'audio/webm',\n FLAC = 'audio/flac',\n}\n\nexport type MediaAudio = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the audio.\n */\n type: MediaAudioMimeType;\n /**\n * The cover image for the audio.\n */\n cover?: EncryptableURI;\n /**\n * How long the the audio is in seconds.\n */\n duration?: number;\n /**\n * The license for the audio.\n */\n license?: MetadataLicenseType;\n /**\n * The credits for the audio.\n */\n credits?: EncryptableString;\n /**\n * The name of the artist.\n */\n artist?: EncryptableString;\n /**\n * The genre of the audio.\n */\n genre?: EncryptableString;\n /**\n * The record label for the audio.\n */\n recordLabel?: EncryptableString;\n /**\n * The type of audio.\n */\n kind?: MediaAudioKind;\n /**\n * The lyrics for the audio.\n */\n lyrics?: EncryptableURI;\n};\n\n/**\n * @internal\n */\nexport const MediaAudioSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaAudioMimeType, { description: 'The mime type of the audio file.' }),\n cover: encryptableUriSchema('The cover image for the audio.').optional(),\n duration: z\n .number({ description: 'How long the the audio is in seconds.' })\n .positive()\n .int()\n .optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the audio.'),\n credits: encryptableStringSchema('The credits for the audio.').optional(),\n artist: encryptableStringSchema('The name of the artist.').optional(),\n genre: encryptableStringSchema('The genre of the audio').optional(),\n recordLabel: encryptableStringSchema('The record label for the audio.').optional(),\n kind: z.nativeEnum(MediaAudioKind, { description: 'The type of audio.' }).optional(),\n lyrics: encryptableUriSchema('The lyrics for the audio.').optional(),\n});\n\n/**\n * Image mime type.\n */\nexport enum MediaImageMimeType {\n BMP = 'image/bmp',\n GIF = 'image/gif',\n HEIC = 'image/heic',\n JPEG = 'image/jpeg',\n PNG = 'image/png',\n SVG_XML = 'image/svg+xml',\n TIFF = 'image/tiff',\n WEBP = 'image/webp',\n X_MS_BMP = 'image/x-ms-bmp',\n}\n\nexport type MediaImage = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the image.\n */\n type: MediaImageMimeType;\n /**\n * The alt tag for accessibility.\n */\n altTag?: EncryptableString;\n /**\n * The license for the image.\n */\n license?: MetadataLicenseType;\n};\n\n/**\n * @internal\n */\nexport const MediaImageSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaImageMimeType, { description: 'The mime type of the image' }),\n altTag: encryptableStringSchema('The alt tag for accessibility').optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the image'),\n});\n\n/**\n * Video mime type.\n */\nexport enum MediaVideoMimeType {\n GLTF = 'model/gltf+json',\n GLTF_BINARY = 'model/gltf-binary',\n M4V = 'video/x-m4v',\n MOV = 'video/mov',\n MP4 = 'video/mp4',\n MPEG = 'video/mpeg',\n OGG = 'video/ogg',\n OGV = 'video/ogv',\n QUICKTIME = 'video/quicktime',\n WEBM = 'video/webm',\n}\n\nexport type MediaVideo = {\n /**\n * The location of the file.\n */\n item: EncryptableURI;\n /**\n * A bag of attributes that can be used to store any kind\n * of metadata that is not currently supported by the standard.\n */\n attributes?: MetadataAttribute[];\n /**\n * The mime type of the video.\n */\n type: MediaVideoMimeType;\n /**\n * The alt tag for accessibility.\n */\n altTag?: string;\n /**\n * The cover image for the video.\n */\n cover?: EncryptableURI;\n /**\n * How long the the video is in seconds.\n */\n duration?: number;\n /**\n * The license for the video.\n */\n license?: MetadataLicenseType;\n};\n\n/**\n * @internal\n */\nexport const MediaVideoSchema = MediaCommonSchema.extend({\n type: z.nativeEnum(MediaVideoMimeType, { description: 'The mime type of the video' }),\n altTag: encryptableStringSchema('The alt tag for accessibility').optional(),\n cover: encryptableUriSchema('The cover image for the video').optional(),\n duration: z\n .number({ description: 'How long the the video is in seconds' })\n .positive()\n .int()\n .optional(),\n license: MetadataLicenseTypeSchema.optional().describe('The license for the video'),\n});\n\n/**\n * Any media type.\n */\nexport type AnyMedia = MediaAudio | MediaImage | MediaVideo;\n\nconst AnyMediaImageMimeType = {\n ...MediaAudioMimeType,\n ...MediaImageMimeType,\n ...MediaVideoMimeType,\n};\ntype AnyMediaImageMimeType = MediaAudioMimeType | MediaImageMimeType | MediaVideoMimeType;\n\ntype AnyMediaShape = Pick;\nconst AnyMediaShapeScheme: z.ZodType = z.object({\n type: z.nativeEnum(AnyMediaImageMimeType),\n});\n\nfunction isAnyMediaShape(val: unknown): val is AnyMediaShape {\n return AnyMediaShapeScheme.safeParse(val).success;\n}\n\nfunction resolveAnyMediaSchema(val: unknown) {\n if (!isAnyMediaShape(val)) return AnyMediaShapeScheme;\n\n switch (val.type) {\n case MediaAudioMimeType.WAV:\n case MediaAudioMimeType.WAV_VND:\n case MediaAudioMimeType.MP3:\n case MediaAudioMimeType.OGG_AUDIO:\n case MediaAudioMimeType.MP4_AUDIO:\n case MediaAudioMimeType.AAC:\n case MediaAudioMimeType.WEBM_AUDIO:\n case MediaAudioMimeType.FLAC:\n return MediaAudioSchema;\n\n case MediaImageMimeType.BMP:\n case MediaImageMimeType.GIF:\n case MediaImageMimeType.HEIC:\n case MediaImageMimeType.JPEG:\n case MediaImageMimeType.PNG:\n case MediaImageMimeType.SVG_XML:\n case MediaImageMimeType.TIFF:\n case MediaImageMimeType.WEBP:\n case MediaImageMimeType.X_MS_BMP:\n return MediaImageSchema;\n\n case MediaVideoMimeType.GLTF:\n case MediaVideoMimeType.GLTF_BINARY:\n case MediaVideoMimeType.M4V:\n case MediaVideoMimeType.MOV:\n case MediaVideoMimeType.MP4:\n case MediaVideoMimeType.MPEG:\n case MediaVideoMimeType.OGG:\n case MediaVideoMimeType.OGV:\n case MediaVideoMimeType.QUICKTIME:\n case MediaVideoMimeType.WEBM:\n return MediaVideoSchema;\n }\n\n // the alleged AnyMedia is not a valid shape\n return AnyMediaShapeScheme;\n}\n\n/**\n * @internal\n */\nexport const AnyMediaSchema: z.ZodType = z\n .discriminatedUnion('type', [MediaAudioSchema, MediaImageSchema, MediaVideoSchema])\n // the following is necessary cause discriminatedUnion does not properly work when\n // the discriminant is a union of enums, so we keep the discriminatedUnion for the\n // correct JSON Schema definition but we manually refine the type for runtime checks\n .catch((ctx) => ctx.input as AnyMedia) // passthrough even if might not be an AnyMedia type\n .superRefine((val: unknown, ctx): val is AnyMedia => {\n const Schema = resolveAnyMediaSchema(val);\n\n if (!Schema) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union_discriminator,\n options: [\n ...new Set(\n [\n Object.values(MediaAudioMimeType),\n Object.values(MediaImageMimeType),\n Object.values(MediaVideoMimeType),\n ].flat(),\n ),\n ],\n message:\n 'Invalid discriminator value. Expected one of `MediaAudioMimeType`, `MediaImageMimeType`, `MediaVideoMimeType` values.',\n });\n return z.NEVER;\n }\n\n const result = Schema.safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n\n return z.NEVER;\n });\n","import { z } from 'zod';\n\nexport const timezones = [\n 'Africa/Abidjan',\n 'Africa/Accra',\n 'Africa/Addis_Ababa',\n 'Africa/Algiers',\n 'Africa/Asmera',\n 'Africa/Bamako',\n 'Africa/Bangui',\n 'Africa/Banjul',\n 'Africa/Bissau',\n 'Africa/Blantyre',\n 'Africa/Brazzaville',\n 'Africa/Bujumbura',\n 'Africa/Cairo',\n 'Africa/Casablanca',\n 'Africa/Ceuta',\n 'Africa/Conakry',\n 'Africa/Dakar',\n 'Africa/Dar_es_Salaam',\n 'Africa/Djibouti',\n 'Africa/Douala',\n 'Africa/El_Aaiun',\n 'Africa/Freetown',\n 'Africa/Gaborone',\n 'Africa/Harare',\n 'Africa/Johannesburg',\n 'Africa/Juba',\n 'Africa/Kampala',\n 'Africa/Khartoum',\n 'Africa/Kigali',\n 'Africa/Kinshasa',\n 'Africa/Lagos',\n 'Africa/Libreville',\n 'Africa/Lome',\n 'Africa/Luanda',\n 'Africa/Lubumbashi',\n 'Africa/Lusaka',\n 'Africa/Malabo',\n 'Africa/Maputo',\n 'Africa/Maseru',\n 'Africa/Mbabane',\n 'Africa/Mogadishu',\n 'Africa/Monrovia',\n 'Africa/Nairobi',\n 'Africa/Ndjamena',\n 'Africa/Niamey',\n 'Africa/Nouakchott',\n 'Africa/Ouagadougou',\n 'Africa/Porto-Novo',\n 'Africa/Sao_Tome',\n 'Africa/Tripoli',\n 'Africa/Tunis',\n 'Africa/Windhoek',\n 'America/Adak',\n 'America/Anchorage',\n 'America/Anguilla',\n 'America/Antigua',\n 'America/Araguaina',\n 'America/Argentina/La_Rioja',\n 'America/Argentina/Rio_Gallegos',\n 'America/Argentina/Salta',\n 'America/Argentina/San_Juan',\n 'America/Argentina/San_Luis',\n 'America/Argentina/Tucuman',\n 'America/Argentina/Ushuaia',\n 'America/Aruba',\n 'America/Asuncion',\n 'America/Bahia',\n 'America/Bahia_Banderas',\n 'America/Barbados',\n 'America/Belem',\n 'America/Belize',\n 'America/Blanc-Sablon',\n 'America/Boa_Vista',\n 'America/Bogota',\n 'America/Boise',\n 'America/Buenos_Aires',\n 'America/Cambridge_Bay',\n 'America/Campo_Grande',\n 'America/Cancun',\n 'America/Caracas',\n 'America/Catamarca',\n 'America/Cayenne',\n 'America/Cayman',\n 'America/Chicago',\n 'America/Chihuahua',\n 'America/Ciudad_Juarez',\n 'America/Coral_Harbour',\n 'America/Cordoba',\n 'America/Costa_Rica',\n 'America/Creston',\n 'America/Cuiaba',\n 'America/Curacao',\n 'America/Danmarkshavn',\n 'America/Dawson',\n 'America/Dawson_Creek',\n 'America/Denver',\n 'America/Detroit',\n 'America/Dominica',\n 'America/Edmonton',\n 'America/Eirunepe',\n 'America/El_Salvador',\n 'America/Fort_Nelson',\n 'America/Fortaleza',\n 'America/Glace_Bay',\n 'America/Godthab',\n 'America/Goose_Bay',\n 'America/Grand_Turk',\n 'America/Grenada',\n 'America/Guadeloupe',\n 'America/Guatemala',\n 'America/Guayaquil',\n 'America/Guyana',\n 'America/Halifax',\n 'America/Havana',\n 'America/Hermosillo',\n 'America/Indiana/Knox',\n 'America/Indiana/Marengo',\n 'America/Indiana/Petersburg',\n 'America/Indiana/Tell_City',\n 'America/Indiana/Vevay',\n 'America/Indiana/Vincennes',\n 'America/Indiana/Winamac',\n 'America/Indianapolis',\n 'America/Inuvik',\n 'America/Iqaluit',\n 'America/Jamaica',\n 'America/Jujuy',\n 'America/Juneau',\n 'America/Kentucky/Monticello',\n 'America/Kralendijk',\n 'America/La_Paz',\n 'America/Lima',\n 'America/Los_Angeles',\n 'America/Louisville',\n 'America/Lower_Princes',\n 'America/Maceio',\n 'America/Managua',\n 'America/Manaus',\n 'America/Marigot',\n 'America/Martinique',\n 'America/Matamoros',\n 'America/Mazatlan',\n 'America/Mendoza',\n 'America/Menominee',\n 'America/Merida',\n 'America/Metlakatla',\n 'America/Mexico_City',\n 'America/Miquelon',\n 'America/Moncton',\n 'America/Monterrey',\n 'America/Montevideo',\n 'America/Montserrat',\n 'America/Nassau',\n 'America/New_York',\n 'America/Nipigon',\n 'America/Nome',\n 'America/Noronha',\n 'America/North_Dakota/Beulah',\n 'America/North_Dakota/Center',\n 'America/North_Dakota/New_Salem',\n 'America/Ojinaga',\n 'America/Panama',\n 'America/Pangnirtung',\n 'America/Paramaribo',\n 'America/Phoenix',\n 'America/Port-au-Prince',\n 'America/Port_of_Spain',\n 'America/Porto_Velho',\n 'America/Puerto_Rico',\n 'America/Punta_Arenas',\n 'America/Rainy_River',\n 'America/Rankin_Inlet',\n 'America/Recife',\n 'America/Regina',\n 'America/Resolute',\n 'America/Rio_Branco',\n 'America/Santa_Isabel',\n 'America/Santarem',\n 'America/Santiago',\n 'America/Santo_Domingo',\n 'America/Sao_Paulo',\n 'America/Scoresbysund',\n 'America/Sitka',\n 'America/St_Barthelemy',\n 'America/St_Johns',\n 'America/St_Kitts',\n 'America/St_Lucia',\n 'America/St_Thomas',\n 'America/St_Vincent',\n 'America/Swift_Current',\n 'America/Tegucigalpa',\n 'America/Thule',\n 'America/Thunder_Bay',\n 'America/Tijuana',\n 'America/Toronto',\n 'America/Tortola',\n 'America/Vancouver',\n 'America/Whitehorse',\n 'America/Winnipeg',\n 'America/Yakutat',\n 'America/Yellowknife',\n 'Antarctica/Casey',\n 'Antarctica/Davis',\n 'Antarctica/DumontDUrville',\n 'Antarctica/Macquarie',\n 'Antarctica/Mawson',\n 'Antarctica/McMurdo',\n 'Antarctica/Palmer',\n 'Antarctica/Rothera',\n 'Antarctica/Syowa',\n 'Antarctica/Troll',\n 'Antarctica/Vostok',\n 'Arctic/Longyearbyen',\n 'Asia/Aden',\n 'Asia/Almaty',\n 'Asia/Amman',\n 'Asia/Anadyr',\n 'Asia/Aqtau',\n 'Asia/Aqtobe',\n 'Asia/Ashgabat',\n 'Asia/Atyrau',\n 'Asia/Baghdad',\n 'Asia/Bahrain',\n 'Asia/Baku',\n 'Asia/Bangkok',\n 'Asia/Barnaul',\n 'Asia/Beirut',\n 'Asia/Bishkek',\n 'Asia/Brunei',\n 'Asia/Calcutta',\n 'Asia/Chita',\n 'Asia/Choibalsan',\n 'Asia/Colombo',\n 'Asia/Damascus',\n 'Asia/Dhaka',\n 'Asia/Dili',\n 'Asia/Dubai',\n 'Asia/Dushanbe',\n 'Asia/Famagusta',\n 'Asia/Gaza',\n 'Asia/Hebron',\n 'Asia/Hong_Kong',\n 'Asia/Hovd',\n 'Asia/Irkutsk',\n 'Asia/Jakarta',\n 'Asia/Jayapura',\n 'Asia/Jerusalem',\n 'Asia/Kabul',\n 'Asia/Kamchatka',\n 'Asia/Karachi',\n 'Asia/Katmandu',\n 'Asia/Khandyga',\n 'Asia/Krasnoyarsk',\n 'Asia/Kuala_Lumpur',\n 'Asia/Kuching',\n 'Asia/Kuwait',\n 'Asia/Macau',\n 'Asia/Magadan',\n 'Asia/Makassar',\n 'Asia/Manila',\n 'Asia/Muscat',\n 'Asia/Nicosia',\n 'Asia/Novokuznetsk',\n 'Asia/Novosibirsk',\n 'Asia/Omsk',\n 'Asia/Oral',\n 'Asia/Phnom_Penh',\n 'Asia/Pontianak',\n 'Asia/Pyongyang',\n 'Asia/Qatar',\n 'Asia/Qostanay',\n 'Asia/Qyzylorda',\n 'Asia/Rangoon',\n 'Asia/Riyadh',\n 'Asia/Saigon',\n 'Asia/Sakhalin',\n 'Asia/Samarkand',\n 'Asia/Seoul',\n 'Asia/Shanghai',\n 'Asia/Singapore',\n 'Asia/Srednekolymsk',\n 'Asia/Taipei',\n 'Asia/Tashkent',\n 'Asia/Tbilisi',\n 'Asia/Tehran',\n 'Asia/Thimphu',\n 'Asia/Tokyo',\n 'Asia/Tomsk',\n 'Asia/Ulaanbaatar',\n 'Asia/Urumqi',\n 'Asia/Ust-Nera',\n 'Asia/Vientiane',\n 'Asia/Vladivostok',\n 'Asia/Yakutsk',\n 'Asia/Yekaterinburg',\n 'Asia/Yerevan',\n 'Atlantic/Azores',\n 'Atlantic/Bermuda',\n 'Atlantic/Canary',\n 'Atlantic/Cape_Verde',\n 'Atlantic/Faeroe',\n 'Atlantic/Madeira',\n 'Atlantic/Reykjavik',\n 'Atlantic/South_Georgia',\n 'Atlantic/St_Helena',\n 'Atlantic/Stanley',\n 'Australia/Adelaide',\n 'Australia/Brisbane',\n 'Australia/Broken_Hill',\n 'Australia/Currie',\n 'Australia/Darwin',\n 'Australia/Eucla',\n 'Australia/Hobart',\n 'Australia/Lindeman',\n 'Australia/Lord_Howe',\n 'Australia/Melbourne',\n 'Australia/Perth',\n 'Australia/Sydney',\n 'Europe/Amsterdam',\n 'Europe/Andorra',\n 'Europe/Astrakhan',\n 'Europe/Athens',\n 'Europe/Belgrade',\n 'Europe/Berlin',\n 'Europe/Bratislava',\n 'Europe/Brussels',\n 'Europe/Bucharest',\n 'Europe/Budapest',\n 'Europe/Busingen',\n 'Europe/Chisinau',\n 'Europe/Copenhagen',\n 'Europe/Dublin',\n 'Europe/Gibraltar',\n 'Europe/Guernsey',\n 'Europe/Helsinki',\n 'Europe/Isle_of_Man',\n 'Europe/Istanbul',\n 'Europe/Jersey',\n 'Europe/Kaliningrad',\n 'Europe/Kiev',\n 'Europe/Kirov',\n 'Europe/Lisbon',\n 'Europe/Ljubljana',\n 'Europe/London',\n 'Europe/Luxembourg',\n 'Europe/Madrid',\n 'Europe/Malta',\n 'Europe/Mariehamn',\n 'Europe/Minsk',\n 'Europe/Monaco',\n 'Europe/Moscow',\n 'Europe/Oslo',\n 'Europe/Paris',\n 'Europe/Podgorica',\n 'Europe/Prague',\n 'Europe/Riga',\n 'Europe/Rome',\n 'Europe/Samara',\n 'Europe/San_Marino',\n 'Europe/Sarajevo',\n 'Europe/Saratov',\n 'Europe/Simferopol',\n 'Europe/Skopje',\n 'Europe/Sofia',\n 'Europe/Stockholm',\n 'Europe/Tallinn',\n 'Europe/Tirane',\n 'Europe/Ulyanovsk',\n 'Europe/Uzhgorod',\n 'Europe/Vaduz',\n 'Europe/Vatican',\n 'Europe/Vienna',\n 'Europe/Vilnius',\n 'Europe/Volgograd',\n 'Europe/Warsaw',\n 'Europe/Zagreb',\n 'Europe/Zaporozhye',\n 'Europe/Zurich',\n 'Indian/Antananarivo',\n 'Indian/Chagos',\n 'Indian/Christmas',\n 'Indian/Cocos',\n 'Indian/Comoro',\n 'Indian/Kerguelen',\n 'Indian/Mahe',\n 'Indian/Maldives',\n 'Indian/Mauritius',\n 'Indian/Mayotte',\n 'Indian/Reunion',\n 'Pacific/Apia',\n 'Pacific/Auckland',\n 'Pacific/Bougainville',\n 'Pacific/Chatham',\n 'Pacific/Easter',\n 'Pacific/Efate',\n 'Pacific/Enderbury',\n 'Pacific/Fakaofo',\n 'Pacific/Fiji',\n 'Pacific/Funafuti',\n 'Pacific/Galapagos',\n 'Pacific/Gambier',\n 'Pacific/Guadalcanal',\n 'Pacific/Guam',\n 'Pacific/Honolulu',\n 'Pacific/Johnston',\n 'Pacific/Kiritimati',\n 'Pacific/Kosrae',\n 'Pacific/Kwajalein',\n 'Pacific/Majuro',\n 'Pacific/Marquesas',\n 'Pacific/Midway',\n 'Pacific/Nauru',\n 'Pacific/Niue',\n 'Pacific/Norfolk',\n 'Pacific/Noumea',\n 'Pacific/Pago_Pago',\n 'Pacific/Palau',\n 'Pacific/Pitcairn',\n 'Pacific/Ponape',\n 'Pacific/Port_Moresby',\n 'Pacific/Rarotonga',\n 'Pacific/Saipan',\n 'Pacific/Tahiti',\n 'Pacific/Tarawa',\n 'Pacific/Tongatapu',\n 'Pacific/Truk',\n 'Pacific/Wake',\n 'Pacific/Wallis',\n] as const;\n\n/**\n * Timezone ID\n */\nexport type TimezoneId = (typeof timezones)[number];\n\n/**\n * @internal\n */\nexport const TimezoneIdSchema = z.enum(timezones);\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n mainContentFocus,\n PublicationMetadataCommon,\n metadataDetailsWith,\n MetadataLicenseType,\n MetadataLicenseTypeSchema,\n publicationWith,\n optionalContentSchema,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n nonEmptyStringSchema,\n Signature,\n URI,\n uriSchema,\n} from '../primitives.js';\n\n/**\n * The 3D format type.\n */\nexport enum ThreeDFormat {\n GLTF = 'gLTF/GLB',\n FBX = 'FBX',\n VRM = 'VRM',\n OBJ = 'OBJ',\n}\n\n/**\n * A 3D asset.\n */\nexport type ThreeDAsset = {\n /**\n * The URI of the 3D asset zip file.\n */\n uri: URI;\n /**\n * The URL of the recommended web based 3D player to use to view the 3D asset.\n */\n playerUrl: URI;\n /**\n * The 3D format of the asset.\n */\n format: ThreeDFormat;\n /**\n * Path in extracted zip. Relative. 3D start point, MUST be 3D file type.\n */\n zipPath?: string;\n /**\n * The license regulating the use of the 3D asset.\n */\n license?: MetadataLicenseType;\n};\n/**\n * @internal\n */\nexport const ThreeDAssetSchema: z.ZodType = z.object({\n uri: uriSchema('The URI of the 3D asset zip file.'),\n zipPath: nonEmptyStringSchema()\n .optional()\n .describe('Path in extracted zip. Relative. 3D start point, MUST be 3D file type.'),\n playerUrl: uriSchema(\n 'The URL of the recommended web based 3D player to use to view the 3D asset.',\n ),\n format: z.nativeEnum(ThreeDFormat).describe('The 3D format of the asset.'),\n license: MetadataLicenseTypeSchema.optional().describe(\n 'The license regulating the use of the 3D asset.',\n ),\n});\n\nexport type ThreeDMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.THREE_D;\n /**\n * The 3D items for the publication.\n */\n assets: ThreeDAsset[];\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\nconst ThreeDMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.THREE_D),\n\n assets: ThreeDAssetSchema.array().min(1).describe('The 3D items for the publication'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a 3D piece of art.\n */\nexport type ThreeDMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.THREE_D_LATEST;\n /**\n * The metadata details.\n */\n digi: ThreeDMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ThreeDSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.THREE_D_LATEST),\n\n digi: ThreeDMetadataDetailsSchema,\n});\n","/**\n * The main focus of a publication.\n */\nexport enum PublicationMainFocus {\n VIDEO = 'VIDEO',\n IMAGE = 'IMAGE',\n ARTICLE = 'ARTICLE',\n TEXT_ONLY = 'TEXT_ONLY',\n AUDIO = 'AUDIO',\n LINK = 'LINK',\n EMBED = 'EMBED',\n CHECKING_IN = 'CHECKING_IN',\n EVENT = 'EVENT',\n MINT = 'MINT',\n TRANSACTION = 'TRANSACTION',\n LIVESTREAM = 'LIVESTREAM',\n SHORT_VIDEO = 'SHORT_VIDEO',\n THREE_D = '3D',\n STORY = 'STORY',\n SPACE = 'SPACE',\n}\n","/**\n * @internal\n */\nexport const SchemasRoot = 'https://json-schemas.digiv3rse.xyz';\n","import { SchemasRoot } from '../constants';\n\nconst location = `${SchemasRoot}/publications`;\n\n/**\n * A list of all the publication schema ids (past and present).\n */\nexport enum PublicationSchemaId {\n THREE_D_LATEST = `${location}/3d/3.0.0.json`,\n ARTICLE_LATEST = `${location}/article/3.0.0.json`,\n AUDIO_LATEST = `${location}/audio/3.0.0.json`,\n CHECKING_IN_LATEST = `${location}/checking-in/3.0.0.json`,\n EMBED_LATEST = `${location}/embed/3.0.0.json`,\n EVENT_LATEST = `${location}/event/3.0.0.json`,\n IMAGE_LATEST = `${location}/image/3.0.0.json`,\n LINK_LATEST = `${location}/link/3.0.0.json`,\n LIVESTREAM_LATEST = `${location}/livestream/3.0.0.json`,\n MINT_LATEST = `${location}/mint/3.0.0.json`,\n SPACE_LATEST = `${location}/space/3.0.0.json`,\n STORY_LATEST = `${location}/story/3.0.0.json`,\n TRANSACTION_LATEST = `${location}/transaction/3.0.0.json`,\n TEXT_ONLY_LATEST = `${location}/text-only/3.0.0.json`,\n VIDEO_LATEST = `${location}/video/3.0.0.json`,\n}\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n Signature,\n encryptable,\n markdown,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type ArticleMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.ARTICLE;\n /**\n * Markdown content.\n */\n content: EncryptableMarkdown;\n /**\n * The optional article title.\n */\n title?: string;\n /**\n * Any attachment you want to include with it.\n */\n attachments?: AnyMedia[];\n};\nconst ArticleMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.ARTICLE),\n\n content: encryptable(\n markdown(nonEmptyStringSchema('The content for the publication as markdown.')),\n ),\n\n title: nonEmptyStringSchema('The optional article title.').optional(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('Any attachment you want to include with it.'),\n });\n\n/**\n * Use this model an article-like publication (e.g. blog, news, etc.)\n */\nexport type ArticleMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.ARTICLE_LATEST;\n /**\n * The metadata details.\n */\n digi: ArticleMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ArticleSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.ARTICLE_LATEST),\n digi: ArticleMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n mainContentFocus,\n MediaAudio,\n MediaAudioSchema,\n metadataDetailsWith,\n optionalContentSchema,\n PublicationMetadataCommon,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, nonEmptyStringSchema, Signature } from '../primitives.js';\n\nexport type AudioMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.AUDIO;\n /**\n * The audio.\n */\n audio: MediaAudio;\n /**\n * The optional audio title.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst AudioMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.AUDIO),\n\n audio: MediaAudioSchema,\n\n title: nonEmptyStringSchema('The optional audio title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where an audio is the main focus.\n *\n * Use the `digi.attachments` to include more media.\n */\nexport type AudioMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.AUDIO_LATEST;\n /**\n * The metadata details.\n */\n digi: AudioMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const AudioSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.AUDIO_LATEST),\n digi: AudioMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableGeoURI,\n EncryptableMarkdown,\n EncryptableString,\n PhysicalAddress,\n PhysicalAddressSchema,\n Signature,\n encryptableGeoUriSchema,\n encryptableStringSchema,\n} from '../primitives.js';\n\nexport type CheckingInMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.CHECKING_IN;\n /**\n * Where you checking in from (free form text).\n */\n location: EncryptableString;\n /**\n * The optional geographic position of the location.\n */\n position?: EncryptableGeoURI;\n /**\n * The optional address of the location.\n */\n address?: PhysicalAddress;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst CheckingInMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.CHECKING_IN),\n\n location: encryptableStringSchema('Where you checking in from (free form text).'),\n\n position: encryptableGeoUriSchema(\n 'The optional geographic position of the location.',\n ).optional(),\n\n address: PhysicalAddressSchema.optional().describe('The optional address of the location.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community that you are checking in from a location.\n */\nexport type CheckingInMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.CHECKING_IN_LATEST;\n /**\n * The metadata details.\n */\n digi: CheckingInMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const CheckingInSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.CHECKING_IN_LATEST),\n digi: CheckingInMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\nexport type EmbedMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.EMBED;\n /**\n * The embed URL.\n */\n embed: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst EmbedMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.EMBED),\n\n embed: encryptableUriSchema('The embed URL.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication that embeds a resource such as a micro-app, a game, etc.\n */\nexport type EmbedMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.EMBED_LATEST;\n /**\n * The metadata details.\n */\n digi: EmbedMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const EmbedSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.EMBED_LATEST),\n digi: EmbedMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n TimezoneId,\n TimezoneIdSchema,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n PhysicalAddressSchema,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n encryptableStringSchema,\n EncryptableURI,\n EncryptableString,\n EncryptableGeoURI,\n PhysicalAddress,\n EncryptableDateTime,\n EncryptableMarkdown,\n encryptableGeoUriSchema,\n Signature,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\n/**\n * An object intended to help with future events scheduling adjustments.\n *\n * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events\n */\nexport type SchedulingAdjustments = {\n /**\n * Indicates a reference timezone for the event start and end times.\n * If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer.\n */\n timezoneId: TimezoneId;\n /**\n * Indicates the reference timezone offset with respect to UTC timezone a the time of event creation.\n * The difference in minutes between the reference timezone time and UTC time (e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).\n */\n timezoneOffset: number;\n};\n\n/**\n * @internal\n */\nexport const SchedulingAdjustmentsSchema: z.ZodType =\n z.object({\n timezoneId: TimezoneIdSchema.describe(\n 'Indicates a reference timezone for the event start and end times. ' +\n 'If physical event, you could use the timezone of the event location. If virtual event, the timezone of the event organizer.',\n ),\n timezoneOffset: z\n .number()\n .describe(\n 'Indicates the reference timezone offset with respect to UTC timezone a the time of event creation. ' +\n 'The difference in minutes between the reference timezone time and UTC time ' +\n '(e.g. UTC+2 would be -120, UTC-5 would be 300, UTC would be 0).',\n ),\n });\n\nexport type EventMetadataDetails = PublicationMetadataCommon & {\n /**\n * The title of the event.\n */\n title?: string;\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.EVENT;\n /*\n * The location of the event.\n */\n location: EncryptableURI | EncryptableString;\n /**\n * The geographic position of the event.\n */\n position?: EncryptableGeoURI;\n /**\n * The address of the event.\n */\n address?: PhysicalAddress;\n /**\n * The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n endsAt: EncryptableDateTime;\n /**\n * Captures extra criteria to recompute correctly future start and end times.\n *\n * @see https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events\n */\n schedulingAdjustments?: SchedulingAdjustments;\n /**\n * The links you want to include with it.\n */\n links?: EncryptableURI[];\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst EventMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n title: nonEmptyStringSchema().describe('The title of the event.').optional(),\n\n mainContentFocus: mainContentFocus(PublicationMainFocus.EVENT),\n\n location: z\n .union([\n encryptableUriSchema('A virtual location.'),\n encryptableStringSchema('The event location (free form text).'),\n ])\n .describe('The location of the event.'),\n\n position: encryptableGeoUriSchema('The geographic position of the event.').optional(),\n\n address: PhysicalAddressSchema.optional().describe('The address of the event.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The event start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n endsAt: encryptableDateTimeSchema('The event end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).'),\n\n schedulingAdjustments: SchedulingAdjustmentsSchema.optional().describe(\n 'Captures extra criteria to recompute correctly future start and end times.' +\n 'See: https://www.w3.org/International/wiki/WorkingWithTimeZones#Working_with_Future_and_Recurring_Events',\n ),\n\n links: encryptableUriSchema()\n .array()\n .min(1)\n .optional()\n .describe('The links you want to include with it.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to create an event, virtual or physical.\n */\nexport type EventMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.EVENT_LATEST;\n /**\n * The metadata details.\n */\n digi: EventMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const EventSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.EVENT_LATEST),\n digi: EventMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n MediaImage,\n MediaImageSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature, nonEmptyStringSchema } from '../primitives.js';\n\nexport type ImageMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.IMAGE;\n /**\n * The image.\n */\n image: MediaImage;\n /**\n * A title for the image.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst ImageMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.IMAGE),\n\n image: MediaImageSchema,\n\n title: nonEmptyStringSchema('The optional image title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where an image is the main focus.\n *\n * Use the `digi.attachments` to include more images.\n */\nexport type ImageMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.IMAGE_LATEST;\n /**\n * The metadata details.\n */\n digi: ImageMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const ImageSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.IMAGE_LATEST),\n digi: ImageMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\nexport type LinkMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.LINK;\n /**\n * The sharing link url.\n */\n sharingLink: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst LinkMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.LINK),\n\n sharingLink: encryptableUriSchema('The sharing link url.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a link to something you want to share.\n */\nexport type LinkMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.LINK_LATEST;\n /**\n * The metadata details.\n */\n digi: LinkMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const LinkSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.LINK_LATEST),\n digi: LinkMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common/index.js';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableDateTime,\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type LiveStreamMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.LIVESTREAM;\n /**\n * The livestream title.\n */\n title?: string;\n /**\n * The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n endsAt?: EncryptableDateTime;\n /**\n * Some livestream platforms have the playback url as a separate url.\n * If not your case make sure `liveUrl` and `playbackUrl` are the same.\n */\n playbackUrl: EncryptableURI;\n /**\n * Some livestream platforms have the live url as a separate url.\n * If not your case make sure `liveUrl` and `playbackUrl` are the same.\n */\n liveUrl: EncryptableURI;\n /**\n * The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.\n *\n * Responses from this endpoint should conform to the following schema:\n *\n * ```json\n * {\n * \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n * \"type\": \"object\",\n * \"properties\": {\n * \"isLive\": {\n * \"type\": \"boolean\"\n * }\n * },\n * \"required\": [\"isLive\"]\n * }\n * ```\n */\n checkLiveAPI?: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst LiveStreamMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.LIVESTREAM),\n\n title: nonEmptyStringSchema().optional().describe('The livestream title.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The stream start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n endsAt: encryptableDateTimeSchema(\n 'The optional stream end time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`)',\n ).optional(),\n\n playbackUrl: encryptableUriSchema(\n 'Some livestream platforms have the playback url as a separate url. ' +\n 'If not your case make sure `liveUrl` and `playbackUrl` are the same.',\n ),\n\n liveUrl: encryptableUriSchema(\n 'Some livestream platforms have the live url as a separate url. ' +\n 'If not your case make sure `liveUrl` and `playbackUrl` are the same.',\n ),\n\n checkLiveAPI: encryptableUriSchema(\n 'The data cannot be changed so you can put in an API endpoint to know if it is still live or not for clients to be able to check.',\n ).optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community of a livestream event.\n */\nexport type LiveStreamMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.LIVESTREAM_LATEST;\n /**\n * The metadata details.\n */\n digi: LiveStreamMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const LiveStreamSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.LIVESTREAM_LATEST),\n digi: LiveStreamMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableUriSchema,\n} from '../primitives.js';\n\n// TODO validate the mint link using the allow list\n\nexport type MintMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.MINT;\n /**\n * The mint item it can be a URL of the known provider like opensea\n * https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299\n * or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626.\n *\n * The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata\n */\n mintLink: EncryptableURI;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * Any attachment you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst MintMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.MINT),\n\n mintLink: encryptableUriSchema(\n 'The mint item it can be a URL of the known provider like opensea ' +\n 'https://opensea.io/assets/ethereum/0xfaa2471e93bd1cee3b0ab381c242ada8e1d1a759/299 ' +\n 'or https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/39626. ' +\n 'The DiGi API has an allow list of providers and if the domain does not match it will mark it as failed metadata',\n ),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to share a link to mint an NFT.\n */\nexport type MintMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.MINT_LATEST;\n /**\n * The metadata details.\n */\n digi: MintMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const MintSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.MINT_LATEST),\n digi: MintMetadataDetailsSchema,\n});\n","import { SchemasRoot } from '../constants.js';\n\nexport enum MirrorSchemaId {\n LATEST = `${SchemasRoot}/publications/mirror/1.0.0.json`,\n}\n","import { z } from 'zod';\n\nimport { MirrorSchemaId } from './MirrorSchemaId.js';\nimport {\n AppId,\n AppIdSchema,\n Signature,\n SignatureSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\nimport { ShapeCheck } from '../utils.js';\n\nexport type MirrorMetadataDetails = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId: AppId;\n};\n\nconst MirrorMetadataDetailsSchema: z.ZodType =\n z.object(\n {\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.describe('The App Id that this publication belongs to.'),\n },\n {\n description: 'The DiGi operational metadata fields.',\n },\n );\n\n/**\n * A Mirror metadata object.\n */\nexport type MirrorMetadata = ShapeCheck<{\n /**\n * The schema id.\n */\n $schema: MirrorSchemaId.LATEST;\n /**\n * The metadata details.\n */\n digi: MirrorMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n}>;\n/**\n * Mirror metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * MirrorMetadata.parse(valid); // => MirrorMetadata\n *\n * MirrorMetadata.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * MirrorMetadata.safeParse(valid);\n * // => { success: true, data: MirrorMetadata }\n *\n * MirrorMetadata.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const MirrorMetadataSchema: z.ZodType = z.object({\n $schema: z.literal(MirrorSchemaId.LATEST),\n digi: MirrorMetadataDetailsSchema,\n signature: SignatureSchema.optional(),\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableDateTime,\n EncryptableMarkdown,\n EncryptableURI,\n Signature,\n encryptableDateTimeSchema,\n encryptableUriSchema,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type SpaceMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.SPACE;\n /**\n * The space title.\n */\n title: string;\n /**\n * The space join link.\n */\n link: EncryptableURI;\n /**\n * The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).\n */\n startsAt: EncryptableDateTime;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nexport const SpaceMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.SPACE),\n\n title: nonEmptyStringSchema().describe('The space title.'),\n\n link: encryptableUriSchema('The space join link.'),\n\n startsAt: encryptableDateTimeSchema(\n 'The space start time (ISO 8601 `YYYY-MM-DDTHH:mm:ss.sssZ`).',\n ),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to notify your community about a space you are hosting.\n */\nexport type SpaceMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.SPACE_LATEST;\n /**\n * The metadata details.\n */\n digi: SpaceMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const SpaceSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.SPACE_LATEST),\n\n digi: SpaceMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature } from '../primitives.js';\n\nexport type StoryMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.STORY;\n /**\n * The story asset.\n */\n asset: AnyMedia;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n};\n\nconst StoryMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.STORY),\n\n asset: AnyMediaSchema.describe('The story asset.'),\n\n content: optionalContentSchema(),\n });\n\n/**\n * Use this to model an Instagram-like story.\n */\nexport type StoryMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.STORY_LATEST;\n /**\n * The metadata details.\n */\n digi: StoryMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const StorySchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.STORY_LATEST),\n digi: StoryMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n EncryptableMarkdown,\n Signature,\n encryptable,\n markdown,\n nonEmptyStringSchema,\n} from '../primitives.js';\n\nexport type TextOnlyMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.TEXT_ONLY;\n /**\n * The content for the publication as markdown.\n */\n content: EncryptableMarkdown;\n};\n\nconst TextOnlyMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.TEXT_ONLY),\n\n content: encryptable(\n markdown(nonEmptyStringSchema('The content for the publication as markdown.')),\n ),\n });\n\n/**\n * Use this for a text-only publication.\n *\n * Most comments will fall into this category.\n */\nexport type TextOnlyMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.TEXT_ONLY_LATEST;\n /**\n * The metadata details.\n */\n digi: TextOnlyMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const TextOnlySchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.TEXT_ONLY_LATEST),\n digi: TextOnlyMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport {\n ChainId,\n ChainIdSchema,\n EncryptableMarkdown,\n EncryptableString,\n Signature,\n encryptableStringSchema,\n} from '../primitives.js';\n\n/**\n * A way to classify the type of transaction.\n */\nexport enum MetadataTransactionType {\n ERC721 = 'ERC721',\n ERC20 = 'ERC20',\n OTHER = 'OTHER',\n}\n\nexport type TransactionMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.TRANSACTION;\n /**\n * The transaction hash.\n */\n txHash: EncryptableString;\n /**\n * The type of transaction.\n */\n type: MetadataTransactionType;\n /**\n * The Chain Id.\n */\n chainId: ChainId;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst TransactionMetadataDetailsSchema: z.ZodType<\n TransactionMetadataDetails,\n z.ZodTypeDef,\n object\n> = metadataDetailsWith({\n mainContentFocus: mainContentFocus(PublicationMainFocus.TRANSACTION),\n\n txHash: encryptableStringSchema('The transaction hash.'),\n\n type: z.nativeEnum(MetadataTransactionType).describe('The type of transaction.'),\n\n chainId: ChainIdSchema.describe('The Chain Id.'),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n});\n\n/**\n * Use this to model a publication where a transaction is the main focus.\n */\nexport type TransactionMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.TRANSACTION_LATEST;\n /**\n * The metadata details.\n */\n digi: TransactionMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const TransactionSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.TRANSACTION_LATEST),\n digi: TransactionMetadataDetailsSchema,\n});\n","import { z } from 'zod';\n\nimport { PublicationMainFocus } from './PublicationMainFocus.js';\nimport { PublicationSchemaId } from './PublicationSchemaId.js';\nimport {\n AnyMedia,\n AnyMediaSchema,\n MediaVideo,\n MediaVideoSchema,\n PublicationMetadataCommon,\n mainContentFocus,\n metadataDetailsWith,\n optionalContentSchema,\n publicationWith,\n} from './common';\nimport { MarketplaceMetadata } from '../marketplace.js';\nimport { EncryptableMarkdown, Signature, nonEmptyStringSchema } from '../primitives.js';\n\nexport type VideoMetadataDetails = PublicationMetadataCommon & {\n /**\n * The main focus of the publication.\n */\n mainContentFocus: PublicationMainFocus.VIDEO | PublicationMainFocus.SHORT_VIDEO;\n /**\n * The video.\n */\n video: MediaVideo;\n /**\n * The optional video title.\n */\n title?: string;\n /**\n * Optional markdown content.\n */\n content?: EncryptableMarkdown;\n /**\n * The other attachments you want to include with it.\n */\n attachments?: AnyMedia[];\n};\n\nconst VideoMetadataDetailsSchema: z.ZodType =\n metadataDetailsWith({\n mainContentFocus: mainContentFocus(\n PublicationMainFocus.SHORT_VIDEO,\n PublicationMainFocus.VIDEO,\n ),\n\n video: MediaVideoSchema,\n\n title: nonEmptyStringSchema('The optional video title.').optional(),\n\n content: optionalContentSchema(),\n\n attachments: AnyMediaSchema.array()\n .min(1)\n .optional()\n .describe('The other attachments you want to include with it.'),\n });\n\n/**\n * Use this to model a publication where a video is the main focus.\n *\n * Use the `digi.attachments` to include more media.\n */\nexport type VideoMetadata = MarketplaceMetadata & {\n /**\n * The schema id.\n */\n $schema: PublicationSchemaId.VIDEO_LATEST;\n /**\n * The metadata details.\n */\n digi: VideoMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * @internal\n */\nexport const VideoSchema = publicationWith({\n $schema: z.literal(PublicationSchemaId.VIDEO_LATEST),\n digi: VideoMetadataDetailsSchema,\n});\n","import { evaluate } from './ValidationError';\nimport { NetworkAddressDetails, amount } from '../primitives';\nimport {\n AccessCondition,\n AccessConditionSchema,\n AndCondition,\n AndConditionSchema,\n AnyCondition,\n CollectCondition,\n CollectConditionSchema,\n ConditionComparisonOperator,\n ConditionType,\n EoaOwnershipCondition,\n EoaOwnershipConditionSchema,\n Erc20OwnershipCondition,\n Erc20OwnershipConditionSchema,\n FollowCondition,\n FollowConditionSchema,\n NftContractType,\n NftOwnershipCondition,\n NftOwnershipConditionSchema,\n OrCondition,\n OrConditionSchema,\n ProfileOwnershipCondition,\n ProfileOwnershipConditionSchema,\n SimpleCondition,\n refineNftOwnershipCondition,\n AdvancedContractCondition,\n AdvancedContractConditionSchema,\n} from '../publication';\n\nexport type CollectConditionDetails = {\n /**\n * The Publication Id that needs to be collected to fulfill the condition.\n */\n publicationId: string;\n /**\n * If the Publication Id refers to the current publication.\n */\n thisPublication: boolean;\n};\n/**\n * Creates a Collect condition.\n *\n * @category Helpers\n */\nexport function collectCondition(input: CollectConditionDetails): CollectCondition {\n return evaluate(\n CollectConditionSchema.safeParse({\n type: ConditionType.COLLECT,\n ...input,\n }),\n );\n}\n\nexport type EoaOwnershipConditionDetails = {\n /**\n * The EVM address to verify ownership of.\n */\n address: string;\n};\n/**\n * Creates an EOA ownership condition.\n *\n * @category Helpers\n */\nexport function eoaOwnershipCondition(input: EoaOwnershipConditionDetails): EoaOwnershipCondition {\n return evaluate(\n EoaOwnershipConditionSchema.safeParse({\n type: ConditionType.EOA_OWNERSHIP,\n ...input,\n }),\n );\n}\n\nexport type Erc20OwnershipConditionDetails = {\n /**\n * The comparison operator to use to compare the ERC-20 token balance.\n */\n condition: ConditionComparisonOperator;\n /**\n * The ERC-20 token contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The ERC-20 token decimals (e.g. 18 for GHO)\n */\n decimals: number;\n /**\n * The human readable amount to compare the ERC-20 token balance against using the comparison operator.\n *\n * @example\n * 1.5\n * 42\n * 0.000002\n */\n value: string;\n};\n\n/**\n * Creates an ERC-20 token ownership condition.\n *\n * @category Helpers\n * @param input - The ERC-20 token ownership condition details.\n */\nexport function erc20OwnershipCondition({\n condition,\n ...others\n}: Erc20OwnershipConditionDetails): Erc20OwnershipCondition {\n return evaluate(\n Erc20OwnershipConditionSchema.safeParse({\n type: ConditionType.ERC20_OWNERSHIP,\n amount: amount(others),\n condition,\n }),\n );\n}\n\nexport type Erc721OwnershipConditionDetails = {\n /**\n * The NFT contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The list of token ids to verify ownership of.\n */\n tokenIds?: string[];\n};\n\n/**\n * Creates an ERC-721 NFT ownership condition.\n *\n * @category Helpers\n */\nexport function erc721OwnershipCondition(\n input: Erc721OwnershipConditionDetails,\n): NftOwnershipCondition {\n return evaluate(\n NftOwnershipConditionSchema.superRefine(refineNftOwnershipCondition).safeParse({\n type: ConditionType.NFT_OWNERSHIP,\n contractType: NftContractType.ERC721,\n ...input,\n }),\n );\n}\n\nexport type Erc1155OwnershipConditionDetails = {\n /**\n * The NFT contract address details.\n */\n contract: NetworkAddressDetails;\n /**\n * The list of token ids to verify ownership of.\n */\n tokenIds: string[];\n};\n\n/**\n * Creates an ERC-1155 NFT ownership condition.\n *\n * @category Helpers\n */\nexport function erc1155OwnershipCondition(\n input: Erc721OwnershipConditionDetails,\n): NftOwnershipCondition {\n return evaluate(\n NftOwnershipConditionSchema.superRefine(refineNftOwnershipCondition).safeParse({\n type: ConditionType.NFT_OWNERSHIP,\n contractType: NftContractType.ERC1155,\n ...input,\n }),\n );\n}\n\nexport type ProfileOwnershipConditionDetails = {\n profileId: string;\n};\n/**\n * Creates a DiGi Profile ownership condition.\n *\n * @category Helpers\n */\nexport function profileOwnershipCondition(\n input: ProfileOwnershipConditionDetails,\n): ProfileOwnershipCondition {\n return evaluate(\n ProfileOwnershipConditionSchema.safeParse({\n type: ConditionType.PROFILE_OWNERSHIP,\n ...input,\n }),\n );\n}\n\nexport type FollowConditionDetails = {\n follow: string;\n};\n/**\n * Creates a follow DiGi Profile condition.\n *\n * @category Helpers\n */\nexport function followCondition(input: FollowConditionDetails): FollowCondition {\n return evaluate(\n FollowConditionSchema.safeParse({\n type: ConditionType.FOLLOW,\n ...input,\n }),\n );\n}\n\nexport type AdvancedContractConditionDetails = {\n /**\n * The contract information, including the chain id and the EVM address.\n */\n contract: NetworkAddressDetails;\n\n /**\n * The function name to call. Has to be exactly the same as in the ABI.\n */\n functionName: string;\n\n /**\n * The function ABI. Has to be in a human-readable string format, which you can convert using the ethers library.\n * See here for more info https://docs.ethers.io/v5/api/utils/abi/fragments/#human-readable-abi\n */\n abi: string;\n\n /**\n * The parameters to pass to the function. Has to be matching the arguments described in the ABI.\n * In case of tuples and arrays, you have to pass the values as a stringified JSON array.\n */\n params: string[];\n\n /**\n * The comparison operator to use to compare the result of the function call. In case of integer outputs\n * you can use any comparison operator. In case of boolean outputs, you can only use EQUAL and NOT_EQUAL.\n */\n comparison: ConditionComparisonOperator;\n\n /**\n * The value to compare the result of the function call against. Can be a boolean or a BigNumber in string format.\n */\n value: string;\n};\n\n/**\n * Creates an arbitrary on-chain condition based on the return value\n * of a given contract view function.\n *\n * @category Helpers\n * @experimental This feature is experimental and might change in the future.\n */\nexport function advancedContractCondition(\n input: AdvancedContractConditionDetails,\n): AdvancedContractCondition {\n return evaluate(\n AdvancedContractConditionSchema.safeParse({\n type: ConditionType.ADVANCED_CONTRACT,\n ...input,\n }),\n );\n}\n\n/**\n * Creates an AND condition between two or more conditions.\n *\n * @category Helpers\n */\nexport function andCondition(criteria: T): AndCondition {\n return evaluate(\n AndConditionSchema.safeParse({\n type: ConditionType.AND,\n criteria,\n }),\n );\n}\n\n/**\n * Creates an OR condition between two or more conditions.\n *\n * @category Helpers\n */\nexport function orCondition(criteria: T): OrCondition {\n return evaluate(\n OrConditionSchema.safeParse({\n type: ConditionType.OR,\n criteria,\n }),\n );\n}\n\n/**\n * Creates the access condition specification for a given publication.\n *\n * @internal\n */\nexport function accessCondition(criteria: AnyCondition[]): AccessCondition {\n return evaluate(\n AccessConditionSchema.safeParse({\n type: ConditionType.OR,\n criteria,\n }),\n );\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport {\n MirrorMetadata,\n MirrorMetadataSchema,\n MirrorSchemaId,\n MirrorMetadataDetails,\n} from '../publication';\nimport { Prettify } from '../utils.js';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype MirrorDetails = Prettify>>;\n/**\n * All {@link MirrorMetadataDetails} fields with:\n * - `id` defaults to a UUID\n */\nexport type MirrorOptions = MirrorDetails & {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * @defaultValue a UUID\n */\n id?: string;\n};\n/**\n * Creates a valid MirrorMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = mirror({\n * appId: 'com.example.app',\n * });\n * ```\n */\nexport function mirror({ id = v4(), ...others }: MirrorOptions): MirrorMetadata {\n return evaluate(\n MirrorMetadataSchema.safeParse({\n $schema: MirrorSchemaId.LATEST,\n digi: {\n id,\n ...others,\n },\n }),\n );\n}\n","import { z } from 'zod';\n\nimport { ModuleSchemaId } from './ModuleSchemaId';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../MetadataAttribute';\nimport { nonEmptyStringSchema, Markdown, markdown, nonEmpty } from '../primitives';\n\nfunction isValidJsonString(str: string) {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n}\n\nfunction jsonString(description: string) {\n return z.string({ description }).refine(isValidJsonString, { message: 'Invalid JSON string' });\n}\n\n/**\n * The metadata standard for DiGi Modules\n */\nexport type ModuleMetadata = {\n /**\n * The name of the module.\n */\n name: string;\n /**\n * The human-friendly title for the module.\n */\n title: string;\n /**\n * Markdown formatted description of the module.\n *\n * It should explain what this module does, how to use it, examples just\n * like you would if you were building an NPM package.\n * The more detail the better to allow dApp to easily integrate it.\n */\n description: Markdown;\n /**\n * List of authors email addresses.\n */\n authors: string[];\n /**\n * The Solidity JSON ABI as JSON-string describing the initialization function calldata.\n *\n * This will be used to encode the calldata for the initialization function.\n *\n * It will also be used by the consumers of this module to decode the initialization\n * calldata so to infer the initialization criteria.\n */\n initializeCalldataABI: string;\n /**\n * The Solidity JSON ABI as JSON-string describing the initialization result data.\n *\n * This will be used by the consumers of this module to decode\n * the result data from the initialization function so to infer the\n * initialization result state.\n */\n initializeResultDataABI?: string;\n /**\n * The Solidity JSON ABI as JSON-string describing the process function calldata.\n *\n * This will be used to encode the calldata for the process function.\n *\n * Some modules might non need to return any initialization result data.\n */\n processCalldataABI: string;\n /**\n * An arbitrary bag of attributes you wish to add to the metadata.\n */\n attributes: MetadataAttribute[];\n /**\n * The schema ID.\n */\n $schema: ModuleSchemaId.LATEST;\n};\n\nexport const ModuleMetadataSchema: z.ZodType = z.object({\n name: nonEmpty(z.string().max(200)).describe('The name of the module.'),\n title: nonEmptyStringSchema('The human-friendly title for the module.'),\n description: markdown(nonEmptyStringSchema('Markdown formatted description of the module.')),\n authors: z\n .array(z.string().email('Authors list should only contain valid emails'))\n .min(1, 'You must supply at least one author')\n .describe('List of authors email addresses.'),\n initializeCalldataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the initialization function calldata.',\n ),\n initializeResultDataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the initialization result data.',\n ).optional(),\n processCalldataABI: jsonString(\n 'The Solidity JSON ABI as JSON-string describing the process function calldata.',\n ),\n attributes: z.array(MetadataAttributeSchema).describe('An arbitrary bag of attributes.'),\n $schema: z.literal(ModuleSchemaId.LATEST),\n});\n","import { SchemasRoot } from '../constants';\n\nexport enum ModuleSchemaId {\n LATEST = `${SchemasRoot}/modules/1.0.0.json`,\n}\n","import { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport { MetadataAttribute } from '../MetadataAttribute';\nimport { ModuleMetadata, ModuleMetadataSchema, ModuleSchemaId } from '../module';\nimport { Prettify } from '../utils';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ModuleDetails = Prettify>>;\n/**\n * All {@link ModuleMetadata} fields without `$schema` a with:\n * - `attributes` defaults to an empty array\n */\nexport type ModuleOptions = ModuleDetails & {\n /**\n * An arbitrary bag of attributes you wish to add to the metadata.\n */\n attributes?: MetadataAttribute[];\n};\n\n/**\n * Creates a valid ModuleMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = module({\n * name: 'My Open Action',\n * title: 'This is my Open Action',\n * description: 'Get ready for the future of social interaction!',\n * authors: ['awesome-dev@digi.xyz'],\n * initializeCalldataABI: JSON.stringify([\n * {\n * type: 'address',\n * name: 'address',\n * },\n * {\n * type: 'uint256',\n * name: 'price',\n * },\n * ]),\n * processCalldataABI: JSON.stringify([\n * {\n * type: 'address',\n * name: 'collector',\n * },\n * ]),\n * });\n * ```\n */\nexport function module({ attributes = [], ...others }: ModuleOptions): ModuleMetadata {\n return evaluate(\n ModuleMetadataSchema.safeParse({\n $schema: ModuleSchemaId.LATEST,\n attributes,\n ...others,\n }),\n );\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand } from './utils';\nimport {\n ProfileMetadata,\n ProfileMetadataDetails,\n ProfileMetadataSchema,\n ProfileSchemaId,\n} from '../profile';\nimport { Prettify } from '../utils.js';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ProfileDetails = Prettify>>;\n/**\n * All {@link ProfileMetadataDetails} fields with:\n */\nexport type ProfileOptions = ProfileDetails & {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * @defaultValue a UUID\n */\n id?: string;\n};\n/**\n * Creates a valid ProfileMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Global profile (no `appId`):\n * ```ts\n * const metadata = profile({\n * name: 'John Doe',\n * bio: `\n * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris.\n *\n * - Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n * - Donec a diam lectus.\n * `,\n * });\n * ```\n *\n * @example\n * App specific profile (with `appId`):\n * ```ts\n * const metadata = profile({\n * appId: 'com.example.app',\n * name: 'John Doe',\n * });\n * ```\n *\n * @example\n * With attributes:\n * ```ts\n * const metadata = profile({\n * name: 'John Doe',\n * picture: 'https://example.com/picture.png',\n * attributes: [\n * {\n * key: 'twitter',\n * type: MetadataAttributeType.STRING,\n * value: 'https://twitter.com/johndoe',\n * },\n * {\n * key: 'dob',\n * type: MetadataAttributeType.DATE,\n * value: '1990-01-01T00:00:00Z',\n * },\n * {\n * key: 'enabled',\n * type: MetadataAttributeType.BOOLEAN,\n * value: 'true',\n * },\n * {\n * key: 'height',\n * type: MetadataAttributeType.NUMBER,\n * value: '1.8',\n * },\n * {\n * key: 'settings',\n * type: MetadataAttributeType.JSON,\n * value: '{\"theme\": \"dark\"}',\n * },\n * ],\n * });\n * ```\n */\nexport function profile({ id = v4(), ...others }: ProfileOptions): ProfileMetadata {\n return evaluate(\n ProfileMetadataSchema.safeParse({\n $schema: ProfileSchemaId.LATEST,\n digi: {\n id,\n ...others,\n },\n }),\n );\n}\n","import { z } from 'zod';\n\nimport { ProfileSchemaId } from './ProfileSchemaId.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../MetadataAttribute.js';\nimport {\n AppId,\n AppIdSchema,\n Markdown,\n Signature,\n SignatureSchema,\n URI,\n markdown,\n nonEmptyStringSchema,\n uriSchema,\n} from '../primitives.js';\n\nexport type ProfileMetadataDetails = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this Profile details are relevant for.\n *\n * If omitted the data is considered to be the global Profile data.\n */\n appId?: AppId;\n /**\n * The profile display name.\n */\n name?: string;\n /**\n * The profile bio as markdown.\n */\n bio?: Markdown;\n /**\n * The profile picture.\n */\n picture?: URI;\n /**\n * The profile cover picture.\n */\n coverPicture?: URI;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n};\n/**\n * @internal\n */\nconst ProfileMetadataDetailsSchema: z.ZodType =\n z.object(\n {\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n name: nonEmptyStringSchema('The profile display name.').optional(),\n\n bio: markdown(nonEmptyStringSchema('The profile bio as markdown.')).optional(),\n\n picture: uriSchema('The profile picture.').optional(),\n\n coverPicture: uriSchema('The profile cover picture.').optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n appId: AppIdSchema.optional().describe(\n 'The App Id that this Profile data refers to. ' +\n 'If omitted the data is considered to be the global Profile data.',\n ),\n },\n { description: 'The DiGi specific metadata details.' },\n );\n\n/**\n * Use this to create Profile metadata objects.\n */\nexport type ProfileMetadata = {\n /**\n * The schema id.\n */\n $schema: ProfileSchemaId.LATEST;\n /**\n * The metadata details.\n */\n digi: ProfileMetadataDetails;\n /**\n * A cryptographic signature of the `digi` data.\n *\n * @experimental DO NOT use yet\n */\n signature?: Signature;\n};\n\n/**\n * Profile Metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * ProfileMetadataSchema.parse(valid); // => ProfileMetadata\n *\n * ProfileMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * ProfileMetadataSchema.safeParse(valid);\n * // => { success: true, data: ProfileMetadata }\n *\n * ProfileMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const ProfileMetadataSchema: z.ZodType = z.object({\n $schema: z.literal(ProfileSchemaId.LATEST),\n digi: ProfileMetadataDetailsSchema,\n signature: SignatureSchema.optional(),\n});\n","import { SchemasRoot } from '../constants.js';\n\nexport enum ProfileSchemaId {\n LATEST = `${SchemasRoot}/profile/2.0.0.json`,\n}\n","import { v4 } from 'uuid';\n\nimport { evaluate } from './ValidationError';\nimport { RecursiveUnbrand, InputForPublicationMetadataDetails } from './utils';\nimport { MarketplaceMetadata } from '../marketplace';\nimport {\n ThreeDMetadata,\n ThreeDSchema,\n AudioMetadata,\n AudioSchema,\n CheckingInMetadata,\n CheckingInSchema,\n EmbedMetadata,\n EmbedSchema,\n EventMetadata,\n EventSchema,\n ImageMetadata,\n ImageSchema,\n LinkMetadata,\n LinkSchema,\n LiveStreamMetadata,\n LiveStreamSchema,\n MintMetadata,\n MintSchema,\n PublicationMainFocus,\n PublicationSchemaId,\n SpaceMetadata,\n SpaceSchema,\n StoryMetadata,\n StorySchema,\n TextOnlyMetadata,\n TextOnlySchema,\n TransactionMetadata,\n TransactionSchema,\n VideoMetadata,\n VideoSchema,\n ArticleMetadataDetails,\n AudioMetadataDetails,\n CheckingInMetadataDetails,\n EmbedMetadataDetails,\n EventMetadataDetails,\n ImageMetadataDetails,\n LinkMetadataDetails,\n LiveStreamMetadataDetails,\n MintMetadataDetails,\n SpaceMetadataDetails,\n StoryMetadataDetails,\n TextOnlyMetadataDetails,\n ThreeDMetadataDetails,\n TransactionMetadataDetails,\n VideoMetadataDetails,\n ArticleMetadata,\n ArticleSchema,\n} from '../publication';\n\n/**\n * The default locale used by the builder helpers.\n */\nexport const DEFAULT_LOCALE = 'en';\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype MarketplaceDetails = RecursiveUnbrand;\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype ArticleDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ArticleMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.ARTICLE_LATEST`\n */\nexport type ArticleOptions = ArticleDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ArticleMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = article({\n * title: 'Great Question'\n * content: `\n * ## Heading\n *\n * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris.\n *\n * ## Question\n *\n * What is the answer to life, the universe and everything?\n *\n * ## Answer\n *\n * 42\n *\n * ![The answer](https://example.com/answer.png)\n * `,\n * tags: ['question', '42'],\n * });\n * ```\n */\nexport function article({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ArticleOptions): ArticleMetadata {\n return evaluate(\n ArticleSchema.safeParse({\n $schema: PublicationSchemaId.ARTICLE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.ARTICLE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype AudioDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link AudioMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.AUDIO_LATEST`\n */\nexport type AudioOptions = AudioDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid AudioMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single track:\n * ```ts\n * const metadata = audio({\n * title: 'Great song!',\n * audio: {\n * item: 'https://example.com/song.mp3',\n * type: MediaAudioMimeType.MP3,\n * artist: 'John Doe',\n * cover: 'https://example.com/cover.png',\n * },\n * });\n * ```\n *\n * @example\n * Album:\n * ```ts\n * const metadata = audio({\n * title: 'Great song!',\n * audio: {\n * item: 'https://example.com/sample.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 60,\n * artist: 'John Doe',\n * cover: 'https://example.com/cover.png',\n * },\n * attachments: [\n * {\n * item: 'https://example.com/song-1.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 234,\n * },\n * {\n * item: 'https://example.com/song-2.mp3',\n * type: MediaAudioMimeType.MP3,\n * duration: 345,\n * },\n * ],\n * });\n * ```\n */\nexport function audio({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: AudioOptions): AudioMetadata {\n return evaluate(\n AudioSchema.safeParse({\n $schema: PublicationSchemaId.AUDIO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.AUDIO,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docsRemarks MUST stay very @private to produce usable docs\n */\ntype CheckingInDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link CheckingInMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.CHECKING_IN_LATEST`\n */\nexport type CheckingInOptions = CheckingInDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid CheckingInMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * With GPS coordinates:\n * ```ts\n * const metadata = checkingIn({\n * location: 'The Moon',\n * position: geoUri({\n * lat: 40.6892,\n * lng: -74.0444,\n * }),\n * });\n * ```\n * See {@link geoUri} for more details.\n *\n * @example\n * With a physical address:\n * ```ts\n * const metadata = checkingIn({\n * location: 'The Moon',\n * address: {\n * streetAddress: '1st Street',\n * locality: 'New York',\n * region: 'NY',\n * postalCode: '10001',\n * country: 'US',\n * },\n * });\n * ```\n */\nexport function checkingIn({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: CheckingInOptions): CheckingInMetadata {\n return evaluate(\n CheckingInSchema.safeParse({\n $schema: PublicationSchemaId.CHECKING_IN_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.CHECKING_IN,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype EmbedDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link EmbedMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.EMBED_LATEST`\n */\nexport type EmbedOptions = EmbedDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid EmbedMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = embed({\n * embed: 'https://example.com/embed.html',\n * });\n * ```\n */\nexport function embed({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: EmbedOptions): EmbedMetadata {\n return evaluate(\n EmbedSchema.safeParse({\n $schema: PublicationSchemaId.EMBED_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.EMBED,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype EventDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link EventMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.EVENT_LATEST`\n */\nexport type EventOptions = EventDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid EventMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * With GPS coordinates:\n * ```ts\n * const metadata = event({\n * location: 'The Moon',\n * position: geoUri({\n * lat: 40.6892,\n * lng: -74.0444,\n * }),\n * startsAt: '2028-10-01T00:00:00Z',\n * endsAt: '2028-10-01T01:00:00Z',\n * links: ['https://example.com/tickets.html'],\n * });\n * ```\n *\n * @example\n * With a physical address:\n * ```ts\n * const metadata = event({\n * location: 'The Moon',\n * address: {\n * streetAddress: '1st Street',\n * locality: 'New York',\n * region: 'NY',\n * postalCode: '10001',\n * country: 'US',\n * },\n * startsAt: '2028-10-01T00:00:00Z',\n * endsAt: '2028-10-01T01:00:00Z',\n * });\n * ```\n */\nexport function event({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: EventOptions): EventMetadata {\n return evaluate(\n EventSchema.safeParse({\n $schema: PublicationSchemaId.EVENT_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.EVENT,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ImageDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ImageMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.IMAGE_LATEST`\n */\nexport type ImageOptions = ImageDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ImageMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single image:\n *\n * ```ts\n * const metadata = image({\n * title: 'Touch grass',\n * image: {\n * item: 'https://example.com/image.png',\n * type: MediaImageMimeType.PNG,\n * altTag: 'Me touching grass',\n * license: MetadataLicenseType.CCO,\n * },\n * });\n * ```\n *\n * @example\n * A gallery:\n * ```ts\n * const metadata = image({\n * title: 'Touch grass',\n * image: {\n * item: 'https://example.com/cover.png',\n * type: MediaImageMimeType.PNG,\n * altTag: 'A collage of me touching grass',\n * license: MetadataLicenseType.CCO,\n * },\n * attachments: [\n * {\n * item: 'https://example.com/image-1.png',\n * type: MediaImageMimeType.PNG,\n * license: MetadataLicenseType.CC_BY_NC,\n * altTag: 'Me touching a tree',\n * },\n * {\n * item: 'https://example.com/image-2.png',\n * type: MediaImageMimeType.PNG,\n * license: MetadataLicenseType.CC_BY_NC,\n * altTag: 'The tree touching me',\n * },\n * ],\n * });\n * ```\n */\nexport function image({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ImageOptions): ImageMetadata {\n return evaluate(\n ImageSchema.safeParse({\n $schema: PublicationSchemaId.IMAGE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.IMAGE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype LinkDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link LinkMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.LINK_LATEST`\n */\nexport type LinkOptions = LinkDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid LinkMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = link({\n * sharingLink: 'https://example.com/embed.html',\n * content: 'Check out this cool website!',\n * });\n * ```\n */\nexport function link({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: LinkOptions): LinkMetadata {\n return evaluate(\n LinkSchema.safeParse({\n $schema: PublicationSchemaId.LINK_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.LINK,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype LiveStreamDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link LiveStreamMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.LIVESTREAM_LATEST`\n */\nexport type LiveStreamOptions = LiveStreamDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid LivestreamMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = liveStream({\n * title: 'Live stream #1',\n * liveUrl: 'https://example.com/live.html',\n * playbackUrl: 'https://example.com/playback.html',\n * startsAt: '2028-10-01T00:00:00Z',\n * });\n * ```\n */\nexport function liveStream({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: LiveStreamOptions): LiveStreamMetadata {\n return evaluate(\n LiveStreamSchema.safeParse({\n $schema: PublicationSchemaId.LIVESTREAM_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.LIVESTREAM,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype MintDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link MintMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.MINT_LATEST`\n */\nexport type MintOptions = MintDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid MintMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = mint({\n * content: 'Check out this NFT!',\n * mintLink:\n * 'https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/1234567890',\n * });\n * ```\n */\nexport function mint({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: MintOptions): MintMetadata {\n return evaluate(\n MintSchema.safeParse({\n $schema: PublicationSchemaId.MINT_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.MINT,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype SpaceDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link SpaceMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.SPACE_LATEST`\n */\nexport type SpaceOptions = SpaceDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid SpaceMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = space({\n * title: 'Space #1',\n * link: 'https://example.com/space.html',\n * startsAt: '2028-10-01T00:00:00Z',\n * });\n * ```\n */\nexport function space({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: SpaceOptions): SpaceMetadata {\n return evaluate(\n SpaceSchema.safeParse({\n $schema: PublicationSchemaId.SPACE_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.SPACE,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype StoryDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link StoryMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.STORY_LATEST`\n */\nexport type StoryOptions = StoryDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid StoryMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = story({\n * asset: {\n * item: 'https://example.com/story.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The story of my life',\n * },\n * });\n * ```\n */\nexport function story({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: StoryOptions): StoryMetadata {\n return evaluate(\n StorySchema.safeParse({\n $schema: PublicationSchemaId.STORY_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.STORY,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype TextOnlyDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link TextOnlyMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.TEXT_ONLY_LATEST`\n */\nexport type TextOnlyOptions = TextOnlyDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid TextOnlyMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = textOnly({\n * content: `Nice question!`,\n * });\n * ```\n */\nexport function textOnly({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: TextOnlyOptions): TextOnlyMetadata {\n return evaluate(\n TextOnlySchema.safeParse({\n $schema: PublicationSchemaId.TEXT_ONLY_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.TEXT_ONLY,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype ThreeDDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link ThreeDMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.THREE_D_LATEST`\n */\nexport type ThreeDOptions = ThreeDDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid ThreeDMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = threeD({\n * content: 'Check out this 3D model!',\n * assets: [\n * {\n * format: ThreeDFormat.VRM,\n * playerUrl: 'https://example.com/player.html',\n * uri: 'https://example.com/model.zip',\n * zipPath: 'foo/model.vrm',\n * },\n * ],\n * tags: ['3d', 'vrm'],\n * });\n * ```\n */\nexport function threeD({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ThreeDOptions): ThreeDMetadata {\n return evaluate(\n ThreeDSchema.safeParse({\n $schema: PublicationSchemaId.THREE_D_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.THREE_D,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype TransactionDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link TransactionMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.TRANSACTION_LATEST`\n */\nexport type TransactionOptions = TransactionDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid TransactionMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = transaction({\n * chainId: 1,\n * txHash: '0x1234567890',\n * content: 'Check out this transaction!',\n * type: MetadataTransactionType.ERC20,\n * });\n * ```\n */\nexport function transaction({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: TransactionOptions): TransactionMetadata {\n return evaluate(\n TransactionSchema.safeParse({\n $schema: PublicationSchemaId.TRANSACTION_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.TRANSACTION,\n ...others,\n },\n }),\n );\n}\n\n/**\n * @private\n * @privateRemarks MUST stay very @private to produce usable docs\n */\ntype VideoDetails = InputForPublicationMetadataDetails;\n/**\n * All {@link VideoMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.VIDEO_LATEST`\n */\nexport type VideoOptions = VideoDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid VideoMetadata.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * Single video:\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * },\n * content: `\n * In this video I will show you how to make a great video.\n *\n * And maybe I will show you how to make a great video about making a great video.\n * `\n * });\n * ```\n *\n * @example\n * Video with attachments:\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * },\n * attachments: [\n * {\n * item: 'https://example.com/soundtrack.mp3',\n * type: MediaAudioMimeType.MP3,\n * license: MetadataLicenseType.CCO,\n * }\n * ]\n * });\n * ```\n */\nexport function video({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: VideoOptions): VideoMetadata {\n return evaluate(\n VideoSchema.safeParse({\n $schema: PublicationSchemaId.VIDEO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.VIDEO,\n ...others,\n },\n }),\n );\n}\n\n/**\n * All {@link VideoMetadataDetails} fields with:\n * - `id` defaults to a UUID\n * - `locale` defaults to `en`\n * - `mainContentFocus` automatically set to `PublicationSchemaId.SHORT_VIDEO`\n */\nexport type ShortVideoOptions = VideoDetails & {\n /**\n * All the {@link MarketplaceMetadata} fields.\n */\n marketplace?: MarketplaceDetails;\n};\n/**\n * Creates a valid VideoMetadata for a short.\n *\n * @category Compose\n * @param input - Use your IDE suggestions for an enhanced development experience\n *\n * @example\n * ```ts\n * const metadata = video({\n * title: 'Great video!',\n * video: {\n * item: 'https://example.com/video.mp4',\n * type: MediaVideoMimeType.MP4,\n * cover: 'https://example.com/thumbnail.png',\n * duration: 123,\n * altTag: 'The video of my life',\n * license: MetadataLicenseType.CCO,\n * }\n * });\n * ```\n */\nexport function shortVideo({\n marketplace,\n locale = DEFAULT_LOCALE,\n id = v4(),\n ...others\n}: ShortVideoOptions): VideoMetadata {\n return evaluate(\n VideoSchema.safeParse({\n $schema: PublicationSchemaId.VIDEO_LATEST,\n ...marketplace,\n digi: {\n id,\n locale,\n mainContentFocus: PublicationMainFocus.SHORT_VIDEO,\n ...others,\n },\n }),\n );\n}\n","import { ProfileMetadata } from './profile';\nimport { MirrorMetadata, PublicationMetadata } from './publication';\nimport { invariant } from './utils';\n\nconst schemaVersionRegex = /(\\d+\\.\\d+\\.\\d+)/;\n/**\n * Helper to extracts the version from the schema id of a metadata object.\n *\n * Most users will not need to use this function directly.\n *\n * @category Helpers\n * @experimental This function is experimental and may change or be removed in future versions.\n *\n * @example\n * Extract the version of a profile metadata object:\n * ```ts\n * const metadata = await ProfileMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '2.0.0'\n * ```\n *\n * @example\n * Extract the version of a mirror metadata object:\n * ```ts\n * const metadata = await MirrorMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '1.0.0'\n * ```\n *\n * @example\n * Extract the version of a publication metadata object:\n * ```ts\n * const metadata = await PublicationMetadataSchema.parse(valid);\n *\n * const version = extractVersion(metadata); // '3.0.0'\n * ```\n */\n\nexport function extractVersion(\n metadata: MirrorMetadata | ProfileMetadata | PublicationMetadata,\n): string {\n const result = schemaVersionRegex.exec(metadata.$schema);\n\n invariant(result !== null, `Invalid schema id: ${metadata.$schema}`);\n return result[0];\n}\n"]} \ No newline at end of file diff --git a/dist/legacy/index.cjs b/dist/legacy/index.cjs new file mode 100644 index 00000000..180af491 --- /dev/null +++ b/dist/legacy/index.cjs @@ -0,0 +1,26 @@ +'use strict'; + +var uuid = require('uuid'); +var zod = require('zod'); + +var Se=(i=>(i.number="number",i.string="string",i.date="date",i))(Se||{});function X(e){return e?typeof e=="string"?e:JSON.stringify(e):""}var xe=zod.z.object({displayType:zod.z.string().nullable().optional().catch(null),traitType:zod.z.string().nullable().optional().catch(null),value:zod.z.unknown().transform(X),key:zod.z.unknown().transform(X)}),Pt=zod.z.object({version:zod.z.literal("1.0.0").describe("The metadata version.").catch("1.0.0"),metadata_id:zod.z.string({description:"The metadata id can be anything but if your uploading to ipfs you will want it to be random. Using uuid could be an option!"}).catch(()=>uuid.v4()),name:zod.z.string({description:"The display name for the profile."}).nullable().catch(null),bio:zod.z.string({description:"The bio for the profile."}).nullable().optional().catch(null),cover_picture:zod.z.string({description:"Cover picture."}).nullable().optional().catch(null),attributes:xe.array().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.").optional()}).passthrough();function S(e){return e.length>=2}function Ee(e){return e}var Ae=/^[a-z]{2}(?:-[a-zA-Z]{2})?$/,Ie=/^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i,Y=zod.z.string({description:"A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."}).regex(Ae,"Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."),I=Y.catch(e=>{let n=Ie.exec(e.input);return n?n[1]:e.input}).superRefine((e,n)=>{let a=Y.safeParse(e);return a.success||a.error.issues.forEach(i=>{n.addIssue(i);}),zod.z.NEVER}).transform(Ee);function Ce(e){return e}function Oe(e){return e.every(n=>!n.success)}var we=zod.z.string().describe("An encrypted value.").regex(/^\S+$/,"Should be a valid encrypted value.").transform(Ce);function te(e){let n=[e,we];return zod.z.union(n).catch(a=>a.input).superRefine((a,i)=>{let m=n.map(T=>T.safeParse(a));return Oe(m)&&i.addIssue({code:zod.z.ZodIssueCode.invalid_union,unionErrors:m.map(T=>T.error)}),zod.z.NEVER})}function Pe(e){return zod.z.preprocess((n,a)=>{let i=zod.z.string().safeParse(n);return i.success?i.data.replace(/^[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*/,"").replace(/[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*$/,"").trim():(i.error.issues.forEach(m=>{a.addIssue(m);}),zod.z.NEVER)},e.min(1))}function d(e){return Pe(zod.z.string({description:e}))}function x(e){return te(d(e))}var R=zod.z.string().describe("An arbitrary tag.").min(1).max(50).transform(e=>e.toLowerCase());function N(e){return e}var ne=zod.z.string().describe("A DiGi App identifier.").min(1).max(200).transform(N);function ve(e){return e}zod.z.string().min(1).describe("A cryptographic signature of the DiGi metadata.").transform(ve);function C(e){return e}function k(e){return e.transform(C)}function Re(e){return e}function O(e="A Uniform Resource Identifier. "){return zod.z.string({description:e}).min(6).url({message:"Should be a valid URI"}).transform(Re)}var ee=/^geo:(-?\d+\.?\d*),(-?\d+\.?\d*)$/,oe=zod.z.coerce.number({description:"The latitude."}).min(-90).max(90),ie=zod.z.coerce.number({description:"The longitude."}).min(-180).max(180);zod.z.string().describe("A Geographic coordinate as subset of Geo URI (RFC 5870). Currently only supports the `geo:lat,lng` format.").regex(ee,"Should be a Geo URI. Expected `geo:lat,lng`.").superRefine((e,n)=>{let a=ee.exec(e);if(!a)return zod.z.NEVER;let[,i="",m=""]=a,T=oe.safeParse(i);T.success||T.error.issues.forEach(M=>n.addIssue({...M,path:[...n.path,"lat"]}));let h=ie.safeParse(m);return h.success||h.error.issues.forEach(M=>n.addIssue({...M,path:[...n.path,"lng"]})),zod.z.NEVER});zod.z.object({lat:oe,lng:ie});zod.z.object({formatted:x("The full mailing address formatted for display.").optional(),streetAddress:x("The street address including house number, street name, P.O. Box, apartment or unit number and extended multi-line address information.").optional(),locality:x("The city or locality."),region:x("The state or region.").optional(),postalCode:x("The zip or postal code.").optional(),country:x("The country name component.")});function Ne(e){return e}var z=zod.z.string().length(42).describe("An EVM compatible address.").transform(Ne);function ke(e){return e}var ze=zod.z.number().positive().transform(ke),w=zod.z.object({chainId:ze,address:z},{description:"An EVM compatible address on a specific chain."});function Le(e){return e}var ae=zod.z.string().min(1).transform(Le),De=zod.z.object({contract:w,decimals:zod.z.number({description:"The number of decimals of the asset."}).int().nonnegative()});var re=zod.z.object({asset:De,value:d("The amount in the smallest unit of the given asset (e.g. wei for ETH).")},{description:"An amount of a specific asset."});function Ve(e){return e}var L=zod.z.string().min(4).transform(Ve);function Ze(e){return e}var se=zod.z.string().min(9).transform(Ze);var D=(i=>(i.NUMBER="number",i.STRING="string",i.DATE="date",i))(D||{}),_e=zod.z.object({display_type:zod.z.nativeEnum(D).optional(),trait_type:d("The name of the trait.").optional(),value:zod.z.union([zod.z.string(),zod.z.number()]).optional()}).passthrough(),ce=zod.z.object({description:k(zod.z.string({description:"A human-readable description of the item. It could be plain text or markdown."})).optional().nullable().catch(null),external_url:O("This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.").optional().nullable().catch(null),name:zod.z.string({description:"Name of the NFT item."}).optional(),attributes:_e.array().optional().describe("These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.").catch([]),image:O("Marketplaces will store any NFT image here.").optional().nullable().catch(null),animation_url:O("A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.").optional().nullable().catch(null)}).passthrough();var P=(a=>(a.ERC721="ERC721",a.ERC1155="ERC1155",a))(P||{});function Ue(e,n){e.contractType==="ERC1155"&&(e.tokenIds===void 0||e.tokenIds.length===0)&&n.addIssue({code:zod.z.ZodIssueCode.custom,message:"ERC1155 requires at least one token id.",path:[...n.path,"tokenIds"]});}var V=zod.z.object({type:zod.z.literal("NFT_OWNERSHIP"),contract:w,contractType:zod.z.nativeEnum(P),tokenIds:ae.array().min(1).optional().describe("A list of token IDs you want to check ownership of. The list is optional for ERC721, you MUST provide a list of token IDs for ERC1155.")}),E=(h=>(h.EQUAL="EQUAL",h.NOT_EQUAL="NOT_EQUAL",h.GREATER_THAN="GREATER_THAN",h.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",h.LESS_THAN="LESS_THAN",h.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",h))(E||{}),Z=zod.z.object({type:zod.z.literal("ERC20_OWNERSHIP"),amount:re,condition:zod.z.nativeEnum(E)}),_=zod.z.object({type:zod.z.literal("EOA_OWNERSHIP"),address:z}),U=zod.z.object({type:zod.z.literal("PROFILE_OWNERSHIP"),profileId:L}),j=zod.z.object({type:zod.z.literal("FOLLOW"),follow:L}),F=zod.z.object({type:zod.z.literal("COLLECT"),publicationId:se,thisPublication:zod.z.boolean().optional().default(!1)}),G=zod.z.object({type:zod.z.literal("ADVANCED_CONTRACT"),contract:w.describe("The contract address and chain id"),functionName:zod.z.string().min(1).describe("The name of the function you want to call"),abi:zod.z.string().min(1).describe("The contract ABI. Has to be in human readable single string format containing the signature of the function you want to call. See https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info"),params:zod.z.string().array().describe("The parameters to pass to the function. Must be exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays."),comparison:zod.z.nativeEnum(E).describe("The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL"),value:zod.z.string().regex(/^(true|false|\d{1,70})$/).describe("The comparison value. Accepts 'true', 'false' or a number")});function je(e){return zod.z.object({type:zod.z.literal("AND"),criteria:zod.z.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(S,"Should have at least 2 conditions")})}var Fe=je([V,Z,_,U,j,F,G]);function de(e){return zod.z.object({type:zod.z.literal("OR"),criteria:zod.z.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(S,"Should have at least 2 conditions")})}var Ge=de([V,Z,_,U,j,F,G]);function pe(e,n){(e.type==="AND"||e.type==="OR")&&e.criteria.forEach((a,i)=>pe(a,{...n,path:[...n.path,"criteria",i]})),e.type==="NFT_OWNERSHIP"&&Ue(e,n);}var Be=de([Fe,F,G,_,Z,j,V,Ge,U]).superRefine((e,n)=>(e.criteria.forEach((a,i)=>{pe(a,{...n,path:[...n.path,"criteria",i]});}),zod.z.NEVER));function We(e){return e}var He=zod.z.string().describe("A symmetric encryption key.").length(368,"Encryption key should be 368 characters long.").transform(We),Ke=d("An encrypted path is a string of keys separated by . that describe a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).").array().min(1),Je=zod.z.object({provider:zod.z.literal("LIT_PROTOCOL"),encryptionKey:He,accessCondition:Be,encryptedPaths:Ke},{description:"Publication encryption strategy powered by the LIT Protocol."}),le=zod.z.discriminatedUnion("provider",[Je]);var $e=zod.z.object({type:zod.z.literal("Boolean"),key:d("The attribute's unique identifier."),value:zod.z.enum(["true","false"]).describe("A JS boolean value serialized as string. It's consumer responsibility to parse it.")}),qe=zod.z.object({type:zod.z.literal("Date"),key:d("The attribute's unique identifier."),value:zod.z.string().datetime().describe("A valid ISO 8601 date string. It's consumer responsibility to parse it.")}),Qe=zod.z.object({type:zod.z.literal("Number"),key:d("The attribute's unique identifier."),value:d("A valid JS number serialized as string. It's consumer responsibility to parse it.")}),Xe=zod.z.object({type:zod.z.literal("String"),key:d("The attribute's unique identifier."),value:d("A string value.")}),Ye=zod.z.object({type:zod.z.literal("JSON"),key:d("The attribute's unique identifier."),value:d("A JSON string. It's consumer responsibility to validate and parse it.")}),ue=zod.z.discriminatedUnion("type",[$e,qe,Qe,Xe,Ye]);var v=(i=>(i.NSFW="NSFW",i.SENSITIVE="SENSITIVE",i.SPOILER="SPOILER",i))(v||{});zod.z.object({id:d("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:ne.optional().describe("The App Id that this publication belongs to."),hideFromFeed:zod.z.boolean({description:"Determine if the publication should not be shown in any feed."}).optional(),attributes:ue.array().min(1).max(20).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),locale:I,encryptedWith:le.optional(),tags:zod.z.set(R).max(20).catch(e=>e.input).superRefine((e,n)=>{let a=zod.z.array(R).max(20).safeParse(e);if(a.success){let i=[...new Set(a.data)];return a.data.length>i.length&&n.addIssue({code:zod.z.ZodIssueCode.custom,fatal:!0,message:`Duplicate tags are not allowed: ${a.data.join(", ")}`}),zod.z.NEVER}a.error.issues.forEach(i=>{n.addIssue(i);});}).transform(e=>[...e]).optional().describe("An arbitrary list of tags."),contentWarning:zod.z.nativeEnum(v,{description:"Specify a content warning."}).optional()});var q=(a=>(a.V1="1.0.0",a.V2="2.0.0",a))(q||{}),p=(s=>(s[s.ARTICLE="ARTICLE"]="ARTICLE",s[s.AUDIO="AUDIO"]="AUDIO",s[s.EMBED="EMBED"]="EMBED",s[s.IMAGE="IMAGE"]="IMAGE",s[s.LINK="LINK"]="LINK",s[s.SHORT_VIDEO="SHORT_VIDEO"]="SHORT_VIDEO",s[s.TEXT_ONLY="TEXT_ONLY"]="TEXT_ONLY",s[s.VIDEO="VIDEO"]="VIDEO",s))(p||{}),he=(s=>(s.AAC="audio/aac",s.FLAC="audio/flac",s.MP3="audio/mpeg",s.MP4_AUDIO="audio/mp4",s.OGG_AUDIO="audio/ogg",s.WAV="audio/wav",s.WAV_VND="audio/vnd.wave",s.WEBM_AUDIO="audio/webm",s))(he||{}),tt=Object.values(he);function nt(e){return tt.includes(e)}var ye=(c=>(c.BMP="image/bmp",c.GIF="image/gif",c.HEIC="image/heic",c.JPEG="image/jpeg",c.JPG="image/jpg",c.PNG="image/png",c.SVG_XML="image/svg+xml",c.TIFF="image/tiff",c.WEBP="image/webp",c.X_MS_BMP="image/x-ms-bmp",c))(ye||{}),ot=Object.values(ye);function it(e){return ot.includes(e)}var fe=(c=>(c.GLTF="model/gltf+json",c.GLTF_BINARY="model/gltf-binary",c.WEBM="video/webm",c.MP4="video/mp4",c.M4V="video/x-m4v",c.OGV="video/ogv",c.OGG="video/ogg",c.MPEG="video/mpeg",c.QUICKTIME="video/quicktime",c.MOV="video/mov",c))(fe||{}),at=Object.values(fe);function rt(e){return at.includes(e)}var st=zod.z.string({description:"In spec for OpenSea and other providers - also used when using EMBED main publication focusA URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported."}),f=zod.z.object({item:d("Marketplaces will store any NFT image here."),altTag:zod.z.string().optional().nullable().describe("The alt tag for accessibility."),cover:zod.z.string().describe("The cover for any video or audio media.").optional().nullable().catch(null),type:zod.z.string().optional().nullable().describe("This is the mime type of the media.")}).passthrough(),A=zod.z.string({description:"The content of a publication."}).max(3e4);function Q(e){return e==null}function ct(e){return Q(e)||e.length===0}function dt(e){return Q(e)||e.length===0}var be=ce.extend({metadata_id:zod.z.string({description:"The metadata_id can be anything but if your uploading to ipfs you will want it to be random. Using uuid could be an option!"}).catch(()=>uuid.v4()),content:A.transform(e=>e).optional().nullable(),media:f.array().catch(e=>e.input.filter(n=>f.safeParse(n).success)).optional().nullable().describe("This is digi supported attached media items to the publication."),appId:zod.z.string().max(200).transform(N).optional().nullable().describe("The App Id that this publication belongs to."),version:zod.z.nativeEnum(q)}),pt=be.extend({version:zod.z.literal("1.0.0",{description:"The metadata version."})}).superRefine((e,n)=>{dt(e.content)&&Q(e.image)&&ct(e.media)&&(n.addIssue({code:zod.z.ZodIssueCode.custom,path:["content"],message:"At least one between content, image, and media must be present. Content must be over 1 character."}),n.addIssue({code:zod.z.ZodIssueCode.custom,path:["image"],message:"At least one between content, image, and media must be present."}),n.addIssue({code:zod.z.ZodIssueCode.custom,path:["media"],message:"At least one between content, image, and media must be present."}));}),B=zod.z.object({collect:zod.z.object({publicationId:zod.z.string().nullable(),thisPublication:zod.z.boolean().nullable().optional()})}).strict(),W=zod.z.object({eoa:zod.z.object({address:zod.z.string()})}).strict(),H=zod.z.object({follow:zod.z.object({profileId:zod.z.string()})}).strict(),K=zod.z.object({nft:zod.z.object({contractAddress:zod.z.string(),chainID:zod.z.number(),contractType:zod.z.nativeEnum(P),tokenIds:zod.z.string().array().min(1).nullable().optional().catch(null)})}).strict(),J=zod.z.object({profile:zod.z.object({profileId:zod.z.string()})}).strict(),$=zod.z.object({token:zod.z.object({amount:zod.z.coerce.string(),chainID:zod.z.coerce.number(),condition:zod.z.nativeEnum(E),contractAddress:zod.z.string(),decimals:zod.z.coerce.number()})}).strict();function lt(e){return zod.z.object({and:zod.z.object({criteria:zod.z.union(e).array().max(5,"Invalid AND condition: should have at most 5 conditions").refine(S,"Invalid AND condition: should have at least 2 conditions")})}).strict()}function me(e){return zod.z.object({or:zod.z.object({criteria:zod.z.union(e).array().max(5,"Invalid OR condition: should have at most 5 conditions").refine(S,"Invalid OR condition: should have at least 2 conditions")})}).strict()}var ut=me([B,W,H,K,J,$,lt([B,W,H,K,J,$]),me([B,W,H,K,J,$])]),mt=zod.z.object({original:zod.z.object({url:d(),cover:zod.z.string().nullable().optional().catch(null),altTag:zod.z.string().nullable().optional().catch(null),mimeType:zod.z.string().nullable().optional().catch(null)})}).passthrough(),ht=zod.z.object({item:zod.z.string().describe("Marketplaces will store any NFT image here."),altTag:zod.z.string().optional().nullable().describe("The alt tag for accessibility."),cover:zod.z.string().describe("The cover for any video or audio media.").optional().nullable(),type:zod.z.string().optional().nullable().describe("This is the mime type of the media.")}).passthrough().catch(e=>{let n=mt.safeParse(e.input);return n.success?{item:n.data.original.url,altTag:n.data.original.altTag,cover:n.data.original.cover,type:n.data.original.mimeType}:e.input}),yt=zod.z.object({content:zod.z.string().optional().nullable(),media:ht.array().optional().nullable(),image:zod.z.string().optional().nullable(),animation_url:zod.z.string().optional().nullable(),external_url:zod.z.string().optional().nullable()}),ft=zod.z.object({accessCondition:ut,encryptedFields:yt,providerSpecificParams:zod.z.object({encryptionKey:zod.z.string().length(368,"Encryption key should be 368 characters long.")})}),g=be.extend({version:zod.z.literal("2.0.0",{description:"The metadata version."}),locale:I,content:A.transform(C).optional().nullable(),contentWarning:zod.z.nativeEnum(v,{description:"Specify a content warning."}).optional().nullable().catch(null),mainContentFocus:zod.z.nativeEnum(p,{description:"Main content focus that for this publication."}),tags:zod.z.string().array().optional().nullable().describe("Ability to tag your publication."),encryptionParams:ft.optional()}),bt=g.extend({mainContentFocus:zod.z.literal(p.ARTICLE),content:A.min(1).transform(C)}),gt=g.extend({mainContentFocus:zod.z.literal(p.AUDIO),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>nt(n?.type)),`Metadata ${p.AUDIO} requires an audio to be attached.`)}),Tt=g.extend({mainContentFocus:zod.z.literal(p.EMBED),animation_url:st.optional().nullable()}),St=g.extend({mainContentFocus:zod.z.literal(p.IMAGE),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>it(n.type)),`Metadata ${p.IMAGE} requires an image to be attached.`)}),xt=g.extend({mainContentFocus:zod.z.literal(p.LINK),content:A.min(1).refine(e=>e.includes("https://"),`Metadata ${p.LINK} requires a valid https link`).transform(e=>e)}),Et=g.extend({mainContentFocus:zod.z.literal(p.TEXT_ONLY),content:A.min(1).transform(e=>e),media:zod.z.any().array().max(0,{message:"Metadata TEXT cannot have media"}).optional().nullable()}),ge=g.extend({mainContentFocus:zod.z.union([zod.z.literal(p.VIDEO),zod.z.literal(p.SHORT_VIDEO)]),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>rt(n.type)),`Metadata ${p.VIDEO} requires an image to be attached.`)}),At=ge.extend({mainContentFocus:zod.z.literal(p.VIDEO)}),It=ge.extend({mainContentFocus:zod.z.literal(p.SHORT_VIDEO)}),Ct=zod.z.discriminatedUnion("mainContentFocus",[bt,gt,Tt,St,xt,Et,At,It]).transform(e=>e.mainContentFocus===p.VIDEO&&e.appId==="digitube-bytes"?{...e,mainContentFocus:p.SHORT_VIDEO}:e),Cn=zod.z.object({version:zod.z.nativeEnum(q)}).passthrough().transform((e,n)=>{switch(e.version){case"1.0.0":let a=pt.safeParse(e);return a.success?a.data:(a.error.issues.forEach(m=>{n.addIssue(m);}),zod.z.NEVER);case"2.0.0":let i=Ct.safeParse(e);return i.success?i.data:(i.error.issues.forEach(m=>{n.addIssue(m);}),zod.z.NEVER)}}); + +exports.AudioMimeType = he; +exports.ConditionComparisonOperator = E; +exports.EncryptedMediaSchema = ht; +exports.EncryptionParamsSchema = ft; +exports.ImageMimeType = ye; +exports.MarketplaceMetadataAttributeDisplayType = D; +exports.MediaSchema = f; +exports.NftContractType = P; +exports.ProfileMetadataAttributeDisplayType = Se; +exports.ProfileMetadataSchema = Pt; +exports.PublicationContentWarning = v; +exports.PublicationMainFocus = p; +exports.PublicationMetadataSchema = Cn; +exports.PublicationMetadataV1Schema = pt; +exports.PublicationMetadataV2Schema = Ct; +exports.PublicationMetadataVersion = q; +exports.VideoMimeType = fe; +//# sourceMappingURL=out.js.map +//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/dist/legacy/index.cjs.map b/dist/legacy/index.cjs.map new file mode 100644 index 00000000..30e205cf --- /dev/null +++ b/dist/legacy/index.cjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/legacy/profile.ts","../../src/legacy/publication.ts","../../src/marketplace.ts","../../src/primitives.ts","../../src/utils.ts","../../src/publication/common/index.ts","../../src/publication/common/encryption.ts","../../src/MetadataAttribute.ts"],"names":["v4","z","ProfileMetadataAttributeDisplayType","serializeValue","value","ProfileMetadataAttributeSchema","ProfileMetadataSchema","hasTwoOrMore","items","toLocale","localeRegex","localeLikeRegex","LocaleRegexSchema","LocaleSchema","ctx","match","val","exact","issue","toEncryptedString","allFailed","results","r","EncryptedStringSchema","encryptable","schema","options","s","nonEmpty","result","nonEmptyStringSchema","description","encryptableStringSchema","TagSchema","toAppId","AppIdSchema","toSignature","SignatureSchema","toMarkdown","markdown","toUri","uriSchema","geoUriRegex","LatitudeSchema","LongitudeSchema","GeoURISchema","latitude","longitude","latResult","lngResult","GeoPointSchema","PhysicalAddressSchema","toEvmAddress","EvmAddressSchema","toChainId","ChainIdSchema","NetworkAddressSchema","toTokenId","TokenIdSchema","AssetSchema","AmountSchema","toProfileId","ProfileIdSchema","toPublicationId","PublicationIdSchema","MarketplaceMetadataAttributeDisplayType","MarketplaceMetadataAttributeSchema","MarketplaceMetadataSchema","NftContractType","refineNftOwnershipCondition","condition","NftOwnershipConditionSchema","ConditionComparisonOperator","Erc20OwnershipConditionSchema","EoaOwnershipConditionSchema","ProfileOwnershipConditionSchema","FollowConditionSchema","CollectConditionSchema","AdvancedContractConditionSchema","andConditionSchema","AndConditionSchema","orConditionSchema","OrConditionSchema","refineAnyCondition","c","idx","AccessConditionSchema","root","toLitEncryptionKey","LitEncryptionKeySchema","EncryptedPaths","LitEncryptionStrategySchema","PublicationEncryptionStrategySchema","BooleanAttributeSchema","DateAttributeSchema","NumberAttributeSchema","StringAttributeSchema","JSONAttributeSchema","MetadataAttributeSchema","PublicationContentWarning","PublicationMetadataCommonSchema","input","uniqueTags","PublicationMetadataVersion","PublicationMainFocus","AudioMimeType","supportedAudioMimeTypes","isSupportedAudioMimeTypes","ImageMimeType","supportedImageMimeTypes","isSupportedImageMimeType","VideoMimeType","supportedVideoMimeTypes","isSupportedVideoMimeType","AnimationUrlSchema","MediaSchema","ContentSchema","isNullish","isEmptyArray","isEmptyString","PublicationCommonSchema","media","PublicationMetadataV1Schema","data","EoaOwnershipSchema","NftOwnershipSchema","ProfileOwnershipSchema","Erc20OwnershipSchema","andCondition","orCondition","EncryptedMediaWithWrongShapeSchema","EncryptedMediaSchema","EncryptedFieldsSchema","EncryptionParamsSchema","PublicationMetadataV2CommonSchema","PublicationMetadataV2ArticleSchema","PublicationMetadataV2AudioSchema","PublicationMetadataV2EmbedSchema","PublicationMetadataV2ImageSchema","PublicationMetadataV2LinkSchema","PublicationMetadataV2TextOnlySchema","PublicationMetadataV2BaseVideoSchema","PublicationMetadataV2VideoSchema","PublicationMetadataV2ShortVideoSchema","PublicationMetadataV2Schema","PublicationMetadataSchema","v1Result","v2Result"],"mappings":"AAAA,OAAS,MAAAA,OAAU,OACnB,OAAS,KAAAC,MAAS,MAEX,IAAKC,QACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,QAAA,IAMZ,SA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OAAO,CACxF,iBAAkB5I,EAAE,QAAQuG,EAAqB,WAAW,CAC9D,CAAC,EASYwC,GAA8B/I,EACxC,mBAAmB,mBAAoB,CACtCsI,GACAC,GACAC,GACAC,GACAC,GACAC,GACAE,GACAC,EACF,CAAC,EACA,UAAWpB,GACNA,EAAK,mBAAqBnB,EAAqB,OAASmB,EAAK,QAAU,iBAClE,CACL,GAAGA,EACH,iBAAkBnB,EAAqB,WACzC,EAEKmB,CACR,EA0BUsB,GAAkFhJ,EAC5F,OAAO,CAEN,QAASA,EAAE,WAAWsG,CAA0B,CAClD,CAAC,EACA,YAAY,EACZ,UAAU,CAACoB,EAAM7G,IAAQ,CACxB,OAAQ6G,EAAK,QAAS,CACpB,IAAK,QACH,IAAMuB,EAAWxB,GAA4B,UAAUC,CAAI,EAE3D,OAAKuB,EAAS,QAMPA,EAAS,MALdA,EAAS,MAAM,OAAO,QAAShI,GAAU,CACvCJ,EAAI,SAASI,CAAK,CACpB,CAAC,EACMjB,EAAE,OAIb,IAAK,QACH,IAAMkJ,EAAWH,GAA4B,UAAUrB,CAAI,EAE3D,OAAKwB,EAAS,QAOPA,EAAS,MANdA,EAAS,MAAM,OAAO,QAASjI,GAAU,CACvCJ,EAAI,SAASI,CAAK,CACpB,CAAC,EACMjB,EAAE,MAIf,CACF,CAAC","sourcesContent":["import { v4 } from 'uuid';\nimport { z } from 'zod';\n\nexport enum ProfileMetadataAttributeDisplayType {\n number = 'number',\n string = 'string',\n date = 'date',\n}\n\nfunction serializeValue(value: unknown): string {\n if (!value) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n\n return JSON.stringify(value);\n}\n\nconst ProfileMetadataAttributeSchema = z.object({\n // On the paper ProfileMetadataAttributeDisplayType but validation never checked for it\n // so to avoid breaking changes we are keeping it as string\n displayType: z.string().nullable().optional().catch(null),\n\n traitType: z.string().nullable().optional().catch(null),\n\n value: z.unknown().transform(serializeValue),\n\n key: z.unknown().transform(serializeValue),\n});\nexport type ProfileMetadataAttribute = z.infer;\n\n/**\n * Profile Metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * legacy.ProfileMetadataSchema.parse(valid); // => legacy.ProfileMetadata\n *\n * legacy.ProfileMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * legacy.ProfileMetadataSchema.safeParse(valid);\n * // => { success: true, data: legacy.ProfileMetadata }\n *\n * legacy.ProfileMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const ProfileMetadataSchema = z\n .object({\n version: z.literal('1.0.0').describe('The metadata version.').catch('1.0.0'),\n\n metadata_id: z\n .string({\n description:\n 'The metadata id can be anything but if your uploading to ipfs ' +\n 'you will want it to be random. Using uuid could be an option!',\n })\n .catch(() => v4()),\n\n name: z.string({ description: 'The display name for the profile.' }).nullable().catch(null),\n\n bio: z.string({ description: 'The bio for the profile.' }).nullable().optional().catch(null),\n\n cover_picture: z.string({ description: 'Cover picture.' }).nullable().optional().catch(null),\n\n attributes: ProfileMetadataAttributeSchema.array()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',\n )\n .optional(),\n })\n .passthrough(); // make it more loose to allow for past profile metadata\n\nexport type ProfileMetadata = z.infer;\n","/* eslint-disable no-case-declarations */\nimport { v4 } from 'uuid';\nimport { z } from 'zod';\n\nimport { MarketplaceMetadataSchema } from '../marketplace.js';\nimport {\n LocaleSchema,\n Markdown,\n nonEmptyStringSchema,\n toAppId,\n toMarkdown,\n} from '../primitives.js';\nimport * as latest from '../publication';\nimport {\n ConditionComparisonOperator,\n NftContractType,\n PublicationContentWarning,\n} from '../publication/common';\nimport { hasTwoOrMore } from '../utils.js';\n\n// re-export under legacy namespace\nexport { ConditionComparisonOperator, NftContractType, PublicationContentWarning };\nexport { MarketplaceMetadataAttributeDisplayType } from '../marketplace.js';\nexport type { MarketplaceMetadataAttribute, MarketplaceMetadata } from '../marketplace.js';\nexport type * from '../primitives.js';\n\nexport enum PublicationMetadataVersion {\n V1 = '1.0.0',\n V2 = '2.0.0',\n}\n\nexport enum PublicationMainFocus {\n ARTICLE = latest.PublicationMainFocus.ARTICLE,\n AUDIO = latest.PublicationMainFocus.AUDIO,\n EMBED = latest.PublicationMainFocus.EMBED,\n IMAGE = latest.PublicationMainFocus.IMAGE,\n LINK = latest.PublicationMainFocus.LINK,\n SHORT_VIDEO = latest.PublicationMainFocus.SHORT_VIDEO,\n TEXT_ONLY = latest.PublicationMainFocus.TEXT_ONLY,\n VIDEO = latest.PublicationMainFocus.VIDEO,\n}\n\nexport enum AudioMimeType {\n AAC = 'audio/aac',\n FLAC = 'audio/flac',\n MP3 = 'audio/mpeg',\n MP4_AUDIO = 'audio/mp4',\n OGG_AUDIO = 'audio/ogg',\n WAV = 'audio/wav',\n WAV_VND = 'audio/vnd.wave',\n WEBM_AUDIO = 'audio/webm',\n}\n\nconst supportedAudioMimeTypes = Object.values(AudioMimeType);\n\nfunction isSupportedAudioMimeTypes(value: unknown): value is AudioMimeType {\n return supportedAudioMimeTypes.includes(value as AudioMimeType);\n}\n\nexport enum ImageMimeType {\n BMP = 'image/bmp',\n GIF = 'image/gif',\n HEIC = 'image/heic',\n JPEG = 'image/jpeg',\n JPG = 'image/jpg',\n PNG = 'image/png',\n SVG_XML = 'image/svg+xml',\n TIFF = 'image/tiff',\n WEBP = 'image/webp',\n X_MS_BMP = 'image/x-ms-bmp',\n}\n\nconst supportedImageMimeTypes = Object.values(ImageMimeType);\n\nfunction isSupportedImageMimeType(value: unknown): value is ImageMimeType {\n return supportedImageMimeTypes.includes(value as ImageMimeType);\n}\n\nexport enum VideoMimeType {\n GLTF = 'model/gltf+json',\n GLTF_BINARY = 'model/gltf-binary',\n WEBM = 'video/webm',\n MP4 = 'video/mp4',\n M4V = 'video/x-m4v',\n OGV = 'video/ogv',\n OGG = 'video/ogg',\n MPEG = 'video/mpeg',\n QUICKTIME = 'video/quicktime',\n MOV = 'video/mov',\n}\n\nconst supportedVideoMimeTypes = Object.values(VideoMimeType);\n\nfunction isSupportedVideoMimeType(value: unknown): value is VideoMimeType {\n return supportedVideoMimeTypes.includes(value as VideoMimeType);\n}\n\nconst AnimationUrlSchema = z.string({\n description:\n 'In spec for OpenSea and other providers - also used when using EMBED main publication focus' +\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n});\n\n// const OpenSeaSchema = z\n// .object({\n// description: z\n// .string({\n// description:\n// 'A human-readable description of the item. It could be plain text or markdown.',\n// })\n// .optional()\n// .nullable()\n// .catch(null),\n\n// external_url: z\n// .string({\n// description:\n// `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n// 'and will allow users to leave OpenSea and view the item on the site.',\n// })\n// .optional()\n// .nullable(),\n\n// name: z.string({ description: 'Name of the NFT item.' }),\n\n// attributes: MarketplaceMetadataAttributeSchema.array()\n// .describe(\n// 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n// )\n// .catch([]),\n\n// image: z\n// .string({\n// description: 'Marketplaces will store any NFT image here.',\n// })\n// .optional()\n// .nullable()\n// .catch(null),\n\n// animation_url: AnimationUrlSchema.optional().nullable(),\n\n// version: z.nativeEnum(PublicationMetadataVersion),\n// })\n// .passthrough(); // loose validation for any unknown fields\n\n/**\n * @internal\n */\nexport const MediaSchema = z\n .object({\n item: nonEmptyStringSchema('Marketplaces will store any NFT image here.'), // it can be `This publication is gated.`\n altTag: z.string().optional().nullable().describe('The alt tag for accessibility.'),\n cover: z\n .string() // it can be `This publication is gated.`\n .describe('The cover for any video or audio media.')\n .optional()\n .nullable()\n .catch(null),\n type: z.string().optional().nullable().describe('This is the mime type of the media.'),\n })\n .passthrough(); // loose validation for media\nexport type Media = z.infer;\n/**\n * @deprecated Use `Media` instead.\n */\nexport type PublicationMetadataMedia = Media;\n\nconst ContentSchema = z\n .string({\n description: 'The content of a publication.',\n })\n .max(30000);\n\nfunction isNullish(value: unknown): value is null | undefined {\n return value === null || value === undefined;\n}\n\nfunction isEmptyArray(value: T[] | null | undefined): value is [] | null | undefined {\n return isNullish(value) || value.length === 0;\n}\n\nfunction isEmptyString(value: string | null | undefined): value is '' | null | undefined {\n return isNullish(value) || value.length === 0;\n}\n\nconst PublicationCommonSchema = MarketplaceMetadataSchema.extend({\n metadata_id: z\n .string({\n description:\n 'The metadata_id can be anything but if your uploading to ipfs ' +\n 'you will want it to be random. Using uuid could be an option!',\n })\n .catch(() => v4()),\n\n content: ContentSchema.transform((value) => value as Markdown)\n .optional()\n .nullable(),\n\n media: MediaSchema.array()\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .optional()\n .nullable()\n .describe('This is digi supported attached media items to the publication.'),\n\n // bespoke z.string() instead of AppIdSchema to emulate past behavior\n appId: z\n .string()\n .max(200)\n .transform(toAppId)\n .optional()\n .nullable()\n .describe('The App Id that this publication belongs to.'),\n\n version: z.nativeEnum(PublicationMetadataVersion),\n});\n\n/**\n * @internal\n */\nexport const PublicationMetadataV1Schema = PublicationCommonSchema.extend({\n version: z.literal(PublicationMetadataVersion.V1, { description: 'The metadata version.' }),\n}).superRefine((data, ctx) => {\n if (isEmptyString(data.content) && isNullish(data.image) && isEmptyArray(data.media)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['content'],\n message:\n 'At least one between content, image, and media must be present. ' +\n 'Content must be over 1 character.',\n });\n\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['image'],\n message: 'At least one between content, image, and media must be present.',\n });\n\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['media'],\n message: 'At least one between content, image, and media must be present.',\n });\n }\n});\nexport type PublicationMetadataV1 = z.infer;\n\nconst CollectConditionSchema = z\n .object({\n collect: z.object({\n publicationId: z.string().nullable(),\n thisPublication: z.boolean().nullable().optional(),\n }),\n })\n .strict();\nexport type CollectCondition = z.infer;\n\nconst EoaOwnershipSchema = z\n .object({\n eoa: z.object({\n address: z.string(),\n }),\n })\n .strict();\nexport type EoaOwnership = z.infer;\n\nconst FollowConditionSchema = z\n .object({\n follow: z.object({\n profileId: z.string(),\n }),\n })\n .strict();\nexport type FollowCondition = z.infer;\n\nconst NftOwnershipSchema = z\n .object({\n nft: z.object({\n contractAddress: z.string(),\n chainID: z.number(),\n contractType: z.nativeEnum(NftContractType),\n tokenIds: z.string().array().min(1).nullable().optional().catch(null),\n }),\n })\n .strict();\n\nexport type NftOwnership = z.infer;\n\nconst ProfileOwnershipSchema = z\n .object({\n profile: z.object({\n profileId: z.string(),\n }),\n })\n .strict();\nexport type ProfileOwnership = z.infer;\n\nconst Erc20OwnershipSchema = z\n .object({\n token: z.object({\n amount: z.coerce.string(),\n chainID: z.coerce.number(),\n condition: z.nativeEnum(ConditionComparisonOperator),\n contractAddress: z.string(),\n decimals: z.coerce.number(),\n }),\n })\n .strict();\nexport type Erc20Ownership = z.infer;\n\nexport type AndCondition = {\n and: {\n criteria: [T, T, ...T[]];\n };\n};\n\nfunction andCondition<\n Criteria extends [z.ZodType, z.ZodType, ...z.ZodType[]],\n>(options: Criteria): z.Schema>, z.ZodTypeDef, object> {\n return z\n .object({\n and: z.object({\n criteria: z\n .union(options)\n .array()\n .max(5, 'Invalid AND condition: should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Invalid AND condition: should have at least 2 conditions'),\n }),\n })\n .strict();\n}\n\nexport type OrCondition = {\n or: {\n criteria: [T, T, ...T[]];\n };\n};\n\nfunction orCondition<\n Criteria extends [z.ZodType, z.ZodType, ...z.ZodType[]],\n>(options: Criteria): z.Schema>, z.ZodTypeDef, object> {\n return z\n .object({\n or: z.object({\n criteria: z\n .union(options)\n .array()\n .max(5, 'Invalid OR condition: should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Invalid OR condition: should have at least 2 conditions'),\n }),\n })\n .strict();\n}\n\nconst AccessConditionSchema = orCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n andCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n ]),\n orCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n ]),\n]);\nexport type AccessCondition = z.infer;\n\nconst EncryptedMediaWithWrongShapeSchema = z\n .object({\n original: z.object({\n url: nonEmptyStringSchema(),\n cover: z.string().nullable().optional().catch(null),\n altTag: z.string().nullable().optional().catch(null),\n mimeType: z.string().nullable().optional().catch(null),\n }),\n })\n .passthrough();\n\n/**\n * @internal\n */\nexport const EncryptedMediaSchema = z\n .object({\n item: z.string().describe('Marketplaces will store any NFT image here.'),\n altTag: z.string().optional().nullable().describe('The alt tag for accessibility.'),\n cover: z.string().describe('The cover for any video or audio media.').optional().nullable(),\n type: z.string().optional().nullable().describe('This is the mime type of the media.'),\n })\n .passthrough()\n .catch((ctx) => {\n const result = EncryptedMediaWithWrongShapeSchema.safeParse(ctx.input);\n\n if (result.success) {\n return {\n item: result.data.original.url,\n altTag: result.data.original.altTag,\n cover: result.data.original.cover,\n type: result.data.original.mimeType,\n };\n }\n\n return ctx.input;\n });\nexport type EncryptedMedia = z.infer;\n\nconst EncryptedFieldsSchema = z.object({\n content: z.string().optional().nullable(),\n media: EncryptedMediaSchema.array().optional().nullable(),\n image: z.string().optional().nullable(),\n animation_url: z.string().optional().nullable(),\n external_url: z.string().optional().nullable(),\n});\nexport type EncryptedFields = z.infer;\n\n/**\n * @internal\n */\nexport const EncryptionParamsSchema = z.object({\n accessCondition: AccessConditionSchema,\n encryptedFields: EncryptedFieldsSchema,\n providerSpecificParams: z.object({\n encryptionKey: z.string().length(368, 'Encryption key should be 368 characters long.'),\n }),\n});\nexport type EncryptionParams = z.infer;\n\nconst PublicationMetadataV2CommonSchema = PublicationCommonSchema.extend({\n version: z.literal(PublicationMetadataVersion.V2, { description: 'The metadata version.' }),\n\n locale: LocaleSchema,\n\n content: ContentSchema.transform(toMarkdown).optional().nullable(),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional()\n .nullable()\n .catch(null),\n\n mainContentFocus: z.nativeEnum(PublicationMainFocus, {\n description: 'Main content focus that for this publication.',\n }),\n\n tags: z.string().array().optional().nullable().describe('Ability to tag your publication.'),\n\n encryptionParams: EncryptionParamsSchema.optional(),\n});\n\nconst PublicationMetadataV2ArticleSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.ARTICLE),\n\n content: ContentSchema.min(1).transform(toMarkdown),\n});\nexport type PublicationMetadataV2Article = z.infer;\n\nconst PublicationMetadataV2AudioSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.AUDIO),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedAudioMimeTypes(media?.type)),\n `Metadata ${PublicationMainFocus.AUDIO} requires an audio to be attached.`,\n ),\n});\nexport type PublicationMetadataV2Audio = z.infer;\n\nconst PublicationMetadataV2EmbedSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.EMBED),\n\n animation_url: AnimationUrlSchema.optional().nullable(), // should not really be null but some publications have it as null\n});\nexport type PublicationMetadataV2Embed = z.infer;\n\nconst PublicationMetadataV2ImageSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.IMAGE),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedImageMimeType(media.type)),\n `Metadata ${PublicationMainFocus.IMAGE} requires an image to be attached.`,\n ),\n});\nexport type PublicationMetadataV2Image = z.infer;\n\nconst PublicationMetadataV2LinkSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.LINK),\n\n content: ContentSchema.min(1)\n .refine(\n (value) => value.includes('https://'),\n `Metadata ${PublicationMainFocus.LINK} requires a valid https link`,\n )\n .transform((value) => value as Markdown),\n});\nexport type PublicationMetadataV2Link = z.infer;\n\nconst PublicationMetadataV2TextOnlySchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.TEXT_ONLY),\n\n content: ContentSchema.min(1).transform((value) => value as Markdown),\n\n media: z\n .any()\n .array()\n .max(0, { message: 'Metadata TEXT cannot have media' })\n .optional()\n .nullable(),\n});\nexport type PublicationMetadataV2TextOnly = z.infer;\n\nconst PublicationMetadataV2BaseVideoSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.union([\n z.literal(PublicationMainFocus.VIDEO),\n z.literal(PublicationMainFocus.SHORT_VIDEO),\n ]),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedVideoMimeType(media.type)),\n `Metadata ${PublicationMainFocus.VIDEO} requires an image to be attached.`,\n ),\n});\nconst PublicationMetadataV2VideoSchema = PublicationMetadataV2BaseVideoSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.VIDEO),\n});\nconst PublicationMetadataV2ShortVideoSchema = PublicationMetadataV2BaseVideoSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.SHORT_VIDEO),\n});\n\nexport type PublicationMetadataV2Video =\n | z.infer\n | z.infer;\n\n/**\n * @internal\n */\nexport const PublicationMetadataV2Schema = z\n .discriminatedUnion('mainContentFocus', [\n PublicationMetadataV2ArticleSchema,\n PublicationMetadataV2AudioSchema,\n PublicationMetadataV2EmbedSchema,\n PublicationMetadataV2ImageSchema,\n PublicationMetadataV2LinkSchema,\n PublicationMetadataV2TextOnlySchema,\n PublicationMetadataV2VideoSchema,\n PublicationMetadataV2ShortVideoSchema,\n ])\n .transform((data) => {\n if (data.mainContentFocus === PublicationMainFocus.VIDEO && data.appId === 'digitube-bytes') {\n return {\n ...data,\n mainContentFocus: PublicationMainFocus.SHORT_VIDEO,\n };\n }\n return data;\n });\nexport type PublicationMetadataV2 = z.infer;\n\nexport type PublicationMetadata = PublicationMetadataV1 | PublicationMetadataV2;\n\n/**\n * A union of Publication Metadata v1 ad v2.\n *\n * @example\n * with `parse`:\n * ```ts\n * legacy.PublicationMetadataSchema.parse(valid); // => legacy.PublicationMetadata\n *\n * legacy.PublicationMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * legacy.PublicationMetadataSchema.safeParse(valid);\n * // => { success: true, data: legacy.PublicationMetadata }\n *\n * legacy.PublicationMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const PublicationMetadataSchema: z.ZodType = z\n .object({\n // although not optional it will allow the refine function to provide better error message\n version: z.nativeEnum(PublicationMetadataVersion),\n })\n .passthrough()\n .transform((data, ctx) => {\n switch (data.version) {\n case PublicationMetadataVersion.V1:\n const v1Result = PublicationMetadataV1Schema.safeParse(data);\n\n if (!v1Result.success) {\n v1Result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n return v1Result.data;\n\n case PublicationMetadataVersion.V2:\n const v2Result = PublicationMetadataV2Schema.safeParse(data);\n\n if (!v2Result.success) {\n v2Result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return v2Result.data;\n }\n });\n","import { z } from 'zod';\n\nimport { Markdown, URI, markdown, nonEmptyStringSchema, uriSchema } from './primitives.js';\n\n/**\n * The display type of a marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport enum MarketplaceMetadataAttributeDisplayType {\n NUMBER = 'number',\n STRING = 'string',\n DATE = 'date',\n}\n\n/**\n * A marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport type MarketplaceMetadataAttribute = {\n value?: string | number | undefined;\n display_type?: MarketplaceMetadataAttributeDisplayType | undefined;\n trait_type?: string | undefined;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataAttributeSchema: z.ZodType<\n MarketplaceMetadataAttribute,\n z.ZodTypeDef,\n object\n> = z\n .object({\n display_type: z.nativeEnum(MarketplaceMetadataAttributeDisplayType).optional(),\n trait_type: nonEmptyStringSchema('The name of the trait.').optional(),\n value: z.union([z.string(), z.number()]).optional(),\n })\n .passthrough(); // make it more loose to allow for future marketplace extensions\n\n/**\n * The metadata standard for marketplace(s).\n *\n * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure\n */\nexport type MarketplaceMetadata = {\n /**\n * A human-readable description of the item. It could be plain text or markdown.\n */\n description?: Markdown | null;\n /**\n * This is the URL that will appear below the asset's image on OpenSea and others etc.\n * and will allow users to leave OpenSea and view the item on the site.\n */\n external_url?: URI | null;\n /**\n * Name of the NFT item.\n */\n name?: string;\n /**\n * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\n attributes?: MarketplaceMetadataAttribute[];\n /**\n * Marketplaces will store any NFT image here.\n */\n image?: URI | null;\n /**\n * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV,\n * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas,\n * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.\n */\n animation_url?: URI | null;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataSchema = z\n .object({\n description: markdown(\n z.string({\n description:\n 'A human-readable description of the item. It could be plain text or markdown.',\n }),\n )\n .optional()\n .nullable()\n .catch(null),\n\n external_url: uriSchema(\n `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n 'and will allow users to leave OpenSea and view the item on the site.',\n )\n .optional()\n .nullable()\n .catch(null),\n\n name: z.string({ description: 'Name of the NFT item.' }).optional(),\n\n attributes: MarketplaceMetadataAttributeSchema.array()\n .optional()\n .describe(\n 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n )\n .catch([]),\n\n image: uriSchema('Marketplaces will store any NFT image here.')\n .optional()\n .nullable()\n .catch(null),\n\n animation_url: uriSchema(\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n )\n .optional()\n .nullable()\n .catch(null),\n })\n .passthrough(); // loose validation for any unknown fields;\n","import { z } from 'zod';\n\nimport { formatZodError } from './formatters.js';\nimport { Brand, invariant, never } from './utils.js';\n\n/**\n * A locale identifier.\n *\n * Syntax: [language]-[region] where:\n * - [language] is a lowercase ISO 639-1 language code\n * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code\n *\n * You can pass just the language code, or both the language and region codes.\n *\n * @example\n * - `en` any English\n * - `en-US` English as used in the United States\n * - `en-GB` English as used in the United Kingdom\n */\nexport type Locale = Brand;\n/**\n * @internal\n */\nexport function toLocale(value: string): Locale {\n return value as Locale;\n}\n\n// using ranges instead of `i` flag so that resulting JSON Schema includes case-insensitivity.\nconst localeRegex = /^[a-z]{2}(?:-[a-zA-Z]{2})?$/;\nconst localeLikeRegex = /^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i;\n\nconst LocaleRegexSchema = z\n .string({\n description:\n 'A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n })\n .regex(\n localeRegex,\n 'Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n );\n\n/**\n * @internal\n */\nexport const LocaleSchema: z.ZodType = LocaleRegexSchema.catch(\n (ctx) => {\n // attempts to recover the language code at least\n const match = localeLikeRegex.exec(ctx.input);\n if (match) {\n return match[1] as string;\n }\n return ctx.input;\n },\n)\n .superRefine((val, ctx): val is Locale => {\n const exact = LocaleRegexSchema.safeParse(val);\n\n if (!exact.success) {\n exact.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n return z.NEVER;\n })\n .transform(toLocale);\n\n/**\n * A base64 encoded encrypted string value.\n */\nexport type EncryptedString = Brand;\nfunction toEncryptedString(value: string): EncryptedString {\n return value as EncryptedString;\n}\n\nfunction allFailed(\n results: z.SafeParseReturnType[],\n): results is z.SafeParseError[] {\n return results.every((r) => !r.success);\n}\n/**\n * @internal\n */\nexport const EncryptedStringSchema = z\n .string()\n .describe('An encrypted value.')\n .regex(\n /^\\S+$/, // Approximation of Lit Encrypted value\n 'Should be a valid encrypted value.',\n )\n .transform(toEncryptedString);\n\n/**\n * Modifies a schema to accept an encrypted string value as well as its decrypted version.\n *\n * @internal\n */\nexport function encryptable(schema: z.ZodType) {\n const options = [schema, EncryptedStringSchema] as const;\n return z\n .union(options)\n .catch((ctx) => ctx.input as T)\n .superRefine((val, ctx): val is T | EncryptedString => {\n const results = options.map((s) => s.safeParse(val));\n\n if (allFailed(results)) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union,\n unionErrors: results.map((r) => r.error),\n });\n }\n return z.NEVER;\n });\n}\n\n/**\n * @internal\n */\nexport function nonEmpty(schema: z.ZodString): z.ZodType {\n return z.preprocess((val, ctx) => {\n const result = z.string().safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return result.data\n .replace(\n // eslint-disable-next-line no-control-regex\n /^[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*/,\n '',\n )\n .replace(\n // eslint-disable-next-line no-control-regex\n /[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*$/,\n '',\n )\n .trim();\n }, schema.min(1));\n}\n/**\n * @internal\n */\nexport function nonEmptyStringSchema(description?: string) {\n return nonEmpty(z.string({ description }));\n}\n/**\n * @internal\n */\nexport function encryptableStringSchema(description: string) {\n return encryptable(nonEmptyStringSchema(description));\n}\n\n/**\n * An arbitrary string or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableString = string | EncryptedString;\n\n/**\n * An arbitrary label.\n *\n * All lowercased, 50 characters max.\n */\nexport type Tag = Brand;\n/**\n * @internal\n */\nexport function toTag(value: string): Tag {\n return value as Tag;\n}\n/**\n * @internal\n */\nexport const TagSchema: z.ZodType = z\n .string()\n .describe('An arbitrary tag.')\n .min(1)\n .max(50)\n .transform((value) => toTag(value.toLowerCase()));\n\n/**\n * A unique DiGi App identifier.\n */\nexport type AppId = Brand;\n/**\n * @internal\n */\nexport function toAppId(value: string): AppId {\n return value as AppId;\n}\n/**\n * @internal\n */\nexport const AppIdSchema: z.ZodType = z\n .string()\n .describe('A DiGi App identifier.')\n .min(1)\n .max(200)\n .transform(toAppId);\n\n/**\n * A cryptographic signature.\n */\nexport type Signature = Brand;\n/**\n * @internal\n */\nexport function toSignature(value: string): Signature {\n return value as Signature;\n}\n/**\n * @internal\n */\nexport const SignatureSchema: z.ZodType = z\n .string()\n .min(1)\n .describe('A cryptographic signature of the DiGi metadata.')\n .transform(toSignature);\n\n/**\n * A markdown text.\n */\nexport type Markdown = Brand;\n/**\n * @internal\n */\nexport function toMarkdown(value: string): Markdown {\n return value as Markdown;\n}\n\n/**\n * @internal\n */\nexport function markdown(\n schema: z.ZodType,\n): z.ZodType {\n return schema.transform(toMarkdown);\n}\n\n/**\n * A markdown text or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableMarkdown = Markdown | EncryptedString;\n\n/**\n * A Uniform Resource Identifier.\n *\n * It could be a URL pointing to a specific resource,\n * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...).\n */\nexport type URI = Brand;\n/**\n * @internal\n */\nexport function toUri(value: string): URI {\n return value as URI;\n}\n/**\n * @internal\n */\nexport function uriSchema(\n description: string = 'A Uniform Resource Identifier. ',\n): z.ZodType {\n return z\n .string({ description })\n .min(6) // [ar://.]\n .url({ message: 'Should be a valid URI' }) // reads url() but works well with URIs too and uses format: 'uri' in the JSON schema\n .transform(toUri);\n}\n/**\n * @internal\n */\nexport function encryptableUriSchema(description?: string) {\n return encryptable(uriSchema(description));\n}\n\n/**\n * A URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableURI = URI | EncryptedString;\n\nconst geoUriRegex = /^geo:(-?\\d+\\.?\\d*),(-?\\d+\\.?\\d*)$/;\n\nconst LatitudeSchema = z.coerce.number({ description: 'The latitude.' }).min(-90).max(90);\n\nconst LongitudeSchema = z.coerce.number({ description: 'The longitude.' }).min(-180).max(180);\n\n/**\n * A Geographic coordinate as subset of Geo URI (RFC 5870).\n *\n * Currently only supports the `geo:lat,lng` format.\n *\n * Use the {@link geoUri} helper to create one, do not attempt to create one manually.\n *\n * @example\n * ```ts\n * 'geo:40.689247,-74.044502'\n *\n * 'geo:41.890209,12.492231'\n * ```\n *\n * @see https://tools.ietf.org/html/rfc5870\n */\nexport type GeoURI = `geo:${number},${number}`;\n/**\n * @internal\n */\nexport const GeoURISchema = z\n .string()\n .describe(\n 'A Geographic coordinate as subset of Geo URI (RFC 5870). ' +\n 'Currently only supports the `geo:lat,lng` format.',\n )\n .regex(geoUriRegex, 'Should be a Geo URI. Expected `geo:lat,lng`.')\n .superRefine((val, ctx): val is GeoURI => {\n const match = geoUriRegex.exec(val);\n\n if (!match) {\n // should never happen\n return z.NEVER;\n }\n\n const [, latitude = '', longitude = ''] = match;\n\n const latResult = LatitudeSchema.safeParse(latitude);\n if (!latResult.success) {\n latResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lat'],\n }),\n );\n }\n\n const lngResult = LongitudeSchema.safeParse(longitude);\n if (!lngResult.success) {\n lngResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lng'],\n }),\n );\n }\n\n return z.NEVER;\n });\n\n/**\n * A geographic point on the Earth.\n */\nexport type GeoPoint = {\n /**\n * The latitude in decimal degrees (from -90° to +90°).\n */\n lat: number;\n\n /**\n * The longitude in decimal degrees (from -180° to +180°).\n */\n lng: number;\n};\n/**\n * @internal\n */\nexport const GeoPointSchema: z.ZodType = z.object({\n lat: LatitudeSchema,\n lng: LongitudeSchema,\n});\n\n/**\n * Helper to create a Geo URI from a {@link GeoPoint}.\n *\n * @category Helpers\n * @example\n * ```ts\n * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502'\n *\n * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231'\n * ```\n */\nexport function geoUri(point: GeoPoint): GeoURI {\n const result = GeoPointSchema.safeParse(point);\n\n if (result.success) {\n const { lat, lng } = result.data;\n return `geo:${lat},${lng}`;\n }\n\n never(formatZodError(result.error));\n}\n\n/**\n * Helper to parse a {@link GeoPoint} from a {@link GeoURI}.\n *\n * @category Helpers\n */\nexport function geoPoint(value: GeoURI): GeoPoint {\n const uri = GeoURISchema.parse(value);\n\n const match = geoUriRegex.exec(uri);\n\n invariant(match, 'Invalid Geo URI format. Expected `geo:lat,lng`.');\n\n const [, lat = '', lng = ''] = match;\n return GeoPointSchema.parse({ lat, lng });\n}\n/**\n * @internal\n */\nexport function encryptableGeoUriSchema(description: string) {\n return encryptable(GeoURISchema.describe(description));\n}\n\n/**\n * A Geo URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableGeoURI = GeoURI | EncryptedString;\n\n/**\n * The address of a physical location.\n */\nexport type PhysicalAddress = {\n /**\n * The full mailing address formatted for display.\n */\n formatted?: EncryptableString;\n /**\n * The street address including house number, street name, P.O. Box,\n * apartment or unit number and extended multi-line address information.\n */\n streetAddress?: EncryptableString;\n /**\n * The city or locality.\n */\n locality: EncryptableString;\n /**\n * The state or region.\n */\n region?: EncryptableString;\n /**\n * The zip or postal code.\n */\n postalCode?: EncryptableString;\n /**\n * The country name component.\n */\n country: EncryptableString;\n};\n/**\n * @internal\n */\nexport const PhysicalAddressSchema: z.ZodType = z.object({\n formatted: encryptableStringSchema('The full mailing address formatted for display.').optional(),\n streetAddress: encryptableStringSchema(\n 'The street address including house number, street name, P.O. Box, ' +\n 'apartment or unit number and extended multi-line address information.',\n ).optional(),\n locality: encryptableStringSchema('The city or locality.'),\n region: encryptableStringSchema('The state or region.').optional(),\n postalCode: encryptableStringSchema('The zip or postal code.').optional(),\n country: encryptableStringSchema('The country name component.'),\n});\n\n/**\n * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`.\n */\nexport type DateTime = Brand;\n/**\n * @internal\n */\nexport function toDateTime(value: string): DateTime {\n return value as DateTime;\n}\n/**\n * @internal\n */\nexport function datetimeSchema(description: string): z.ZodType {\n return z.string({ description }).datetime().transform(toDateTime);\n}\n/**\n * @internal\n */\nexport function encryptableDateTimeSchema(description: string) {\n return encryptable(datetimeSchema(description));\n}\n\n/**\n * A DateTime or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableDateTime = DateTime | EncryptedString;\n\n/**\n * An EVM compatible address.\n */\nexport type EvmAddress = Brand;\n/**\n * @internal\n */\nexport function toEvmAddress(value: string): EvmAddress {\n return value as EvmAddress;\n}\n/**\n * @internal\n */\nexport const EvmAddressSchema: z.ZodType = z\n .string()\n .length(42)\n .describe('An EVM compatible address.')\n .transform(toEvmAddress);\n\n/**\n * An EVM compatible Chain Id.\n */\nexport type ChainId = Brand;\n/**\n * @internal\n */\nexport function toChainId(value: number): ChainId {\n return value as ChainId;\n}\n/**\n * @internal\n */\nexport const ChainIdSchema: z.ZodType = z\n .number()\n .positive()\n .transform(toChainId);\n\n/**\n * An EVM compatible address on a specific chain.\n */\nexport type NetworkAddress = {\n /**\n * The chain id.\n */\n chainId: ChainId;\n /**\n * The EVM address.\n */\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const NetworkAddressSchema: z.ZodType = z.object(\n {\n chainId: ChainIdSchema,\n address: EvmAddressSchema,\n },\n {\n description: 'An EVM compatible address on a specific chain.',\n },\n);\n\n/**\n * An NFT token identifier.\n */\nexport type TokenId = Brand;\n/**\n * @internal\n */\nexport function toTokenId(value: string): TokenId {\n return value as TokenId;\n}\n/**\n * @internal\n */\nexport const TokenIdSchema: z.ZodType = z\n .string()\n .min(1)\n .transform(toTokenId);\n\n/**\n * A Fungible Tokens. Usually an ERC20 token.\n */\nexport type Asset = {\n /**\n * The asset contract address.\n */\n contract: NetworkAddress;\n /**\n * The number of decimals of the asset (e.g. 18 for WETH)\n */\n decimals: number;\n};\n/**\n * @internal\n */\nexport const AssetSchema: z.ZodType = z.object({\n contract: NetworkAddressSchema,\n decimals: z.number({ description: 'The number of decimals of the asset.' }).int().nonnegative(),\n});\n/**\n * Creates an {@link Asset}.\n *\n * @internal\n */\nexport function asset(contract: NetworkAddressDetails, decimals: number): Asset {\n return AssetSchema.parse({ contract, decimals });\n}\n\n/**\n * An amount of a specific asset.\n */\nexport type Amount = {\n /**\n * The asset.\n *\n * See {@link asset} helper to create one.\n */\n asset: Asset;\n /**\n * The amount in the smallest unit of the given asset (e.g. wei for ETH).\n */\n value: string;\n};\n/**\n * @internal\n */\nexport const AmountSchema: z.ZodType = z.object(\n {\n asset: AssetSchema,\n value: nonEmptyStringSchema(\n 'The amount in the smallest unit of the given asset (e.g. wei for ETH).',\n ),\n },\n {\n description: 'An amount of a specific asset.',\n },\n);\n\nexport type NetworkAddressDetails = {\n /**\n * The chain id.\n */\n chainId: number;\n /**\n * The EVM address.\n */\n address: string;\n};\n\n/**\n * @internal\n */\nexport type AmountDetails = {\n contract: NetworkAddressDetails;\n decimals: number;\n value: string;\n};\n/**\n * @internal\n */\nexport function amount(input: AmountDetails): Amount {\n return AmountSchema.parse({\n asset: asset(input.contract, input.decimals),\n value: input.value,\n });\n}\n\n/**\n * A DiGi Profile identifier.\n *\n * @example\n * ```\n * 0x01\n * ```\n */\nexport type ProfileId = Brand;\n/**\n * @internal\n */\nexport function toProfileId(value: string): ProfileId {\n return value as ProfileId;\n}\n/**\n * @internal\n */\nexport const ProfileIdSchema: z.ZodType = z\n .string()\n .min(4)\n .transform(toProfileId);\n\n/**\n * A DiGi Publication identifier.\n *\n * No Momoka publications for now.\n *\n * @example\n * ```\n * 0x01-0x01\n * ```\n */\nexport type PublicationId = Brand;\n/**\n * @internal\n */\nexport function toPublicationId(value: string): PublicationId {\n return value as PublicationId;\n}\n/**\n * @internal\n */\nexport const PublicationIdSchema: z.ZodType = z\n .string()\n .min(9)\n .transform(toPublicationId);\n","import { Signature } from './primitives';\n\n/**\n * Branding helper type.\n *\n * @internal\n */\nexport type Brand = T & {\n [K in ReservedName]: TBrand;\n};\n\n/**\n * Omits properties from an union type, preserving the union.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit = T extends any ? Omit : never;\n\n/**\n * Overwrites properties from T1 with one from T2\n * @internal\n * @example\n * ```ts\n * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string }\n * ```\n */\nexport type Overwrite = DistributiveOmit & T2;\n\n/**\n * An error that occurs when a task violates a logical condition that is assumed to be true at all times.\n */\nexport class InvariantError extends Error {\n name = 'InvariantError' as const;\n}\n\n/**\n * Asserts that the given condition is truthy\n * @internal\n *\n * @param condition - Either truthy or falsy value\n * @param message - An error message\n */\nexport function invariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n/**\n * A function that throws when called.\n *\n * @param message - An error message\n */\nexport function never(message = 'Unexpected call to never()'): never {\n throw new InvariantError(message);\n}\n\n/**\n * Specifies an object with unknown keys\n *\n * Useful when you don't care about exact props passed to the component.\n * @privateRemarks Don't use `{}` as a type. `{}` actually means \"any non-nullish value\".\n */\nexport type UnknownObject = Record;\n\n/**\n * Declares an array of at least one element of the specified type.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasAtLeastOne(items: ReadonlyArray): items is NonEmptyArray {\n return items.length > 0;\n}\n\n/**\n * Declares an array of at least two elements of the specified type.\n */\nexport type TwoAtLeastArray = [T, T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasTwoOrMore(items: ReadonlyArray): items is TwoAtLeastArray {\n return items.length >= 2;\n}\n\n/**\n * Beautify the readout of all of the members of that intersection.\n *\n * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697\n *\n * @internal\n */\nexport type Prettify = {\n [K in keyof T]: T[K];\n // eslint-disable-next-line @typescript-eslint/ban-types\n} & {};\n\n/**\n * @internal\n */\nexport type ShapeCheck = T extends {\n $schema: string;\n\n digi: unknown;\n\n signature?: Signature;\n}\n ? T\n : never;\n","import { z } from 'zod';\n\nimport {\n PublicationEncryptionStrategy,\n PublicationEncryptionStrategySchema,\n} from './encryption.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport { MarketplaceMetadataSchema } from '../../marketplace.js';\nimport {\n AppIdSchema,\n LocaleSchema,\n TagSchema,\n nonEmptyStringSchema,\n SignatureSchema,\n AppId,\n Locale,\n Tag,\n encryptable,\n markdown,\n} from '../../primitives.js';\nimport { PublicationMainFocus } from '../PublicationMainFocus.js';\n\nexport * from './encryption.js';\nexport * from './license.js';\nexport * from './media.js';\nexport * from './timezones.js';\n\nexport enum PublicationContentWarning {\n NSFW = 'NSFW',\n SENSITIVE = 'SENSITIVE',\n SPOILER = 'SPOILER',\n}\n\n/**\n * Common fields of a DiGi primary publication.\n */\nexport type PublicationMetadataCommon = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId?: AppId;\n /**\n * Determine if the publication should not be shown in any feed.\n *\n * @defaultValue false\n */\n hideFromFeed?: boolean;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n /**\n * The locale of the metadata.\n */\n locale: Locale;\n /**\n * The encryption strategy used to encrypt the publication.\n *\n * If not present, the publication is presumed to be unencrypted.\n */\n encryptedWith?: PublicationEncryptionStrategy;\n /**\n * An arbitrary list of tags.\n */\n tags?: Tag[];\n /**\n * Specify a content warning.\n */\n contentWarning?: PublicationContentWarning;\n};\n\nconst PublicationMetadataCommonSchema = z.object({\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.optional().describe('The App Id that this publication belongs to.'),\n\n hideFromFeed: z\n .boolean({\n description: 'Determine if the publication should not be shown in any feed.',\n })\n .optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .max(20)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n locale: LocaleSchema,\n\n encryptedWith: PublicationEncryptionStrategySchema.optional(),\n\n tags: z\n .set(TagSchema) // z.set(...) sets uniqueItems: true in generated JSON Schemas\n .max(20)\n .catch((ctx) => ctx.input as Set)\n .superRefine((input, ctx) => {\n // but needs to be corrected in code\n const result = z.array(TagSchema).max(20).safeParse(input);\n\n if (result.success) {\n const uniqueTags = [...new Set(result.data)];\n if (result.data.length > uniqueTags.length) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: `Duplicate tags are not allowed: ${result.data.join(', ')}`,\n });\n }\n return z.NEVER;\n }\n\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n })\n .transform((value) => [...value]) // type coercion\n .optional()\n .describe('An arbitrary list of tags.'),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional(),\n});\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function metadataDetailsWith<\n Augmentation extends {\n mainContentFocus:\n | z.ZodLiteral\n | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>;\n },\n>(augmentation: Augmentation) {\n return PublicationMetadataCommonSchema.extend(augmentation);\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function publicationWith<\n Augmentation extends {\n $schema: z.ZodLiteral;\n digi: ReturnType;\n },\n>(augmentation: Augmentation) {\n return MarketplaceMetadataSchema.extend({\n signature: SignatureSchema.optional(),\n ...augmentation,\n });\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function mainContentFocus(focus: T): z.ZodLiteral;\nexport function mainContentFocus(\n ...focuses: [T, O]\n): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>;\nexport function mainContentFocus(...focuses: [PublicationMainFocus, ...PublicationMainFocus[]]) {\n const description = 'The main focus of the publication.';\n if (focuses.length > 1) {\n const literals = focuses.map((value) => z.literal(value)) as [\n z.ZodLiteral,\n z.ZodLiteral,\n ...z.ZodLiteral[],\n ];\n return z.union(literals, { description });\n }\n return z.literal(focuses[0], { description });\n}\n\n/**\n * @internal\n */\nexport function optionalContentSchema() {\n return encryptable(markdown(z.string({ description: 'Optional markdown content.' }))).optional();\n}\n","/* eslint-disable no-case-declarations */\nimport { z } from 'zod';\n\nimport {\n Amount,\n AmountSchema,\n EvmAddress,\n EvmAddressSchema,\n NetworkAddress,\n NetworkAddressSchema,\n ProfileId,\n ProfileIdSchema,\n PublicationId,\n PublicationIdSchema,\n TokenId,\n TokenIdSchema,\n nonEmptyStringSchema,\n} from '../../primitives.js';\nimport { hasTwoOrMore, Brand, TwoAtLeastArray } from '../../utils.js';\n\nexport enum EncryptionProvider {\n LIT_PROTOCOL = 'LIT_PROTOCOL',\n}\n\nexport enum NftContractType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n}\n\nexport enum ConditionType {\n NFT_OWNERSHIP = 'NFT_OWNERSHIP',\n ERC20_OWNERSHIP = 'ERC20_OWNERSHIP',\n EOA_OWNERSHIP = 'EOA_OWNERSHIP',\n PROFILE_OWNERSHIP = 'PROFILE_OWNERSHIP',\n FOLLOW = 'FOLLOW',\n COLLECT = 'COLLECT',\n ADVANCED_CONTRACT = 'ADVANCED_CONTRACT',\n AND = 'AND',\n OR = 'OR',\n}\n\nexport type NftOwnershipCondition = {\n type: ConditionType.NFT_OWNERSHIP;\n contractType: NftContractType;\n contract: NetworkAddress;\n tokenIds?: TokenId[];\n};\n\n/**\n * @private\n */\nexport function refineNftOwnershipCondition(\n condition: NftOwnershipCondition,\n ctx: z.RefinementCtx,\n) {\n if (condition.contractType === NftContractType.ERC1155) {\n if (condition.tokenIds === undefined || condition.tokenIds.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'ERC1155 requires at least one token id.',\n path: [...ctx.path, 'tokenIds'],\n });\n }\n }\n}\n\n/**\n * @internal\n */\nexport const NftOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.NFT_OWNERSHIP),\n contract: NetworkAddressSchema,\n contractType: z.nativeEnum(NftContractType),\n tokenIds: TokenIdSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A list of token IDs you want to check ownership of. The list is optional for ERC721, ' +\n 'you MUST provide a list of token IDs for ERC1155.',\n ),\n});\n\nexport enum ConditionComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n}\n\nexport type Erc20OwnershipCondition = {\n type: ConditionType.ERC20_OWNERSHIP;\n amount: Amount;\n condition: ConditionComparisonOperator;\n};\n/**\n * @internal\n */\nexport const Erc20OwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.ERC20_OWNERSHIP),\n amount: AmountSchema,\n condition: z.nativeEnum(ConditionComparisonOperator),\n});\n\nexport type EoaOwnershipCondition = {\n type: ConditionType.EOA_OWNERSHIP;\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const EoaOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.EOA_OWNERSHIP),\n address: EvmAddressSchema,\n});\n\nexport type ProfileOwnershipCondition = {\n type: ConditionType.PROFILE_OWNERSHIP;\n profileId: ProfileId;\n};\n/**\n * @internal\n */\nexport const ProfileOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.PROFILE_OWNERSHIP),\n profileId: ProfileIdSchema,\n});\n\nexport type FollowCondition = {\n type: ConditionType.FOLLOW;\n follow: ProfileId;\n};\n/**\n * @internal\n */\nexport const FollowConditionSchema = z.object({\n type: z.literal(ConditionType.FOLLOW),\n follow: ProfileIdSchema,\n});\n\nexport type CollectCondition = {\n type: ConditionType.COLLECT;\n publicationId: PublicationId;\n thisPublication: boolean;\n};\n/**\n * @internal\n */\nexport const CollectConditionSchema = z.object({\n type: z.literal(ConditionType.COLLECT),\n publicationId: PublicationIdSchema, // TODO check on-chain publication ID\n thisPublication: z.boolean().optional().default(false),\n});\n\nexport type AdvancedContractCondition = {\n type: ConditionType.ADVANCED_CONTRACT;\n contract: NetworkAddress;\n functionName: string;\n abi: string;\n params: string[];\n comparison: ConditionComparisonOperator;\n value: string;\n};\n\n/**\n * @internal\n */\nexport const AdvancedContractConditionSchema = z.object({\n type: z.literal(ConditionType.ADVANCED_CONTRACT),\n contract: NetworkAddressSchema.describe('The contract address and chain id'),\n functionName: z.string().min(1).describe('The name of the function you want to call'),\n abi: z\n .string()\n .min(1)\n .describe(\n 'The contract ABI. Has to be in human readable ' +\n 'single string format containing the signature of the function you want to call. See ' +\n 'https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info',\n ),\n params: z\n .string()\n .array()\n .describe(\n 'The parameters to pass to the function. Must be ' +\n 'exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to ' +\n 'represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays.',\n ),\n comparison: z\n .nativeEnum(ConditionComparisonOperator)\n .describe(\n 'The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL',\n ),\n value: z\n .string()\n .regex(/^(true|false|\\d{1,70})$/)\n .describe(`The comparison value. Accepts 'true', 'false' or a number`),\n});\n\nexport type SimpleCondition =\n | CollectCondition\n | AdvancedContractCondition\n | EoaOwnershipCondition\n | Erc20OwnershipCondition\n | FollowCondition\n | NftOwnershipCondition\n | ProfileOwnershipCondition;\n\ntype BaseCondition = {\n type: ConditionType;\n};\n\ntype ComposableConditionSchema = z.ZodObject<\n {\n type: z.ZodTypeAny;\n } & z.ZodRawShape,\n z.UnknownKeysParam,\n z.ZodTypeAny,\n T\n>;\n\nexport type AndCondition = {\n type: ConditionType.AND;\n criteria: TwoAtLeastArray;\n};\n\nfunction andConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.AND),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const AndConditionSchema = andConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type OrCondition = {\n type: ConditionType.OR;\n criteria: TwoAtLeastArray;\n};\n\nfunction orConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.OR),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const OrConditionSchema = orConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type AnyCondition =\n | SimpleCondition\n | AndCondition\n | OrCondition;\n\nfunction refineAnyCondition(condition: AnyCondition, ctx: z.RefinementCtx) {\n if (condition.type === ConditionType.AND || condition.type === ConditionType.OR) {\n condition.criteria.forEach((c, idx) =>\n refineAnyCondition(c, { ...ctx, path: [...ctx.path, 'criteria', idx] }),\n );\n }\n if (condition.type === ConditionType.NFT_OWNERSHIP) {\n refineNftOwnershipCondition(condition, ctx);\n }\n}\n\nexport type AccessCondition = OrCondition;\n/**\n * @internal\n */\nexport const AccessConditionSchema: z.ZodType =\n orConditionSchema([\n AndConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n EoaOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n FollowConditionSchema,\n NftOwnershipConditionSchema,\n OrConditionSchema,\n ProfileOwnershipConditionSchema,\n ]).superRefine((root, ctx): root is AccessCondition => {\n root.criteria.forEach((condition, idx) => {\n refineAnyCondition(condition, {\n ...ctx,\n path: [...ctx.path, 'criteria', idx],\n });\n });\n return z.NEVER;\n });\n\n/**\n * A symmetric encryption key.\n */\nexport type LitEncryptionKey = Brand;\n/**\n * @internal\n */\nexport function toLitEncryptionKey(value: string): LitEncryptionKey {\n return value as LitEncryptionKey;\n}\n/**\n * @internal\n */\nexport const LitEncryptionKeySchema: z.Schema = z\n .string()\n .describe('A symmetric encryption key.')\n .length(368, 'Encryption key should be 368 characters long.')\n .transform(toLitEncryptionKey);\n\n/**\n * @internal\n */\nexport const EncryptedPaths = nonEmptyStringSchema(\n 'An encrypted path is a string of keys separated by . that describe ' +\n 'a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).',\n)\n .array()\n .min(1);\nexport type EncryptedPaths = z.infer;\n\nexport type LitEncryptionStrategy = {\n provider: EncryptionProvider;\n encryptionKey: LitEncryptionKey;\n accessCondition: AccessCondition;\n encryptedPaths: string[];\n};\n/**\n * @internal\n */\nexport const LitEncryptionStrategySchema = z.object(\n {\n provider: z.literal(EncryptionProvider.LIT_PROTOCOL),\n encryptionKey: LitEncryptionKeySchema,\n accessCondition: AccessConditionSchema,\n encryptedPaths: EncryptedPaths,\n },\n {\n description: 'Publication encryption strategy powered by the LIT Protocol.',\n },\n);\n\n/**\n * The publication encryption strategy.\n *\n * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly.\n */\nexport type PublicationEncryptionStrategy = LitEncryptionStrategy;\n\n/**\n * @internal\n */\nexport const PublicationEncryptionStrategySchema: z.ZodType<\n PublicationEncryptionStrategy,\n z.ZodTypeDef,\n object\n> = z.discriminatedUnion('provider', [LitEncryptionStrategySchema]);\n","import { z } from 'zod';\n\nimport { nonEmptyStringSchema } from './primitives.js';\n\n/**\n * The type of a metadata attribute.\n */\nexport enum MetadataAttributeType {\n BOOLEAN = 'Boolean',\n DATE = 'Date',\n NUMBER = 'Number',\n STRING = 'String',\n JSON = 'JSON',\n}\n\nexport type BooleanAttribute = {\n /**\n * A JS boolean value serialized as string. It's consumer responsibility to parse it.\n */\n value: 'true' | 'false';\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.BOOLEAN;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const BooleanAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.BOOLEAN),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .enum(['true', 'false'])\n .describe(\"A JS boolean value serialized as string. It's consumer responsibility to parse it.\"),\n});\n\nexport type DateAttribute = {\n /**\n * A valid ISO 8601 date string. It's consumer responsibility to parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.DATE;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const DateAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.DATE),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .string()\n .datetime()\n .describe(\"A valid ISO 8601 date string. It's consumer responsibility to parse it.\"),\n});\n\nexport type NumberAttribute = {\n /**\n * A valid JS number serialized as string. It's consumer responsibility to parse it.\n *\n * @example\n * ```ts\n * '42'\n *\n * '42n'\n *\n * '42.42'\n * ```\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.NUMBER;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const NumberAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.NUMBER),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"), // TODO generalize and share\n value: nonEmptyStringSchema(\n \"A valid JS number serialized as string. It's consumer responsibility to parse it.\",\n ),\n});\n\nexport type StringAttribute = {\n /**\n * Any string value.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.STRING;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const StringAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.STRING),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema('A string value.'),\n});\n\nexport type JSONAttribute = {\n /**\n * A JSON string. It's consumer responsibility to validate and parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.JSON;\n /**\n * Union discriminant.\n */\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const JSONAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.JSON),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema(\n \"A JSON string. It's consumer responsibility to validate and parse it.\",\n ),\n});\n\n/**\n * A DiGi metadata attribute.\n */\nexport type MetadataAttribute =\n | BooleanAttribute\n | DateAttribute\n | NumberAttribute\n | StringAttribute\n | JSONAttribute;\n\nexport const MetadataAttributeSchema = z.discriminatedUnion('type', [\n BooleanAttributeSchema,\n DateAttributeSchema,\n NumberAttributeSchema,\n StringAttributeSchema,\n JSONAttributeSchema,\n]);\n"]} \ No newline at end of file diff --git a/dist/legacy/index.d.cts b/dist/legacy/index.d.cts new file mode 100644 index 00000000..9a8cfe2d --- /dev/null +++ b/dist/legacy/index.d.cts @@ -0,0 +1,19182 @@ +import { z } from 'zod'; +import { g as Markdown, h as MarketplaceMetadataAttribute, U as URI, A as AppId, aX as NftContractType, o as ConditionComparisonOperator, _ as Locale, aR as PublicationContentWarning } from '../index-BUp9r-lh.cjs'; +export { aH as Amount, aJ as AmountDetails, aI as AmountSchema, aa as AppIdSchema, aE as Asset, aF as AssetSchema, C as ChainId, ay as ChainIdSchema, aq as DateTime, k as EncryptableDateTime, i as EncryptableGeoURI, e as EncryptableMarkdown, a as EncryptableString, E as EncryptableURI, c as EncryptedString, a1 as EncryptedStringSchema, au as EvmAddress, aw as EvmAddressSchema, ak as GeoPoint, al as GeoPointSchema, ai as GeoURI, aj as GeoURISchema, a0 as LocaleSchema, f as MarketplaceMetadata, z as MarketplaceMetadataAttributeDisplayType, az as NetworkAddress, N as NetworkAddressDetails, aA as NetworkAddressSchema, j as PhysicalAddress, ap as PhysicalAddressSchema, aL as ProfileId, aN as ProfileIdSchema, aO as PublicationId, aQ as PublicationIdSchema, S as Signature, ac as SignatureSchema, a6 as Tag, a8 as TagSchema, aB as TokenId, aD as TokenIdSchema, aK as amount, aG as asset, as as datetimeSchema, a2 as encryptable, at as encryptableDateTimeSchema, ao as encryptableGeoUriSchema, a5 as encryptableStringSchema, ah as encryptableUriSchema, an as geoPoint, am as geoUri, ae as markdown, a3 as nonEmpty, a4 as nonEmptyStringSchema, a9 as toAppId, ax as toChainId, ar as toDateTime, av as toEvmAddress, $ as toLocale, ad as toMarkdown, aM as toProfileId, aP as toPublicationId, ab as toSignature, a7 as toTag, aC as toTokenId, af as toUri, ag as uriSchema } from '../index-BUp9r-lh.cjs'; + +declare enum ProfileMetadataAttributeDisplayType { + number = "number", + string = "string", + date = "date" +} +declare const ProfileMetadataAttributeSchema: z.ZodObject<{ + displayType: z.ZodCatch>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; +}, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; +}, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; +}>; +type ProfileMetadataAttribute = z.infer; +/** + * Profile Metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * legacy.ProfileMetadataSchema.parse(valid); // => legacy.ProfileMetadata + * + * legacy.ProfileMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * legacy.ProfileMetadataSchema.safeParse(valid); + * // => { success: true, data: legacy.ProfileMetadata } + * + * legacy.ProfileMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const ProfileMetadataSchema: z.ZodObject<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, z.ZodTypeAny, "passthrough">>; +type ProfileMetadata = z.infer; + +declare enum PublicationMetadataVersion { + V1 = "1.0.0", + V2 = "2.0.0" +} +declare enum PublicationMainFocus { + ARTICLE = "ARTICLE", + AUDIO = "AUDIO", + EMBED = "EMBED", + IMAGE = "IMAGE", + LINK = "LINK", + SHORT_VIDEO = "SHORT_VIDEO", + TEXT_ONLY = "TEXT_ONLY", + VIDEO = "VIDEO" +} +declare enum AudioMimeType { + AAC = "audio/aac", + FLAC = "audio/flac", + MP3 = "audio/mpeg", + MP4_AUDIO = "audio/mp4", + OGG_AUDIO = "audio/ogg", + WAV = "audio/wav", + WAV_VND = "audio/vnd.wave", + WEBM_AUDIO = "audio/webm" +} +declare enum ImageMimeType { + BMP = "image/bmp", + GIF = "image/gif", + HEIC = "image/heic", + JPEG = "image/jpeg", + JPG = "image/jpg", + PNG = "image/png", + SVG_XML = "image/svg+xml", + TIFF = "image/tiff", + WEBP = "image/webp", + X_MS_BMP = "image/x-ms-bmp" +} +declare enum VideoMimeType { + GLTF = "model/gltf+json", + GLTF_BINARY = "model/gltf-binary", + WEBM = "video/webm", + MP4 = "video/mp4", + M4V = "video/x-m4v", + OGV = "video/ogv", + OGG = "video/ogg", + MPEG = "video/mpeg", + QUICKTIME = "video/quicktime", + MOV = "video/mov" +} +/** + * @internal + */ +declare const MediaSchema: z.ZodObject<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>; +type Media = z.infer; +/** + * @deprecated Use `Media` instead. + */ +type PublicationMetadataMedia = Media; +/** + * @internal + */ +declare const PublicationMetadataV1Schema: z.ZodEffects; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV1 = z.infer; +declare const CollectConditionSchema: z.ZodObject<{ + collect: z.ZodObject<{ + publicationId: z.ZodNullable; + thisPublication: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }, { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }>; +}, "strict", z.ZodTypeAny, { + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +}, { + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +}>; +type CollectCondition = z.infer; +declare const EoaOwnershipSchema: z.ZodObject<{ + eoa: z.ZodObject<{ + address: z.ZodString; + }, "strip", z.ZodTypeAny, { + address: string; + }, { + address: string; + }>; +}, "strict", z.ZodTypeAny, { + eoa: { + address: string; + }; +}, { + eoa: { + address: string; + }; +}>; +type EoaOwnership = z.infer; +declare const FollowConditionSchema: z.ZodObject<{ + follow: z.ZodObject<{ + profileId: z.ZodString; + }, "strip", z.ZodTypeAny, { + profileId: string; + }, { + profileId: string; + }>; +}, "strict", z.ZodTypeAny, { + follow: { + profileId: string; + }; +}, { + follow: { + profileId: string; + }; +}>; +type FollowCondition = z.infer; +declare const NftOwnershipSchema: z.ZodObject<{ + nft: z.ZodObject<{ + contractAddress: z.ZodString; + chainID: z.ZodNumber; + contractType: z.ZodNativeEnum; + tokenIds: z.ZodCatch>>>; + }, "strip", z.ZodTypeAny, { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }, { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: unknown; + }>; +}, "strict", z.ZodTypeAny, { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; +}, { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: unknown; + }; +}>; +type NftOwnership = z.infer; +declare const ProfileOwnershipSchema: z.ZodObject<{ + profile: z.ZodObject<{ + profileId: z.ZodString; + }, "strip", z.ZodTypeAny, { + profileId: string; + }, { + profileId: string; + }>; +}, "strict", z.ZodTypeAny, { + profile: { + profileId: string; + }; +}, { + profile: { + profileId: string; + }; +}>; +type ProfileOwnership = z.infer; +declare const Erc20OwnershipSchema: z.ZodObject<{ + token: z.ZodObject<{ + amount: z.ZodString; + chainID: z.ZodNumber; + condition: z.ZodNativeEnum; + contractAddress: z.ZodString; + decimals: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }, { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }>; +}, "strict", z.ZodTypeAny, { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}, { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}>; +type Erc20Ownership = z.infer; +type AndCondition = { + and: { + criteria: [T, T, ...T[]]; + }; +}; +type OrCondition = { + or: { + criteria: [T, T, ...T[]]; + }; +}; +declare const AccessConditionSchema: z.ZodType | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +} | { + eoa: { + address: string; + }; +} | { + follow: { + profileId: string; + }; +} | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; +} | { + profile: { + profileId: string; + }; +} | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}>>, z.ZodTypeDef, object>; +type AccessCondition = z.infer; +/** + * @internal + */ +declare const EncryptedMediaSchema: z.ZodCatch>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>>; +type EncryptedMedia = z.infer; +declare const EncryptedFieldsSchema: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; +}, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; +}, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; +}>; +type EncryptedFields = z.infer; +/** + * @internal + */ +declare const EncryptionParamsSchema: z.ZodObject<{ + accessCondition: z.ZodType | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; +}, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; +}, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; +}>; +type EncryptionParams = z.infer; +declare const PublicationMetadataV2ArticleSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Article = z.infer; +declare const PublicationMetadataV2AudioSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Audio = z.infer; +declare const PublicationMetadataV2EmbedSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Embed = z.infer; +declare const PublicationMetadataV2ImageSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Image = z.infer; +declare const PublicationMetadataV2LinkSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Link = z.infer; +declare const PublicationMetadataV2TextOnlySchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2TextOnly = z.infer; +declare const PublicationMetadataV2VideoSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +declare const PublicationMetadataV2ShortVideoSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Video = z.infer | z.infer; +/** + * @internal + */ +declare const PublicationMetadataV2Schema: z.ZodEffects; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough"> | { + mainContentFocus: PublicationMainFocus; + version: PublicationMetadataVersion.V2; + metadata_id: string; + locale: string & { + __type__: "Locale"; + }; + media: z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[]; + description?: Markdown | null | undefined; + name?: string | undefined; + attributes?: MarketplaceMetadataAttribute[] | undefined; + external_url?: URI | null | undefined; + image?: URI | null | undefined; + animation_url?: URI | null | undefined; + appId?: AppId | null | undefined; + tags?: string[] | null | undefined; + contentWarning?: PublicationContentWarning | null | undefined; + content?: Markdown | null | undefined; + encryptionParams?: { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + } | undefined; +}, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2 = z.infer; +type PublicationMetadata = PublicationMetadataV1 | PublicationMetadataV2; +/** + * A union of Publication Metadata v1 ad v2. + * + * @example + * with `parse`: + * ```ts + * legacy.PublicationMetadataSchema.parse(valid); // => legacy.PublicationMetadata + * + * legacy.PublicationMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * legacy.PublicationMetadataSchema.safeParse(valid); + * // => { success: true, data: legacy.PublicationMetadata } + * + * legacy.PublicationMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const PublicationMetadataSchema: z.ZodType; + +export { type AccessCondition, type AndCondition, AppId, AudioMimeType, type CollectCondition, ConditionComparisonOperator, type EncryptedFields, type EncryptedMedia, EncryptedMediaSchema, type EncryptionParams, EncryptionParamsSchema, type EoaOwnership, type Erc20Ownership, type FollowCondition, ImageMimeType, Locale, Markdown, MarketplaceMetadataAttribute, type Media, MediaSchema, NftContractType, type NftOwnership, type OrCondition, type ProfileMetadata, type ProfileMetadataAttribute, ProfileMetadataAttributeDisplayType, ProfileMetadataSchema, type ProfileOwnership, PublicationContentWarning, PublicationMainFocus, type PublicationMetadata, type PublicationMetadataMedia, PublicationMetadataSchema, type PublicationMetadataV1, PublicationMetadataV1Schema, type PublicationMetadataV2, type PublicationMetadataV2Article, type PublicationMetadataV2Audio, type PublicationMetadataV2Embed, type PublicationMetadataV2Image, type PublicationMetadataV2Link, PublicationMetadataV2Schema, type PublicationMetadataV2TextOnly, type PublicationMetadataV2Video, PublicationMetadataVersion, URI, VideoMimeType }; diff --git a/dist/legacy/index.d.ts b/dist/legacy/index.d.ts new file mode 100644 index 00000000..f8a89e47 --- /dev/null +++ b/dist/legacy/index.d.ts @@ -0,0 +1,19182 @@ +import { z } from 'zod'; +import { g as Markdown, h as MarketplaceMetadataAttribute, U as URI, A as AppId, aX as NftContractType, o as ConditionComparisonOperator, _ as Locale, aR as PublicationContentWarning } from '../index-BUp9r-lh.js'; +export { aH as Amount, aJ as AmountDetails, aI as AmountSchema, aa as AppIdSchema, aE as Asset, aF as AssetSchema, C as ChainId, ay as ChainIdSchema, aq as DateTime, k as EncryptableDateTime, i as EncryptableGeoURI, e as EncryptableMarkdown, a as EncryptableString, E as EncryptableURI, c as EncryptedString, a1 as EncryptedStringSchema, au as EvmAddress, aw as EvmAddressSchema, ak as GeoPoint, al as GeoPointSchema, ai as GeoURI, aj as GeoURISchema, a0 as LocaleSchema, f as MarketplaceMetadata, z as MarketplaceMetadataAttributeDisplayType, az as NetworkAddress, N as NetworkAddressDetails, aA as NetworkAddressSchema, j as PhysicalAddress, ap as PhysicalAddressSchema, aL as ProfileId, aN as ProfileIdSchema, aO as PublicationId, aQ as PublicationIdSchema, S as Signature, ac as SignatureSchema, a6 as Tag, a8 as TagSchema, aB as TokenId, aD as TokenIdSchema, aK as amount, aG as asset, as as datetimeSchema, a2 as encryptable, at as encryptableDateTimeSchema, ao as encryptableGeoUriSchema, a5 as encryptableStringSchema, ah as encryptableUriSchema, an as geoPoint, am as geoUri, ae as markdown, a3 as nonEmpty, a4 as nonEmptyStringSchema, a9 as toAppId, ax as toChainId, ar as toDateTime, av as toEvmAddress, $ as toLocale, ad as toMarkdown, aM as toProfileId, aP as toPublicationId, ab as toSignature, a7 as toTag, aC as toTokenId, af as toUri, ag as uriSchema } from '../index-BUp9r-lh.js'; + +declare enum ProfileMetadataAttributeDisplayType { + number = "number", + string = "string", + date = "date" +} +declare const ProfileMetadataAttributeSchema: z.ZodObject<{ + displayType: z.ZodCatch>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; +}, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; +}, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; +}>; +type ProfileMetadataAttribute = z.infer; +/** + * Profile Metadata schema. + * + * @category Parse + * + * @example + * with `parse`: + * ```ts + * legacy.ProfileMetadataSchema.parse(valid); // => legacy.ProfileMetadata + * + * legacy.ProfileMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * legacy.ProfileMetadataSchema.safeParse(valid); + * // => { success: true, data: legacy.ProfileMetadata } + * + * legacy.ProfileMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const ProfileMetadataSchema: z.ZodObject<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodCatch>; + metadata_id: z.ZodCatch; + name: z.ZodCatch>; + bio: z.ZodCatch>>; + cover_picture: z.ZodCatch>>; + attributes: z.ZodOptional>>; + traitType: z.ZodCatch>>; + value: z.ZodEffects; + key: z.ZodEffects; + }, "strip", z.ZodTypeAny, { + value: string; + key: string; + displayType?: string | null | undefined; + traitType?: string | null | undefined; + }, { + displayType?: unknown; + traitType?: unknown; + value?: unknown; + key?: unknown; + }>, "many">>; +}, z.ZodTypeAny, "passthrough">>; +type ProfileMetadata = z.infer; + +declare enum PublicationMetadataVersion { + V1 = "1.0.0", + V2 = "2.0.0" +} +declare enum PublicationMainFocus { + ARTICLE = "ARTICLE", + AUDIO = "AUDIO", + EMBED = "EMBED", + IMAGE = "IMAGE", + LINK = "LINK", + SHORT_VIDEO = "SHORT_VIDEO", + TEXT_ONLY = "TEXT_ONLY", + VIDEO = "VIDEO" +} +declare enum AudioMimeType { + AAC = "audio/aac", + FLAC = "audio/flac", + MP3 = "audio/mpeg", + MP4_AUDIO = "audio/mp4", + OGG_AUDIO = "audio/ogg", + WAV = "audio/wav", + WAV_VND = "audio/vnd.wave", + WEBM_AUDIO = "audio/webm" +} +declare enum ImageMimeType { + BMP = "image/bmp", + GIF = "image/gif", + HEIC = "image/heic", + JPEG = "image/jpeg", + JPG = "image/jpg", + PNG = "image/png", + SVG_XML = "image/svg+xml", + TIFF = "image/tiff", + WEBP = "image/webp", + X_MS_BMP = "image/x-ms-bmp" +} +declare enum VideoMimeType { + GLTF = "model/gltf+json", + GLTF_BINARY = "model/gltf-binary", + WEBM = "video/webm", + MP4 = "video/mp4", + M4V = "video/x-m4v", + OGV = "video/ogv", + OGG = "video/ogg", + MPEG = "video/mpeg", + QUICKTIME = "video/quicktime", + MOV = "video/mov" +} +/** + * @internal + */ +declare const MediaSchema: z.ZodObject<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>; +type Media = z.infer; +/** + * @deprecated Use `Media` instead. + */ +type PublicationMetadataMedia = Media; +/** + * @internal + */ +declare const PublicationMetadataV1Schema: z.ZodEffects; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + version: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV1 = z.infer; +declare const CollectConditionSchema: z.ZodObject<{ + collect: z.ZodObject<{ + publicationId: z.ZodNullable; + thisPublication: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }, { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }>; +}, "strict", z.ZodTypeAny, { + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +}, { + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +}>; +type CollectCondition = z.infer; +declare const EoaOwnershipSchema: z.ZodObject<{ + eoa: z.ZodObject<{ + address: z.ZodString; + }, "strip", z.ZodTypeAny, { + address: string; + }, { + address: string; + }>; +}, "strict", z.ZodTypeAny, { + eoa: { + address: string; + }; +}, { + eoa: { + address: string; + }; +}>; +type EoaOwnership = z.infer; +declare const FollowConditionSchema: z.ZodObject<{ + follow: z.ZodObject<{ + profileId: z.ZodString; + }, "strip", z.ZodTypeAny, { + profileId: string; + }, { + profileId: string; + }>; +}, "strict", z.ZodTypeAny, { + follow: { + profileId: string; + }; +}, { + follow: { + profileId: string; + }; +}>; +type FollowCondition = z.infer; +declare const NftOwnershipSchema: z.ZodObject<{ + nft: z.ZodObject<{ + contractAddress: z.ZodString; + chainID: z.ZodNumber; + contractType: z.ZodNativeEnum; + tokenIds: z.ZodCatch>>>; + }, "strip", z.ZodTypeAny, { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }, { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: unknown; + }>; +}, "strict", z.ZodTypeAny, { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; +}, { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: unknown; + }; +}>; +type NftOwnership = z.infer; +declare const ProfileOwnershipSchema: z.ZodObject<{ + profile: z.ZodObject<{ + profileId: z.ZodString; + }, "strip", z.ZodTypeAny, { + profileId: string; + }, { + profileId: string; + }>; +}, "strict", z.ZodTypeAny, { + profile: { + profileId: string; + }; +}, { + profile: { + profileId: string; + }; +}>; +type ProfileOwnership = z.infer; +declare const Erc20OwnershipSchema: z.ZodObject<{ + token: z.ZodObject<{ + amount: z.ZodString; + chainID: z.ZodNumber; + condition: z.ZodNativeEnum; + contractAddress: z.ZodString; + decimals: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }, { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }>; +}, "strict", z.ZodTypeAny, { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}, { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}>; +type Erc20Ownership = z.infer; +type AndCondition = { + and: { + criteria: [T, T, ...T[]]; + }; +}; +type OrCondition = { + or: { + criteria: [T, T, ...T[]]; + }; +}; +declare const AccessConditionSchema: z.ZodType | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; +} | { + eoa: { + address: string; + }; +} | { + follow: { + profileId: string; + }; +} | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; +} | { + profile: { + profileId: string; + }; +} | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; +}>>, z.ZodTypeDef, object>; +type AccessCondition = z.infer; +/** + * @internal + */ +declare const EncryptedMediaSchema: z.ZodCatch>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>>; +type EncryptedMedia = z.infer; +declare const EncryptedFieldsSchema: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; +}, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; +}, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; +}>; +type EncryptedFields = z.infer; +/** + * @internal + */ +declare const EncryptionParamsSchema: z.ZodObject<{ + accessCondition: z.ZodType | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; +}, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; +}, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; +}>; +type EncryptionParams = z.infer; +declare const PublicationMetadataV2ArticleSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Article = z.infer; +declare const PublicationMetadataV2AudioSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Audio = z.infer; +declare const PublicationMetadataV2EmbedSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Embed = z.infer; +declare const PublicationMetadataV2ImageSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Image = z.infer; +declare const PublicationMetadataV2LinkSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Link = z.infer; +declare const PublicationMetadataV2TextOnlySchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2TextOnly = z.infer; +declare const PublicationMetadataV2VideoSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +declare const PublicationMetadataV2ShortVideoSchema: z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2Video = z.infer | z.infer; +/** + * @internal + */ +declare const PublicationMetadataV2Schema: z.ZodEffects; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough"> | { + mainContentFocus: PublicationMainFocus; + version: PublicationMetadataVersion.V2; + metadata_id: string; + locale: string & { + __type__: "Locale"; + }; + media: z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[]; + description?: Markdown | null | undefined; + name?: string | undefined; + attributes?: MarketplaceMetadataAttribute[] | undefined; + external_url?: URI | null | undefined; + image?: URI | null | undefined; + animation_url?: URI | null | undefined; + appId?: AppId | null | undefined; + tags?: string[] | null | undefined; + contentWarning?: PublicationContentWarning | null | undefined; + content?: Markdown | null | undefined; + encryptionParams?: { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + } | undefined; +}, z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + animation_url: z.ZodNullable>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + media: z.ZodNullable; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects, Markdown, string>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; + content: z.ZodEffects; + media: z.ZodNullable>>; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ + version: z.ZodLiteral; + metadata_id: z.ZodCatch; + description: z.ZodCatch>>>; + name: z.ZodOptional; + attributes: z.ZodCatch, "many">>>; + external_url: z.ZodCatch>>>; + image: z.ZodCatch>>>; + animation_url: z.ZodCatch>>>; + appId: z.ZodNullable>>; + locale: z.ZodType; + tags: z.ZodNullable>>; + contentWarning: z.ZodCatch>>>; + content: z.ZodNullable>>; + media: z.ZodEffects; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>, "many">>, z.objectOutputType<{ + item: z.ZodType; + altTag: z.ZodNullable>; + cover: z.ZodCatch>>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[], unknown>; + encryptionParams: z.ZodOptional | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>, z.ZodTypeDef, object>; + encryptedFields: z.ZodObject<{ + content: z.ZodNullable>; + media: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">>>, "many">>>; + image: z.ZodNullable>; + animation_url: z.ZodNullable>; + external_url: z.ZodNullable>; + }, "strip", z.ZodTypeAny, { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }, { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }>; + providerSpecificParams: z.ZodObject<{ + encryptionKey: z.ZodString; + }, "strip", z.ZodTypeAny, { + encryptionKey: string; + }, { + encryptionKey: string; + }>; + }, "strip", z.ZodTypeAny, { + accessCondition: OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + } | AndCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }> | OrCondition<{ + collect: { + publicationId: string | null; + thisPublication?: boolean | null | undefined; + }; + } | { + eoa: { + address: string; + }; + } | { + follow: { + profileId: string; + }; + } | { + nft: { + contractType: NftContractType; + contractAddress: string; + chainID: number; + tokenIds?: string[] | null | undefined; + }; + } | { + profile: { + profileId: string; + }; + } | { + token: { + decimals: number; + amount: string; + condition: ConditionComparisonOperator; + contractAddress: string; + chainID: number; + }; + }>>; + encryptedFields: { + content?: string | null | undefined; + media?: z.objectOutputType<{ + item: z.ZodString; + altTag: z.ZodNullable>; + cover: z.ZodNullable>; + type: z.ZodNullable>; + }, z.ZodTypeAny, "passthrough">[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }, { + accessCondition: object; + encryptedFields: { + content?: string | null | undefined; + media?: unknown[] | null | undefined; + image?: string | null | undefined; + animation_url?: string | null | undefined; + external_url?: string | null | undefined; + }; + providerSpecificParams: { + encryptionKey: string; + }; + }>>; + mainContentFocus: z.ZodLiteral; +}, z.ZodTypeAny, "passthrough">>; +type PublicationMetadataV2 = z.infer; +type PublicationMetadata = PublicationMetadataV1 | PublicationMetadataV2; +/** + * A union of Publication Metadata v1 ad v2. + * + * @example + * with `parse`: + * ```ts + * legacy.PublicationMetadataSchema.parse(valid); // => legacy.PublicationMetadata + * + * legacy.PublicationMetadataSchema.parse(invalid); // => throws ZodError + * ``` + * + * @example + * with `safeParse`: + * ```ts + * legacy.PublicationMetadataSchema.safeParse(valid); + * // => { success: true, data: legacy.PublicationMetadata } + * + * legacy.PublicationMetadataSchema.safeParse(invalid); + * // => { success: false, error: ZodError } + * ``` + */ +declare const PublicationMetadataSchema: z.ZodType; + +export { type AccessCondition, type AndCondition, AppId, AudioMimeType, type CollectCondition, ConditionComparisonOperator, type EncryptedFields, type EncryptedMedia, EncryptedMediaSchema, type EncryptionParams, EncryptionParamsSchema, type EoaOwnership, type Erc20Ownership, type FollowCondition, ImageMimeType, Locale, Markdown, MarketplaceMetadataAttribute, type Media, MediaSchema, NftContractType, type NftOwnership, type OrCondition, type ProfileMetadata, type ProfileMetadataAttribute, ProfileMetadataAttributeDisplayType, ProfileMetadataSchema, type ProfileOwnership, PublicationContentWarning, PublicationMainFocus, type PublicationMetadata, type PublicationMetadataMedia, PublicationMetadataSchema, type PublicationMetadataV1, PublicationMetadataV1Schema, type PublicationMetadataV2, type PublicationMetadataV2Article, type PublicationMetadataV2Audio, type PublicationMetadataV2Embed, type PublicationMetadataV2Image, type PublicationMetadataV2Link, PublicationMetadataV2Schema, type PublicationMetadataV2TextOnly, type PublicationMetadataV2Video, PublicationMetadataVersion, URI, VideoMimeType }; diff --git a/dist/legacy/index.js b/dist/legacy/index.js new file mode 100644 index 00000000..2632904f --- /dev/null +++ b/dist/legacy/index.js @@ -0,0 +1,8 @@ +import { v4 } from 'uuid'; +import { z as z$1 } from 'zod'; + +var Se=(i=>(i.number="number",i.string="string",i.date="date",i))(Se||{});function X(e){return e?typeof e=="string"?e:JSON.stringify(e):""}var xe=z$1.object({displayType:z$1.string().nullable().optional().catch(null),traitType:z$1.string().nullable().optional().catch(null),value:z$1.unknown().transform(X),key:z$1.unknown().transform(X)}),Pt=z$1.object({version:z$1.literal("1.0.0").describe("The metadata version.").catch("1.0.0"),metadata_id:z$1.string({description:"The metadata id can be anything but if your uploading to ipfs you will want it to be random. Using uuid could be an option!"}).catch(()=>v4()),name:z$1.string({description:"The display name for the profile."}).nullable().catch(null),bio:z$1.string({description:"The bio for the profile."}).nullable().optional().catch(null),cover_picture:z$1.string({description:"Cover picture."}).nullable().optional().catch(null),attributes:xe.array().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.").optional()}).passthrough();function S(e){return e.length>=2}function Ee(e){return e}var Ae=/^[a-z]{2}(?:-[a-zA-Z]{2})?$/,Ie=/^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i,Y=z$1.string({description:"A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."}).regex(Ae,"Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). [language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format."),I=Y.catch(e=>{let n=Ie.exec(e.input);return n?n[1]:e.input}).superRefine((e,n)=>{let a=Y.safeParse(e);return a.success||a.error.issues.forEach(i=>{n.addIssue(i);}),z$1.NEVER}).transform(Ee);function Ce(e){return e}function Oe(e){return e.every(n=>!n.success)}var we=z$1.string().describe("An encrypted value.").regex(/^\S+$/,"Should be a valid encrypted value.").transform(Ce);function te(e){let n=[e,we];return z$1.union(n).catch(a=>a.input).superRefine((a,i)=>{let m=n.map(T=>T.safeParse(a));return Oe(m)&&i.addIssue({code:z$1.ZodIssueCode.invalid_union,unionErrors:m.map(T=>T.error)}),z$1.NEVER})}function Pe(e){return z$1.preprocess((n,a)=>{let i=z$1.string().safeParse(n);return i.success?i.data.replace(/^[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*/,"").replace(/[\u0000\u0007\u000e\u000f\u200b-\u200d\ufeff]*$/,"").trim():(i.error.issues.forEach(m=>{a.addIssue(m);}),z$1.NEVER)},e.min(1))}function d(e){return Pe(z$1.string({description:e}))}function x(e){return te(d(e))}var R=z$1.string().describe("An arbitrary tag.").min(1).max(50).transform(e=>e.toLowerCase());function N(e){return e}var ne=z$1.string().describe("A DiGi App identifier.").min(1).max(200).transform(N);function ve(e){return e}z$1.string().min(1).describe("A cryptographic signature of the DiGi metadata.").transform(ve);function C(e){return e}function k(e){return e.transform(C)}function Re(e){return e}function O(e="A Uniform Resource Identifier. "){return z$1.string({description:e}).min(6).url({message:"Should be a valid URI"}).transform(Re)}var ee=/^geo:(-?\d+\.?\d*),(-?\d+\.?\d*)$/,oe=z$1.coerce.number({description:"The latitude."}).min(-90).max(90),ie=z$1.coerce.number({description:"The longitude."}).min(-180).max(180);z$1.string().describe("A Geographic coordinate as subset of Geo URI (RFC 5870). Currently only supports the `geo:lat,lng` format.").regex(ee,"Should be a Geo URI. Expected `geo:lat,lng`.").superRefine((e,n)=>{let a=ee.exec(e);if(!a)return z$1.NEVER;let[,i="",m=""]=a,T=oe.safeParse(i);T.success||T.error.issues.forEach(M=>n.addIssue({...M,path:[...n.path,"lat"]}));let h=ie.safeParse(m);return h.success||h.error.issues.forEach(M=>n.addIssue({...M,path:[...n.path,"lng"]})),z$1.NEVER});z$1.object({lat:oe,lng:ie});z$1.object({formatted:x("The full mailing address formatted for display.").optional(),streetAddress:x("The street address including house number, street name, P.O. Box, apartment or unit number and extended multi-line address information.").optional(),locality:x("The city or locality."),region:x("The state or region.").optional(),postalCode:x("The zip or postal code.").optional(),country:x("The country name component.")});function Ne(e){return e}var z=z$1.string().length(42).describe("An EVM compatible address.").transform(Ne);function ke(e){return e}var ze=z$1.number().positive().transform(ke),w=z$1.object({chainId:ze,address:z},{description:"An EVM compatible address on a specific chain."});function Le(e){return e}var ae=z$1.string().min(1).transform(Le),De=z$1.object({contract:w,decimals:z$1.number({description:"The number of decimals of the asset."}).int().nonnegative()});var re=z$1.object({asset:De,value:d("The amount in the smallest unit of the given asset (e.g. wei for ETH).")},{description:"An amount of a specific asset."});function Ve(e){return e}var L=z$1.string().min(4).transform(Ve);function Ze(e){return e}var se=z$1.string().min(9).transform(Ze);var D=(i=>(i.NUMBER="number",i.STRING="string",i.DATE="date",i))(D||{}),_e=z$1.object({display_type:z$1.nativeEnum(D).optional(),trait_type:d("The name of the trait.").optional(),value:z$1.union([z$1.string(),z$1.number()]).optional()}).passthrough(),ce=z$1.object({description:k(z$1.string({description:"A human-readable description of the item. It could be plain text or markdown."})).optional().nullable().catch(null),external_url:O("This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.").optional().nullable().catch(null),name:z$1.string({description:"Name of the NFT item."}).optional(),attributes:_e.array().optional().describe("These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.").catch([]),image:O("Marketplaces will store any NFT image here.").optional().nullable().catch(null),animation_url:O("A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.").optional().nullable().catch(null)}).passthrough();var P=(a=>(a.ERC721="ERC721",a.ERC1155="ERC1155",a))(P||{});function Ue(e,n){e.contractType==="ERC1155"&&(e.tokenIds===void 0||e.tokenIds.length===0)&&n.addIssue({code:z$1.ZodIssueCode.custom,message:"ERC1155 requires at least one token id.",path:[...n.path,"tokenIds"]});}var V=z$1.object({type:z$1.literal("NFT_OWNERSHIP"),contract:w,contractType:z$1.nativeEnum(P),tokenIds:ae.array().min(1).optional().describe("A list of token IDs you want to check ownership of. The list is optional for ERC721, you MUST provide a list of token IDs for ERC1155.")}),E=(h=>(h.EQUAL="EQUAL",h.NOT_EQUAL="NOT_EQUAL",h.GREATER_THAN="GREATER_THAN",h.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",h.LESS_THAN="LESS_THAN",h.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",h))(E||{}),Z=z$1.object({type:z$1.literal("ERC20_OWNERSHIP"),amount:re,condition:z$1.nativeEnum(E)}),_=z$1.object({type:z$1.literal("EOA_OWNERSHIP"),address:z}),U=z$1.object({type:z$1.literal("PROFILE_OWNERSHIP"),profileId:L}),j=z$1.object({type:z$1.literal("FOLLOW"),follow:L}),F=z$1.object({type:z$1.literal("COLLECT"),publicationId:se,thisPublication:z$1.boolean().optional().default(!1)}),G=z$1.object({type:z$1.literal("ADVANCED_CONTRACT"),contract:w.describe("The contract address and chain id"),functionName:z$1.string().min(1).describe("The name of the function you want to call"),abi:z$1.string().min(1).describe("The contract ABI. Has to be in human readable single string format containing the signature of the function you want to call. See https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info"),params:z$1.string().array().describe("The parameters to pass to the function. Must be exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays."),comparison:z$1.nativeEnum(E).describe("The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL"),value:z$1.string().regex(/^(true|false|\d{1,70})$/).describe("The comparison value. Accepts 'true', 'false' or a number")});function je(e){return z$1.object({type:z$1.literal("AND"),criteria:z$1.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(S,"Should have at least 2 conditions")})}var Fe=je([V,Z,_,U,j,F,G]);function de(e){return z$1.object({type:z$1.literal("OR"),criteria:z$1.discriminatedUnion("type",e).array().max(5,"Should have at most 5 conditions").refine(S,"Should have at least 2 conditions")})}var Ge=de([V,Z,_,U,j,F,G]);function pe(e,n){(e.type==="AND"||e.type==="OR")&&e.criteria.forEach((a,i)=>pe(a,{...n,path:[...n.path,"criteria",i]})),e.type==="NFT_OWNERSHIP"&&Ue(e,n);}var Be=de([Fe,F,G,_,Z,j,V,Ge,U]).superRefine((e,n)=>(e.criteria.forEach((a,i)=>{pe(a,{...n,path:[...n.path,"criteria",i]});}),z$1.NEVER));function We(e){return e}var He=z$1.string().describe("A symmetric encryption key.").length(368,"Encryption key should be 368 characters long.").transform(We),Ke=d("An encrypted path is a string of keys separated by . that describe a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).").array().min(1),Je=z$1.object({provider:z$1.literal("LIT_PROTOCOL"),encryptionKey:He,accessCondition:Be,encryptedPaths:Ke},{description:"Publication encryption strategy powered by the LIT Protocol."}),le=z$1.discriminatedUnion("provider",[Je]);var $e=z$1.object({type:z$1.literal("Boolean"),key:d("The attribute's unique identifier."),value:z$1.enum(["true","false"]).describe("A JS boolean value serialized as string. It's consumer responsibility to parse it.")}),qe=z$1.object({type:z$1.literal("Date"),key:d("The attribute's unique identifier."),value:z$1.string().datetime().describe("A valid ISO 8601 date string. It's consumer responsibility to parse it.")}),Qe=z$1.object({type:z$1.literal("Number"),key:d("The attribute's unique identifier."),value:d("A valid JS number serialized as string. It's consumer responsibility to parse it.")}),Xe=z$1.object({type:z$1.literal("String"),key:d("The attribute's unique identifier."),value:d("A string value.")}),Ye=z$1.object({type:z$1.literal("JSON"),key:d("The attribute's unique identifier."),value:d("A JSON string. It's consumer responsibility to validate and parse it.")}),ue=z$1.discriminatedUnion("type",[$e,qe,Qe,Xe,Ye]);var v=(i=>(i.NSFW="NSFW",i.SENSITIVE="SENSITIVE",i.SPOILER="SPOILER",i))(v||{});z$1.object({id:d("A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure."),appId:ne.optional().describe("The App Id that this publication belongs to."),hideFromFeed:z$1.boolean({description:"Determine if the publication should not be shown in any feed."}).optional(),attributes:ue.array().min(1).max(20).optional().describe("A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged."),locale:I,encryptedWith:le.optional(),tags:z$1.set(R).max(20).catch(e=>e.input).superRefine((e,n)=>{let a=z$1.array(R).max(20).safeParse(e);if(a.success){let i=[...new Set(a.data)];return a.data.length>i.length&&n.addIssue({code:z$1.ZodIssueCode.custom,fatal:!0,message:`Duplicate tags are not allowed: ${a.data.join(", ")}`}),z$1.NEVER}a.error.issues.forEach(i=>{n.addIssue(i);});}).transform(e=>[...e]).optional().describe("An arbitrary list of tags."),contentWarning:z$1.nativeEnum(v,{description:"Specify a content warning."}).optional()});var q=(a=>(a.V1="1.0.0",a.V2="2.0.0",a))(q||{}),p=(s=>(s[s.ARTICLE="ARTICLE"]="ARTICLE",s[s.AUDIO="AUDIO"]="AUDIO",s[s.EMBED="EMBED"]="EMBED",s[s.IMAGE="IMAGE"]="IMAGE",s[s.LINK="LINK"]="LINK",s[s.SHORT_VIDEO="SHORT_VIDEO"]="SHORT_VIDEO",s[s.TEXT_ONLY="TEXT_ONLY"]="TEXT_ONLY",s[s.VIDEO="VIDEO"]="VIDEO",s))(p||{}),he=(s=>(s.AAC="audio/aac",s.FLAC="audio/flac",s.MP3="audio/mpeg",s.MP4_AUDIO="audio/mp4",s.OGG_AUDIO="audio/ogg",s.WAV="audio/wav",s.WAV_VND="audio/vnd.wave",s.WEBM_AUDIO="audio/webm",s))(he||{}),tt=Object.values(he);function nt(e){return tt.includes(e)}var ye=(c=>(c.BMP="image/bmp",c.GIF="image/gif",c.HEIC="image/heic",c.JPEG="image/jpeg",c.JPG="image/jpg",c.PNG="image/png",c.SVG_XML="image/svg+xml",c.TIFF="image/tiff",c.WEBP="image/webp",c.X_MS_BMP="image/x-ms-bmp",c))(ye||{}),ot=Object.values(ye);function it(e){return ot.includes(e)}var fe=(c=>(c.GLTF="model/gltf+json",c.GLTF_BINARY="model/gltf-binary",c.WEBM="video/webm",c.MP4="video/mp4",c.M4V="video/x-m4v",c.OGV="video/ogv",c.OGG="video/ogg",c.MPEG="video/mpeg",c.QUICKTIME="video/quicktime",c.MOV="video/mov",c))(fe||{}),at=Object.values(fe);function rt(e){return at.includes(e)}var st=z$1.string({description:"In spec for OpenSea and other providers - also used when using EMBED main publication focusA URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported."}),f=z$1.object({item:d("Marketplaces will store any NFT image here."),altTag:z$1.string().optional().nullable().describe("The alt tag for accessibility."),cover:z$1.string().describe("The cover for any video or audio media.").optional().nullable().catch(null),type:z$1.string().optional().nullable().describe("This is the mime type of the media.")}).passthrough(),A=z$1.string({description:"The content of a publication."}).max(3e4);function Q(e){return e==null}function ct(e){return Q(e)||e.length===0}function dt(e){return Q(e)||e.length===0}var be=ce.extend({metadata_id:z$1.string({description:"The metadata_id can be anything but if your uploading to ipfs you will want it to be random. Using uuid could be an option!"}).catch(()=>v4()),content:A.transform(e=>e).optional().nullable(),media:f.array().catch(e=>e.input.filter(n=>f.safeParse(n).success)).optional().nullable().describe("This is digi supported attached media items to the publication."),appId:z$1.string().max(200).transform(N).optional().nullable().describe("The App Id that this publication belongs to."),version:z$1.nativeEnum(q)}),pt=be.extend({version:z$1.literal("1.0.0",{description:"The metadata version."})}).superRefine((e,n)=>{dt(e.content)&&Q(e.image)&&ct(e.media)&&(n.addIssue({code:z$1.ZodIssueCode.custom,path:["content"],message:"At least one between content, image, and media must be present. Content must be over 1 character."}),n.addIssue({code:z$1.ZodIssueCode.custom,path:["image"],message:"At least one between content, image, and media must be present."}),n.addIssue({code:z$1.ZodIssueCode.custom,path:["media"],message:"At least one between content, image, and media must be present."}));}),B=z$1.object({collect:z$1.object({publicationId:z$1.string().nullable(),thisPublication:z$1.boolean().nullable().optional()})}).strict(),W=z$1.object({eoa:z$1.object({address:z$1.string()})}).strict(),H=z$1.object({follow:z$1.object({profileId:z$1.string()})}).strict(),K=z$1.object({nft:z$1.object({contractAddress:z$1.string(),chainID:z$1.number(),contractType:z$1.nativeEnum(P),tokenIds:z$1.string().array().min(1).nullable().optional().catch(null)})}).strict(),J=z$1.object({profile:z$1.object({profileId:z$1.string()})}).strict(),$=z$1.object({token:z$1.object({amount:z$1.coerce.string(),chainID:z$1.coerce.number(),condition:z$1.nativeEnum(E),contractAddress:z$1.string(),decimals:z$1.coerce.number()})}).strict();function lt(e){return z$1.object({and:z$1.object({criteria:z$1.union(e).array().max(5,"Invalid AND condition: should have at most 5 conditions").refine(S,"Invalid AND condition: should have at least 2 conditions")})}).strict()}function me(e){return z$1.object({or:z$1.object({criteria:z$1.union(e).array().max(5,"Invalid OR condition: should have at most 5 conditions").refine(S,"Invalid OR condition: should have at least 2 conditions")})}).strict()}var ut=me([B,W,H,K,J,$,lt([B,W,H,K,J,$]),me([B,W,H,K,J,$])]),mt=z$1.object({original:z$1.object({url:d(),cover:z$1.string().nullable().optional().catch(null),altTag:z$1.string().nullable().optional().catch(null),mimeType:z$1.string().nullable().optional().catch(null)})}).passthrough(),ht=z$1.object({item:z$1.string().describe("Marketplaces will store any NFT image here."),altTag:z$1.string().optional().nullable().describe("The alt tag for accessibility."),cover:z$1.string().describe("The cover for any video or audio media.").optional().nullable(),type:z$1.string().optional().nullable().describe("This is the mime type of the media.")}).passthrough().catch(e=>{let n=mt.safeParse(e.input);return n.success?{item:n.data.original.url,altTag:n.data.original.altTag,cover:n.data.original.cover,type:n.data.original.mimeType}:e.input}),yt=z$1.object({content:z$1.string().optional().nullable(),media:ht.array().optional().nullable(),image:z$1.string().optional().nullable(),animation_url:z$1.string().optional().nullable(),external_url:z$1.string().optional().nullable()}),ft=z$1.object({accessCondition:ut,encryptedFields:yt,providerSpecificParams:z$1.object({encryptionKey:z$1.string().length(368,"Encryption key should be 368 characters long.")})}),g=be.extend({version:z$1.literal("2.0.0",{description:"The metadata version."}),locale:I,content:A.transform(C).optional().nullable(),contentWarning:z$1.nativeEnum(v,{description:"Specify a content warning."}).optional().nullable().catch(null),mainContentFocus:z$1.nativeEnum(p,{description:"Main content focus that for this publication."}),tags:z$1.string().array().optional().nullable().describe("Ability to tag your publication."),encryptionParams:ft.optional()}),bt=g.extend({mainContentFocus:z$1.literal(p.ARTICLE),content:A.min(1).transform(C)}),gt=g.extend({mainContentFocus:z$1.literal(p.AUDIO),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>nt(n?.type)),`Metadata ${p.AUDIO} requires an audio to be attached.`)}),Tt=g.extend({mainContentFocus:z$1.literal(p.EMBED),animation_url:st.optional().nullable()}),St=g.extend({mainContentFocus:z$1.literal(p.IMAGE),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>it(n.type)),`Metadata ${p.IMAGE} requires an image to be attached.`)}),xt=g.extend({mainContentFocus:z$1.literal(p.LINK),content:A.min(1).refine(e=>e.includes("https://"),`Metadata ${p.LINK} requires a valid https link`).transform(e=>e)}),Et=g.extend({mainContentFocus:z$1.literal(p.TEXT_ONLY),content:A.min(1).transform(e=>e),media:z$1.any().array().max(0,{message:"Metadata TEXT cannot have media"}).optional().nullable()}),ge=g.extend({mainContentFocus:z$1.union([z$1.literal(p.VIDEO),z$1.literal(p.SHORT_VIDEO)]),media:f.array().min(1).catch(e=>e.input.filter(n=>f.safeParse(n).success)).refine(e=>e.some(n=>rt(n.type)),`Metadata ${p.VIDEO} requires an image to be attached.`)}),At=ge.extend({mainContentFocus:z$1.literal(p.VIDEO)}),It=ge.extend({mainContentFocus:z$1.literal(p.SHORT_VIDEO)}),Ct=z$1.discriminatedUnion("mainContentFocus",[bt,gt,Tt,St,xt,Et,At,It]).transform(e=>e.mainContentFocus===p.VIDEO&&e.appId==="digitube-bytes"?{...e,mainContentFocus:p.SHORT_VIDEO}:e),Cn=z$1.object({version:z$1.nativeEnum(q)}).passthrough().transform((e,n)=>{switch(e.version){case"1.0.0":let a=pt.safeParse(e);return a.success?a.data:(a.error.issues.forEach(m=>{n.addIssue(m);}),z$1.NEVER);case"2.0.0":let i=Ct.safeParse(e);return i.success?i.data:(i.error.issues.forEach(m=>{n.addIssue(m);}),z$1.NEVER)}}); + +export { he as AudioMimeType, E as ConditionComparisonOperator, ht as EncryptedMediaSchema, ft as EncryptionParamsSchema, ye as ImageMimeType, D as MarketplaceMetadataAttributeDisplayType, f as MediaSchema, P as NftContractType, Se as ProfileMetadataAttributeDisplayType, Pt as ProfileMetadataSchema, v as PublicationContentWarning, p as PublicationMainFocus, Cn as PublicationMetadataSchema, pt as PublicationMetadataV1Schema, Ct as PublicationMetadataV2Schema, q as PublicationMetadataVersion, fe as VideoMimeType }; +//# sourceMappingURL=out.js.map +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/legacy/index.js.map b/dist/legacy/index.js.map new file mode 100644 index 00000000..30e205cf --- /dev/null +++ b/dist/legacy/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/legacy/profile.ts","../../src/legacy/publication.ts","../../src/marketplace.ts","../../src/primitives.ts","../../src/utils.ts","../../src/publication/common/index.ts","../../src/publication/common/encryption.ts","../../src/MetadataAttribute.ts"],"names":["v4","z","ProfileMetadataAttributeDisplayType","serializeValue","value","ProfileMetadataAttributeSchema","ProfileMetadataSchema","hasTwoOrMore","items","toLocale","localeRegex","localeLikeRegex","LocaleRegexSchema","LocaleSchema","ctx","match","val","exact","issue","toEncryptedString","allFailed","results","r","EncryptedStringSchema","encryptable","schema","options","s","nonEmpty","result","nonEmptyStringSchema","description","encryptableStringSchema","TagSchema","toAppId","AppIdSchema","toSignature","SignatureSchema","toMarkdown","markdown","toUri","uriSchema","geoUriRegex","LatitudeSchema","LongitudeSchema","GeoURISchema","latitude","longitude","latResult","lngResult","GeoPointSchema","PhysicalAddressSchema","toEvmAddress","EvmAddressSchema","toChainId","ChainIdSchema","NetworkAddressSchema","toTokenId","TokenIdSchema","AssetSchema","AmountSchema","toProfileId","ProfileIdSchema","toPublicationId","PublicationIdSchema","MarketplaceMetadataAttributeDisplayType","MarketplaceMetadataAttributeSchema","MarketplaceMetadataSchema","NftContractType","refineNftOwnershipCondition","condition","NftOwnershipConditionSchema","ConditionComparisonOperator","Erc20OwnershipConditionSchema","EoaOwnershipConditionSchema","ProfileOwnershipConditionSchema","FollowConditionSchema","CollectConditionSchema","AdvancedContractConditionSchema","andConditionSchema","AndConditionSchema","orConditionSchema","OrConditionSchema","refineAnyCondition","c","idx","AccessConditionSchema","root","toLitEncryptionKey","LitEncryptionKeySchema","EncryptedPaths","LitEncryptionStrategySchema","PublicationEncryptionStrategySchema","BooleanAttributeSchema","DateAttributeSchema","NumberAttributeSchema","StringAttributeSchema","JSONAttributeSchema","MetadataAttributeSchema","PublicationContentWarning","PublicationMetadataCommonSchema","input","uniqueTags","PublicationMetadataVersion","PublicationMainFocus","AudioMimeType","supportedAudioMimeTypes","isSupportedAudioMimeTypes","ImageMimeType","supportedImageMimeTypes","isSupportedImageMimeType","VideoMimeType","supportedVideoMimeTypes","isSupportedVideoMimeType","AnimationUrlSchema","MediaSchema","ContentSchema","isNullish","isEmptyArray","isEmptyString","PublicationCommonSchema","media","PublicationMetadataV1Schema","data","EoaOwnershipSchema","NftOwnershipSchema","ProfileOwnershipSchema","Erc20OwnershipSchema","andCondition","orCondition","EncryptedMediaWithWrongShapeSchema","EncryptedMediaSchema","EncryptedFieldsSchema","EncryptionParamsSchema","PublicationMetadataV2CommonSchema","PublicationMetadataV2ArticleSchema","PublicationMetadataV2AudioSchema","PublicationMetadataV2EmbedSchema","PublicationMetadataV2ImageSchema","PublicationMetadataV2LinkSchema","PublicationMetadataV2TextOnlySchema","PublicationMetadataV2BaseVideoSchema","PublicationMetadataV2VideoSchema","PublicationMetadataV2ShortVideoSchema","PublicationMetadataV2Schema","PublicationMetadataSchema","v1Result","v2Result"],"mappings":"AAAA,OAAS,MAAAA,OAAU,OACnB,OAAS,KAAAC,MAAS,MAEX,IAAKC,QACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,QAAA,IAMZ,SAASC,EAAeC,EAAwB,CAC9C,OAAKA,EAGD,OAAOA,GAAU,SACZA,EAGF,KAAK,UAAUA,CAAK,EANlB,EAOX,CAEA,IAAMC,GAAiCJ,EAAE,OAAO,CAG9C,YAAaA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,IAAI,EAExD,UAAWA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,IAAI,EAEtD,MAAOA,EAAE,QAAQ,EAAE,UAAUE,CAAc,EAE3C,IAAKF,EAAE,QAAQ,EAAE,UAAUE,CAAc,CAC3C,CAAC,EA0BYG,GAAwBL,EAClC,OAAO,CACN,QAASA,EAAE,QAAQ,OAAO,EAAE,SAAS,uBAAuB,EAAE,MAAM,OAAO,EAE3E,YAAaA,EACV,OAAO,CACN,YACE,6HAEJ,CAAC,EACA,MAAM,IAAMD,GAAG,CAAC,EAEnB,KAAMC,EAAE,OAAO,CAAE,YAAa,mCAAoC,CAAC,EAAE,SAAS,EAAE,MAAM,IAAI,EAE1F,IAAKA,EAAE,OAAO,CA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AAUrB,CAAI,EAE3D,OAAKwB,EAAS,QAOPA,EAAS,MANdA,EAAS,MAAM,OAAO,QAASjI,GAAU,CACvCJ,EAAI,SAASI,CAAK,CACpB,CAAC,EACMjB,EAAE,MAIf,CACF,CAAC","sourcesContent":["import { v4 } from 'uuid';\nimport { z } from 'zod';\n\nexport enum ProfileMetadataAttributeDisplayType {\n number = 'number',\n string = 'string',\n date = 'date',\n}\n\nfunction serializeValue(value: unknown): string {\n if (!value) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n\n return JSON.stringify(value);\n}\n\nconst ProfileMetadataAttributeSchema = z.object({\n // On the paper ProfileMetadataAttributeDisplayType but validation never checked for it\n // so to avoid breaking changes we are keeping it as string\n displayType: z.string().nullable().optional().catch(null),\n\n traitType: z.string().nullable().optional().catch(null),\n\n value: z.unknown().transform(serializeValue),\n\n key: z.unknown().transform(serializeValue),\n});\nexport type ProfileMetadataAttribute = z.infer;\n\n/**\n * Profile Metadata schema.\n *\n * @category Parse\n *\n * @example\n * with `parse`:\n * ```ts\n * legacy.ProfileMetadataSchema.parse(valid); // => legacy.ProfileMetadata\n *\n * legacy.ProfileMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * legacy.ProfileMetadataSchema.safeParse(valid);\n * // => { success: true, data: legacy.ProfileMetadata }\n *\n * legacy.ProfileMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const ProfileMetadataSchema = z\n .object({\n version: z.literal('1.0.0').describe('The metadata version.').catch('1.0.0'),\n\n metadata_id: z\n .string({\n description:\n 'The metadata id can be anything but if your uploading to ipfs ' +\n 'you will want it to be random. Using uuid could be an option!',\n })\n .catch(() => v4()),\n\n name: z.string({ description: 'The display name for the profile.' }).nullable().catch(null),\n\n bio: z.string({ description: 'The bio for the profile.' }).nullable().optional().catch(null),\n\n cover_picture: z.string({ description: 'Cover picture.' }).nullable().optional().catch(null),\n\n attributes: ProfileMetadataAttributeSchema.array()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.',\n )\n .optional(),\n })\n .passthrough(); // make it more loose to allow for past profile metadata\n\nexport type ProfileMetadata = z.infer;\n","/* eslint-disable no-case-declarations */\nimport { v4 } from 'uuid';\nimport { z } from 'zod';\n\nimport { MarketplaceMetadataSchema } from '../marketplace.js';\nimport {\n LocaleSchema,\n Markdown,\n nonEmptyStringSchema,\n toAppId,\n toMarkdown,\n} from '../primitives.js';\nimport * as latest from '../publication';\nimport {\n ConditionComparisonOperator,\n NftContractType,\n PublicationContentWarning,\n} from '../publication/common';\nimport { hasTwoOrMore } from '../utils.js';\n\n// re-export under legacy namespace\nexport { ConditionComparisonOperator, NftContractType, PublicationContentWarning };\nexport { MarketplaceMetadataAttributeDisplayType } from '../marketplace.js';\nexport type { MarketplaceMetadataAttribute, MarketplaceMetadata } from '../marketplace.js';\nexport type * from '../primitives.js';\n\nexport enum PublicationMetadataVersion {\n V1 = '1.0.0',\n V2 = '2.0.0',\n}\n\nexport enum PublicationMainFocus {\n ARTICLE = latest.PublicationMainFocus.ARTICLE,\n AUDIO = latest.PublicationMainFocus.AUDIO,\n EMBED = latest.PublicationMainFocus.EMBED,\n IMAGE = latest.PublicationMainFocus.IMAGE,\n LINK = latest.PublicationMainFocus.LINK,\n SHORT_VIDEO = latest.PublicationMainFocus.SHORT_VIDEO,\n TEXT_ONLY = latest.PublicationMainFocus.TEXT_ONLY,\n VIDEO = latest.PublicationMainFocus.VIDEO,\n}\n\nexport enum AudioMimeType {\n AAC = 'audio/aac',\n FLAC = 'audio/flac',\n MP3 = 'audio/mpeg',\n MP4_AUDIO = 'audio/mp4',\n OGG_AUDIO = 'audio/ogg',\n WAV = 'audio/wav',\n WAV_VND = 'audio/vnd.wave',\n WEBM_AUDIO = 'audio/webm',\n}\n\nconst supportedAudioMimeTypes = Object.values(AudioMimeType);\n\nfunction isSupportedAudioMimeTypes(value: unknown): value is AudioMimeType {\n return supportedAudioMimeTypes.includes(value as AudioMimeType);\n}\n\nexport enum ImageMimeType {\n BMP = 'image/bmp',\n GIF = 'image/gif',\n HEIC = 'image/heic',\n JPEG = 'image/jpeg',\n JPG = 'image/jpg',\n PNG = 'image/png',\n SVG_XML = 'image/svg+xml',\n TIFF = 'image/tiff',\n WEBP = 'image/webp',\n X_MS_BMP = 'image/x-ms-bmp',\n}\n\nconst supportedImageMimeTypes = Object.values(ImageMimeType);\n\nfunction isSupportedImageMimeType(value: unknown): value is ImageMimeType {\n return supportedImageMimeTypes.includes(value as ImageMimeType);\n}\n\nexport enum VideoMimeType {\n GLTF = 'model/gltf+json',\n GLTF_BINARY = 'model/gltf-binary',\n WEBM = 'video/webm',\n MP4 = 'video/mp4',\n M4V = 'video/x-m4v',\n OGV = 'video/ogv',\n OGG = 'video/ogg',\n MPEG = 'video/mpeg',\n QUICKTIME = 'video/quicktime',\n MOV = 'video/mov',\n}\n\nconst supportedVideoMimeTypes = Object.values(VideoMimeType);\n\nfunction isSupportedVideoMimeType(value: unknown): value is VideoMimeType {\n return supportedVideoMimeTypes.includes(value as VideoMimeType);\n}\n\nconst AnimationUrlSchema = z.string({\n description:\n 'In spec for OpenSea and other providers - also used when using EMBED main publication focus' +\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n});\n\n// const OpenSeaSchema = z\n// .object({\n// description: z\n// .string({\n// description:\n// 'A human-readable description of the item. It could be plain text or markdown.',\n// })\n// .optional()\n// .nullable()\n// .catch(null),\n\n// external_url: z\n// .string({\n// description:\n// `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n// 'and will allow users to leave OpenSea and view the item on the site.',\n// })\n// .optional()\n// .nullable(),\n\n// name: z.string({ description: 'Name of the NFT item.' }),\n\n// attributes: MarketplaceMetadataAttributeSchema.array()\n// .describe(\n// 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n// )\n// .catch([]),\n\n// image: z\n// .string({\n// description: 'Marketplaces will store any NFT image here.',\n// })\n// .optional()\n// .nullable()\n// .catch(null),\n\n// animation_url: AnimationUrlSchema.optional().nullable(),\n\n// version: z.nativeEnum(PublicationMetadataVersion),\n// })\n// .passthrough(); // loose validation for any unknown fields\n\n/**\n * @internal\n */\nexport const MediaSchema = z\n .object({\n item: nonEmptyStringSchema('Marketplaces will store any NFT image here.'), // it can be `This publication is gated.`\n altTag: z.string().optional().nullable().describe('The alt tag for accessibility.'),\n cover: z\n .string() // it can be `This publication is gated.`\n .describe('The cover for any video or audio media.')\n .optional()\n .nullable()\n .catch(null),\n type: z.string().optional().nullable().describe('This is the mime type of the media.'),\n })\n .passthrough(); // loose validation for media\nexport type Media = z.infer;\n/**\n * @deprecated Use `Media` instead.\n */\nexport type PublicationMetadataMedia = Media;\n\nconst ContentSchema = z\n .string({\n description: 'The content of a publication.',\n })\n .max(30000);\n\nfunction isNullish(value: unknown): value is null | undefined {\n return value === null || value === undefined;\n}\n\nfunction isEmptyArray(value: T[] | null | undefined): value is [] | null | undefined {\n return isNullish(value) || value.length === 0;\n}\n\nfunction isEmptyString(value: string | null | undefined): value is '' | null | undefined {\n return isNullish(value) || value.length === 0;\n}\n\nconst PublicationCommonSchema = MarketplaceMetadataSchema.extend({\n metadata_id: z\n .string({\n description:\n 'The metadata_id can be anything but if your uploading to ipfs ' +\n 'you will want it to be random. Using uuid could be an option!',\n })\n .catch(() => v4()),\n\n content: ContentSchema.transform((value) => value as Markdown)\n .optional()\n .nullable(),\n\n media: MediaSchema.array()\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .optional()\n .nullable()\n .describe('This is digi supported attached media items to the publication.'),\n\n // bespoke z.string() instead of AppIdSchema to emulate past behavior\n appId: z\n .string()\n .max(200)\n .transform(toAppId)\n .optional()\n .nullable()\n .describe('The App Id that this publication belongs to.'),\n\n version: z.nativeEnum(PublicationMetadataVersion),\n});\n\n/**\n * @internal\n */\nexport const PublicationMetadataV1Schema = PublicationCommonSchema.extend({\n version: z.literal(PublicationMetadataVersion.V1, { description: 'The metadata version.' }),\n}).superRefine((data, ctx) => {\n if (isEmptyString(data.content) && isNullish(data.image) && isEmptyArray(data.media)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['content'],\n message:\n 'At least one between content, image, and media must be present. ' +\n 'Content must be over 1 character.',\n });\n\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['image'],\n message: 'At least one between content, image, and media must be present.',\n });\n\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['media'],\n message: 'At least one between content, image, and media must be present.',\n });\n }\n});\nexport type PublicationMetadataV1 = z.infer;\n\nconst CollectConditionSchema = z\n .object({\n collect: z.object({\n publicationId: z.string().nullable(),\n thisPublication: z.boolean().nullable().optional(),\n }),\n })\n .strict();\nexport type CollectCondition = z.infer;\n\nconst EoaOwnershipSchema = z\n .object({\n eoa: z.object({\n address: z.string(),\n }),\n })\n .strict();\nexport type EoaOwnership = z.infer;\n\nconst FollowConditionSchema = z\n .object({\n follow: z.object({\n profileId: z.string(),\n }),\n })\n .strict();\nexport type FollowCondition = z.infer;\n\nconst NftOwnershipSchema = z\n .object({\n nft: z.object({\n contractAddress: z.string(),\n chainID: z.number(),\n contractType: z.nativeEnum(NftContractType),\n tokenIds: z.string().array().min(1).nullable().optional().catch(null),\n }),\n })\n .strict();\n\nexport type NftOwnership = z.infer;\n\nconst ProfileOwnershipSchema = z\n .object({\n profile: z.object({\n profileId: z.string(),\n }),\n })\n .strict();\nexport type ProfileOwnership = z.infer;\n\nconst Erc20OwnershipSchema = z\n .object({\n token: z.object({\n amount: z.coerce.string(),\n chainID: z.coerce.number(),\n condition: z.nativeEnum(ConditionComparisonOperator),\n contractAddress: z.string(),\n decimals: z.coerce.number(),\n }),\n })\n .strict();\nexport type Erc20Ownership = z.infer;\n\nexport type AndCondition = {\n and: {\n criteria: [T, T, ...T[]];\n };\n};\n\nfunction andCondition<\n Criteria extends [z.ZodType, z.ZodType, ...z.ZodType[]],\n>(options: Criteria): z.Schema>, z.ZodTypeDef, object> {\n return z\n .object({\n and: z.object({\n criteria: z\n .union(options)\n .array()\n .max(5, 'Invalid AND condition: should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Invalid AND condition: should have at least 2 conditions'),\n }),\n })\n .strict();\n}\n\nexport type OrCondition = {\n or: {\n criteria: [T, T, ...T[]];\n };\n};\n\nfunction orCondition<\n Criteria extends [z.ZodType, z.ZodType, ...z.ZodType[]],\n>(options: Criteria): z.Schema>, z.ZodTypeDef, object> {\n return z\n .object({\n or: z.object({\n criteria: z\n .union(options)\n .array()\n .max(5, 'Invalid OR condition: should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Invalid OR condition: should have at least 2 conditions'),\n }),\n })\n .strict();\n}\n\nconst AccessConditionSchema = orCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n andCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n ]),\n orCondition([\n CollectConditionSchema,\n EoaOwnershipSchema,\n FollowConditionSchema,\n NftOwnershipSchema,\n ProfileOwnershipSchema,\n Erc20OwnershipSchema,\n ]),\n]);\nexport type AccessCondition = z.infer;\n\nconst EncryptedMediaWithWrongShapeSchema = z\n .object({\n original: z.object({\n url: nonEmptyStringSchema(),\n cover: z.string().nullable().optional().catch(null),\n altTag: z.string().nullable().optional().catch(null),\n mimeType: z.string().nullable().optional().catch(null),\n }),\n })\n .passthrough();\n\n/**\n * @internal\n */\nexport const EncryptedMediaSchema = z\n .object({\n item: z.string().describe('Marketplaces will store any NFT image here.'),\n altTag: z.string().optional().nullable().describe('The alt tag for accessibility.'),\n cover: z.string().describe('The cover for any video or audio media.').optional().nullable(),\n type: z.string().optional().nullable().describe('This is the mime type of the media.'),\n })\n .passthrough()\n .catch((ctx) => {\n const result = EncryptedMediaWithWrongShapeSchema.safeParse(ctx.input);\n\n if (result.success) {\n return {\n item: result.data.original.url,\n altTag: result.data.original.altTag,\n cover: result.data.original.cover,\n type: result.data.original.mimeType,\n };\n }\n\n return ctx.input;\n });\nexport type EncryptedMedia = z.infer;\n\nconst EncryptedFieldsSchema = z.object({\n content: z.string().optional().nullable(),\n media: EncryptedMediaSchema.array().optional().nullable(),\n image: z.string().optional().nullable(),\n animation_url: z.string().optional().nullable(),\n external_url: z.string().optional().nullable(),\n});\nexport type EncryptedFields = z.infer;\n\n/**\n * @internal\n */\nexport const EncryptionParamsSchema = z.object({\n accessCondition: AccessConditionSchema,\n encryptedFields: EncryptedFieldsSchema,\n providerSpecificParams: z.object({\n encryptionKey: z.string().length(368, 'Encryption key should be 368 characters long.'),\n }),\n});\nexport type EncryptionParams = z.infer;\n\nconst PublicationMetadataV2CommonSchema = PublicationCommonSchema.extend({\n version: z.literal(PublicationMetadataVersion.V2, { description: 'The metadata version.' }),\n\n locale: LocaleSchema,\n\n content: ContentSchema.transform(toMarkdown).optional().nullable(),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional()\n .nullable()\n .catch(null),\n\n mainContentFocus: z.nativeEnum(PublicationMainFocus, {\n description: 'Main content focus that for this publication.',\n }),\n\n tags: z.string().array().optional().nullable().describe('Ability to tag your publication.'),\n\n encryptionParams: EncryptionParamsSchema.optional(),\n});\n\nconst PublicationMetadataV2ArticleSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.ARTICLE),\n\n content: ContentSchema.min(1).transform(toMarkdown),\n});\nexport type PublicationMetadataV2Article = z.infer;\n\nconst PublicationMetadataV2AudioSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.AUDIO),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedAudioMimeTypes(media?.type)),\n `Metadata ${PublicationMainFocus.AUDIO} requires an audio to be attached.`,\n ),\n});\nexport type PublicationMetadataV2Audio = z.infer;\n\nconst PublicationMetadataV2EmbedSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.EMBED),\n\n animation_url: AnimationUrlSchema.optional().nullable(), // should not really be null but some publications have it as null\n});\nexport type PublicationMetadataV2Embed = z.infer;\n\nconst PublicationMetadataV2ImageSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.IMAGE),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedImageMimeType(media.type)),\n `Metadata ${PublicationMainFocus.IMAGE} requires an image to be attached.`,\n ),\n});\nexport type PublicationMetadataV2Image = z.infer;\n\nconst PublicationMetadataV2LinkSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.LINK),\n\n content: ContentSchema.min(1)\n .refine(\n (value) => value.includes('https://'),\n `Metadata ${PublicationMainFocus.LINK} requires a valid https link`,\n )\n .transform((value) => value as Markdown),\n});\nexport type PublicationMetadataV2Link = z.infer;\n\nconst PublicationMetadataV2TextOnlySchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.TEXT_ONLY),\n\n content: ContentSchema.min(1).transform((value) => value as Markdown),\n\n media: z\n .any()\n .array()\n .max(0, { message: 'Metadata TEXT cannot have media' })\n .optional()\n .nullable(),\n});\nexport type PublicationMetadataV2TextOnly = z.infer;\n\nconst PublicationMetadataV2BaseVideoSchema = PublicationMetadataV2CommonSchema.extend({\n mainContentFocus: z.union([\n z.literal(PublicationMainFocus.VIDEO),\n z.literal(PublicationMainFocus.SHORT_VIDEO),\n ]),\n\n media: MediaSchema.array()\n .min(1)\n .catch((ctx) => ctx.input.filter((media) => MediaSchema.safeParse(media).success) as Media[])\n .refine(\n (value) => value.some((media) => isSupportedVideoMimeType(media.type)),\n `Metadata ${PublicationMainFocus.VIDEO} requires an image to be attached.`,\n ),\n});\nconst PublicationMetadataV2VideoSchema = PublicationMetadataV2BaseVideoSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.VIDEO),\n});\nconst PublicationMetadataV2ShortVideoSchema = PublicationMetadataV2BaseVideoSchema.extend({\n mainContentFocus: z.literal(PublicationMainFocus.SHORT_VIDEO),\n});\n\nexport type PublicationMetadataV2Video =\n | z.infer\n | z.infer;\n\n/**\n * @internal\n */\nexport const PublicationMetadataV2Schema = z\n .discriminatedUnion('mainContentFocus', [\n PublicationMetadataV2ArticleSchema,\n PublicationMetadataV2AudioSchema,\n PublicationMetadataV2EmbedSchema,\n PublicationMetadataV2ImageSchema,\n PublicationMetadataV2LinkSchema,\n PublicationMetadataV2TextOnlySchema,\n PublicationMetadataV2VideoSchema,\n PublicationMetadataV2ShortVideoSchema,\n ])\n .transform((data) => {\n if (data.mainContentFocus === PublicationMainFocus.VIDEO && data.appId === 'digitube-bytes') {\n return {\n ...data,\n mainContentFocus: PublicationMainFocus.SHORT_VIDEO,\n };\n }\n return data;\n });\nexport type PublicationMetadataV2 = z.infer;\n\nexport type PublicationMetadata = PublicationMetadataV1 | PublicationMetadataV2;\n\n/**\n * A union of Publication Metadata v1 ad v2.\n *\n * @example\n * with `parse`:\n * ```ts\n * legacy.PublicationMetadataSchema.parse(valid); // => legacy.PublicationMetadata\n *\n * legacy.PublicationMetadataSchema.parse(invalid); // => throws ZodError\n * ```\n *\n * @example\n * with `safeParse`:\n * ```ts\n * legacy.PublicationMetadataSchema.safeParse(valid);\n * // => { success: true, data: legacy.PublicationMetadata }\n *\n * legacy.PublicationMetadataSchema.safeParse(invalid);\n * // => { success: false, error: ZodError }\n * ```\n */\nexport const PublicationMetadataSchema: z.ZodType = z\n .object({\n // although not optional it will allow the refine function to provide better error message\n version: z.nativeEnum(PublicationMetadataVersion),\n })\n .passthrough()\n .transform((data, ctx) => {\n switch (data.version) {\n case PublicationMetadataVersion.V1:\n const v1Result = PublicationMetadataV1Schema.safeParse(data);\n\n if (!v1Result.success) {\n v1Result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n return v1Result.data;\n\n case PublicationMetadataVersion.V2:\n const v2Result = PublicationMetadataV2Schema.safeParse(data);\n\n if (!v2Result.success) {\n v2Result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return v2Result.data;\n }\n });\n","import { z } from 'zod';\n\nimport { Markdown, URI, markdown, nonEmptyStringSchema, uriSchema } from './primitives.js';\n\n/**\n * The display type of a marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport enum MarketplaceMetadataAttributeDisplayType {\n NUMBER = 'number',\n STRING = 'string',\n DATE = 'date',\n}\n\n/**\n * A marketplace metadata attribute.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\nexport type MarketplaceMetadataAttribute = {\n value?: string | number | undefined;\n display_type?: MarketplaceMetadataAttributeDisplayType | undefined;\n trait_type?: string | undefined;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataAttributeSchema: z.ZodType<\n MarketplaceMetadataAttribute,\n z.ZodTypeDef,\n object\n> = z\n .object({\n display_type: z.nativeEnum(MarketplaceMetadataAttributeDisplayType).optional(),\n trait_type: nonEmptyStringSchema('The name of the trait.').optional(),\n value: z.union([z.string(), z.number()]).optional(),\n })\n .passthrough(); // make it more loose to allow for future marketplace extensions\n\n/**\n * The metadata standard for marketplace(s).\n *\n * @see https://docs.opensea.io/docs/metadata-standards#metadata-structure\n */\nexport type MarketplaceMetadata = {\n /**\n * A human-readable description of the item. It could be plain text or markdown.\n */\n description?: Markdown | null;\n /**\n * This is the URL that will appear below the asset's image on OpenSea and others etc.\n * and will allow users to leave OpenSea and view the item on the site.\n */\n external_url?: URI | null;\n /**\n * Name of the NFT item.\n */\n name?: string;\n /**\n * These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.\n *\n * @see https://docs.opensea.io/docs/metadata-standards#attributes\n */\n attributes?: MarketplaceMetadataAttribute[];\n /**\n * Marketplaces will store any NFT image here.\n */\n image?: URI | null;\n /**\n * A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV,\n * and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n * `animation_url` also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas,\n * WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.\n */\n animation_url?: URI | null;\n};\n\n/**\n * @internal\n */\nexport const MarketplaceMetadataSchema = z\n .object({\n description: markdown(\n z.string({\n description:\n 'A human-readable description of the item. It could be plain text or markdown.',\n }),\n )\n .optional()\n .nullable()\n .catch(null),\n\n external_url: uriSchema(\n `This is the URL that will appear below the asset's image on OpenSea and others etc. ` +\n 'and will allow users to leave OpenSea and view the item on the site.',\n )\n .optional()\n .nullable()\n .catch(null),\n\n name: z.string({ description: 'Name of the NFT item.' }).optional(),\n\n attributes: MarketplaceMetadataAttributeSchema.array()\n .optional()\n .describe(\n 'These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.',\n )\n .catch([]),\n\n image: uriSchema('Marketplaces will store any NFT image here.')\n .optional()\n .nullable()\n .catch(null),\n\n animation_url: uriSchema(\n 'A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, ' +\n 'and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. ' +\n 'Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, ' +\n 'WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.',\n )\n .optional()\n .nullable()\n .catch(null),\n })\n .passthrough(); // loose validation for any unknown fields;\n","import { z } from 'zod';\n\nimport { formatZodError } from './formatters.js';\nimport { Brand, invariant, never } from './utils.js';\n\n/**\n * A locale identifier.\n *\n * Syntax: [language]-[region] where:\n * - [language] is a lowercase ISO 639-1 language code\n * - [region] is an optional uppercase ISO 3166-1 alpha-2 country code\n *\n * You can pass just the language code, or both the language and region codes.\n *\n * @example\n * - `en` any English\n * - `en-US` English as used in the United States\n * - `en-GB` English as used in the United Kingdom\n */\nexport type Locale = Brand;\n/**\n * @internal\n */\nexport function toLocale(value: string): Locale {\n return value as Locale;\n}\n\n// using ranges instead of `i` flag so that resulting JSON Schema includes case-insensitivity.\nconst localeRegex = /^[a-z]{2}(?:-[a-zA-Z]{2})?$/;\nconst localeLikeRegex = /^([a-z]{2})(?:-[A-Z0-9]{2,3})?$/i;\n\nconst LocaleRegexSchema = z\n .string({\n description:\n 'A Locale Identifier in the `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n })\n .regex(\n localeRegex,\n 'Should be a valid Locale Identifier. Expected `[language]` OR `[language]-[region]` format (e.g. `en`, `en-GB`, `it`). ' +\n '[language] MUST be in the ISO 639-1 format. [region], if provided, MUST be in the ISO 3166-1 alpha-2 format.',\n );\n\n/**\n * @internal\n */\nexport const LocaleSchema: z.ZodType = LocaleRegexSchema.catch(\n (ctx) => {\n // attempts to recover the language code at least\n const match = localeLikeRegex.exec(ctx.input);\n if (match) {\n return match[1] as string;\n }\n return ctx.input;\n },\n)\n .superRefine((val, ctx): val is Locale => {\n const exact = LocaleRegexSchema.safeParse(val);\n\n if (!exact.success) {\n exact.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n }\n return z.NEVER;\n })\n .transform(toLocale);\n\n/**\n * A base64 encoded encrypted string value.\n */\nexport type EncryptedString = Brand;\nfunction toEncryptedString(value: string): EncryptedString {\n return value as EncryptedString;\n}\n\nfunction allFailed(\n results: z.SafeParseReturnType[],\n): results is z.SafeParseError[] {\n return results.every((r) => !r.success);\n}\n/**\n * @internal\n */\nexport const EncryptedStringSchema = z\n .string()\n .describe('An encrypted value.')\n .regex(\n /^\\S+$/, // Approximation of Lit Encrypted value\n 'Should be a valid encrypted value.',\n )\n .transform(toEncryptedString);\n\n/**\n * Modifies a schema to accept an encrypted string value as well as its decrypted version.\n *\n * @internal\n */\nexport function encryptable(schema: z.ZodType) {\n const options = [schema, EncryptedStringSchema] as const;\n return z\n .union(options)\n .catch((ctx) => ctx.input as T)\n .superRefine((val, ctx): val is T | EncryptedString => {\n const results = options.map((s) => s.safeParse(val));\n\n if (allFailed(results)) {\n ctx.addIssue({\n code: z.ZodIssueCode.invalid_union,\n unionErrors: results.map((r) => r.error),\n });\n }\n return z.NEVER;\n });\n}\n\n/**\n * @internal\n */\nexport function nonEmpty(schema: z.ZodString): z.ZodType {\n return z.preprocess((val, ctx) => {\n const result = z.string().safeParse(val);\n\n if (!result.success) {\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n return z.NEVER;\n }\n\n return result.data\n .replace(\n // eslint-disable-next-line no-control-regex\n /^[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*/,\n '',\n )\n .replace(\n // eslint-disable-next-line no-control-regex\n /[\\u0000\\u0007\\u000e\\u000f\\u200b-\\u200d\\ufeff]*$/,\n '',\n )\n .trim();\n }, schema.min(1));\n}\n/**\n * @internal\n */\nexport function nonEmptyStringSchema(description?: string) {\n return nonEmpty(z.string({ description }));\n}\n/**\n * @internal\n */\nexport function encryptableStringSchema(description: string) {\n return encryptable(nonEmptyStringSchema(description));\n}\n\n/**\n * An arbitrary string or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableString = string | EncryptedString;\n\n/**\n * An arbitrary label.\n *\n * All lowercased, 50 characters max.\n */\nexport type Tag = Brand;\n/**\n * @internal\n */\nexport function toTag(value: string): Tag {\n return value as Tag;\n}\n/**\n * @internal\n */\nexport const TagSchema: z.ZodType = z\n .string()\n .describe('An arbitrary tag.')\n .min(1)\n .max(50)\n .transform((value) => toTag(value.toLowerCase()));\n\n/**\n * A unique DiGi App identifier.\n */\nexport type AppId = Brand;\n/**\n * @internal\n */\nexport function toAppId(value: string): AppId {\n return value as AppId;\n}\n/**\n * @internal\n */\nexport const AppIdSchema: z.ZodType = z\n .string()\n .describe('A DiGi App identifier.')\n .min(1)\n .max(200)\n .transform(toAppId);\n\n/**\n * A cryptographic signature.\n */\nexport type Signature = Brand;\n/**\n * @internal\n */\nexport function toSignature(value: string): Signature {\n return value as Signature;\n}\n/**\n * @internal\n */\nexport const SignatureSchema: z.ZodType = z\n .string()\n .min(1)\n .describe('A cryptographic signature of the DiGi metadata.')\n .transform(toSignature);\n\n/**\n * A markdown text.\n */\nexport type Markdown = Brand;\n/**\n * @internal\n */\nexport function toMarkdown(value: string): Markdown {\n return value as Markdown;\n}\n\n/**\n * @internal\n */\nexport function markdown(\n schema: z.ZodType,\n): z.ZodType {\n return schema.transform(toMarkdown);\n}\n\n/**\n * A markdown text or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableMarkdown = Markdown | EncryptedString;\n\n/**\n * A Uniform Resource Identifier.\n *\n * It could be a URL pointing to a specific resource,\n * an IPFS URI (e.g. ipfs://Qm...), or an Arweave URI (e.g. ar://Qm...).\n */\nexport type URI = Brand;\n/**\n * @internal\n */\nexport function toUri(value: string): URI {\n return value as URI;\n}\n/**\n * @internal\n */\nexport function uriSchema(\n description: string = 'A Uniform Resource Identifier. ',\n): z.ZodType {\n return z\n .string({ description })\n .min(6) // [ar://.]\n .url({ message: 'Should be a valid URI' }) // reads url() but works well with URIs too and uses format: 'uri' in the JSON schema\n .transform(toUri);\n}\n/**\n * @internal\n */\nexport function encryptableUriSchema(description?: string) {\n return encryptable(uriSchema(description));\n}\n\n/**\n * A URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableURI = URI | EncryptedString;\n\nconst geoUriRegex = /^geo:(-?\\d+\\.?\\d*),(-?\\d+\\.?\\d*)$/;\n\nconst LatitudeSchema = z.coerce.number({ description: 'The latitude.' }).min(-90).max(90);\n\nconst LongitudeSchema = z.coerce.number({ description: 'The longitude.' }).min(-180).max(180);\n\n/**\n * A Geographic coordinate as subset of Geo URI (RFC 5870).\n *\n * Currently only supports the `geo:lat,lng` format.\n *\n * Use the {@link geoUri} helper to create one, do not attempt to create one manually.\n *\n * @example\n * ```ts\n * 'geo:40.689247,-74.044502'\n *\n * 'geo:41.890209,12.492231'\n * ```\n *\n * @see https://tools.ietf.org/html/rfc5870\n */\nexport type GeoURI = `geo:${number},${number}`;\n/**\n * @internal\n */\nexport const GeoURISchema = z\n .string()\n .describe(\n 'A Geographic coordinate as subset of Geo URI (RFC 5870). ' +\n 'Currently only supports the `geo:lat,lng` format.',\n )\n .regex(geoUriRegex, 'Should be a Geo URI. Expected `geo:lat,lng`.')\n .superRefine((val, ctx): val is GeoURI => {\n const match = geoUriRegex.exec(val);\n\n if (!match) {\n // should never happen\n return z.NEVER;\n }\n\n const [, latitude = '', longitude = ''] = match;\n\n const latResult = LatitudeSchema.safeParse(latitude);\n if (!latResult.success) {\n latResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lat'],\n }),\n );\n }\n\n const lngResult = LongitudeSchema.safeParse(longitude);\n if (!lngResult.success) {\n lngResult.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: [...ctx.path, 'lng'],\n }),\n );\n }\n\n return z.NEVER;\n });\n\n/**\n * A geographic point on the Earth.\n */\nexport type GeoPoint = {\n /**\n * The latitude in decimal degrees (from -90° to +90°).\n */\n lat: number;\n\n /**\n * The longitude in decimal degrees (from -180° to +180°).\n */\n lng: number;\n};\n/**\n * @internal\n */\nexport const GeoPointSchema: z.ZodType = z.object({\n lat: LatitudeSchema,\n lng: LongitudeSchema,\n});\n\n/**\n * Helper to create a Geo URI from a {@link GeoPoint}.\n *\n * @category Helpers\n * @example\n * ```ts\n * geoUri({ lat: 40.689247, lng: -74.044502 }) // 'geo:40.689247,-74.044502'\n *\n * geoUri({ lat: 41.890209, lng: 12.492231 }) // 'geo:41.890209,12.492231'\n * ```\n */\nexport function geoUri(point: GeoPoint): GeoURI {\n const result = GeoPointSchema.safeParse(point);\n\n if (result.success) {\n const { lat, lng } = result.data;\n return `geo:${lat},${lng}`;\n }\n\n never(formatZodError(result.error));\n}\n\n/**\n * Helper to parse a {@link GeoPoint} from a {@link GeoURI}.\n *\n * @category Helpers\n */\nexport function geoPoint(value: GeoURI): GeoPoint {\n const uri = GeoURISchema.parse(value);\n\n const match = geoUriRegex.exec(uri);\n\n invariant(match, 'Invalid Geo URI format. Expected `geo:lat,lng`.');\n\n const [, lat = '', lng = ''] = match;\n return GeoPointSchema.parse({ lat, lng });\n}\n/**\n * @internal\n */\nexport function encryptableGeoUriSchema(description: string) {\n return encryptable(GeoURISchema.describe(description));\n}\n\n/**\n * A Geo URI or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableGeoURI = GeoURI | EncryptedString;\n\n/**\n * The address of a physical location.\n */\nexport type PhysicalAddress = {\n /**\n * The full mailing address formatted for display.\n */\n formatted?: EncryptableString;\n /**\n * The street address including house number, street name, P.O. Box,\n * apartment or unit number and extended multi-line address information.\n */\n streetAddress?: EncryptableString;\n /**\n * The city or locality.\n */\n locality: EncryptableString;\n /**\n * The state or region.\n */\n region?: EncryptableString;\n /**\n * The zip or postal code.\n */\n postalCode?: EncryptableString;\n /**\n * The country name component.\n */\n country: EncryptableString;\n};\n/**\n * @internal\n */\nexport const PhysicalAddressSchema: z.ZodType = z.object({\n formatted: encryptableStringSchema('The full mailing address formatted for display.').optional(),\n streetAddress: encryptableStringSchema(\n 'The street address including house number, street name, P.O. Box, ' +\n 'apartment or unit number and extended multi-line address information.',\n ).optional(),\n locality: encryptableStringSchema('The city or locality.'),\n region: encryptableStringSchema('The state or region.').optional(),\n postalCode: encryptableStringSchema('The zip or postal code.').optional(),\n country: encryptableStringSchema('The country name component.'),\n});\n\n/**\n * An ISO 8601 in the JS simplified format: `YYYY-MM-DDTHH:mm:ss.sssZ`.\n */\nexport type DateTime = Brand;\n/**\n * @internal\n */\nexport function toDateTime(value: string): DateTime {\n return value as DateTime;\n}\n/**\n * @internal\n */\nexport function datetimeSchema(description: string): z.ZodType {\n return z.string({ description }).datetime().transform(toDateTime);\n}\n/**\n * @internal\n */\nexport function encryptableDateTimeSchema(description: string) {\n return encryptable(datetimeSchema(description));\n}\n\n/**\n * A DateTime or its encrypted version.\n *\n * For example in the context of a token-gated publication, fields of this type are encrypted.\n */\nexport type EncryptableDateTime = DateTime | EncryptedString;\n\n/**\n * An EVM compatible address.\n */\nexport type EvmAddress = Brand;\n/**\n * @internal\n */\nexport function toEvmAddress(value: string): EvmAddress {\n return value as EvmAddress;\n}\n/**\n * @internal\n */\nexport const EvmAddressSchema: z.ZodType = z\n .string()\n .length(42)\n .describe('An EVM compatible address.')\n .transform(toEvmAddress);\n\n/**\n * An EVM compatible Chain Id.\n */\nexport type ChainId = Brand;\n/**\n * @internal\n */\nexport function toChainId(value: number): ChainId {\n return value as ChainId;\n}\n/**\n * @internal\n */\nexport const ChainIdSchema: z.ZodType = z\n .number()\n .positive()\n .transform(toChainId);\n\n/**\n * An EVM compatible address on a specific chain.\n */\nexport type NetworkAddress = {\n /**\n * The chain id.\n */\n chainId: ChainId;\n /**\n * The EVM address.\n */\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const NetworkAddressSchema: z.ZodType = z.object(\n {\n chainId: ChainIdSchema,\n address: EvmAddressSchema,\n },\n {\n description: 'An EVM compatible address on a specific chain.',\n },\n);\n\n/**\n * An NFT token identifier.\n */\nexport type TokenId = Brand;\n/**\n * @internal\n */\nexport function toTokenId(value: string): TokenId {\n return value as TokenId;\n}\n/**\n * @internal\n */\nexport const TokenIdSchema: z.ZodType = z\n .string()\n .min(1)\n .transform(toTokenId);\n\n/**\n * A Fungible Tokens. Usually an ERC20 token.\n */\nexport type Asset = {\n /**\n * The asset contract address.\n */\n contract: NetworkAddress;\n /**\n * The number of decimals of the asset (e.g. 18 for WETH)\n */\n decimals: number;\n};\n/**\n * @internal\n */\nexport const AssetSchema: z.ZodType = z.object({\n contract: NetworkAddressSchema,\n decimals: z.number({ description: 'The number of decimals of the asset.' }).int().nonnegative(),\n});\n/**\n * Creates an {@link Asset}.\n *\n * @internal\n */\nexport function asset(contract: NetworkAddressDetails, decimals: number): Asset {\n return AssetSchema.parse({ contract, decimals });\n}\n\n/**\n * An amount of a specific asset.\n */\nexport type Amount = {\n /**\n * The asset.\n *\n * See {@link asset} helper to create one.\n */\n asset: Asset;\n /**\n * The amount in the smallest unit of the given asset (e.g. wei for ETH).\n */\n value: string;\n};\n/**\n * @internal\n */\nexport const AmountSchema: z.ZodType = z.object(\n {\n asset: AssetSchema,\n value: nonEmptyStringSchema(\n 'The amount in the smallest unit of the given asset (e.g. wei for ETH).',\n ),\n },\n {\n description: 'An amount of a specific asset.',\n },\n);\n\nexport type NetworkAddressDetails = {\n /**\n * The chain id.\n */\n chainId: number;\n /**\n * The EVM address.\n */\n address: string;\n};\n\n/**\n * @internal\n */\nexport type AmountDetails = {\n contract: NetworkAddressDetails;\n decimals: number;\n value: string;\n};\n/**\n * @internal\n */\nexport function amount(input: AmountDetails): Amount {\n return AmountSchema.parse({\n asset: asset(input.contract, input.decimals),\n value: input.value,\n });\n}\n\n/**\n * A DiGi Profile identifier.\n *\n * @example\n * ```\n * 0x01\n * ```\n */\nexport type ProfileId = Brand;\n/**\n * @internal\n */\nexport function toProfileId(value: string): ProfileId {\n return value as ProfileId;\n}\n/**\n * @internal\n */\nexport const ProfileIdSchema: z.ZodType = z\n .string()\n .min(4)\n .transform(toProfileId);\n\n/**\n * A DiGi Publication identifier.\n *\n * No Momoka publications for now.\n *\n * @example\n * ```\n * 0x01-0x01\n * ```\n */\nexport type PublicationId = Brand;\n/**\n * @internal\n */\nexport function toPublicationId(value: string): PublicationId {\n return value as PublicationId;\n}\n/**\n * @internal\n */\nexport const PublicationIdSchema: z.ZodType = z\n .string()\n .min(9)\n .transform(toPublicationId);\n","import { Signature } from './primitives';\n\n/**\n * Branding helper type.\n *\n * @internal\n */\nexport type Brand = T & {\n [K in ReservedName]: TBrand;\n};\n\n/**\n * Omits properties from an union type, preserving the union.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DistributiveOmit = T extends any ? Omit : never;\n\n/**\n * Overwrites properties from T1 with one from T2\n * @internal\n * @example\n * ```ts\n * Overwrite<{ foo: boolean, bar: string }, { foo: number }> // { foo: number, bar: string }\n * ```\n */\nexport type Overwrite = DistributiveOmit & T2;\n\n/**\n * An error that occurs when a task violates a logical condition that is assumed to be true at all times.\n */\nexport class InvariantError extends Error {\n name = 'InvariantError' as const;\n}\n\n/**\n * Asserts that the given condition is truthy\n * @internal\n *\n * @param condition - Either truthy or falsy value\n * @param message - An error message\n */\nexport function invariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n/**\n * A function that throws when called.\n *\n * @param message - An error message\n */\nexport function never(message = 'Unexpected call to never()'): never {\n throw new InvariantError(message);\n}\n\n/**\n * Specifies an object with unknown keys\n *\n * Useful when you don't care about exact props passed to the component.\n * @privateRemarks Don't use `{}` as a type. `{}` actually means \"any non-nullish value\".\n */\nexport type UnknownObject = Record;\n\n/**\n * Declares an array of at least one element of the specified type.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasAtLeastOne(items: ReadonlyArray): items is NonEmptyArray {\n return items.length > 0;\n}\n\n/**\n * Declares an array of at least two elements of the specified type.\n */\nexport type TwoAtLeastArray = [T, T, ...T[]];\n\n/**\n * @internal\n */\nexport function hasTwoOrMore(items: ReadonlyArray): items is TwoAtLeastArray {\n return items.length >= 2;\n}\n\n/**\n * Beautify the readout of all of the members of that intersection.\n *\n * As seen on tv: https://twitter.com/mattpocockuk/status/1622730173446557697\n *\n * @internal\n */\nexport type Prettify = {\n [K in keyof T]: T[K];\n // eslint-disable-next-line @typescript-eslint/ban-types\n} & {};\n\n/**\n * @internal\n */\nexport type ShapeCheck = T extends {\n $schema: string;\n\n digi: unknown;\n\n signature?: Signature;\n}\n ? T\n : never;\n","import { z } from 'zod';\n\nimport {\n PublicationEncryptionStrategy,\n PublicationEncryptionStrategySchema,\n} from './encryption.js';\nimport { MetadataAttribute, MetadataAttributeSchema } from '../../MetadataAttribute.js';\nimport { MarketplaceMetadataSchema } from '../../marketplace.js';\nimport {\n AppIdSchema,\n LocaleSchema,\n TagSchema,\n nonEmptyStringSchema,\n SignatureSchema,\n AppId,\n Locale,\n Tag,\n encryptable,\n markdown,\n} from '../../primitives.js';\nimport { PublicationMainFocus } from '../PublicationMainFocus.js';\n\nexport * from './encryption.js';\nexport * from './license.js';\nexport * from './media.js';\nexport * from './timezones.js';\n\nexport enum PublicationContentWarning {\n NSFW = 'NSFW',\n SENSITIVE = 'SENSITIVE',\n SPOILER = 'SPOILER',\n}\n\n/**\n * Common fields of a DiGi primary publication.\n */\nexport type PublicationMetadataCommon = {\n /**\n * A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI.\n *\n * Use a UUID if unsure.\n */\n id: string;\n /**\n * The App Id that this publication belongs to.\n */\n appId?: AppId;\n /**\n * Determine if the publication should not be shown in any feed.\n *\n * @defaultValue false\n */\n hideFromFeed?: boolean;\n /**\n * A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.\n * Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.\n */\n attributes?: MetadataAttribute[];\n /**\n * The locale of the metadata.\n */\n locale: Locale;\n /**\n * The encryption strategy used to encrypt the publication.\n *\n * If not present, the publication is presumed to be unencrypted.\n */\n encryptedWith?: PublicationEncryptionStrategy;\n /**\n * An arbitrary list of tags.\n */\n tags?: Tag[];\n /**\n * Specify a content warning.\n */\n contentWarning?: PublicationContentWarning;\n};\n\nconst PublicationMetadataCommonSchema = z.object({\n id: nonEmptyStringSchema(\n 'A unique identifier that in storages like IPFS ensures the uniqueness of the metadata URI. Use a UUID if unsure.',\n ),\n\n appId: AppIdSchema.optional().describe('The App Id that this publication belongs to.'),\n\n hideFromFeed: z\n .boolean({\n description: 'Determine if the publication should not be shown in any feed.',\n })\n .optional(),\n\n attributes: MetadataAttributeSchema.array()\n .min(1)\n .max(20)\n .optional()\n .describe(\n 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard. ' +\n 'Over time, common attributes will be added to the standard and their usage as arbitrary attributes will be discouraged.',\n ),\n\n locale: LocaleSchema,\n\n encryptedWith: PublicationEncryptionStrategySchema.optional(),\n\n tags: z\n .set(TagSchema) // z.set(...) sets uniqueItems: true in generated JSON Schemas\n .max(20)\n .catch((ctx) => ctx.input as Set)\n .superRefine((input, ctx) => {\n // but needs to be corrected in code\n const result = z.array(TagSchema).max(20).safeParse(input);\n\n if (result.success) {\n const uniqueTags = [...new Set(result.data)];\n if (result.data.length > uniqueTags.length) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: `Duplicate tags are not allowed: ${result.data.join(', ')}`,\n });\n }\n return z.NEVER;\n }\n\n result.error.issues.forEach((issue) => {\n ctx.addIssue(issue);\n });\n })\n .transform((value) => [...value]) // type coercion\n .optional()\n .describe('An arbitrary list of tags.'),\n\n contentWarning: z\n .nativeEnum(PublicationContentWarning, { description: 'Specify a content warning.' })\n .optional(),\n});\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function metadataDetailsWith<\n Augmentation extends {\n mainContentFocus:\n | z.ZodLiteral\n | z.ZodUnion<[z.ZodLiteral, ...z.ZodLiteral[]]>;\n },\n>(augmentation: Augmentation) {\n return PublicationMetadataCommonSchema.extend(augmentation);\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function publicationWith<\n Augmentation extends {\n $schema: z.ZodLiteral;\n digi: ReturnType;\n },\n>(augmentation: Augmentation) {\n return MarketplaceMetadataSchema.extend({\n signature: SignatureSchema.optional(),\n ...augmentation,\n });\n}\n\n/**\n * Ok, ok, don't! It's really not meant to be used outside.\n * Don't have Kenny say you we told you so.\n *\n * @internal\n */\nexport function mainContentFocus(focus: T): z.ZodLiteral;\nexport function mainContentFocus(\n ...focuses: [T, O]\n): z.ZodUnion<[z.ZodLiteral, z.ZodLiteral]>;\nexport function mainContentFocus(...focuses: [PublicationMainFocus, ...PublicationMainFocus[]]) {\n const description = 'The main focus of the publication.';\n if (focuses.length > 1) {\n const literals = focuses.map((value) => z.literal(value)) as [\n z.ZodLiteral,\n z.ZodLiteral,\n ...z.ZodLiteral[],\n ];\n return z.union(literals, { description });\n }\n return z.literal(focuses[0], { description });\n}\n\n/**\n * @internal\n */\nexport function optionalContentSchema() {\n return encryptable(markdown(z.string({ description: 'Optional markdown content.' }))).optional();\n}\n","/* eslint-disable no-case-declarations */\nimport { z } from 'zod';\n\nimport {\n Amount,\n AmountSchema,\n EvmAddress,\n EvmAddressSchema,\n NetworkAddress,\n NetworkAddressSchema,\n ProfileId,\n ProfileIdSchema,\n PublicationId,\n PublicationIdSchema,\n TokenId,\n TokenIdSchema,\n nonEmptyStringSchema,\n} from '../../primitives.js';\nimport { hasTwoOrMore, Brand, TwoAtLeastArray } from '../../utils.js';\n\nexport enum EncryptionProvider {\n LIT_PROTOCOL = 'LIT_PROTOCOL',\n}\n\nexport enum NftContractType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n}\n\nexport enum ConditionType {\n NFT_OWNERSHIP = 'NFT_OWNERSHIP',\n ERC20_OWNERSHIP = 'ERC20_OWNERSHIP',\n EOA_OWNERSHIP = 'EOA_OWNERSHIP',\n PROFILE_OWNERSHIP = 'PROFILE_OWNERSHIP',\n FOLLOW = 'FOLLOW',\n COLLECT = 'COLLECT',\n ADVANCED_CONTRACT = 'ADVANCED_CONTRACT',\n AND = 'AND',\n OR = 'OR',\n}\n\nexport type NftOwnershipCondition = {\n type: ConditionType.NFT_OWNERSHIP;\n contractType: NftContractType;\n contract: NetworkAddress;\n tokenIds?: TokenId[];\n};\n\n/**\n * @private\n */\nexport function refineNftOwnershipCondition(\n condition: NftOwnershipCondition,\n ctx: z.RefinementCtx,\n) {\n if (condition.contractType === NftContractType.ERC1155) {\n if (condition.tokenIds === undefined || condition.tokenIds.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'ERC1155 requires at least one token id.',\n path: [...ctx.path, 'tokenIds'],\n });\n }\n }\n}\n\n/**\n * @internal\n */\nexport const NftOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.NFT_OWNERSHIP),\n contract: NetworkAddressSchema,\n contractType: z.nativeEnum(NftContractType),\n tokenIds: TokenIdSchema.array()\n .min(1)\n .optional()\n .describe(\n 'A list of token IDs you want to check ownership of. The list is optional for ERC721, ' +\n 'you MUST provide a list of token IDs for ERC1155.',\n ),\n});\n\nexport enum ConditionComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n}\n\nexport type Erc20OwnershipCondition = {\n type: ConditionType.ERC20_OWNERSHIP;\n amount: Amount;\n condition: ConditionComparisonOperator;\n};\n/**\n * @internal\n */\nexport const Erc20OwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.ERC20_OWNERSHIP),\n amount: AmountSchema,\n condition: z.nativeEnum(ConditionComparisonOperator),\n});\n\nexport type EoaOwnershipCondition = {\n type: ConditionType.EOA_OWNERSHIP;\n address: EvmAddress;\n};\n/**\n * @internal\n */\nexport const EoaOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.EOA_OWNERSHIP),\n address: EvmAddressSchema,\n});\n\nexport type ProfileOwnershipCondition = {\n type: ConditionType.PROFILE_OWNERSHIP;\n profileId: ProfileId;\n};\n/**\n * @internal\n */\nexport const ProfileOwnershipConditionSchema = z.object({\n type: z.literal(ConditionType.PROFILE_OWNERSHIP),\n profileId: ProfileIdSchema,\n});\n\nexport type FollowCondition = {\n type: ConditionType.FOLLOW;\n follow: ProfileId;\n};\n/**\n * @internal\n */\nexport const FollowConditionSchema = z.object({\n type: z.literal(ConditionType.FOLLOW),\n follow: ProfileIdSchema,\n});\n\nexport type CollectCondition = {\n type: ConditionType.COLLECT;\n publicationId: PublicationId;\n thisPublication: boolean;\n};\n/**\n * @internal\n */\nexport const CollectConditionSchema = z.object({\n type: z.literal(ConditionType.COLLECT),\n publicationId: PublicationIdSchema, // TODO check on-chain publication ID\n thisPublication: z.boolean().optional().default(false),\n});\n\nexport type AdvancedContractCondition = {\n type: ConditionType.ADVANCED_CONTRACT;\n contract: NetworkAddress;\n functionName: string;\n abi: string;\n params: string[];\n comparison: ConditionComparisonOperator;\n value: string;\n};\n\n/**\n * @internal\n */\nexport const AdvancedContractConditionSchema = z.object({\n type: z.literal(ConditionType.ADVANCED_CONTRACT),\n contract: NetworkAddressSchema.describe('The contract address and chain id'),\n functionName: z.string().min(1).describe('The name of the function you want to call'),\n abi: z\n .string()\n .min(1)\n .describe(\n 'The contract ABI. Has to be in human readable ' +\n 'single string format containing the signature of the function you want to call. See ' +\n 'https://docs.ethers.org/v5/api/utils/abi/fragments/#human-readable-abi for more info',\n ),\n params: z\n .string()\n .array()\n .describe(\n 'The parameters to pass to the function. Must be ' +\n 'exactly matching the function arguments. You *must* pass in the `:userAddress` parameter to ' +\n 'represent the decrypter address. Any array or tuple arguments, must be stringified JSON arrays.',\n ),\n comparison: z\n .nativeEnum(ConditionComparisonOperator)\n .describe(\n 'The comparison operator to use. In case of boolean functions you can only use EQUAL or NOT_EQUAL',\n ),\n value: z\n .string()\n .regex(/^(true|false|\\d{1,70})$/)\n .describe(`The comparison value. Accepts 'true', 'false' or a number`),\n});\n\nexport type SimpleCondition =\n | CollectCondition\n | AdvancedContractCondition\n | EoaOwnershipCondition\n | Erc20OwnershipCondition\n | FollowCondition\n | NftOwnershipCondition\n | ProfileOwnershipCondition;\n\ntype BaseCondition = {\n type: ConditionType;\n};\n\ntype ComposableConditionSchema = z.ZodObject<\n {\n type: z.ZodTypeAny;\n } & z.ZodRawShape,\n z.UnknownKeysParam,\n z.ZodTypeAny,\n T\n>;\n\nexport type AndCondition = {\n type: ConditionType.AND;\n criteria: TwoAtLeastArray;\n};\n\nfunction andConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.AND),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const AndConditionSchema = andConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type OrCondition = {\n type: ConditionType.OR;\n criteria: TwoAtLeastArray;\n};\n\nfunction orConditionSchema<\n Criteria extends [\n ComposableConditionSchema,\n ComposableConditionSchema,\n ...ComposableConditionSchema[],\n ],\n>(options: Criteria): ComposableConditionSchema>> {\n return z.object({\n type: z.literal(ConditionType.OR),\n criteria: z\n .discriminatedUnion('type', options)\n .array()\n .max(5, 'Should have at most 5 conditions')\n .refine(hasTwoOrMore, 'Should have at least 2 conditions'),\n });\n}\n\n/**\n * @internal\n */\nexport const OrConditionSchema = orConditionSchema([\n NftOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n EoaOwnershipConditionSchema,\n ProfileOwnershipConditionSchema,\n FollowConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n]);\n\nexport type AnyCondition =\n | SimpleCondition\n | AndCondition\n | OrCondition;\n\nfunction refineAnyCondition(condition: AnyCondition, ctx: z.RefinementCtx) {\n if (condition.type === ConditionType.AND || condition.type === ConditionType.OR) {\n condition.criteria.forEach((c, idx) =>\n refineAnyCondition(c, { ...ctx, path: [...ctx.path, 'criteria', idx] }),\n );\n }\n if (condition.type === ConditionType.NFT_OWNERSHIP) {\n refineNftOwnershipCondition(condition, ctx);\n }\n}\n\nexport type AccessCondition = OrCondition;\n/**\n * @internal\n */\nexport const AccessConditionSchema: z.ZodType =\n orConditionSchema([\n AndConditionSchema,\n CollectConditionSchema,\n AdvancedContractConditionSchema,\n EoaOwnershipConditionSchema,\n Erc20OwnershipConditionSchema,\n FollowConditionSchema,\n NftOwnershipConditionSchema,\n OrConditionSchema,\n ProfileOwnershipConditionSchema,\n ]).superRefine((root, ctx): root is AccessCondition => {\n root.criteria.forEach((condition, idx) => {\n refineAnyCondition(condition, {\n ...ctx,\n path: [...ctx.path, 'criteria', idx],\n });\n });\n return z.NEVER;\n });\n\n/**\n * A symmetric encryption key.\n */\nexport type LitEncryptionKey = Brand;\n/**\n * @internal\n */\nexport function toLitEncryptionKey(value: string): LitEncryptionKey {\n return value as LitEncryptionKey;\n}\n/**\n * @internal\n */\nexport const LitEncryptionKeySchema: z.Schema = z\n .string()\n .describe('A symmetric encryption key.')\n .length(368, 'Encryption key should be 368 characters long.')\n .transform(toLitEncryptionKey);\n\n/**\n * @internal\n */\nexport const EncryptedPaths = nonEmptyStringSchema(\n 'An encrypted path is a string of keys separated by . that describe ' +\n 'a path to a value in a JSON object (e.g. digi.attachments.0.item.url, digi.content).',\n)\n .array()\n .min(1);\nexport type EncryptedPaths = z.infer;\n\nexport type LitEncryptionStrategy = {\n provider: EncryptionProvider;\n encryptionKey: LitEncryptionKey;\n accessCondition: AccessCondition;\n encryptedPaths: string[];\n};\n/**\n * @internal\n */\nexport const LitEncryptionStrategySchema = z.object(\n {\n provider: z.literal(EncryptionProvider.LIT_PROTOCOL),\n encryptionKey: LitEncryptionKeySchema,\n accessCondition: AccessConditionSchema,\n encryptedPaths: EncryptedPaths,\n },\n {\n description: 'Publication encryption strategy powered by the LIT Protocol.',\n },\n);\n\n/**\n * The publication encryption strategy.\n *\n * This is normally populated by the DiGi SDK so the vast majority of developers will not need to use this directly.\n */\nexport type PublicationEncryptionStrategy = LitEncryptionStrategy;\n\n/**\n * @internal\n */\nexport const PublicationEncryptionStrategySchema: z.ZodType<\n PublicationEncryptionStrategy,\n z.ZodTypeDef,\n object\n> = z.discriminatedUnion('provider', [LitEncryptionStrategySchema]);\n","import { z } from 'zod';\n\nimport { nonEmptyStringSchema } from './primitives.js';\n\n/**\n * The type of a metadata attribute.\n */\nexport enum MetadataAttributeType {\n BOOLEAN = 'Boolean',\n DATE = 'Date',\n NUMBER = 'Number',\n STRING = 'String',\n JSON = 'JSON',\n}\n\nexport type BooleanAttribute = {\n /**\n * A JS boolean value serialized as string. It's consumer responsibility to parse it.\n */\n value: 'true' | 'false';\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.BOOLEAN;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const BooleanAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.BOOLEAN),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .enum(['true', 'false'])\n .describe(\"A JS boolean value serialized as string. It's consumer responsibility to parse it.\"),\n});\n\nexport type DateAttribute = {\n /**\n * A valid ISO 8601 date string. It's consumer responsibility to parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.DATE;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const DateAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.DATE),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: z\n .string()\n .datetime()\n .describe(\"A valid ISO 8601 date string. It's consumer responsibility to parse it.\"),\n});\n\nexport type NumberAttribute = {\n /**\n * A valid JS number serialized as string. It's consumer responsibility to parse it.\n *\n * @example\n * ```ts\n * '42'\n *\n * '42n'\n *\n * '42.42'\n * ```\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.NUMBER;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const NumberAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.NUMBER),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"), // TODO generalize and share\n value: nonEmptyStringSchema(\n \"A valid JS number serialized as string. It's consumer responsibility to parse it.\",\n ),\n});\n\nexport type StringAttribute = {\n /**\n * Any string value.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.STRING;\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const StringAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.STRING),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema('A string value.'),\n});\n\nexport type JSONAttribute = {\n /**\n * A JSON string. It's consumer responsibility to validate and parse it.\n */\n value: string;\n /**\n * Union discriminant.\n */\n type: MetadataAttributeType.JSON;\n /**\n * Union discriminant.\n */\n /**\n * The attribute's unique identifier.\n */\n key: string;\n};\n/**\n * @internal\n */\nexport const JSONAttributeSchema = z.object({\n type: z.literal(MetadataAttributeType.JSON),\n key: nonEmptyStringSchema(\"The attribute's unique identifier.\"),\n value: nonEmptyStringSchema(\n \"A JSON string. It's consumer responsibility to validate and parse it.\",\n ),\n});\n\n/**\n * A DiGi metadata attribute.\n */\nexport type MetadataAttribute =\n | BooleanAttribute\n | DateAttribute\n | NumberAttribute\n | StringAttribute\n | JSONAttribute;\n\nexport const MetadataAttributeSchema = z.discriminatedUnion('type', [\n BooleanAttributeSchema,\n DateAttributeSchema,\n NumberAttributeSchema,\n StringAttributeSchema,\n JSONAttributeSchema,\n]);\n"]} \ No newline at end of file