interface IStampsClient {
    createStamp(
        args: {
            file?: FileParameter;
            isPublic?: boolean;
            name?: null | string;
            repositoryId: string;
        },
    ): Promise<Stamp>;
    deleteStamp(args: { repositoryId: string; stampId: number }): Promise<void>;
    getStamp(
        args: { repositoryId: string; select?: null | string; stampId: number },
    ): Promise<Stamp>;
    getStampImage(
        args: {
            color?: null | string;
            repositoryId: string;
            select?: null | string;
            stampId: number;
        },
    ): Promise<FileResponse>;
    listStamps(
        args: {
            count?: boolean;
            orderby?: null | string;
            repositoryId: string;
            scope?: StampScope;
            select?: null | string;
        },
    ): Promise<Stamp[]>;
    updateStamp(
        args: {
            repositoryId: string;
            request: UpdateStampRequest;
            stampId: number;
        },
    ): Promise<Stamp>;
}

Implemented by

Methods

    • Send the image as multipart/form-data under the form field "file", with "name" and "isPublic" form fields. The service converts the image to the repository's internal format.
    • Creating a public stamp requires the stamp-management privilege; personal stamps require no special privilege.
    • Required OAuth scope: repository.Write

    Parameters

    • args: {
          file?: FileParameter;
          isPublic?: boolean;
          name?: null | string;
          repositoryId: string;
      }
      • Optionalfile?: FileParameter

        (optional) The image file to upload. See https://doc.laserfiche.com/ for supported image file formats.

      • OptionalisPublic?: boolean

        (optional)

      • Optionalname?: null | string

        (optional)

      • repositoryId: string

    Returns Promise<Stamp>

    Successfully created the stamp. Returned the created stamp.

    • Deleting a public stamp requires the stamp-management privilege.
    • Required OAuth scope: repository.Write

    Parameters

    • args: { repositoryId: string; stampId: number }

    Returns Promise<void>

    Successfully deleted the stamp.

    • Required OAuth scope: repository.Read

    Parameters

    • args: { repositoryId: string; select?: null | string; stampId: number }
      • repositoryId: string
      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

      • stampId: number

    Returns Promise<Stamp>

    Successfully returned the stamp's metadata.

    • Only public (common) stamps are returned. Personal stamps are not served by this endpoint and return 404.
    • An optional color (#RRGGBB) recolors the image: black pixels become the color, white becomes transparent.
    • Required OAuth scope: repository.Read

    Parameters

    • args: {
          color?: null | string;
          repositoryId: string;
          select?: null | string;
          stampId: number;
      }
      • Optionalcolor?: null | string

        (optional)

      • repositoryId: string
      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

      • stampId: number

    Returns Promise<FileResponse>

    Successfully returned the stamp image as a PNG.

    • Use scope to select public, personal, or all stamps. The image bytes are not included; fetch them from the stamp's Image sub-resource.
    • Required OAuth scope: repository.Read

    Parameters

    • args: {
          count?: boolean;
          orderby?: null | string;
          repositoryId: string;
          scope?: StampScope;
          select?: null | string;
      }
      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalorderby?: null | string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • repositoryId: string
      • Optionalscope?: StampScope

        (optional)

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<Stamp[]>

    Successfully returned the repository's stamps.

    • Managing a public stamp requires the stamp-management privilege.
    • Required OAuth scope: repository.Write

    Parameters

    Returns Promise<Stamp>

    Successfully updated the stamp. Returned the updated stamp.