method

RiduClient.duplicate

RiduClient.duplicate<Slug extends CollectionSlug<Config>>( collection: Slug, id: string, overrides?: Partial<Omit<CreateFor<Config, Slug>, "id">>, options?: MutationLocaleOptions<LocaleFor<Config>>, ): Promise<OutputFor<Config, Slug>>

Duplicate a document with optional typed create-field overrides.

Source packages/sdk/src/types.ts:853

@param collection
The collection value.
@param id
The id value.
@param overrides
The overrides value.
@param options
The options value.
@returns
The declared result.

Related types

  • CollectionSlug

    The generated union of collection slugs.

  • CreateFor

    Resolve a collection create input type.

  • MutationLocaleOptions

    Locale and transport options shared by mutations without an optimistic-concurrency contract.

  • OutputFor

    Resolve a collection document output type.