attributes/relation.ts

strapi · packages/core/types/src/modules/entity-service/params/attributes/relation.ts · typescript · MIT
database

relation.ts from strapi/strapi

// Source: https://github.com/strapi/strapi | License: MIT | Copyright 2015-present Strapi Solutions SAS
// Provided via justclaw.it.com; keep this notice with the code.
import type * as Schema from '../../../../schema';

import type { If } from '../../../../utils';
import type * as UID from '../../../../uid';

import type { ID } from './id';

type ShortHand = ID;
type LongHandEntity = { id: ID };
type LongHandDocument = { documentId: ID; locale?: string };
type LongHand = LongHandEntity | LongHandDocument;

interface PositionalArguments {
  before?: ID;
  after?: ID;
  start?: boolean;
  end?: boolean;
}

type WithPositionArguments<T> = T & { position?: PositionalArguments };

type Set = { set: ShortHand[] | LongHand[] | null };
type Connect = { connect: ShortHand[] | WithPositionArgument

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key