Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.30.1] - 2026-08-26

### Fixed

- **`context.platform`'s doc comment described the wrong thing.** It read "Platform type (e.g. \"chat\", \"social_media\", \"gaming\")", but the SDK treats the value as your app/product name and appends its own identifier before sending it — `"MyApp"` reaches the API as `"MyApp - Node SDK"`. Following the old doc's examples sent a bare category string instead of an identifiable app name, which is what shows up for dashboard attribution. Corrected here and on the equivalent `platform` fields across image/video/voice/document/synthetic-content inputs and the batch/voice-stream context shapes. No behavior change — types and doc comments only.

## [2.30.0] - 2026-08-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tuteliq/sdk",
"version": "2.30.0",
"version": "2.30.1",
"description": "TypeScript SDK for Tuteliq AI child safety API - Detect bullying, grooming, and unsafe content",
"type": "module",
"main": "./dist/index.js",
Expand Down
5 changes: 5 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ export interface BatchItemBase {
language?: string;
ageGroup?: string;
relationship?: string;
/**
* Your platform/app name (e.g. "MyApp"), used for dashboard
* attribution. The SDK appends its own identifier before sending it —
* "MyApp" is sent to the API as "MyApp - Node SDK".
*/
platform?: string;
country?: string;
};
Expand Down
32 changes: 28 additions & 4 deletions src/types/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ export interface AnalyzeVoiceInput extends TrackingFields {
ageGroup?: string;
/** Language hint */
language?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/** Child's age (used for grooming analysis) */
childAge?: number;
Expand Down Expand Up @@ -138,7 +144,13 @@ export interface AnalyzeVideoInput extends TrackingFields {
fileId?: string;
/** Age group for calibrated analysis */
ageGroup?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/**
* Additive, deterministic word-list flag for plain profanity/vulgarity
Expand Down Expand Up @@ -251,7 +263,13 @@ export interface AnalyzeImageInput extends TrackingFields {
fileId?: string;
/** Age group for calibrated analysis */
ageGroup?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/**
* Additive, deterministic word-list flag for plain profanity/vulgarity
Expand Down Expand Up @@ -350,7 +368,13 @@ export interface AnalyzeDocumentInput extends TrackingFields {
ageGroup?: string;
/** Language hint (ISO 639-1) */
language?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/** Minimum severity to include crisis helplines. Default: "high". */
supportThreshold?: 'low' | 'medium' | 'high' | 'critical';
Expand Down
7 changes: 6 additions & 1 deletion src/types/safety.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ export type ContextInput = string | {
ageGroup?: string;
/** Relationship between participants (e.g., "classmates", "strangers") */
relationship?: string;
/** Platform type (e.g., "chat", "social_media", "gaming") */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so pass
* your product's name here, not a category like "chat" or "social_media".
*/
platform?: string;
/** ISO 3166-1 alpha-2 country code (e.g., "GB", "US") for geo-localised helpline data */
country?: string;
Expand Down
24 changes: 21 additions & 3 deletions src/types/synthetic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ export interface DetectSyntheticImageInput extends TrackingFields {
ageGroup?: string;
/** Language hint (ISO 639-1) */
language?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/** Skip verdict cache (both read and write). See bypassCache on DetectSyntheticTextInput. */
bypassCache?: boolean;
Expand Down Expand Up @@ -247,7 +253,13 @@ export interface DetectSyntheticAudioInput extends TrackingFields {
ageGroup?: string;
/** Language hint (ISO 639-1) */
language?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/** Skip verdict cache (both read and write). See bypassCache on DetectSyntheticTextInput. */
bypassCache?: boolean;
Expand Down Expand Up @@ -335,7 +347,13 @@ export interface DetectSyntheticVideoInput extends TrackingFields {
ageGroup?: string;
/** Language hint (ISO 639-1) */
language?: string;
/** Platform name */
/**
* Your platform/app name (e.g. "MyApp", "Discord Bot"), used for dashboard
* attribution and calibration. The SDK appends its own identifier before
* sending it — "MyApp" is sent to the API as "MyApp - Node SDK" — so
* pass your product's name here, not a category like "chat" or
* "social_media".
*/
platform?: string;
/** Skip verdict cache (both read and write). See bypassCache on DetectSyntheticTextInput. */
bypassCache?: boolean;
Expand Down
5 changes: 5 additions & 0 deletions src/types/voice-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export interface VoiceStreamConfig {
language?: string;
ageGroup?: string;
relationship?: string;
/**
* Your platform/app name (e.g. "MyApp"), used for dashboard
* attribution. The SDK appends its own identifier before sending it —
* "MyApp" is sent to the API as "MyApp - Node SDK".
*/
platform?: string;
};
}
Expand Down