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

    Returns Promise<LfRepositoryClientV2.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<LfRepositoryClientV2.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<LfRepositoryClientV2.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?: LfRepositoryClientV2.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?: LfRepositoryClientV2.StampScope

        (optional)

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.Stamp[]>

    Successfully returned the repository's stamps.