<commit_before>// Type definitions for sqs-producer 1.5
// Project: https://github.com/BBC/sqs-producer
// Definitions by: <NAME> <http://dchao.co/>
//                 <NAME> <https://johnhamelink.com/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
import { SQS } from "aws-sdk";

export interface Options {
  accessKeyId?: string;
  batchSize?: number;
  queueUrl: string;
  region?: string;
  secretAccessKey?: string;
  sqs?: SQS;
}

export type ProducerCallback<T> = (err?: Error, data?: T) => any;

export interface ProducerMessageAttribute {
  DataType: "String" | "Binary";
  StringValue?: string;
  BinaryValue?: Buffer;
}

export interface ProducerMessage {
  id: string;
  body: string;
  messageAttributes?: { [key: string]: ProducerMessageAttribute };
  delaySeconds?: number;
}

export interface Producer {
  send(messages: string[] | ProducerMessage[], cb: ProducerCallback<void>): void;
  queueSize(cb: ProducerCallback<number>): void;
}

export function create(opts: Options): Producer;<commit_msg>Update type definitions for "sqs-producer" (#38735)<commit_after>// Type definitions for sqs-producer 1.6
// Project: https://github.com/BBC/sqs-producer
// Definitions by: <NAME> <http://dchao.co/>
//                 <NAME> <https://johnhamelink.com/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
import { SQS } from "aws-sdk";

export interface Options {
  accessKeyId?: string;
  batchSize?: number;
  queueUrl: string;
  region?: string;
  secretAccessKey?: string;
  sqs?: SQS;
}

export type ProducerCallback<T> = (err?: Error, data?: T) => any;

export interface ProducerMessageAttribute {
  DataType: "String" | "Binary";
  StringValue?: string;
  BinaryValue?: Buffer;
}

export interface ProducerMessage {
  id: string;
  body: string;
  messageAttributes?: { [key: string]: ProducerMessageAttribute };
  delaySeconds?: number;
  groupId?: string;
  deduplicationId?: string;
}

export interface Producer {
  send(messages: string | string[] | ProducerMessage | ProducerMessage[], cb: ProducerCallback<void>): void;
  queueSize(cb: ProducerCallback<number>): void;
}

export function create(opts: Options): Producer;
{'fraction_non_alphanumeric': 0.14597240765465064, 'fraction_numerical': 0.004005340453938585, 'mean_word_length': 4.496332518337408, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5370308', 'n_tokens_mistral': 713, 'n_tokens_neox': 699, 'n_words': 180}