Skip to content
Docs
Reference

BackstageClient.mediaStock

BackstageClient.mediaStock in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / mediaStock

mediaStock: {
  list: (options?: {
     locationId?: string;
     mediaType?: string;
   }, requestOptions?: RequestOptions) => Promise<{
     id: string;
     locationId: string;
     low: boolean;
     lowStockThreshold: number | null;
     mediaType: string;
     quantity: number;
     updatedAt: string;
  }[]>;
  move: (request: {
     locationId: string;
     lowStockThreshold?: number | null;
     mediaType: string;
     note?: string | null;
     quantity: number;
     reason: "received" | "printed" | "adjusted" | "spoiled" | "counted";
     reference?: string | null;
   }, requestOptions?: RequestOptions) => Promise<{
     id: string;
     locationId: string;
     low: boolean;
     lowStockThreshold: number | null;
     mediaType: string;
     quantity: number;
     updatedAt: string;
  }>;
  movements: (stockId: string, requestOptions?: RequestOptions) => Promise<{
     actor: string | null;
     createdAt: string;
     delta: number;
     id: string;
     note: string | null;
     reason: "received" | "printed" | "adjusted" | "spoiled" | "counted";
     reference: string | null;
     stockId: string;
  }[]>;
};

Defined in: client.ts:7134

Media stock methods

list()#

list: (options?: {
  locationId?: string;
  mediaType?: string;
}, requestOptions?: RequestOptions) => Promise<{
  id: string;
  locationId: string;
  low: boolean;
  lowStockThreshold: number | null;
  mediaType: string;
  quantity: number;
  updatedAt: string;
}[]>;

Media stock Stock per media type and location, with low-stock flags. Stock Managed Fulfilment holds is at ticketlayer_warehouse. Needs devices.read.

Parameters#

ParameterType
options?{ locationId?: string; mediaType?: string; }
options.locationId?string
options.mediaType?string
requestOptions?RequestOptions

Returns#

Promise<{ id: string; locationId: string; low: boolean; lowStockThreshold: number | null; mediaType: string; quantity: number; updatedAt: string; }[]>

Operation Id#

listMediaStock

move()#

move: (request: {
  locationId: string;
  lowStockThreshold?: number | null;
  mediaType: string;
  note?: string | null;
  quantity: number;
  reason: "received" | "printed" | "adjusted" | "spoiled" | "counted";
  reference?: string | null;
}, requestOptions?: RequestOptions) => Promise<{
  id: string;
  locationId: string;
  low: boolean;
  lowStockThreshold: number | null;
  mediaType: string;
  quantity: number;
  updatedAt: string;
}>;

Move media stock Received, spoiled, adjusted or counted stock at a location, recorded as a movement; it can also set the low-stock threshold. Printing counts itself down. Needs devices.update.

Parameters#

ParameterTypeDescription
request{ locationId: string; lowStockThreshold?: number | null; mediaType: string; note?: string | null; quantity: number; reason: "received" | "printed" | "adjusted" | "spoiled" | "counted"; reference?: string | null; }-
request.locationIdstring-
request.lowStockThreshold?number | null-
request.mediaType?string-
request.note?string | null-
request.quantity?numberDescription The change; for counted, the count
request.reason?"received" | "printed" | "adjusted" | "spoiled" | "counted"Description received adds, printed and spoiled take away, adjusted either way, counted sets the quantity to what was counted.
request.reference?string | nullDescription A delivery note, a serial range
requestOptions?RequestOptions-

Returns#

Promise<{ id: string; locationId: string; low: boolean; lowStockThreshold: number | null; mediaType: string; quantity: number; updatedAt: string; }>

Operation Id#

moveMediaStock

movements()#

movements: (stockId: string, requestOptions?: RequestOptions) => Promise<{
  actor: string | null;
  createdAt: string;
  delta: number;
  id: string;
  note: string | null;
  reason: "received" | "printed" | "adjusted" | "spoiled" | "counted";
  reference: string | null;
  stockId: string;
}[]>;

Media stock movements Every movement of one stock line, newest first (the last 500). Needs devices.read.

Parameters#

ParameterType
stockIdstring
requestOptions?RequestOptions

Returns#

Promise<{ actor: string | null; createdAt: string; delta: number; id: string; note: string | null; reason: "received" | "printed" | "adjusted" | "spoiled" | "counted"; reference: string | null; stockId: string; }[]>

Operation Id#

listMediaStockMovements