Hierarchy

Methods

  • Delete records from a stream

    Delete records from a mutable stream. The operation is idempotent - deleting non-existent records will not cause an error.

    Note: This endpoint is only available for mutable streams.

    await client.records.delete('my_mutable_stream', [
    { space: 'mySpace', externalId: 'record1' },
    { space: 'mySpace', externalId: 'record2' }
    ]);

    Parameters

    Returns Promise<void>

  • Ingest records into a stream

    Ingest records into a stream.

    await client.records.ingest('my_stream', [
    {
    space: 'mySpace',
    externalId: 'record1',
    sources: [
    {
    source: { type: 'container', space: 'mySpace', externalId: 'myContainer' },
    properties: { temperature: 25.5, timestamp: '2025-01-01T00:00:00Z' }
    }
    ]
    }
    ]);

    Parameters

    Returns Promise<void>

  • Upsert records into a stream

    Create or update records in a mutable stream. If a record with the same space + externalId already exists, it will be fully replaced (no partial updates).

    Note: This endpoint is only available for mutable streams.

    await client.records.upsert('my_mutable_stream', [
    {
    space: 'mySpace',
    externalId: 'record1',
    sources: [
    {
    source: { type: 'container', space: 'mySpace', externalId: 'myContainer' },
    properties: { temperature: 30.0, timestamp: '2025-01-01T00:00:00Z' }
    }
    ]
    }
    ]);

    Parameters

    Returns Promise<void>