diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index de29ef053a..b8de1a8192 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -21,3 +21,8 @@ jobs:
- name: Lint
run: yarn lint
+
+ # `tsc` over src, the build scripts, and the compile-time assertions in `test/types/` (which pin
+ # the `TimestampNS` brand and its `new Date` guard). Nothing else in PR CI typechecks.
+ - name: Types
+ run: yarn types
diff --git a/CLAUDE.md b/CLAUDE.md
index 457d896752..6851dfc470 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -20,6 +20,7 @@ Companion docs that apply to all agents: `AGENTS.md` (general agent rules) and `
| Watch dev build | `yarn start` |
| Typecheck only | `yarn types` |
| Typecheck the build scripts only | `yarn types:scripts` |
+| Type assertions (src / built dist) | `yarn types:tests` / `yarn types:dist` |
| Lint (prettier + eslint, zero warnings) | `yarn lint` |
| Auto-fix lint/format | `yarn lint-fix` |
| Unit tests (Vitest) | `yarn test` (alias for `yarn test-unit`) |
@@ -43,6 +44,12 @@ Single test runs use Vitest's CLI directly: `yarn test-unit path/to/file.test.ts
behind `stream-chat/i18n` now ships as **`@stream-io/i18n`** — but adding a new entry point without
declaring its boundary in `ENTRY_BOUNDARIES` is still an error, which is the point of keeping it.
+When both finish, `yarn build` runs `types:dist`: the compile-time assertions in `test/types/` checked
+against the built `dist/types`, resolved through `package.json#exports` exactly as a consumer would.
+It is what fails a build whose published types lost the `DateConstructor` guard
+(`src/gen/models/timestamp-guard.ts`, which reaches consumers only through the type-only re-export in
+`src/index.ts`). The same files run against `src/` as `types:tests`, part of `yarn types`.
+
`package.json#exports` routes consumers to the right bundle by condition: `node` → node-cjs, `browser`/`react-native` → browser-cjs (require) or esm (import), default → esm. The `react-native` + `require` branch must stay pointed at CJS — React Native's Jest runs CJS with `customConditions: ["react-native"]` and does not transform `node_modules`, so an `.mjs` there is a syntax error across every RN suite that touches the module. `typesVersions` mirrors the subpaths for consumers still on `moduleResolution: "node"`. There is **no `package.json#browser` field** — it used to zero Node-only deps (`crypto`, `https`, `jsonwebtoken`, `ws`, `zlib`) for browser/RN builds, but the SDK no longer imports any of them (`src/index.ts` is platform-agnostic: global `WebSocket`, global `FormData`, global `atob`). `scripts/bundle.mts` keeps a `browserIgnoreModules` hook, currently an empty array, for the day that changes. Prefer a platform global or a browser-safe dep over reintroducing a Node-only one.
esbuild `define` injects two compile-time constants: `process.env.PKG_VERSION` (read from `package.json`) and `process.env.CLIENT_BUNDLE` (one of `node-cjs`, `browser-cjs`, `browser-esm`). Both are consumed by `StreamChat.getUserAgent()` to produce a bundle-aware UA string. **`tsc`-only code paths do not get this substitution** — these env vars only resolve in the esbuild bundles, so don't gate runtime logic on them in code that callers might import directly via `src/`.
@@ -199,7 +206,7 @@ GitHub workflows in `.github/workflows/`:
| Workflow | Trigger | What it runs |
| -------------- | ------------------- | -------------------------------------------------------------- |
-| `lint.yml` | PR | `yarn lint` |
+| `lint.yml` | PR | `yarn lint`, then `yarn types` |
| `unit.yml` | PR | `yarn test-coverage` |
| `size.yml` | PR (excludes tests) | `preactjs/compressed-size-action` — reports bundle-size diff |
| `pr-check.yml` | PR title change | `commitlint` on the PR title |
diff --git a/dev/burst-simulator-extension/simulator.js b/dev/burst-simulator-extension/simulator.js
index 3d7dfa4c9a..88eaf4e747 100644
--- a/dev/burst-simulator-extension/simulator.js
+++ b/dev/burst-simulator-extension/simulator.js
@@ -342,10 +342,15 @@
return text;
};
+ // Wire timestamps are unix nanoseconds, as the API sends them (stream-chat v10+). An ISO string here
+ // never becomes a finite timestamp, so it would break exactly the ordering and formatting paths a
+ // burst is meant to exercise.
+ const nowNs = () => Date.now() * 1e6;
+
const buildHtml = (text) => `
${escapeHtml(text).replace(/\n/g, '
')}
\n`;
const buildUserPool = (size) => {
- const now = new Date().toISOString();
+ const now = nowNs();
const users = [];
for (let i = 0; i < size; i++) {
const id = `sim_user_${i}`;
@@ -374,7 +379,7 @@
};
const buildMessage = (channel, user) => {
- const now = new Date().toISOString();
+ const now = nowNs();
const text = generateText();
return {
id: uuid(),
@@ -410,7 +415,7 @@
const buildMessageNewEvent = (channel, message) => ({
type: 'message.new',
- created_at: new Date().toISOString(),
+ created_at: nowNs(),
cid: channel.cid,
channel_type: channel.type,
channel_id: channel.id,
@@ -421,7 +426,7 @@
});
const buildReactionNewEvent = (channel, message, user) => {
- const now = new Date().toISOString();
+ const now = nowNs();
const emoji = pick(EMOJIS);
const reactionType = `emoji-${emoji.code}`;
diff --git a/package.json b/package.json
index d2041c29ba..d64444bcb7 100644
--- a/package.json
+++ b/package.json
@@ -78,9 +78,9 @@
"yaml": "^2.8.4"
},
"scripts": {
- "build": "rm -rf dist && concurrently 'tsc' './scripts/bundle.mts'",
+ "build": "rm -rf dist && concurrently 'tsc' './scripts/bundle.mts' && yarn run types:dist",
"start": "concurrently 'tsc --watch' './scripts/bundle.mts --watch'",
- "types": "tsc --noEmit && yarn run types:scripts",
+ "types": "tsc --noEmit && yarn run types:scripts && yarn run types:tests",
"lint": "yarn run prettier && yarn run eslint",
"lint-fix": "yarn run eslint-fix; yarn run prettier-fix",
"prettier": "prettier '**/*.{json,js,mjs,mts,cjs,ts,yml,md}' --check",
@@ -95,7 +95,9 @@
"postinstall": "node -e \"require('fs').existsSync('scripts/install-husky.mjs') && import('./scripts/install-husky.mjs')\"",
"prepare": "yarn run build",
"generate-client": "./scripts/generate-client.sh",
- "types:scripts": "tsc -p tsconfig.scripts.json"
+ "types:scripts": "tsc -p tsconfig.scripts.json",
+ "types:tests": "tsc -p tsconfig.types-test.json",
+ "types:dist": "tsc -p tsconfig.types-test.dist.json"
},
"engines": {
"node": ">=22.18.0"
diff --git a/scripts/generate-client.sh b/scripts/generate-client.sh
index df399c7b92..e66972bbd4 100755
--- a/scripts/generate-client.sh
+++ b/scripts/generate-client.sh
@@ -8,9 +8,8 @@ rm -rf $OUTPUT_DIR
( cd $CHAT_DIR ; make openapi ; make -C projects/chat-manager build; build/chat-manager openapi generate-client --language ts --spec releases/v2/chat-clientside-api.yaml --output $OUTPUT_DIR --opt typed_filters=true --opt with_request_options=true --opt response_dates_as_number=true)
-# apply-custom-data-types matches `export interface` / `}` anchored to column 0,
-# but the generator emits them indented — format first so it can track which
-# interface each `custom` field belongs to.
+# apply-custom-data-types matches `export interface` / `}` anchored to column 0.
+# The generator emits them there already; formatting first keeps that true.
yarn exec prettier --write $OUTPUT_DIR/models/index.ts
node ./scripts/apply-custom-data-types.mts -i $OUTPUT_DIR/models/index.ts
diff --git a/src/CooldownTimer.ts b/src/CooldownTimer.ts
index e2caca6176..48b0dcc839 100644
--- a/src/CooldownTimer.ts
+++ b/src/CooldownTimer.ts
@@ -1,7 +1,7 @@
import { StateStore } from '@stream-io/state-store';
import { getMessageCreatedAtTimestamp } from './pagination/paginators/MessageIntervalPaginator';
import { nowNs, nsToMs } from './utils/time';
-import type { ChannelResponse, LocalMessage } from './types';
+import type { ChannelResponse, LocalMessage, TimestampNS } from './types';
import { WithSubscriptions } from './utils/WithSubscriptions';
import type { Channel } from './channel';
@@ -18,7 +18,7 @@ export type CooldownTimerState = {
* Creation timestamp of the latest message authored by the current user in this channel, in unix
* nanoseconds as the API sends it. Change reported via message.new WS event.
*/
- ownLatestMessageTimestamp?: number;
+ ownLatestMessageTimestamp?: TimestampNS;
/**
* Remaining cooldown in whole seconds (rounded).
*/
@@ -141,7 +141,7 @@ export class CooldownTimer extends WithSubscriptions {
*
* @param timestamp - Unix nanoseconds, as the API sends it.
*/
- public setOwnLatestMessageTimestamp = (timestamp: number | undefined) => {
+ public setOwnLatestMessageTimestamp = (timestamp: TimestampNS | undefined) => {
this.state.partialNext({ ownLatestMessageTimestamp: timestamp });
this.recalculate();
};
@@ -155,11 +155,11 @@ export class CooldownTimer extends WithSubscriptions {
messages,
}: {
messages: LocalMessage[];
- }): number | undefined {
+ }): TimestampNS | undefined {
const ownUserId = this.getOwnUserId();
if (!ownUserId) return undefined;
- let latest: number | undefined;
+ let latest: TimestampNS | undefined;
for (let i = messages.length - 1; i >= 0; i -= 1) {
const message = messages[i];
if (message.user?.id !== ownUserId) continue;
diff --git a/src/api-client.ts b/src/api-client.ts
index 4839329586..5c5e03d607 100644
--- a/src/api-client.ts
+++ b/src/api-client.ts
@@ -152,8 +152,11 @@ export class ApiClient {
const remaining = headers['x-ratelimit-remaining'] as string | undefined;
if (remaining) rateLimit.rate_limit_remaining = parseInt(remaining, 10);
- const reset = headers['x-ratelimit-reset'] as string | undefined;
- if (reset) rateLimit.rate_limit_reset = new Date(reset);
+ // Unix SECONDS (`strconv.FormatInt(info.Reset, 10)` server-side). `new Date('1700000000')` parses the
+ // string as a date and is Invalid Date, so convert the number explicitly.
+ const reset = Number(headers['x-ratelimit-reset']);
+ if (Number.isFinite(reset) && reset > 0)
+ rateLimit.rate_limit_reset = new Date(reset * 1000);
return {
response_headers: headers as Record,
diff --git a/src/channel.ts b/src/channel.ts
index bbd50917a4..1993418058 100644
--- a/src/channel.ts
+++ b/src/channel.ts
@@ -20,7 +20,7 @@ import {
logChatPromiseExecution,
sanitizeOutgoingAttachments,
} from './utils';
-import { msToNs, nowNs } from './utils/time';
+import { asTimestampNS, msToNs, nowNs } from './utils/time';
import { normalizeUploadFile } from './upload-utils';
import type { StreamChat } from './client';
import { chatLoggerSystem } from './logger';
@@ -62,6 +62,7 @@ import type {
SharedLocation,
StreamRequestOptions,
StreamResponse,
+ TimestampNS,
UnBanUserOptions,
UpdateChannelPartialRequest,
UpdateLiveLocationRequest,
@@ -1153,7 +1154,7 @@ export class Channel extends WithMessageOperations(ChannelApi) {
/**
* Returns the mute status for the current channel.
*
- * @returns An object of the form `{ muted: true | false, createdAt: number | null, expiresAt: number | null }`,
+ * @returns An object of the form `{ muted: true | false, createdAt: TimestampNS | null, expiresAt: TimestampNS | null }`,
* where the timestamps are unix nanoseconds as the API sends them.
*/
muteStatus() {
@@ -1733,7 +1734,7 @@ export class Channel extends WithMessageOperations(ChannelApi) {
* defaults to the current user's read state).
* @returns Unread count.
*/
- countUnread(lastRead?: number | null) {
+ countUnread(lastRead?: TimestampNS | null) {
// Nullish, not truthy: `0` is a legitimate wire timestamp (the epoch).
if (lastRead == null) return this.state.unreadCount;
let count = 0;
@@ -2523,7 +2524,7 @@ export class Channel extends WithMessageOperations(ChannelApi) {
// every "no last read" consumer already treats a missing value.
if (ownUserId && countsAsOwnUnread && !currentReadState[ownUserId]) {
nextReadState[ownUserId] = {
- last_read: 0,
+ last_read: asTimestampNS(0),
unread_messages: 1,
user: (client.user ?? { id: ownUserId }) as UserResponse,
};
diff --git a/src/channel_state.ts b/src/channel_state.ts
index cae7882f48..35920c15c2 100644
--- a/src/channel_state.ts
+++ b/src/channel_state.ts
@@ -6,6 +6,7 @@ import type {
LocalMessage,
MessageResponse,
PendingMessageResponse,
+ TimestampNS,
UserResponse,
} from './types';
import { AIStates } from './types';
@@ -17,13 +18,13 @@ type ChannelReadStatus = Record<
string,
{
/** Unix nanoseconds, as the API sends it. */
- last_read: number;
+ last_read: TimestampNS;
unread_messages: number;
user: UserResponse;
first_unread_message_id?: string;
last_read_message_id?: string;
/** Unix nanoseconds, as the API sends it. */
- last_delivered_at?: number;
+ last_delivered_at?: TimestampNS;
last_delivered_message_id?: string;
}
>;
@@ -110,9 +111,9 @@ export type ChannelDataState = {
export type ChannelMuteStatus = {
muted: boolean;
/** Unix nanoseconds, as the API sends it. */
- createdAt: number | null;
+ createdAt: TimestampNS | null;
/** Unix nanoseconds, as the API sends it. */
- expiresAt: number | null;
+ expiresAt: TimestampNS | null;
};
/**
diff --git a/src/client.ts b/src/client.ts
index f757da4563..aed7c243ee 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -52,6 +52,7 @@ import type {
SdkIdentifier,
StreamChatOptions,
StreamRequestOptions,
+ TimestampNS,
TokenOrProvider,
UnBanUserOptions,
UpdateUserPartialRequest,
@@ -122,6 +123,13 @@ export type ChannelConfigsState = {
export type ClientUser = PartializeAllBut & { anon?: boolean };
+/**
+ * `T`, unless it is a server-sent {@link TimestampNS}: for parameters where a bare `number` means a
+ * relative offset rather than an instant. `any` passes through (`0 extends 1 & T`), so untyped
+ * callers are not suddenly rejected.
+ */
+type NotATimestampNS = 0 extends 1 & T ? T : T extends TimestampNS ? never : T;
+
export class StreamChat extends ChatApi {
private static _instance?: unknown | StreamChat; // type is undefined|StreamChat, unknown is due to TS limitations with statics
messageDeliveryReporter: MessageDeliveryReporter;
@@ -2011,6 +2019,10 @@ export class StreamChat extends ChatApi {
/**
* Pins the message.
*
+ * A `number` is a relative offset in SECONDS, so a server-sent timestamp (`message.pinned_at`,
+ * `message.pin_expires`) is rejected at compile time rather than read as ~1.79e18 seconds from now.
+ * Hand one back as a date with `nsToDate(timestamp)`.
+ *
* @param messageOrMessageId - MessageRequest object or message ID.
* @param timeoutOrExpirationDate - Expiration date or timeout. Use `number` to set the timeout
* in seconds, `string` or `Date` to set the exact expiration date (optional).
@@ -2021,10 +2033,13 @@ export class StreamChat extends ChatApi {
* into the request (optional).
* @returns The updated message response.
*/
- pinMessage(
+ pinMessage<
+ Expiration extends null | number | string | Date | undefined = undefined,
+ PinnedAt extends number | string | Date | undefined = undefined,
+ >(
messageOrMessageId: string | { id: string },
- timeoutOrExpirationDate?: null | number | string | Date,
- pinnedAt?: number | string | Date,
+ timeoutOrExpirationDate?: NotATimestampNS,
+ pinnedAt?: NotATimestampNS,
requestOptions?: StreamRequestOptions,
) {
const id = this._validateAndGetMessageId(
diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts
index 2a27d60884..81cef6433c 100644
--- a/src/gen/chat/ChatApi.ts
+++ b/src/gen/chat/ChatApi.ts
@@ -109,6 +109,7 @@ import type {
SyncRequest,
SyncResponse,
TranslateMessageRequest,
+ TranslateMessageResponse,
TruncateChannelRequest,
TruncateChannelResponse,
UnblockUsersRequest,
@@ -1478,7 +1479,7 @@ export class ChatApi {
async translateMessage(
request: TranslateMessageRequest & { id: string },
requestOptions?: StreamRequestOptions,
- ): Promise> {
+ ): Promise> {
const pathParams = {
id: request?.id,
};
@@ -1487,7 +1488,7 @@ export class ChatApi {
};
const response = await this.apiClient.sendRequest<
- StreamResponse
+ StreamResponse
>(
'POST',
'/api/v2/chat/messages/{id}/translate',
@@ -2122,6 +2123,7 @@ export class ChatApi {
id: request?.id,
is_closed: request?.is_closed,
max_votes_allowed: request?.max_votes_allowed,
+ team: request?.team,
voting_visibility: request?.voting_visibility,
options: request?.options,
custom: request?.custom,
diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts
index 1b3e375154..c66a0fbe87 100644
--- a/src/gen/models/index.ts
+++ b/src/gen/models/index.ts
@@ -10,6 +10,32 @@ import type {
CustomThreadData,
CustomUserData,
} from '../../custom_types';
+declare const timestampNsBrand: unique symbol;
+
+/**
+ * A unix-nanosecond timestamp, exactly as the server sends it.
+ *
+ * NOT milliseconds. `new Date(t)` is out of range and yields an Invalid Date, whose
+ * `.toISOString()` then throws; `models/timestamp-guard.ts` turns that into a
+ * compile error. Comparing or sorting two timestamps is fine -- same unit, plain
+ * numbers. Everything else should go through this SDK's time helpers:
+ *
+ * nsToDate(t) a Date
+ * convertTimestampToDate(t) a Date, or undefined when the value is absent or NaN
+ * nsToMs(t) epoch ms, for arithmetic against Date.now()
+ * nsToRfc3339(t) an RFC3339 string keeping sub-millisecond precision
+ * dateToNs(d), msToNs(ms) back to a wire timestamp
+ * nowNs() the local clock, wire-comparable
+ * asTimestampNS(n) brand a number already in ns (DB rows, fixtures) -- no conversion
+ *
+ * A request date field is typed `Date`, not this -- pass `nsToDate(t)` when handing a
+ * server-sent timestamp back to the API, or `nsToRfc3339(t)` where precision matters.
+ *
+ * Values above `Number.MAX_SAFE_INTEGER` are quantised to ~256ns, so ordering holds
+ * but exact equality after a JSON round-trip does not.
+ */
+export type TimestampNS = number & { readonly [timestampNsBrand]: true };
+
export type Filters<
FilterConditions extends Record,
> = QueryFilters<{
@@ -91,35 +117,26 @@ export type RequireOnlyOne = Omit &
}[Keys];
export interface AIAudioConfigRequest {
profile?: string;
-
rules?: Array;
}
export interface AIAudioConfigResponse {
enabled: boolean;
-
profile: string;
-
rules: Array;
}
export interface AIImageConfig {
enabled: boolean;
-
ocr_rules: Array;
-
rules: Array;
-
async?: boolean;
}
export interface AIImageLabelDefinition {
description: string;
-
group: string;
-
key: string;
-
label: string;
}
@@ -127,62 +144,50 @@ export interface AIIndicatorClearEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "ai_indicator.clear" in this case
*/
type: string;
-
/**
* The ID of the channel
*/
channel_id?: string;
-
/**
* The type of the channel
*/
channel_type?: string;
-
/**
* The CID of the channel
*/
cid?: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface AIIndicatorStopEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "ai_indicator.stop" in this case
*/
type: string;
-
/**
* The ID of the channel
*/
channel_id?: string;
-
/**
* The type of the channel
*/
channel_type?: string;
-
/**
* The CID of the channel
*/
cid?: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface AIIndicatorUpdateEvent {
@@ -190,64 +195,55 @@ export interface AIIndicatorUpdateEvent {
* The state of the AI indicator
*/
ai_state: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* The ID of the message
*/
message_id: string;
-
custom: CustomEventData;
-
/**
* The type of event: "ai_indicator.update" in this case
*/
type: string;
-
/**
* Optional message from the AI
*/
ai_message?: string;
-
/**
* The ID of the channel
*/
channel_id?: string;
-
/**
* The type of the channel
*/
channel_type?: string;
-
/**
* The CID of the channel
*/
cid?: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface AITextConfig {
enabled: boolean;
-
profile: string;
-
rules: Array;
-
severity_rules: Array;
+ async?: boolean;
+}
+export interface AIVideoConfigRequest {
async?: boolean;
+ enabled?: boolean;
+ rules?: Array;
}
-export interface AIVideoConfig {
+export interface AIVideoConfigResponse {
enabled: boolean;
-
rules: Array;
-
async?: boolean;
}
@@ -256,37 +252,30 @@ export interface APIError {
* API error code
*/
code: number;
-
/**
* Request duration
*/
duration: string;
-
/**
* Message describing an error
*/
message: string;
-
/**
* URL with additional information
*/
more_info: string;
-
/**
* Response HTTP status code
*/
status_code: number;
-
/**
* Additional error-specific information
*/
details: Array;
-
/**
* Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
*/
unrecoverable?: boolean;
-
/**
* Additional error info
*/
@@ -295,23 +284,16 @@ export interface APIError {
export interface AWSRekognitionRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
-
label: string;
-
min_confidence: number;
-
subclassifications?: Record;
}
export interface Action {
name: string;
-
text: string;
-
type: string;
-
style?: string;
-
value?: string;
}
@@ -319,52 +301,41 @@ export interface ActionLogResponse {
/**
* Timestamp when the action was taken
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Unique identifier of the action log
*/
id: string;
-
/**
* Reason for the moderation action
*/
reason: string;
-
/**
* Classification of who triggered the action (e.g. user, moderator, automod, api_integration)
*/
reporter_type: string;
-
/**
* ID of the user who was the target of the action
*/
target_user_id: string;
-
/**
* Type of moderation action
*/
type: string;
-
/**
* ID of the user who performed the action
*/
user_id: string;
-
ai_providers: Array;
-
/**
* Additional metadata about the action
*/
custom: Record;
-
review_queue_item?: ReviewQueueItemResponse;
-
/**
* User response object
*/
target_user?: UserResponse;
-
/**
* User response object
*/
@@ -373,17 +344,11 @@ export interface ActionLogResponse {
export interface ActionSequence {
action: string;
-
blur: boolean;
-
cooldown_period: number;
-
threshold: number;
-
time_window: number;
-
warning: boolean;
-
warning_text: string;
}
@@ -392,18 +357,15 @@ export interface AddUserGroupMembersRequest {
* List of user IDs to add as members
*/
member_ids: Array;
-
/**
* Whether to add the members as group admins. Defaults to false
*/
as_admin?: boolean;
-
team_id?: string;
}
export interface AddUserGroupMembersResponse {
duration: string;
-
user_group?: UserGroupResponse;
}
@@ -412,35 +374,25 @@ export interface AppEventResponse {
* boolean
*/
auto_translation_enabled: boolean;
-
/**
* string
*/
name: string;
-
/**
* boolean
*/
async_url_enrich_enabled?: boolean;
-
file_upload_config?: FileUploadConfig;
-
image_upload_config?: FileUploadConfig;
}
export interface AppResponseFields {
async_url_enrich_enabled: boolean;
-
auto_translation_enabled: boolean;
-
id: number;
-
name: string;
-
placement: string;
-
file_upload_config: FileUploadConfig;
-
image_upload_config: FileUploadConfig;
}
@@ -448,18 +400,14 @@ export interface AppUpdatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
app: AppEventResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "app.updated" in this case
*/
type: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface AppealItemResponse {
@@ -467,100 +415,86 @@ export interface AppealItemResponse {
* Reason Text of the Appeal Item
*/
appeal_reason: string;
-
/**
* When the flag was created
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* ID of the entity
*/
entity_id: string;
-
/**
* Type of entity
*/
entity_type: string;
-
id: string;
-
/**
* Status of the Appeal Item
*/
status: string;
-
/**
* When the flag was last updated
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Text severity level assigned by the AI provider
*/
ai_text_severity?: string;
-
/**
- * CID of the channel the entity belongs to, if applicable
+ * Detected language of the appeal_reason text itself
+ */
+ appeal_reason_language?: string;
+ /**
+ * CID of the channel the entity belongs to (content appeals), or of the channel ban being appealed (stream:user appeals). Empty for a global ban appeal.
*/
channel_cid?: string;
-
/**
* Moderation policy key that was applied
*/
config_key?: string;
-
/**
* Decision Reason of the Appeal Item
*/
decision_reason?: string;
-
/**
* Action recommended by the automated moderation system (e.g. flag, remove, shadow)
*/
recommended_action?: string;
-
/**
* ID of the review queue item linked to this appeal, if the appeal was submitted with one
*/
review_queue_item_id?: string;
-
/**
* Overall content severity score (1–100)
*/
severity?: number;
-
/**
* Full chronological history of all moderation actions on the review queue item
*/
actions?: Array;
-
/**
* Attachments(e.g. Images) of the Appeal Item
*/
attachments?: Array;
-
/**
* Classification labels from automated and manual review
*/
flag_labels?: Array;
-
/**
* Types of flags applied to the entity (e.g. user_report, bodyguard)
*/
flag_types?: Array;
-
/**
* Per-provider flag records explaining why the action was taken
*/
flags?: Array;
-
+ /**
+ * Detected languages in the content
+ */
+ languages?: Array;
entity_content?: ModerationPayload;
-
moderation_action?: ActionLogResponse;
-
original_moderation_action?: ActionLogResponse;
-
/**
* User response object
*/
@@ -572,22 +506,22 @@ export interface AppealRequest {
* Explanation for why the content is being appealed
*/
appeal_reason: string;
-
/**
* Unique identifier of the entity being appealed
*/
entity_id: string;
-
/**
* Type of entity being appealed (e.g., message, user)
*/
entity_type: string;
-
+ /**
+ * CID of the channel ban being appealed. Only used when entity_type is stream:user; omit to appeal the global ban.
+ */
+ channel_cid?: string;
/**
* ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals.
*/
review_queue_item_id?: string;
-
/**
* Array of Attachment URLs(e.g., images)
*/
@@ -599,68 +533,42 @@ export interface AppealResponse {
* Unique identifier of the created Appeal item
*/
appeal_id: string;
-
duration: string;
}
export interface Attachment {
custom: CustomAttachmentData;
-
asset_url?: string;
-
author_icon?: string;
-
author_link?: string;
-
author_name?: string;
-
color?: string;
-
fallback?: string;
-
footer?: string;
-
footer_icon?: string;
-
image_url?: string;
-
og_scrape_url?: string;
-
original_height?: number;
-
original_width?: number;
-
pretext?: string;
-
text?: string;
-
thumb_url?: string;
-
title?: string;
-
title_link?: string;
-
/**
* Attachment type (e.g. image, video, url)
*/
type?: string;
-
actions?: Array;
-
fields?: Array;
-
giphy?: Images;
}
export interface AutomodDetailsResponse {
action?: string;
-
original_message_type?: string;
-
image_labels?: Array;
-
message_details?: FlagMessageDetailsResponse;
-
/**
* Result of the message moderation
*/
@@ -669,41 +577,31 @@ export interface AutomodDetailsResponse {
export interface AutomodPlatformCircumventionConfig {
enabled: boolean;
-
rules: Array;
-
async?: boolean;
}
export interface AutomodRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
-
label: string;
-
threshold: number;
}
export interface AutomodSemanticFiltersConfig {
enabled: boolean;
-
rules: Array;
-
async?: boolean;
}
export interface AutomodSemanticFiltersRule {
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
-
name: string;
-
threshold: number;
}
export interface AutomodToxicityConfig {
enabled: boolean;
-
rules: Array;
-
async?: boolean;
}
@@ -712,40 +610,31 @@ export interface BanActionRequestPayload {
* Also ban user from all channels this moderator creates in the future
*/
ban_from_future_channels?: boolean;
-
/**
* Ban only from specific channel
*/
channel_ban_only?: boolean;
-
channel_cid?: string;
-
/**
* Message deletion mode: soft, pruning, or hard
*/
-
delete_messages?: 'soft' | 'pruning' | 'hard';
-
/**
* Whether to ban by IP address
*/
ip_ban?: boolean;
-
/**
* Reason for the ban
*/
reason?: string;
-
/**
* Whether this is a shadow ban
*/
shadow?: boolean;
-
/**
* Optional: ban user directly without review item
*/
target_user_id?: string;
-
/**
* Duration of ban in minutes
*/
@@ -756,35 +645,28 @@ export interface BanInfoResponse {
/**
* When the ban was created
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban.
*/
channel_cid?: string;
-
/**
* When the ban expires
*/
- expires?: number;
-
+ expires?: TimestampNS;
/**
* Reason for the ban
*/
reason?: string;
-
/**
* Whether this is a shadow ban
*/
shadow?: boolean;
-
channel?: ChannelMetadata;
-
/**
* User response object
*/
created_by?: UserResponse;
-
/**
* User response object
*/
@@ -793,13 +675,9 @@ export interface BanInfoResponse {
export interface BanOptions {
delete_messages?: 'soft' | 'pruning' | 'hard';
-
duration?: number;
-
ip_ban?: boolean;
-
reason?: string;
-
shadow_ban?: boolean;
}
@@ -808,29 +686,23 @@ export interface BanRequest {
* ID of the user to ban
*/
target_user_id: string;
-
/**
* Channel where the ban applies
*/
channel_cid?: string;
-
delete_messages?: 'soft' | 'pruning' | 'hard';
-
/**
* Whether to ban the user's IP address
*/
ip_ban?: boolean;
-
/**
* Optional explanation for the ban
*/
reason?: string;
-
/**
* Whether this is a shadow ban
*/
shadow?: boolean;
-
/**
* Duration of the ban in minutes
*/
@@ -838,24 +710,18 @@ export interface BanRequest {
}
export interface BanResponse {
- created_at: number;
-
- expires?: number;
-
+ created_at: TimestampNS;
+ expires?: TimestampNS;
reason?: string;
-
shadow?: boolean;
-
/**
* User response object
*/
banned_by?: UserResponse;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
/**
* User response object
*/
@@ -871,11 +737,8 @@ export interface BlockActionRequestPayload {
export interface BlockListConfig {
enabled: boolean;
-
rules: Array;
-
async?: boolean;
-
match_substring?: boolean;
}
@@ -883,9 +746,7 @@ export interface BlockListOptions {
/**
* Blocklist behavior. One of: flag, block, shadow_block
*/
-
behavior: 'flag' | 'block' | 'shadow_block';
-
/**
* Blocklist name
*/
@@ -894,43 +755,32 @@ export interface BlockListOptions {
export interface BlockListResponse {
is_confusable_folding_enabled: boolean;
-
is_leet_check_enabled: boolean;
-
is_plural_check_enabled: boolean;
-
is_substring_matching_enabled: boolean;
-
/**
* Block list name
*/
name: string;
-
/**
* Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word
*/
type: string;
-
/**
* List of words to block
*/
words: Array;
-
/**
* Date/time of creation
*/
- created_at?: number;
-
+ created_at?: TimestampNS;
id?: string;
-
owner_user_id?: string;
-
team?: string;
-
/**
* Date/time of the last update
*/
- updated_at?: number;
+ updated_at?: TimestampNS;
}
export interface BlockListRule {
@@ -943,9 +793,7 @@ export interface BlockListRule {
| 'bounce'
| 'bounce_flag'
| 'bounce_remove';
-
name: string;
-
team: string;
}
@@ -961,17 +809,14 @@ export interface BlockUsersResponse {
* User id who blocked another user
*/
blocked_by_user_id: string;
-
/**
* User id who got blocked
*/
blocked_user_id: string;
-
/**
* Timestamp when the user was blocked
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Duration of the request in milliseconds
*/
@@ -983,19 +828,15 @@ export interface BlockedUserResponse {
* ID of the user who got blocked
*/
blocked_user_id: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
/**
* ID of the user who blocked another user
*/
user_id: string;
-
/**
* User response object
*/
blocked_user: UserResponse;
-
/**
* User response object
*/
@@ -1004,9 +845,7 @@ export interface BlockedUserResponse {
export interface BodyguardProfileSummary {
name: string;
-
display_name?: string;
-
text_type?: string;
}
@@ -1021,9 +860,7 @@ export interface BodyguardRule {
| 'bounce'
| 'bounce_flag'
| 'bounce_remove';
-
label: string;
-
severity_rules: Array;
}
@@ -1037,7 +874,6 @@ export interface BodyguardSeverityRule {
| 'bounce'
| 'bounce_flag'
| 'bounce_remove';
-
severity: 'low' | 'medium' | 'high' | 'critical';
}
@@ -1045,34 +881,27 @@ export interface BulkActionAppealsRequest {
/**
* Action to apply: unban, restore, unblock, mark_reviewed, or reject_appeal
*/
-
action_type: 'unban' | 'restore' | 'unblock' | 'mark_reviewed' | 'reject_appeal';
-
/**
* List of appeal UUIDs to process
*/
appeal_ids: Array;
-
/**
* Configuration for mark reviewed action
*/
mark_reviewed?: MarkReviewedRequestPayload;
-
/**
* Configuration for rejecting an appeal
*/
reject_appeal?: RejectAppealRequestPayload;
-
/**
* Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).
*/
restore?: RestoreActionRequestPayload;
-
/**
* Configuration for unban moderation action
*/
unban?: UnbanActionRequestPayload;
-
/**
* Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action.
*/
@@ -1081,12 +910,10 @@ export interface BulkActionAppealsRequest {
export interface BulkActionAppealsResponse {
duration: string;
-
/**
* Appeals that could not be processed, with per-item error messages
*/
errors: Array;
-
/**
* Successfully processed appeals
*/
@@ -1095,13 +922,11 @@ export interface BulkActionAppealsResponse {
export interface BulkAppealError {
appeal_id: string;
-
error: string;
}
export interface BulkAppealResult {
appeal_id: string;
-
appeal_item?: AppealItemResponse;
}
@@ -1117,7 +942,6 @@ export interface BulkDeleteActionConfigResponse {
* Number of action configs deleted
*/
deleted: number;
-
duration: string;
}
@@ -1130,7 +954,6 @@ export interface BulkUpsertActionConfigRequest {
export interface BulkUpsertActionConfigResponse {
duration: string;
-
/**
* The created or updated action configs in the same order as the request
*/
@@ -1143,31 +966,22 @@ export interface BypassActionRequest {
export interface CallActionOptions {
duration?: number;
-
flag_reason?: string;
-
kick_reason?: string;
-
mute_audio?: boolean;
-
mute_video?: boolean;
-
reason?: string;
-
warning_text?: string;
}
export interface CallCustomPropertyParameters {
operator?: string;
-
property_key?: string;
}
export interface CallRuleActionSequence {
violation_number?: number;
-
actions?: Array;
-
call_options?: CallActionOptions;
}
@@ -1177,7 +991,6 @@ export interface CallTypeRuleParameters {
export interface CallViolationCountParameters {
threshold?: number;
-
time_window?: string;
}
@@ -1187,153 +1000,100 @@ export interface CastPollVoteRequest {
export interface ChannelConfigOverrides {
blocklist?: string;
-
blocklist_behavior?: 'flag' | 'block';
-
/**
* Enable/disable message counting
*/
count_messages?: boolean;
-
/**
* Overrides max message length
*/
max_message_length?: number;
-
/**
* Overrides the push notification level for this channel
*/
-
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
-
/**
* Enables message quotes
*/
quotes?: boolean;
-
/**
* Enables or disables reactions
*/
reactions?: boolean;
-
/**
* Enables message replies (threads)
*/
replies?: boolean;
-
/**
* Enable/disable shared locations
*/
shared_locations?: boolean;
-
/**
* Enables or disables typing events
*/
typing_events?: boolean;
-
/**
* Enables or disables file uploads
*/
uploads?: boolean;
-
/**
* Enables or disables URL enrichment
*/
url_enrichment?: boolean;
-
/**
* Enable/disable user message reminders
*/
user_message_reminders?: boolean;
-
/**
* List of commands that channel supports
*/
commands?: Array;
-
chat_preferences?: ChatPreferences;
-
grants?: Record>;
}
export interface ChannelConfigWithInfo {
automod: 'disabled' | 'simple' | 'AI';
-
automod_behavior: 'flag' | 'block' | 'shadow_block';
-
connect_events: boolean;
-
count_messages: boolean;
-
- created_at: number;
-
+ created_at: TimestampNS;
custom_events: boolean;
-
delivery_events: boolean;
-
mark_messages_pending: boolean;
-
max_message_length: number;
-
message_retention: string;
-
mutes: boolean;
-
name: string;
-
polls: boolean;
-
push_notifications: boolean;
-
quotes: boolean;
-
reactions: boolean;
-
read_events: boolean;
-
reminders: boolean;
-
replies: boolean;
-
search: boolean;
-
shared_locations: boolean;
-
skip_last_msg_update_for_system_msgs: boolean;
-
typing_events: boolean;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
uploads: boolean;
-
url_enrichment: boolean;
-
user_message_reminders: boolean;
-
commands: Array;
-
blocklist?: string;
-
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
-
partition_size?: number;
-
partition_ttl?: string;
-
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
-
allowed_flag_reasons?: Array;
-
blocklists?: Array;
-
/**
* Sets thresholds for AI moderation
*/
automod_thresholds?: Thresholds;
-
chat_preferences?: ChatPreferences;
-
grants?: Record>;
}
@@ -1342,17 +1102,14 @@ export interface ChannelContextResponse {
* Channel CID (:)
*/
cid: string;
-
/**
* Channel ID
*/
id: string;
-
/**
* Channel type
*/
type: string;
-
/**
* User response object
*/
@@ -1363,51 +1120,39 @@ export interface ChannelCreatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.created" in this case
*/
type: string;
-
/**
* The ID of the channel which was created
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was created
*/
channel_type?: string;
-
/**
* The CID of the channel which was created
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -1415,51 +1160,39 @@ export interface ChannelDeletedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.deleted" in this case
*/
type: string;
-
/**
* The ID of the channel which was deleted
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was deleted
*/
channel_type?: string;
-
/**
* The CID of the channel which was deleted
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -1467,31 +1200,25 @@ export interface ChannelFrozenEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "channel.frozen" in this case
*/
type: string;
-
/**
* The ID of the channel which was frozen
*/
channel_id?: string;
-
/**
* The type of the channel which was frozen
*/
channel_type?: string;
-
/**
* The CID of the channel which was frozen
*/
cid?: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface ChannelGetOrCreateRequest {
@@ -1499,35 +1226,26 @@ export interface ChannelGetOrCreateRequest {
* Whether this channel will be hidden for the user who created the channel or not
*/
hide_for_creator?: boolean;
-
/**
* Fetch user presence info
*/
presence?: boolean;
-
/**
* Refresh channel state
*/
state?: boolean;
-
thread_unread_counts?: boolean;
-
/**
* Start watching the channel
*/
watch?: boolean;
-
/**
* Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
*/
member_custom_include?: Array;
-
data?: ChannelInput;
-
members?: PaginationParams;
-
messages?: MessagePaginationParams;
-
watchers?: PaginationParams;
}
@@ -1536,55 +1254,42 @@ export interface ChannelHiddenEvent {
* Whether the history was cleared
*/
clear_history: boolean;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.hidden" in this case
*/
type: string;
-
/**
* The ID of the channel which was hidden
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was hidden
*/
channel_type?: string;
-
/**
* The CID of the channel which was hidden
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -1593,72 +1298,51 @@ export interface ChannelInput {
* Enable or disable auto translation
*/
auto_translation_enabled?: boolean;
-
/**
* Language (or comma-separated list of languages) to translate to when auto translation is active
*/
auto_translation_language?: string;
-
created_by_id?: string;
-
disabled?: boolean;
-
/**
* Freeze or unfreeze the channel
*/
frozen?: boolean;
-
/**
* Team the channel belongs to (if multi-tenant mode is enabled)
*/
team?: string;
-
truncated_by_id?: string;
-
filter_tags?: Array;
-
invites?: Array;
-
members?: Array;
-
/**
* Channel configuration overrides
*/
config_overrides?: ChannelConfigOverrides;
-
/**
* User request object
*/
created_by?: UserRequest;
-
custom?: CustomChannelData;
}
export interface ChannelInputRequest {
auto_translation_enabled?: boolean;
-
auto_translation_language?: string;
-
disabled?: boolean;
-
frozen?: boolean;
-
team?: string;
-
invites?: Array;
-
members?: Array;
-
/**
* Channel configuration overrides
*/
config_overrides?: ConfigOverridesRequest;
-
/**
* User request object
*/
created_by?: UserRequest;
-
custom?: CustomChannelData;
}
@@ -1666,44 +1350,34 @@ export interface ChannelKickedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "channel.kicked" in this case
*/
type: string;
-
/**
* The ID of the channel which was kicked
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was kicked
*/
channel_type?: string;
-
/**
* The CID of the channel which was kicked
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
}
@@ -1712,12 +1386,10 @@ export interface ChannelMemberPartialResponse {
* Role of the member in the channel
*/
channel_role: string;
-
/**
* Whether the user muted notifications for this channel
*/
notifications_muted: boolean;
-
/**
* Channel-member custom fields projected via `member_custom_include`
*/
@@ -1729,11 +1401,8 @@ export interface ChannelMemberRequest {
* Role of the member in the channel
*/
channel_role?: string;
-
user_id?: string;
-
custom?: CustomMemberData;
-
user?: MemberUserRequest;
}
@@ -1742,83 +1411,62 @@ export interface ChannelMemberResponse {
* Whether member is banned this channel or not
*/
banned: boolean;
-
/**
* Role of the member in the channel
*/
channel_role: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
notifications_muted: boolean;
-
/**
* Whether member is shadow banned in this channel or not
*/
shadow_banned: boolean;
-
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
custom: CustomMemberData;
-
- archived_at?: number;
-
+ archived_at?: TimestampNS;
/**
* Expiration date of the ban
*/
- ban_expires?: number;
-
+ ban_expires?: TimestampNS;
/**
* Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member)
*/
ban_from_future_channels?: boolean;
-
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
/**
* Expiration date of the future channel ban; absent when the future channel ban is permanent
*/
- future_channel_ban_expires?: number;
-
+ future_channel_ban_expires?: TimestampNS;
/**
* Date when invite was accepted
*/
- invite_accepted_at?: number;
-
+ invite_accepted_at?: TimestampNS;
/**
* Date when invite was rejected
*/
- invite_rejected_at?: number;
-
+ invite_rejected_at?: TimestampNS;
/**
* Whether member was invited or not
*/
invited?: boolean;
-
/**
* Whether member is channel moderator or not
*/
is_moderator?: boolean;
-
- pinned_at?: number;
-
+ pinned_at?: TimestampNS;
/**
* Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner
*/
role?: string;
-
status?: string;
-
user_id?: string;
-
deleted_messages?: Array;
-
/**
* User response object
*/
@@ -1827,27 +1475,18 @@ export interface ChannelMemberResponse {
export interface ChannelMessageCountRuleParameters {
operator?: string;
-
threshold?: number;
}
export interface ChannelMetadata {
cid: string;
-
id: string;
-
type: string;
-
custom: CustomChannelData;
-
- last_message_at?: number;
-
+ last_message_at?: TimestampNS;
member_count?: number;
-
message_count?: number;
-
push_level?: string;
-
team?: string;
}
@@ -1855,23 +1494,19 @@ export interface ChannelMute {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Date/time of mute expiration
*/
- expires?: number;
-
+ expires?: TimestampNS;
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
/**
* User response object
*/
@@ -1928,9 +1563,7 @@ export type ChannelOwnCapability =
export interface ChannelPushPreferencesResponse {
chat_level?: string;
-
- disabled_until?: number;
-
+ disabled_until?: TimestampNS;
chat_preferences?: ChatPreferencesResponse;
}
@@ -1939,131 +1572,104 @@ export interface ChannelResponse {
* Channel CID (:)
*/
cid: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
disabled: boolean;
-
/**
* Whether channel is frozen or not
*/
frozen: boolean;
-
/**
* Channel unique ID
*/
id: string;
-
/**
* Type of the channel
*/
type: string;
-
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Custom data for this object
*/
custom: CustomChannelData;
-
/**
* Whether auto translation is enabled or not
*/
auto_translation_enabled?: boolean;
-
/**
* Language (or comma-separated list of languages) to translate to when auto translation is active
*/
auto_translation_language?: string;
-
/**
* Whether this channel is blocked by current user or not
*/
blocked?: boolean;
-
/**
* Cooldown period after sending each message
*/
cooldown?: number;
-
/**
* Date/time of deletion
*/
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
/**
* Whether this channel is hidden by current user or not
*/
hidden?: boolean;
-
/**
* Date since when the message history is accessible
*/
- hide_messages_before?: number;
-
+ hide_messages_before?: TimestampNS;
/**
* Date of the last message sent
*/
- last_message_at?: number;
-
+ last_message_at?: TimestampNS;
/**
* Number of members in the channel
*/
member_count?: number;
-
/**
* Number of messages in the channel
*/
message_count?: number;
-
/**
* Date of mute expiration
*/
- mute_expires_at?: number;
-
+ mute_expires_at?: TimestampNS;
/**
* Whether this channel is muted or not
*/
muted?: boolean;
-
/**
* Team the channel belongs to (multi-tenant only)
*/
team?: string;
-
/**
* Date of the latest truncation of the channel
*/
- truncated_at?: number;
-
+ truncated_at?: TimestampNS;
/**
* List of filter tags associated with the channel
*/
filter_tags?: Array;
-
/**
* List of channel members (max 100)
*/
members?: Array;
-
/**
* List of channel capabilities of authenticated user
*/
own_capabilities?: Array;
-
config?: ChannelConfigWithInfo;
-
/**
* User response object
*/
created_by?: UserResponse;
-
/**
* User response object
*/
@@ -2072,38 +1678,23 @@ export interface ChannelResponse {
export interface ChannelStateResponse {
duration: string;
-
members: Array;
-
messages: Array;
-
pinned_messages: Array;
-
threads: Array;
-
hidden?: boolean;
-
- hide_messages_before?: number;
-
+ hide_messages_before?: TimestampNS;
watcher_count?: number;
-
active_live_locations?: Array;
-
pending_messages?: Array;
-
read?: Array;
-
watchers?: Array;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
draft?: DraftResponse;
-
membership?: ChannelMemberResponse;
-
push_preferences?: ChannelPushPreferencesResponse;
}
@@ -2112,63 +1703,49 @@ export interface ChannelStateResponseFields {
* List of channel members
*/
members: Array;
-
/**
* List of channel messages
*/
messages: Array;
-
/**
* List of pinned messages in the channel
*/
pinned_messages: Array;
-
threads: Array;
-
/**
* Whether this channel is hidden or not
*/
hidden?: boolean;
-
/**
* Messages before this date are hidden from the user
*/
- hide_messages_before?: number;
-
+ hide_messages_before?: TimestampNS;
/**
* Number of channel watchers
*/
watcher_count?: number;
-
/**
* Active live locations in the channel
*/
active_live_locations?: Array;
-
/**
* Pending messages that this user has sent
*/
pending_messages?: Array;
-
/**
* List of read states
*/
read?: Array;
-
/**
* List of user who is watching the channel
*/
watchers?: Array;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
draft?: DraftResponse;
-
membership?: ChannelMemberResponse;
-
push_preferences?: ChannelPushPreferencesResponse;
}
@@ -2178,58 +1755,44 @@ export interface ChannelTruncatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.truncated" in this case
*/
type: string;
-
/**
* The ID of the channel which was truncated
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was truncated
*/
channel_type?: string;
-
/**
* The CID of the channel which was truncated
*/
cid?: string;
-
message_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
/**
* Represents any chat message
*/
message?: MessageResponse;
-
user?: UserResponseCommonFields;
}
@@ -2237,89 +1800,69 @@ export interface ChannelUnFrozenEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "channel.unfrozen" in this case
*/
type: string;
-
/**
* The ID of the channel which was unfrozen
*/
channel_id?: string;
-
/**
* The type of the channel which was unfrozen
*/
channel_type?: string;
-
/**
* The CID of the channel which was unfrozen
*/
cid?: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface ChannelUpdatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.updated" in this case
*/
type: string;
-
/**
* The ID of the channel which was updated
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was updated
*/
channel_type?: string;
-
/**
* The CID of the channel which was updated
*/
cid?: string;
-
message_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
/**
* Represents any chat message
*/
message?: MessageResponse;
-
user?: UserResponseCommonFields;
}
@@ -2327,287 +1870,178 @@ export interface ChannelVisibleEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
/**
* The type of event: "channel.visible" in this case
*/
type: string;
-
/**
* The ID of the channel which was shown
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
channel_message_count?: number;
-
/**
* The type of the channel which was shown
*/
channel_type?: string;
-
/**
* The CID of the channel which was shown
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
export interface ChatDraftPayloadResponse {
id: string;
-
text: string;
-
custom: CustomMessageData;
-
html?: string;
-
mml?: string;
-
parent_id?: string;
-
poll_id?: string;
-
quoted_message_id?: string;
-
show_in_channel?: boolean;
-
silent?: boolean;
-
type?: string;
-
attachments?: Array;
-
mentioned_users?: Array;
}
export interface ChatDraftResponse {
channel_cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
message: ChatDraftPayloadResponse;
-
parent_id?: string;
-
parent_message?: ChatMessageResponse;
-
quoted_message?: ChatMessageResponse;
}
export interface ChatMessageResponse {
cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
deleted_reply_count: number;
-
html: string;
-
id: string;
-
mentioned_channel: boolean;
-
mentioned_here: boolean;
-
pinned: boolean;
-
reply_count: number;
-
shadowed: boolean;
-
silent: boolean;
-
text: string;
-
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
attachments: Array;
-
latest_reactions: Array;
-
mentioned_users: Array;
-
own_reactions: Array;
-
restricted_visibility: Array;
-
custom: CustomMessageData;
-
reaction_counts: Record;
-
reaction_scores: Record;
-
/**
* User response object
*/
user: UserResponse;
-
command?: string;
-
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
deleted_for_me?: boolean;
-
- message_text_updated_at?: number;
-
+ message_text_updated_at?: TimestampNS;
mml?: string;
-
parent_id?: string;
-
- pin_expires?: number;
-
- pinned_at?: number;
-
+ pin_expires?: TimestampNS;
+ pinned_at?: TimestampNS;
poll_id?: string;
-
quoted_message_id?: string;
-
show_in_channel?: boolean;
-
mentioned_group_ids?: Array;
-
mentioned_groups?: Array;
-
mentioned_roles?: Array;
-
thread_participants?: Array;
-
draft?: ChatDraftResponse;
-
i18n?: Record;
-
image_labels?: Record>;
-
member?: ChannelMemberPartialResponse;
-
moderation?: ChatModerationV2Response;
-
/**
* User response object
*/
pinned_by?: UserResponse;
-
poll?: PollResponseData;
-
quoted_message?: ChatMessageResponse;
-
reaction_groups?: Record;
-
reminder?: ChatReminderResponseData;
-
shared_location?: ChatSharedLocationResponseData;
}
export interface ChatModerationV2Response {
action: string;
-
original_text: string;
-
blocklist_matched?: string;
-
platform_circumvented?: boolean;
-
semantic_filter_matched?: string;
-
blocklists_matched?: Array;
-
image_harms?: Array;
-
text_harms?: Array;
}
export interface ChatPreferences {
channel_mentions?: string;
-
default_preference?: string;
-
direct_mentions?: string;
-
distinct_channel_messages?: string;
-
group_mentions?: string;
-
here_mentions?: string;
-
role_mentions?: string;
-
thread_replies?: string;
}
export interface ChatPreferencesInput {
channel_mentions?: 'all' | 'none';
-
default_preference?: 'all' | 'none';
-
direct_mentions?: 'all' | 'none';
-
group_mentions?: 'all' | 'none';
-
here_mentions?: 'all' | 'none';
-
role_mentions?: 'all' | 'none';
-
thread_replies?: 'all' | 'none';
}
export interface ChatPreferencesResponse {
channel_mentions?: string;
-
default_preference?: string;
-
direct_mentions?: string;
-
group_mentions?: string;
-
here_mentions?: string;
-
role_mentions?: string;
-
thread_replies?: string;
}
export interface ChatReactionGroupResponse {
count: number;
-
- first_reaction_at: number;
-
- last_reaction_at: number;
-
+ first_reaction_at: TimestampNS;
+ last_reaction_at: TimestampNS;
sum_scores: number;
-
latest_reactions_by: Array;
}
export interface ChatReactionGroupUserResponse {
- created_at: number;
-
+ created_at: TimestampNS;
user_id: string;
-
/**
* User response object
*/
@@ -2615,20 +2049,13 @@ export interface ChatReactionGroupUserResponse {
}
export interface ChatReactionResponse {
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
score: number;
-
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
user_id: string;
-
custom: CustomReactionData;
-
/**
* User response object
*/
@@ -2637,19 +2064,12 @@ export interface ChatReactionResponse {
export interface ChatReminderResponseData {
channel_cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
user_id: string;
-
- remind_at?: number;
-
+ remind_at?: TimestampNS;
message?: ChatMessageResponse;
-
/**
* User response object
*/
@@ -2658,35 +2078,22 @@ export interface ChatReminderResponseData {
export interface ChatSharedLocationResponseData {
channel_cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
created_by_device_id: string;
-
latitude: number;
-
longitude: number;
-
message_id: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
user_id: string;
-
- end_at?: number;
-
+ end_at?: TimestampNS;
message?: ChatMessageResponse;
}
export interface ClosedCaptionRuleParameters {
severity?: string;
-
threshold?: number;
-
time_window?: string;
-
harm_labels?: Array;
-
llm_harm_labels?: Record;
}
@@ -2695,31 +2102,26 @@ export interface Command {
* Arguments help text, shown in commands auto-completion
*/
args: string;
-
/**
* Description, shown in commands auto-completion
*/
description: string;
-
/**
* Unique command name
*/
name: string;
-
/**
* Set name used for grouping commands
*/
set: string;
-
/**
* Date/time of creation
*/
- created_at?: number;
-
+ created_at?: TimestampNS;
/**
* Date/time of the last update
*/
- updated_at?: number;
+ updated_at?: TimestampNS;
}
export interface ConfigOverridesRequest {
@@ -2727,72 +2129,56 @@ export interface ConfigOverridesRequest {
* Blocklist name
*/
blocklist?: string;
-
/**
* Blocklist behavior. One of: flag, block
*/
-
blocklist_behavior?: 'flag' | 'block';
-
/**
* Enable/disable message counting
*/
count_messages?: boolean;
-
/**
* Maximum message length
*/
max_message_length?: number;
-
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
-
/**
* Enable/disable quotes
*/
quotes?: boolean;
-
/**
* Enable/disable reactions
*/
reactions?: boolean;
-
/**
* Enable/disable replies
*/
replies?: boolean;
-
/**
* Enable/disable shared locations
*/
shared_locations?: boolean;
-
/**
* Enable/disable typing events
*/
typing_events?: boolean;
-
/**
* Enable/disable uploads
*/
uploads?: boolean;
-
/**
* Enable/disable URL enrichment
*/
url_enrichment?: boolean;
-
/**
* Enable/disable user message reminders
*/
user_message_reminders?: boolean;
-
/**
* List of available commands
*/
commands?: Array;
-
chat_preferences?: ChatPreferences;
-
/**
* Permission grants modifiers
*/
@@ -2804,104 +2190,73 @@ export interface ConfigResponse {
* Whether moderation should be performed asynchronously
*/
async: boolean;
-
/**
* When the configuration was created
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Unique identifier for the moderation configuration
*/
key: string;
-
/**
* Team associated with the configuration
*/
team: string;
-
/**
* When the configuration was last updated
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
supported_video_call_harm_types: Array;
-
/**
* Configurable image moderation label definitions for dashboard rendering
*/
ai_image_label_definitions?: Array;
-
/**
* Names of Bodyguard credential profiles registered on this app. The dashboard uses this list to render the profile picker on the AI Text section.
*/
available_bodyguard_profiles?: Array;
-
ai_audio_config?: AIAudioConfigResponse;
-
ai_image_config?: AIImageConfig;
-
/**
* Available L2 subclassifications per L1 image moderation label, based on the active provider
*/
ai_image_subclassifications?: Record>;
-
ai_text_config?: AITextConfig;
-
- ai_video_config?: AIVideoConfig;
-
+ ai_video_config?: AIVideoConfigResponse;
automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
-
automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
-
automod_toxicity_config?: AutomodToxicityConfig;
-
block_list_config?: BlockListConfig;
-
flood_config?: FloodConfig;
-
llm_config?: LLMConfig;
-
velocity_filter_config?: VelocityFilterConfig;
-
video_call_rule_config?: VideoCallRuleConfig;
}
export interface ConnectUserDetailsRequest {
id: string;
-
image?: string;
-
invisible?: boolean;
-
language?: string;
-
name?: string;
-
custom?: CustomUserData;
-
privacy_settings?: PrivacySettingsResponse;
}
export interface ContentCountRuleParameters {
threshold?: number;
-
time_window?: string;
}
export interface ContentCustomPropertyCountParameters {
operator?: string;
-
property_key?: string;
-
threshold?: number;
-
time_window?: string;
}
export interface ContentCustomPropertyParameters {
operator?: string;
-
property_key?: string;
}
@@ -2910,26 +2265,18 @@ export interface CreateBlockListRequest {
* Block list name
*/
name: string;
-
/**
* List of words to block
*/
words: Array;
-
is_confusable_folding_enabled?: boolean;
-
is_leet_check_enabled?: boolean;
-
is_plural_check_enabled?: boolean;
-
is_substring_matching_enabled?: boolean;
-
team?: string;
-
/**
* Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word
*/
-
type?: 'regex' | 'domain' | 'domain_allowlist' | 'email' | 'email_allowlist' | 'word';
}
@@ -2938,7 +2285,6 @@ export interface CreateBlockListResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Block list contains restricted words
*/
@@ -2950,23 +2296,18 @@ export interface CreateDeviceRequest {
* Device ID
*/
id: string;
-
/**
* Push provider
*/
-
push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi';
-
/**
* Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from 'id', which is the push token.
*/
hardware_id?: string;
-
/**
* Push provider name
*/
push_provider_name?: string;
-
/**
* When true the token is for Apple VoIP push notifications
*/
@@ -2985,7 +2326,6 @@ export interface CreateDraftResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
draft: DraftResponse;
}
@@ -3001,12 +2341,10 @@ export interface CreateGuestResponse {
* the access token to authenticate the user
*/
access_token: string;
-
/**
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* User response object
*/
@@ -3018,7 +2356,6 @@ export interface CreatePollOptionRequest {
* Option text
*/
text: string;
-
/**
* Custom data for this object
*/
@@ -3030,40 +2367,31 @@ export interface CreatePollRequest {
* The name of the poll
*/
name: string;
-
/**
* Indicates whether users can suggest user defined answers
*/
allow_answers?: boolean;
-
allow_user_suggested_options?: boolean;
-
/**
* A description of the poll
*/
description?: string;
-
/**
* Indicates whether users can cast multiple votes
*/
enforce_unique_vote?: boolean;
-
id?: string;
-
/**
* Indicates whether the poll is open for voting
*/
is_closed?: boolean;
-
/**
* Indicates the maximum amount of votes a user can cast
*/
max_votes_allowed?: number;
-
+ team?: string;
voting_visibility?: 'anonymous' | 'public';
-
options?: Array;
-
/**
* Custom data for this object
*/
@@ -3072,13 +2400,9 @@ export interface CreatePollRequest {
export interface CreateQueueRequest {
name: string;
-
type: 'personal_view' | 'operational_queue';
-
description?: string;
-
sort?: Array>;
-
filters?: Record;
}
@@ -3091,7 +2415,6 @@ export interface CreateReminderResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
reminder: ReminderResponseData;
}
@@ -3100,22 +2423,18 @@ export interface CreateUserGroupRequest {
* The user friendly name of the user group
*/
name: string;
-
/**
* An optional description for the group
*/
description?: string;
-
/**
* Optional user group ID. If not provided, a UUID v7 will be generated
*/
id?: string;
-
/**
* Optional team ID to scope the group to a team
*/
team_id?: string;
-
/**
* Optional initial list of user IDs to add as members
*/
@@ -3124,7 +2443,6 @@ export interface CreateUserGroupRequest {
export interface CreateUserGroupResponse {
duration: string;
-
user_group?: UserGroupResponse;
}
@@ -3133,7 +2451,6 @@ export interface CustomActionRequestPayload {
* Custom action identifier
*/
id?: string;
-
/**
* Custom action options
*/
@@ -3141,13 +2458,10 @@ export interface CustomActionRequestPayload {
}
export interface CustomEvent {
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
type: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface Data {
@@ -3159,7 +2473,6 @@ export interface DeleteActionConfigResponse {
* Number of action configs deleted (0 or 1)
*/
deleted: number;
-
duration: string;
}
@@ -3168,17 +2481,14 @@ export interface DeleteActivityRequestPayload {
* ID of the activity to delete (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity (required for delete_activity to distinguish v2 vs v3)
*/
entity_type?: string;
-
/**
* Whether to permanently delete the activity
*/
hard_delete?: boolean;
-
/**
* Reason for deletion
*/
@@ -3190,7 +2500,6 @@ export interface DeleteChannelResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Represents channel in chat
*/
@@ -3202,9 +2511,8 @@ export interface DeleteChannelsRequest {
* All channels that should be deleted
*/
cids: Array;
-
/**
- * Specify if channels and all ressources should be hard deleted
+ * Server-side only. When true, the channels and all their resources are permanently deleted instead of soft-deleted.
*/
hard_delete?: boolean;
}
@@ -3214,9 +2522,7 @@ export interface DeleteChannelsResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
task_id?: string;
-
/**
* Map of channel IDs and their deletion results
*/
@@ -3225,7 +2531,6 @@ export interface DeleteChannelsResponse {
export interface DeleteChannelsResultResponse {
status: string;
-
error?: string;
}
@@ -3234,17 +2539,14 @@ export interface DeleteCommentRequestPayload {
* ID of the comment to delete (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity
*/
entity_type?: string;
-
/**
* Whether to permanently delete the comment
*/
hard_delete?: boolean;
-
/**
* Reason for deletion
*/
@@ -3256,17 +2558,14 @@ export interface DeleteMessageRequestPayload {
* ID of the message to delete (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity
*/
entity_type?: string;
-
/**
* Whether to permanently delete the message
*/
hard_delete?: boolean;
-
/**
* Reason for deletion
*/
@@ -3278,7 +2577,6 @@ export interface DeleteMessageResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Represents any chat message
*/
@@ -3296,17 +2594,14 @@ export interface DeleteReactionRequestPayload {
* ID of the reaction to delete (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity
*/
entity_type?: string;
-
/**
* Whether to permanently delete the reaction
*/
hard_delete?: boolean;
-
/**
* Reason for deletion
*/
@@ -3318,12 +2613,10 @@ export interface DeleteReactionResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Represents any chat message
*/
message: MessageResponse;
-
reaction: ReactionResponse;
}
@@ -3338,29 +2631,23 @@ export interface DeleteUserMessagesRequestPayload {
/**
* Message deletion mode: soft, pruning, or hard
*/
-
delete_messages: 'soft' | 'pruning' | 'hard';
-
/**
* Optional: scope deletion to a single channel (alternative to app-wide deletion)
*/
channel_cid?: string;
-
/**
* Whether to also delete the user's reactions on other users' messages
*/
delete_reactions?: boolean;
-
/**
* ID of the user whose messages should be deleted (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity
*/
entity_type?: string;
-
/**
* Reason for the deletion
*/
@@ -3372,32 +2659,26 @@ export interface DeleteUserRequestPayload {
* Also delete all user conversations
*/
delete_conversation_channels?: boolean;
-
/**
* Delete flagged feeds content
*/
delete_feeds_content?: boolean;
-
/**
* ID of the user to delete (alternative to item_id)
*/
entity_id?: string;
-
/**
* Type of the entity
*/
entity_type?: string;
-
/**
* Whether to permanently delete the user
*/
hard_delete?: boolean;
-
/**
* Also delete all user messages
*/
mark_messages_deleted?: boolean;
-
/**
* Reason for deletion
*/
@@ -3406,7 +2687,6 @@ export interface DeleteUserRequestPayload {
export interface DeliveredMessagePayload {
cid?: string;
-
id?: string;
}
@@ -3418,43 +2698,35 @@ export interface DeviceResponse {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Device ID
*/
id: string;
-
/**
* Push provider
*/
push_provider: string;
-
/**
* User ID
*/
user_id: string;
-
/**
* Whether device is disabled or not
*/
disabled?: boolean;
-
/**
* Reason explaining why device had been disabled
*/
disabled_reason?: string;
-
/**
* Stable physical device identifier used to deduplicate pushes across push providers
*/
hardware_id?: string;
-
/**
* Push provider name
*/
push_provider_name?: string;
-
/**
* When true the token is for Apple VoIP push notifications
*/
@@ -3465,27 +2737,21 @@ export interface DraftDeletedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "draft.deleted" in this case
*/
type: string;
-
/**
* The CID of the channel where the draft was created
*/
cid?: string;
-
/**
* The ID of the parent message
*/
parent_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
draft?: DraftResponse;
}
@@ -3494,56 +2760,44 @@ export interface DraftPayloadResponse {
* Message ID is unique string identifier of the message
*/
id: string;
-
/**
* Text of the message
*/
text: string;
-
custom: CustomMessageData;
-
/**
* Contains HTML markup of the message
*/
html?: string;
-
/**
* MML content of the message
*/
mml?: string;
-
/**
* ID of parent message (thread)
*/
parent_id?: string;
-
/**
* Identifier of the poll to include in the message
*/
poll_id?: string;
-
quoted_message_id?: string;
-
/**
* Whether thread reply should be shown in the channel as well
*/
show_in_channel?: boolean;
-
/**
* Whether message is silent or not
*/
silent?: boolean;
-
/**
* Contains type of the message. One of: regular, system
*/
type?: string;
-
/**
* Array of message attachments
*/
attachments?: Array;
-
/**
* List of mentioned users
*/
@@ -3552,26 +2806,20 @@ export interface DraftPayloadResponse {
export interface DraftResponse {
channel_cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Contains the draft message content
*/
message: DraftPayloadResponse;
-
parent_id?: string;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
/**
* Represents any chat message
*/
parent_message?: MessageResponse;
-
/**
* Represents any chat message
*/
@@ -3582,81 +2830,52 @@ export interface DraftUpdatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "draft.updated" in this case
*/
type: string;
-
/**
* The CID of the channel where the draft was created/updated
*/
cid?: string;
-
/**
* The ID of the parent message
*/
parent_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
draft?: DraftResponse;
}
export interface EnrichedActivity {
foreign_id?: string;
-
id?: string;
-
score?: number;
-
verb?: string;
-
to?: Array;
-
actor?: Data;
-
latest_reactions?: Record>;
-
object?: Data;
-
origin?: Data;
-
own_reactions?: Record>;
-
reaction_counts?: Record;
-
target?: Data;
}
export interface EnrichedReaction {
activity_id: string;
-
kind: string;
-
user_id: string;
-
id?: string;
-
parent?: string;
-
target_feeds?: Array;
-
children_counts?: Record;
-
created_at?: Time;
-
data?: Record;
-
latest_children?: Record>;
-
own_children?: Record>;
-
updated_at?: Time;
-
user?: Data;
}
@@ -3665,51 +2884,31 @@ export interface EntityCreatorResponse {
* Number of minor actions performed on the user
*/
ban_count: number;
-
banned: boolean;
-
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Number of major actions performed on the user
*/
deleted_content_count: number;
-
/**
* Number of flag actions performed on the user
*/
flagged_count: number;
-
id: string;
-
language: string;
-
online: boolean;
-
role: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
blocked_user_ids: Array;
-
teams: Array;
-
custom: CustomUserData;
-
avg_response_time?: number;
-
- deactivated_at?: number;
-
- deleted_at?: number;
-
+ deactivated_at?: TimestampNS;
+ deleted_at?: TimestampNS;
image?: string;
-
- last_active?: number;
-
+ last_active?: TimestampNS;
name?: string;
-
- revoke_tokens_issued_before?: number;
-
+ revoke_tokens_issued_before?: TimestampNS;
teams_role?: Record;
}
@@ -3718,12 +2917,10 @@ export interface EscalatePayload {
* Additional context for the reviewer
*/
notes?: string;
-
/**
* Priority of the escalation (low, medium, high)
*/
priority?: string;
-
/**
* Reason for the escalation (from configured escalation_reasons)
*/
@@ -3732,17 +2929,13 @@ export interface EscalatePayload {
export interface EscalationMetadata {
notes?: string;
-
priority?: string;
-
reason?: string;
}
export interface EventRequest {
type: string;
-
parent_id?: string;
-
custom?: CustomEventData;
}
@@ -3751,7 +2944,6 @@ export interface EventResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* The discriminator object for all websocket events, it maps events' payload to the final type
*/
@@ -3760,141 +2952,92 @@ export interface EventResponse {
export interface FeedsActivityLocation {
lat: number;
-
lng: number;
}
export interface FeedsBookmarkResponse {
- created_at: number;
-
+ created_at: TimestampNS;
object_id: string;
-
object_type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* User response object
*/
user: UserResponse;
-
activity_id?: string;
-
custom?: Record;
}
export interface FeedsEnrichedCollectionResponse {
- created_at: number;
-
+ created_at: TimestampNS;
id: string;
-
name: string;
-
status: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
user_id: string;
-
custom: Record;
}
export interface FeedsFeedResponse {
activity_count: number;
-
- created_at: number;
-
+ created_at: TimestampNS;
description: string;
-
feed: string;
-
follower_count: number;
-
following_count: number;
-
group_id: string;
-
id: string;
-
member_count: number;
-
name: string;
-
pin_count: number;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* User response object
*/
created_by: UserResponse;
-
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
visibility?: string;
-
filter_tags?: Array;
-
custom?: Record;
-
location?: FeedsActivityLocation;
}
export interface FeedsNotificationComment {
comment: string;
-
id: string;
-
user_id: string;
-
attachments?: Array;
}
export interface FeedsNotificationContext {
target?: FeedsNotificationTarget;
-
trigger?: FeedsNotificationTrigger;
}
export interface FeedsNotificationParentActivity {
id: string;
-
text?: string;
-
type?: string;
-
user_id?: string;
-
attachments?: Array;
}
export interface FeedsNotificationTarget {
id: string;
-
name?: string;
-
text?: string;
-
type?: string;
-
user_id?: string;
-
attachments?: Array;
-
comment?: FeedsNotificationComment;
-
custom?: Record;
-
parent_activity?: FeedsNotificationParentActivity;
}
export interface FeedsNotificationTrigger {
text: string;
-
type: string;
-
comment?: FeedsNotificationComment;
-
custom?: Record;
}
@@ -3902,45 +3045,31 @@ export interface FeedsPreferences {
/**
* Push notification preference for comments on user's activities. One of: all, none
*/
-
comment?: 'all' | 'none';
-
/**
* Push notification preference for mentions in comments. One of: all, none
*/
-
comment_mention?: 'all' | 'none';
-
/**
* Push notification preference for reactions on comments. One of: all, none
*/
-
comment_reaction?: 'all' | 'none';
-
/**
* Push notification preference for replies to comments. One of: all, none
*/
-
comment_reply?: 'all' | 'none';
-
/**
* Push notification preference for new followers. One of: all, none
*/
-
follow?: 'all' | 'none';
-
/**
* Push notification preference for mentions in activities. One of: all, none
*/
-
mention?: 'all' | 'none';
-
/**
* Push notification preference for reactions on user's activities or comments. One of: all, none
*/
-
reaction?: 'all' | 'none';
-
/**
* Push notification preferences for custom activity types. Map of activity type to preference (all or none)
*/
@@ -3949,54 +3078,37 @@ export interface FeedsPreferences {
export interface FeedsPreferencesResponse {
comment?: string;
-
comment_mention?: string;
-
comment_reaction?: string;
-
comment_reply?: string;
-
follow?: string;
-
mention?: string;
-
reaction?: string;
-
custom_activity_types?: Record;
}
export interface FeedsReactionGroupResponse {
count: number;
-
- first_reaction_at: number;
-
- last_reaction_at: number;
+ first_reaction_at: TimestampNS;
+ last_reaction_at: TimestampNS;
}
export interface FeedsReactionResponse {
activity_id: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* User response object
*/
user: UserResponse;
-
comment_id?: string;
-
custom?: Record;
}
export interface FeedsShareResponse {
activity_id: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
/**
* User response object
*/
@@ -4005,185 +3117,104 @@ export interface FeedsShareResponse {
export interface FeedsV3ActivityResponse {
bookmark_count: number;
-
comment_count: number;
-
- created_at: number;
-
+ created_at: TimestampNS;
hidden: boolean;
-
id: string;
-
popularity: number;
-
preview: boolean;
-
reaction_count: number;
-
restrict_replies: string;
-
score: number;
-
share_count: number;
-
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
visibility: string;
-
attachments: Array;
-
comments: Array;
-
feeds: Array;
-
filter_tags: Array;
-
interest_tags: Array;
-
latest_reactions: Array;
-
mentioned_users: Array;
-
own_bookmarks: Array;
-
own_reactions: Array;
-
collections: Record;
-
custom: Record;
-
reaction_groups: Record;
-
search_data: Record;
-
/**
* User response object
*/
user: UserResponse;
-
- deleted_at?: number;
-
- edited_at?: number;
-
- expires_at?: number;
-
+ deleted_at?: TimestampNS;
+ edited_at?: TimestampNS;
+ expires_at?: TimestampNS;
friend_reaction_count?: number;
-
is_read?: boolean;
-
is_seen?: boolean;
-
is_watched?: boolean;
-
moderation_action?: string;
-
selector_source?: string;
-
text?: string;
-
visibility_tag?: string;
-
friend_reactions?: Array;
-
latest_shares?: Array;
-
current_feed?: FeedsFeedResponse;
-
i18n?: Record;
-
location?: FeedsActivityLocation;
-
metrics?: Record;
-
moderation?: ModerationV2Response;
-
notification_context?: FeedsNotificationContext;
-
parent?: FeedsV3ActivityResponse;
-
poll?: PollResponseData;
-
score_vars?: Record;
}
export interface FeedsV3CommentResponse {
bookmark_count: number;
-
confidence_score: number;
-
- created_at: number;
-
+ created_at: TimestampNS;
downvote_count: number;
-
id: string;
-
object_id: string;
-
object_type: string;
-
reaction_count: number;
-
reply_count: number;
-
score: number;
-
status: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
upvote_count: number;
-
mentioned_users: Array;
-
own_reactions: Array;
-
/**
* User response object
*/
user: UserResponse;
-
controversy_score?: number;
-
- deleted_at?: number;
-
- edited_at?: number;
-
+ deleted_at?: TimestampNS;
+ edited_at?: TimestampNS;
parent_id?: string;
-
text?: string;
-
attachments?: Array;
-
latest_reactions?: Array;
-
custom?: Record;
-
i18n?: Record;
-
moderation?: ModerationV2Response;
-
reaction_groups?: Record;
}
export interface Field {
short: boolean;
-
title: string;
-
value: string;
}
export interface FileUploadConfig {
size_limit: number;
-
allowed_file_extensions: Array;
-
allowed_mime_types: Array;
-
blocked_file_extensions: Array;
-
blocked_mime_types: Array;
}
@@ -4192,7 +3223,6 @@ export interface FileUploadRequest {
* file field
*/
file?: string;
-
user?: OnlyUserID;
}
@@ -4201,12 +3231,10 @@ export interface FileUploadResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* URL to the uploaded asset. Should be used to put to `asset_url` attachment field
*/
file?: string;
-
/**
* URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field
*/
@@ -4218,27 +3246,26 @@ export interface FilterConfigResponse {
* LLM moderation labels available as filter values
*/
llm_labels: Array;
-
/**
* AI image moderation labels available as filter values. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard L1 label set.
*/
ai_image_labels?: Array;
-
/**
* AI text moderation labels available as filter values
*/
ai_text_labels?: Array;
-
/**
* Moderation config keys present in the queue, available as filter values
*/
config_keys?: Array;
-
/**
* The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only — the filter accepts any custom key regardless of this list.
*/
filterable_custom_keys?: Array;
-
+ /**
+ * Names of the app's moderation rules, available as filter values on the `label` field when filtering rule-flagged content. Includes disabled rules, since items flagged before a rule was turned off still carry its name; excludes deleted ones. Scoped to the caller's teams on a multi-tenant app. Capped at 30 names, ordered by name, so an app above that cap is listed partially.
+ */
+ rule_names?: Array;
/**
* AI image moderation labels available as filter values, as a map of L1 label to its L2 sub-labels. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard catalogue of the org's enabled image providers.
*/
@@ -4251,23 +3278,18 @@ export interface FlagCountRuleParameters {
export interface FlagDetailsResponse {
original_text: string;
-
automod?: AutomodDetailsResponse;
-
extra?: Record;
}
export interface FlagFeedbackResponse {
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
labels: Array;
}
export interface FlagItemResponse {
duration: string;
-
/**
* Unique identifier of the created moderation item
*/
@@ -4276,11 +3298,8 @@ export interface FlagItemResponse {
export interface FlagMessageDetailsResponse {
pin_changed?: boolean;
-
should_enrich?: boolean;
-
skip_push?: boolean;
-
updated_by_id?: string;
}
@@ -4289,27 +3308,22 @@ export interface FlagRequest {
* Unique identifier of the entity being flagged
*/
entity_id: string;
-
/**
* Type of entity being flagged (e.g., message, user)
*/
entity_type: string;
-
/**
* ID of the user who created the flagged entity
*/
entity_creator_id?: string;
-
/**
* Optional explanation for why the content is being flagged
*/
reason?: string;
-
/**
* Additional metadata about the flag
*/
custom?: Record;
-
moderation_payload?: ModerationPayload;
}
@@ -4319,128 +3333,82 @@ export interface FlagUserOptions {
export interface FloodConfig {
allowlist?: Array;
-
identical?: FloodIdenticalConfig;
-
similar?: FloodSimilarConfig;
}
export interface FloodIdenticalConfig {
action: string;
-
enabled: boolean;
-
threshold: number;
-
time_window: string;
}
export interface FloodIdenticalRuleParameters {
+ min_text_length?: number;
threshold?: number;
-
time_window?: string;
-
+ track_across_users?: boolean;
allowlist?: Array;
}
export interface FloodSimilarConfig {
action: string;
-
enabled: boolean;
-
similarity_distance: number;
-
threshold: number;
-
time_window: string;
}
export interface FloodSimilarRuleParameters {
similarity_distance?: number;
-
threshold?: number;
-
time_window?: string;
-
allowlist?: Array;
}
export interface FullUserResponse {
banned: boolean;
-
- created_at: number;
-
+ created_at: TimestampNS;
id: string;
-
invisible: boolean;
-
language: string;
-
online: boolean;
-
role: string;
-
shadow_banned: boolean;
-
total_unread_count: number;
-
unread_channels: number;
-
unread_count: number;
-
unread_threads: number;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
blocked_user_ids: Array;
-
channel_mutes: Array;
-
devices: Array;
-
mutes: Array;
-
teams: Array;
-
custom: CustomUserData;
-
avg_response_time?: number;
-
- ban_expires?: number;
-
- deactivated_at?: number;
-
- deleted_at?: number;
-
+ ban_expires?: TimestampNS;
+ deactivated_at?: TimestampNS;
+ deleted_at?: TimestampNS;
image?: string;
-
- last_active?: number;
-
+ last_active?: TimestampNS;
name?: string;
-
- revoke_tokens_issued_before?: number;
-
+ revoke_tokens_issued_before?: TimestampNS;
latest_hidden_channels?: Array;
-
privacy_settings?: PrivacySettingsResponse;
-
teams_role?: Record;
}
export interface FutureChannelBanResponse {
- created_at: number;
-
- expires?: number;
-
+ created_at: TimestampNS;
+ expires?: TimestampNS;
reason?: string;
-
shadow?: boolean;
-
/**
* User response object
*/
banned_by?: UserResponse;
-
/**
* User response object
*/
@@ -4449,7 +3417,6 @@ export interface FutureChannelBanResponse {
export interface GetActionConfigResponse {
duration: string;
-
/**
* Moderation action configs grouped by entity type, sorted by order ascending
*/
@@ -4458,7 +3425,6 @@ export interface GetActionConfigResponse {
export interface GetAppealResponse {
duration: string;
-
item?: AppealItemResponse;
}
@@ -4467,7 +3433,6 @@ export interface GetApplicationResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
app: AppResponseFields;
}
@@ -4476,7 +3441,6 @@ export interface GetBlockedUsersResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Array of blocked user object
*/
@@ -4485,7 +3449,6 @@ export interface GetBlockedUsersResponse {
export interface GetConfigResponse {
duration: string;
-
config?: ConfigResponse;
}
@@ -4494,13 +3457,11 @@ export interface GetDraftResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
draft: DraftResponse;
}
export interface GetManyMessagesResponse {
duration: string;
-
/**
* List of messages
*/
@@ -4512,7 +3473,6 @@ export interface GetMessageResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Represents any chat message
*/
@@ -4521,79 +3481,57 @@ export interface GetMessageResponse {
export interface GetOGResponse {
duration: string;
-
custom: CustomAttachmentData;
-
/**
* URL of detected video or audio
*/
asset_url?: string;
-
author_icon?: string;
-
/**
* og:site
*/
author_link?: string;
-
/**
* og:site_name
*/
author_name?: string;
-
color?: string;
-
fallback?: string;
-
footer?: string;
-
footer_icon?: string;
-
/**
* URL of detected image
*/
image_url?: string;
-
/**
* extracted url from the text
*/
og_scrape_url?: string;
-
original_height?: number;
-
original_width?: number;
-
pretext?: string;
-
/**
* og:description
*/
text?: string;
-
/**
* URL of detected thumb image
*/
thumb_url?: string;
-
/**
* og:title
*/
title?: string;
-
/**
* og:url
*/
title_link?: string;
-
/**
* Attachment type, could be empty, image, audio or video
*/
type?: string;
-
actions?: Array;
-
fields?: Array;
-
giphy?: Images;
}
@@ -4602,7 +3540,6 @@ export interface GetPinnedMessagesResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Messages
*/
@@ -4611,7 +3548,6 @@ export interface GetPinnedMessagesResponse {
export interface GetReactionsResponse {
duration: string;
-
/**
* List of reactions
*/
@@ -4623,19 +3559,16 @@ export interface GetRepliesResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
messages: Array;
}
export interface GetThreadResponse {
duration: string;
-
thread: ThreadStateResponse;
}
export interface GetUserGroupResponse {
duration: string;
-
user_group?: UserGroupResponse;
}
@@ -4648,17 +3581,14 @@ export interface GroupedChannelsBucket {
* Channels returned for this bucket
*/
channels: Array;
-
/**
* Cursor for the next page of this group
*/
next?: string;
-
/**
* Cursor for the previous page of this group
*/
prev?: string;
-
/**
* Unread channels currently classified into this bucket
*/
@@ -4667,9 +3597,7 @@ export interface GroupedChannelsBucket {
export interface GroupedChannelsGroupRequest {
limit?: number;
-
next?: string;
-
prev?: string;
}
@@ -4678,17 +3606,14 @@ export interface GroupedQueryChannelsRequest {
* Default max channels per group (default 10)
*/
limit?: number;
-
/**
* Whether to subscribe to presence events for channel members
*/
presence?: boolean;
-
/**
* Whether to start watching found channels or not
*/
watch?: boolean;
-
/**
* Groups to return, keyed by group name. Each group can define limit, next, or prev. 'next' and 'prev' cursors are only allowed when the request contains exactly one group; multi-group pagination is rejected.
*/
@@ -4700,7 +3625,6 @@ export interface GroupedQueryChannelsResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Predefined channel groups keyed by group name
*/
@@ -4709,29 +3633,19 @@ export interface GroupedQueryChannelsResponse {
export interface HarmConfig {
cooldown_period: number;
-
severity: number;
-
threshold: number;
-
action_sequences: Array;
-
harm_types: Array;
}
export interface HealthCheckEvent {
connection_id: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
type: string;
-
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
me?: OwnUserResponse;
}
@@ -4751,47 +3665,34 @@ export interface HideChannelResponse {
export interface IPContentCountRuleParameters {
threshold?: number;
-
time_window?: string;
}
export interface IPFlagCountRuleParameters {
severity?: string;
-
threshold?: number;
-
time_window?: string;
-
harm_labels?: Array;
}
export interface ImageContentParameters {
label_operator?: string;
-
min_confidence?: number;
-
harm_labels?: Array;
}
export interface ImageData {
frames: string;
-
height: string;
-
size: string;
-
url: string;
-
width: string;
}
export interface ImageRuleParameters {
min_confidence?: number;
-
threshold?: number;
-
time_window?: string;
-
harm_labels?: Array;
}
@@ -4800,17 +3701,14 @@ export interface ImageSize {
* Crop mode. One of: top, bottom, left, right, center
*/
crop?: string;
-
/**
* Target image height
*/
height?: number;
-
/**
* Resize method. One of: clip, crop, scale, fill
*/
resize?: string;
-
/**
* Target image width
*/
@@ -4819,12 +3717,10 @@ export interface ImageSize {
export interface ImageUploadRequest {
file?: string;
-
/**
* field with JSON-encoded array of image size configurations
*/
upload_sizes?: Array;
-
user?: OnlyUserID;
}
@@ -4833,11 +3729,8 @@ export interface ImageUploadResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
file?: string;
-
thumb_url?: string;
-
/**
* Array of image size configurations
*/
@@ -4846,23 +3739,16 @@ export interface ImageUploadResponse {
export interface Images {
fixed_height: ImageData;
-
fixed_height_downsampled: ImageData;
-
fixed_height_still: ImageData;
-
fixed_width: ImageData;
-
fixed_width_downsampled: ImageData;
-
fixed_width_still: ImageData;
-
original: ImageData;
}
export interface ImportBlockListRequest {
items: Array;
-
chunk_size?: number;
}
@@ -4871,37 +3757,27 @@ export interface ImportBlockListResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
task_id: string;
}
export interface KeyframeOCRRuleParameters {
threshold?: number;
-
time_window?: string;
-
harm_labels?: Array;
}
export interface KeyframeRuleParameters {
min_confidence?: number;
-
threshold?: number;
-
time_window?: string;
-
harm_labels?: Array;
}
export interface LLMConfig {
enabled: boolean;
-
rules: Array;
-
app_context?: string;
-
async?: boolean;
-
severity_descriptions?: Record;
}
@@ -4914,19 +3790,14 @@ export interface LLMRule {
| 'bounce_flag'
| 'bounce_remove'
| 'keep';
-
description: string;
-
label: string;
-
severity_rules: Array;
}
export interface LabelResponse {
name: string;
-
harm_labels?: Array;
-
phrase_list_ids?: Array;
}
@@ -4935,7 +3806,6 @@ export interface LabelThresholds {
* Threshold for automatic message block
*/
block?: number;
-
/**
* Threshold for automatic message flag
*/
@@ -4947,15 +3817,12 @@ export interface ListBlockListResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
blocklists: Array;
-
next_cursor?: string;
}
export interface ListDevicesResponse {
duration: string;
-
/**
* List of devices
*/
@@ -4967,13 +3834,11 @@ export interface ListQueuesResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
queues: Array;
}
export interface ListUserGroupsResponse {
duration: string;
-
/**
* List of user groups
*/
@@ -5003,7 +3868,6 @@ export interface MarkReadRequest {
* ID of the message that is considered last read by client
*/
message_id?: string;
-
/**
* Optional Thread ID to specifically mark a given thread as read
*/
@@ -5015,34 +3879,23 @@ export interface MarkReadResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
event?: MarkReadResponseEvent;
}
export interface MarkReadResponseEvent {
channel_id: string;
-
channel_type: string;
-
cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
type: string;
-
- channel_last_message_at?: number;
-
+ channel_last_message_at?: TimestampNS;
last_read_message_id?: string;
-
team?: string;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
thread?: ThreadResponse;
-
user?: UserResponseCommonFields;
}
@@ -5051,12 +3904,10 @@ export interface MarkReviewedRequestPayload {
* Maximum content items to mark as reviewed
*/
content_to_mark_as_reviewed_limit?: number;
-
/**
* Reason for the appeal decision
*/
decision_reason?: string;
-
/**
* Skip marking content as reviewed
*/
@@ -5068,12 +3919,10 @@ export interface MarkUnreadRequest {
* ID of the message from where the channel is marked unread
*/
message_id?: string;
-
/**
* Timestamp of the message from where the channel is marked unread
*/
message_timestamp?: Date;
-
/**
* Mark a thread unread, specify one of the thread, message timestamp, or message id
*/
@@ -5081,69 +3930,53 @@ export interface MarkUnreadRequest {
}
export interface MaxStreakChangedEvent {
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
type: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface MemberAddedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
member: ChannelMemberResponse;
-
/**
* The type of event: "member.added" in this case
*/
type: string;
-
/**
* The ID of the channel to which the member was added
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel to which the member was added
*/
channel_type?: string;
-
/**
* The CID of the channel to which the member was added
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -5151,56 +3984,43 @@ export interface MemberRemovedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
member: ChannelMemberResponse;
-
/**
* The type of event: "member.removed" in this case
*/
type: string;
-
/**
* The ID of the channel from which the member was removed
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel from which the member was removed
*/
channel_type?: string;
-
/**
* The CID of the channel from which the member was removed
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -5208,72 +4028,53 @@ export interface MemberUpdatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomEventData;
-
member: ChannelMemberResponse;
-
/**
* The type of event: "member.updated" in this case
*/
type: string;
-
/**
* The ID of the channel in which the member was updated
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel in which the member was updated
*/
channel_type?: string;
-
/**
* The CID of the channel in which the member was updated
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
export interface MemberUserRequest {
id: string;
-
image?: string;
-
invisible?: boolean;
-
language?: string;
-
name?: string;
-
custom?: CustomUserData;
-
privacy_settings?: PrivacySettingsResponse;
}
@@ -5282,7 +4083,6 @@ export interface MembersResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* List of found members
*/
@@ -5301,7 +4101,6 @@ export interface MessageActionResponse {
* Duration of the request in milliseconds
*/
duration: string;
-
/**
* Represents any chat message
*/
@@ -5310,21 +4109,13 @@ export interface MessageActionResponse {
export interface MessageChangeSet {
attachments: boolean;
-
custom: boolean;
-
html: boolean;
-
mentioned_user_ids: boolean;
-
mml: boolean;
-
pin: boolean;
-
quoted_message_id: boolean;
-
silent: boolean;
-
text: boolean;
}
@@ -5332,66 +4123,51 @@ export interface MessageDeletedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* Whether the message was hard deleted
*/
hard_delete: boolean;
-
message_id: string;
-
custom: CustomEventData;
-
/**
* Represents any chat message
*/
message: MessageResponse;
-
/**
* The type of event: "message.deleted" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was sent
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was sent
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was sent
*/
cid?: string;
-
/**
* Whether the message was deleted only for the current user
*/
deleted_for_me?: boolean;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
@@ -5399,103 +4175,76 @@ export interface MessageDeliveredEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "message.delivered" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was read
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was read
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was read
*/
cid?: string;
-
/**
* The time when the message was delivered
*/
last_delivered_at?: string;
-
/**
* The ID of the last delivered message
*/
last_delivered_message_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
channel_custom?: CustomChannelData;
-
user?: UserResponseCommonFields;
}
export interface MessageFlagResponse {
- created_at: number;
-
+ created_at: TimestampNS;
created_by_automod: boolean;
-
- updated_at: number;
-
- approved_at?: number;
-
+ updated_at: TimestampNS;
+ approved_at?: TimestampNS;
reason?: string;
-
- rejected_at?: number;
-
- reviewed_at?: number;
-
+ rejected_at?: TimestampNS;
+ reviewed_at?: TimestampNS;
custom?: Record;
-
details?: FlagDetailsResponse;
-
/**
* Represents any chat message
*/
message?: MessageResponse;
-
moderation_feedback?: FlagFeedbackResponse;
-
/**
* Result of the message moderation
*/
moderation_result?: MessageModerationResult;
-
/**
* User response object
*/
reviewed_by?: UserResponse;
-
/**
* User response object
*/
@@ -5507,49 +4256,39 @@ export interface MessageModerationResult {
* Action taken by automod
*/
action: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
/**
* ID of the message
*/
message_id: string;
-
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Whether user has bad karma
*/
user_bad_karma: boolean;
-
/**
* Karma of the user
*/
user_karma: number;
-
/**
* Word that was blocked
*/
blocked_word?: string;
-
/**
* Name of the blocklist
*/
blocklist_name?: string;
-
/**
* User who moderated the message
*/
moderated_by?: string;
-
ai_moderation_response?: ModerationResponse;
-
/**
* Sets thresholds for AI moderation
*/
@@ -5560,93 +4299,71 @@ export interface MessageNewEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
/**
* The number of watchers
*/
watcher_count: number;
-
custom: CustomEventData;
-
/**
* Represents any chat message
*/
message: MessageResponse;
-
/**
* The type of event: "message.new" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was sent
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was sent
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was sent
*/
cid?: string;
-
/**
* The author of the parent message
*/
parent_author?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
total_unread_count?: number;
-
unread_channels?: number;
-
/**
* The number of unread messages
*/
unread_count?: number;
-
/**
* The participants of the thread
*/
thread_participants?: Array;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
channel_custom?: CustomChannelData;
-
grouped_unread_channels?: Record;
-
user?: UserResponseCommonFields;
}
export interface MessageOptions {
include_thread_participants?: boolean;
-
member_custom_include?: Array;
}
@@ -5655,52 +4372,42 @@ export interface MessagePaginationParams {
* The timestamp to get messages with a created_at timestamp greater than
*/
created_at_after?: Date;
-
/**
* The timestamp to get messages with a created_at timestamp greater than or equal to
*/
created_at_after_or_equal?: Date;
-
/**
* The result will be a set of messages, that are both older and newer than the created_at timestamp provided, distributed evenly around the timestamp
*/
created_at_around?: Date;
-
/**
* The timestamp to get messages with a created_at timestamp smaller than
*/
created_at_before?: Date;
-
/**
* The timestamp to get messages with a created_at timestamp smaller than or equal to
*/
created_at_before_or_equal?: Date;
-
/**
* The result will be a set of messages, that are both older and newer than the message with the provided ID, and the message with the ID provided will be in the middle of the set
*/
id_around?: string;
-
/**
* The ID of the message to get messages with a timestamp greater than
*/
id_gt?: string;
-
/**
* The ID of the message to get messages with a timestamp greater than or equal to
*/
id_gte?: string;
-
/**
* The ID of the message to get messages with a timestamp smaller than
*/
id_lt?: string;
-
/**
* The ID of the message to get messages with a timestamp smaller than or equal to
*/
id_lte?: string;
-
/**
* The maximum number of messages to return (max limit
*/
@@ -5711,61 +4418,47 @@ export interface MessageReadEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
/**
* The type of event: "message.read" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was read
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was read
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was read
*/
cid?: string;
-
/**
* The ID of the last read message
*/
last_read_message_id?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
/**
* Represents channel in chat
*/
channel?: ChannelResponse;
-
channel_custom?: CustomChannelData;
-
thread?: ThreadResponse;
-
user?: UserResponseCommonFields;
}
@@ -5774,88 +4467,67 @@ export interface MessageRequest {
* Message ID is unique string identifier of the message
*/
id?: string;
-
mentioned_channel?: boolean;
-
mentioned_here?: boolean;
-
/**
* Should be empty if `text` is provided. Can only be set when using server-side API
*/
mml?: string;
-
/**
* ID of parent message (thread)
*/
parent_id?: string;
-
/**
* Date when pinned message expires
*/
pin_expires?: Date;
-
/**
* Whether message is pinned or not
*/
pinned?: boolean;
-
/**
* Date when message got pinned
*/
pinned_at?: Date;
-
/**
* Identifier of the poll to include in the message
*/
poll_id?: string;
-
quoted_message_id?: string;
-
/**
* Whether thread reply should be shown in the channel as well
*/
show_in_channel?: boolean;
-
/**
* Whether message is silent or not
*/
silent?: boolean;
-
/**
* Text of the message. Should be empty if `mml` is provided
*/
text?: string;
-
/**
* Contains type of the message. One of: regular, system
*/
-
type?: 'regular' | 'system';
-
/**
* Array of message attachments
*/
attachments?: Array;
-
/**
* List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups
*/
mentioned_group_ids?: Array;
-
mentioned_roles?: Array;
-
/**
* Array of user IDs to mention
*/
mentioned_users?: Array;
-
/**
* A list of user ids that have restricted visibility to the message
*/
restricted_visibility?: Array;
-
custom?: CustomMessageData;
-
shared_location?: SharedLocation;
}
@@ -5864,214 +4536,165 @@ export interface MessageResponse {
* Channel unique identifier in : format
*/
cid: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
deleted_reply_count: number;
-
/**
* Contains HTML markup of the message. Can only be set when using server-side API
*/
html: string;
-
/**
* Message ID is unique string identifier of the message
*/
id: string;
-
/**
* Whether the message mentioned the channel tag
*/
mentioned_channel: boolean;
-
/**
* Whether the message mentioned online users with @here tag
*/
mentioned_here: boolean;
-
/**
* Whether message is pinned or not
*/
pinned: boolean;
-
/**
* Number of replies to this message
*/
reply_count: number;
-
/**
* Whether the message was shadowed or not
*/
shadowed: boolean;
-
/**
* Whether message is silent or not
*/
silent: boolean;
-
/**
* Text of the message. Should be empty if `mml` is provided
*/
text: string;
-
/**
* Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
*/
type: string;
-
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Array of message attachments
*/
attachments: Array;
-
/**
* List of 10 latest reactions to this message
*/
latest_reactions: Array;
-
/**
* List of mentioned users
*/
mentioned_users: Array;
-
/**
* List of 10 latest reactions of authenticated user to this message
*/
own_reactions: Array;
-
/**
* A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
*/
restricted_visibility: Array;
-
custom: CustomMessageData;
-
/**
* An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
*/
reaction_counts: Record;
-
/**
* An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
*/
reaction_scores: Record;
-
/**
* User response object
*/
user: UserResponse;
-
/**
* Contains provided slash command
*/
command?: string;
-
/**
* Date/time of deletion
*/
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
deleted_for_me?: boolean;
-
- message_text_updated_at?: number;
-
+ message_text_updated_at?: TimestampNS;
/**
* Should be empty if `text` is provided. Can only be set when using server-side API
*/
mml?: string;
-
/**
* ID of parent message (thread)
*/
parent_id?: string;
-
/**
* Date when pinned message expires
*/
- pin_expires?: number;
-
+ pin_expires?: TimestampNS;
/**
* Date when message got pinned
*/
- pinned_at?: number;
-
+ pinned_at?: TimestampNS;
/**
* Identifier of the poll to include in the message
*/
poll_id?: string;
-
quoted_message_id?: string;
-
/**
* Whether thread reply should be shown in the channel as well
*/
show_in_channel?: boolean;
-
/**
* List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
*/
mentioned_group_ids?: Array;
-
/**
* List of mentioned user group objects.
*/
mentioned_groups?: Array;
-
/**
* List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
*/
mentioned_roles?: Array;
-
/**
* List of users who participate in thread
*/
thread_participants?: Array;
-
draft?: DraftResponse;
-
/**
* Object with translations. Key `language` contains the original language key. Other keys contain translations
*/
i18n?: Record;
-
/**
* Contains image moderation information
*/
image_labels?: Record>;
-
member?: ChannelMemberPartialResponse;
-
/**
* Channel member data for the users mentioned in the message, keyed by user id. Only present when the app has member custom on mentioned users enabled, and only for the first two mentioned users of each message
*/
mentioned_channel_members?: Record;
-
moderation?: ModerationV2Response;
-
/**
* User response object
*/
pinned_by?: UserResponse;
-
poll?: PollResponseData;
-
/**
* Represents any chat message
*/
quoted_message?: MessageResponse;
-
reaction_groups?: Record;
-
reminder?: ReminderResponseData;
-
shared_location?: SharedLocationResponseData;
}
@@ -6079,60 +4702,47 @@ export interface MessageUndeletedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
custom: CustomEventData;
-
/**
* Represents any chat message
*/
message: MessageResponse;
-
/**
* The type of event: "message.undeleted" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was sent
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was sent
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was sent
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
}
export interface MessageUpdate {
old_text?: string;
-
change_set?: MessageChangeSet;
}
@@ -6140,58 +4750,44 @@ export interface MessageUpdatedEvent {
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
message_id: string;
-
custom: CustomEventData;
-
/**
* Represents any chat message
*/
message: MessageResponse;
-
/**
* The type of event: "message.updated" in this case
*/
type: string;
-
/**
* The ID of the channel where the message was sent
*/
channel_id?: string;
-
/**
* The number of members in the channel
*/
channel_member_count?: number;
-
/**
* The number of messages in the channel
*/
channel_message_count?: number;
-
/**
* The type of the channel where the message was sent
*/
channel_type?: string;
-
/**
* The CID of the channel where the message was sent
*/
cid?: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* The team ID
*/
team?: string;
-
channel_custom?: CustomChannelData;
-
message_update?: MessageUpdate;
-
user?: UserResponseCommonFields;
}
@@ -6200,219 +4796,169 @@ export interface MessageWithChannelResponse {
* Channel unique identifier in : format
*/
cid: string;
-
/**
* Date/time of creation
*/
- created_at: number;
-
+ created_at: TimestampNS;
deleted_reply_count: number;
-
/**
* Contains HTML markup of the message. Can only be set when using server-side API
*/
html: string;
-
/**
* Message ID is unique string identifier of the message
*/
id: string;
-
/**
* Whether the message mentioned the channel tag
*/
mentioned_channel: boolean;
-
/**
* Whether the message mentioned online users with @here tag
*/
mentioned_here: boolean;
-
/**
* Whether message is pinned or not
*/
pinned: boolean;
-
/**
* Number of replies to this message
*/
reply_count: number;
-
/**
* Whether the message was shadowed or not
*/
shadowed: boolean;
-
/**
* Whether message is silent or not
*/
silent: boolean;
-
/**
* Text of the message. Should be empty if `mml` is provided
*/
text: string;
-
/**
* Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
*/
type: string;
-
/**
* Date/time of the last update
*/
- updated_at: number;
-
+ updated_at: TimestampNS;
/**
* Array of message attachments
*/
attachments: Array;
-
/**
* List of 10 latest reactions to this message
*/
latest_reactions: Array;
-
/**
* List of mentioned users
*/
mentioned_users: Array;
-
/**
* List of 10 latest reactions of authenticated user to this message
*/
own_reactions: Array;
-
/**
* A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
*/
restricted_visibility: Array;
-
/**
* Represents channel in chat
*/
channel: ChannelResponse;
-
custom: CustomMessageData;
-
/**
* An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
*/
reaction_counts: Record;
-
/**
* An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
*/
reaction_scores: Record;
-
/**
* User response object
*/
user: UserResponse;
-
/**
* Contains provided slash command
*/
command?: string;
-
/**
* Date/time of deletion
*/
- deleted_at?: number;
-
+ deleted_at?: TimestampNS;
deleted_for_me?: boolean;
-
- message_text_updated_at?: number;
-
+ message_text_updated_at?: TimestampNS;
/**
* Should be empty if `text` is provided. Can only be set when using server-side API
*/
mml?: string;
-
/**
* ID of parent message (thread)
*/
parent_id?: string;
-
/**
* Date when pinned message expires
*/
- pin_expires?: number;
-
+ pin_expires?: TimestampNS;
/**
* Date when message got pinned
*/
- pinned_at?: number;
-
+ pinned_at?: TimestampNS;
/**
* Identifier of the poll to include in the message
*/
poll_id?: string;
-
quoted_message_id?: string;
-
/**
* Whether thread reply should be shown in the channel as well
*/
show_in_channel?: boolean;
-
/**
* List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
*/
mentioned_group_ids?: Array;
-
/**
* List of mentioned user group objects.
*/
mentioned_groups?: Array;
-
/**
* List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
*/
mentioned_roles?: Array;
-
/**
* List of users who participate in thread
*/
thread_participants?: Array;
-
draft?: DraftResponse;
-
/**
* Object with translations. Key `language` contains the original language key. Other keys contain translations
*/
i18n?: Record;
-
/**
* Contains image moderation information
*/
image_labels?: Record>;
-
member?: ChannelMemberPartialResponse;
-
/**
* Channel member data for the users mentioned in the message, keyed by user id. Only present when the app has member custom on mentioned users enabled, and only for the first two mentioned users of each message
*/
mentioned_channel_members?: Record;
-
moderation?: ModerationV2Response;
-
/**
* User response object
*/
pinned_by?: UserResponse;
-
poll?: PollResponseData;
-
/**
* Represents any chat message
*/
quoted_message?: MessageResponse;
-
reaction_groups?: Record;
-
reminder?: ReminderResponseData;
-
shared_location?: SharedLocationResponseData;
}
@@ -6421,34 +4967,27 @@ export interface ModerationActionConfigResponse {
* The action to take
*/
action: string;
-
/**
* Description of what this action does
*/
description: string;
-
/**
* Type of entity this action applies to
*/
entity_type: string;
-
/**
* Icon for the dashboard
*/
icon: string;
-
/**
* Display order (lower numbers shown first)
*/
order: number;
-
id?: string;
-
/**
* Queue type this action config belongs to
*/
queue_type?: string;
-
/**
* Custom data for the action
*/
@@ -6461,43 +5000,24 @@ export interface ModerationBanResponse {
export interface ModerationCallResponse {
backstage: boolean;
-
captioning: boolean;
-
cid: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
current_session_id: string;
-
id: string;
-
recording: boolean;
-
transcribing: boolean;
-
translating: boolean;
-
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
blocked_user_ids: Array;
-
custom: Record;
-
channel_cid?: string;
-
- ended_at?: number;
-
+ ended_at?: TimestampNS;
join_ahead_time_seconds?: number;
-
routing_number?: string;
-
- starts_at?: number;
-
+ starts_at?: TimestampNS;
team?: string;
-
/**
* User response object
*/
@@ -6509,22 +5029,15 @@ export interface ModerationCustomActionEvent {
* The ID of the custom action that was executed
*/
action_id: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
review_queue_item: ReviewQueueItemResponse;
-
type: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* Additional options passed to the custom action
*/
action_options?: Record;
-
/**
* Represents any chat message
*/
@@ -6532,37 +5045,24 @@ export interface ModerationCustomActionEvent {
}
export interface ModerationFlagResponse {
- created_at: number;
-
+ created_at: TimestampNS;
entity_id: string;
-
entity_type: string;
-
type: string;
-
- updated_at: number;
-
+ updated_at: TimestampNS;
user_id: string;
-
result: Array>;
-
+ content_published_at?: TimestampNS;
entity_creator_id?: string;
-
reason?: string;
-
review_queue_item_id?: string;
-
labels?: Array;
-
custom?: Record;
-
/**
* Content payload for moderation
*/
moderation_payload?: ModerationPayloadResponse;
-
review_queue_item?: ReviewQueueItemResponse;
-
/**
* User response object
*/
@@ -6574,32 +5074,22 @@ export interface ModerationFlaggedEvent {
* The type of content that was flagged
*/
content_type: string;
-
- created_at: number;
-
+ created_at: TimestampNS;
/**
* The ID of the flagged content
*/
object_id: string;
-
custom: CustomEventData;
-
type: string;
-
- received_at?: number;
+ received_at?: TimestampNS;
}
export interface ModerationMarkReviewedEvent {
- created_at: number;
-
+ created_at: TimestampNS;
custom: CustomEventData;
-
item: ReviewQueueItemResponse;
-
type: string;
-
- received_at?: number;
-
+ received_at?: TimestampNS;
/**
* Represents any chat message
*/
@@ -6607,24 +5097,16 @@ export interface ModerationMarkReviewedEvent {
}
export interface ModerationPayload {
+ country_code?: string;
audios?: Array;
-
image_ordered_keys?: Array