@openfloor/protocol - v0.0.4
    Preparing search index...

    Function validateDialogEvent

    • Validates a dialog event object against the Dialog Event schema

      Parameters

      • data: unknown

        Dialog event data to validate

      Returns ValidationResult

      Validation result

      const dialogEvent = {
      id: 'de:123',
      speakerUri: 'tag:example.com,2025:user1',
      span: { startTime: '2025-01-01T00:00:00Z' },
      features: {
      text: {
      mimeType: 'text/plain',
      tokens: [{ value: 'Hello' }]
      }
      }
      };

      const result = validateDialogEvent(dialogEvent);
      console.log(result.valid); // true or false