Summary
The WebsiteOperator TypeScript type does not match the payload returned by the Crisp REST API for listWebsiteOperators.
Environment
crisp-api: 10.10.6
- Endpoint:
GET /v1/website/{website_id}/operators/list
Actual REST response
{
"type": "operator",
"details": {
"user_id": "operator-user-id",
"email": "operator@example.com"
}
}
This also matches the official REST API documentation, which documents details.user_id.
Current type
export interface WebsiteOperator {
userID?: string;
email?: string;
}
Impact
listWebsiteOperators() is typed as returning WebsiteOperatorListOne[], so TypeScript consumers read details.userID, but the runtime value is undefined. The SDK request implementation returns response.body.data without converting snake_case keys.
Expected behavior
Please either:
- change the affected operator response types to use the REST field name
user_id; or
- explicitly transform the API response to camelCase before returning it, and document that behavior.
The current declaration should not claim userID unless the SDK performs that transformation.
Summary
The
WebsiteOperatorTypeScript type does not match the payload returned by the Crisp REST API forlistWebsiteOperators.Environment
crisp-api:10.10.6GET /v1/website/{website_id}/operators/listActual REST response
{ "type": "operator", "details": { "user_id": "operator-user-id", "email": "operator@example.com" } }This also matches the official REST API documentation, which documents
details.user_id.Current type
Impact
listWebsiteOperators()is typed as returningWebsiteOperatorListOne[], so TypeScript consumers readdetails.userID, but the runtime value isundefined. The SDK request implementation returnsresponse.body.datawithout converting snake_case keys.Expected behavior
Please either:
user_id; orThe current declaration should not claim
userIDunless the SDK performs that transformation.