0.0.4 • Published 9 months ago

@radai/event-services-gen-client v0.0.4

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

event-services-gen-client

Code-generated client for the Event Services API.

To generate the client, make sure event-services is running locally on port 8081, then run:

turbo codegen

Which will generate the client in the src/client directory.

By default, the generated client will point to https://ingest-api.dev.radai-systems.com/openapi.json. To change this, update the input in openapi-ts.config.ts.

DONT EDIT THE GENERATED CODE DIRECTLY.

Functions

createEventV1

Create Event Ingest a single CloudEvent

FunctionType
createEventV1<ThrowOnError extends boolean = false>(options: OmitKeys<RequestOptions<ThrowOnError, string>, "body" or "url"> and CreateEventV1Data and Pick<...>) => RequestResult<...>

createEventsV1

Create Events Ingest an array of CloudEvents

FunctionType
createEventsV1<ThrowOnError extends boolean = false>(options: OmitKeys<RequestOptions<ThrowOnError, string>, "body" or "url"> and CreateEventsV1Data and Pick<...>) => RequestResult<...>

Constants

client

ConstantType
clientClient<Request, Response, unknown, RequestOptions<boolean, string>>

Types

CloudData

A model representing the data payload of a CloudEvent.

TypeType
CloudData{ /** * The user ID associated with the event, if available. */ user_id?: string or null; /** * The device ID associated with the event, if available. */ device_id?: string or null; /** * * The organization name that generated the event. Needed for org-specific data retention policies. * */ organization?: string or null; /** * Indicates whether any PHI is present in the event data. Needed for PHI compliance. */ contains_phi?: boolean or null; /** * * Marks fields in the data that may contain PHI. * * - KEY: A dot notation string pointing to the PHI field. Example: "data.patient.name" * - VALUE: Specifies how the field should be de-identified: * - MASK: Replace the PHI in this field with a mask. * - HASH: Hash the field, preserving uniqueness but making it non-identifiable. * - AGE: Bucket all ages over 89 into a single category. (as per HIPAA Safe Harbor Rule section C) * Example: { * "data.patient.name": "HASH", * "data.report_text": "MASK" * } * */ phi_fields?: { [key: string]: PHIHandler; } or null; [key: string]: unknown; }

CloudEvent

A model representing a CloudEvent payload for Event Services API.

Based on the CloudEvents v1.0.2 JSON schema, this model adds additional fields for auditing purposes.

Attributes: id (str): A unique identifier for the event. type (str): The type of event. source (str): The source application that generated the event. time (str): The event's timestamp in ISO8601 format (supports optional TZ and microseconds). specversion (Optionalstr): The CloudEvents specification version. Defaults to '1.0.2'. datacontenttype (Optionalstr): The content type of the event data. Defaults to 'application/json'. data CloudEventData: The event's data payload.

TypeType
CloudEvent{ /** * Unique identifier for the event. */ id: string; /** * Type of event. */ type: string; /** * Source application that created the event. */ source: string; /** * Event timestamp in ISO8601 format with optional TZ/Microseconds support (e.g., 'yyyy-MM-ddTHH:mm:ss.SSSSSSZ'). */ time: string; /** * Optional field indicating the event specification version. */ specversion?: string or null; /** * Optional field indicating the data content type (default: 'application/json'). */ datacontenttype?: string or null; /** * Contextual/metadata information sent from the source application. */ data: CloudData; }

CreateEventResponse

TypeType
CreateEventResponse{ /** * Success status of the request */ status: "success" or "error"; /** * Message describing resulting status of the request */ message: string; }

status

Success status of the request

TypeType
statussuccess" or "error

HTTPValidationError

TypeType
HTTPValidationError{ detail?: Array<ValidationError>; }

PHIHandler

Specifies how the field should be de-identified:

  • MASK: Replace the PHI in this field with a mask.
  • HASH: Hash the field, preserving uniqueness but making it non-identifiable.
  • AGE: Bucket all ages over 89 into a single category. (as per HIPAA Safe Harbor Rule section C)
TypeType
PHIHandlerMASK" or "HASH" or "AGE

ValidationError

TypeType
ValidationError{ loc: Array<string or number>; msg: string; type: string; }

CreateEventV1Data

TypeType
CreateEventV1Data{ body: CloudEvent; }

CreateEventV1Response

TypeType
CreateEventV1ResponseCreateEventResponse

CreateEventV1Error

TypeType
CreateEventV1ErrorHTTPValidationError

CreateEventsV1Data

TypeType
CreateEventsV1Data{ body: Array<CloudEvent>; }

CreateEventsV1Response

TypeType
CreateEventsV1ResponseCreateEventResponse

CreateEventsV1Error

TypeType
CreateEventsV1ErrorHTTPValidationError
0.0.4

9 months ago

0.0.3

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago