@epilot/sdk 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/event-catalog-runtime.json +1 -1
- package/definitions/event-catalog.json +256 -1
- package/definitions/integration-toolkit-runtime.json +1 -1
- package/definitions/integration-toolkit.json +480 -4
- package/definitions/metering-runtime.json +1 -1
- package/definitions/metering.json +728 -64
- package/definitions/webhooks.json +19 -4
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +8 -8
- package/dist/apis/event-catalog.d.cts +2 -2
- package/dist/apis/event-catalog.d.ts +2 -2
- package/dist/apis/event-catalog.js +2 -2
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +8 -8
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +2 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +8 -8
- package/dist/apis/metering.d.cts +2 -2
- package/dist/apis/metering.d.ts +2 -2
- package/dist/apis/metering.js +2 -2
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.d.cts +2 -2
- package/dist/apis/webhooks.d.ts +2 -2
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-C7GDYBXX.cjs → chunk-35CN2YFK.cjs} +7 -7
- package/dist/{chunk-JTFWOEZF.cjs → chunk-4FFGRWLS.cjs} +1 -1
- package/dist/chunk-56MMZJOD.js +14 -0
- package/dist/{chunk-BLNXQAMX.cjs → chunk-CBDKPGO5.cjs} +1 -1
- package/dist/{chunk-WRD2XFHY.js → chunk-JB7LITSP.js} +7 -7
- package/dist/{chunk-TME4YJNP.js → chunk-OCMIXJWC.js} +1 -1
- package/dist/chunk-T6A22LSD.cjs +14 -0
- package/dist/chunk-WM74R3BD.js +14 -0
- package/dist/event-catalog-37B6JC7G.js +7 -0
- package/dist/event-catalog-5JBHJJ2I.cjs +7 -0
- package/dist/{event-catalog-runtime-5HQSAJVX.cjs → event-catalog-runtime-B2BPKQVG.cjs} +2 -2
- package/dist/{event-catalog-runtime-6FA3SCRI.js → event-catalog-runtime-N262TQ3Y.js} +1 -1
- package/dist/{event-catalog.d-ENw6HO-w.d.cts → event-catalog.d-mQJLSYUo.d.cts} +351 -6
- package/dist/{event-catalog.d-ENw6HO-w.d.ts → event-catalog.d-mQJLSYUo.d.ts} +351 -6
- package/dist/index.cjs +14 -14
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/integration-toolkit-3I3IPVFN.cjs +7 -0
- package/dist/integration-toolkit-XAFQXNQY.js +7 -0
- package/dist/{integration-toolkit-runtime-5KG3LGXF.cjs → integration-toolkit-runtime-YHTU4X5J.cjs} +2 -2
- package/dist/{integration-toolkit-runtime-LYHFVIRW.js → integration-toolkit-runtime-YR4CIMKH.js} +1 -1
- package/dist/{integration-toolkit.d-Ry-KC9ow.d.cts → integration-toolkit.d-BstNqiJb.d.cts} +460 -20
- package/dist/{integration-toolkit.d-Ry-KC9ow.d.ts → integration-toolkit.d-BstNqiJb.d.ts} +460 -20
- package/dist/metering-3IUSYAGN.js +7 -0
- package/dist/metering-MHBFU7QH.cjs +7 -0
- package/dist/{metering-runtime-HAIWXZXJ.cjs → metering-runtime-IUZJHBVS.cjs} +2 -2
- package/dist/{metering-runtime-NJ6NEUMB.js → metering-runtime-KZMJKKUZ.js} +1 -1
- package/dist/{metering.d-DvtPv7wk.d.ts → metering.d-CUICZDiL.d.cts} +718 -130
- package/dist/{metering.d-DvtPv7wk.d.cts → metering.d-CUICZDiL.d.ts} +718 -130
- package/dist/{webhooks-XLBUXXCS.js → webhooks-NZHJBT64.js} +1 -1
- package/dist/{webhooks-NZ3TM3AY.cjs → webhooks-SK2STDKR.cjs} +1 -1
- package/dist/{webhooks.d-D79qib9f.d.cts → webhooks.d-ByePoUWs.d.cts} +40 -4
- package/dist/{webhooks.d-D79qib9f.d.ts → webhooks.d-ByePoUWs.d.ts} +40 -4
- package/docs/event-catalog.md +247 -1
- package/docs/integration-toolkit.md +334 -19
- package/docs/metering.md +570 -48
- package/docs/webhooks.md +3 -1
- package/package.json +1 -1
- package/dist/chunk-265TE2OV.js +0 -14
- package/dist/chunk-4ZMLRFDX.cjs +0 -14
- package/dist/chunk-U4PUHKZC.js +0 -14
- package/dist/event-catalog-C45ISVMP.cjs +0 -7
- package/dist/event-catalog-D7VJ7WRS.js +0 -7
- package/dist/integration-toolkit-FRPFOYT2.js +0 -7
- package/dist/integration-toolkit-VNMDI55O.cjs +0 -7
- package/dist/metering-DZNZPPY6.cjs +0 -7
- package/dist/metering-KOSCPPKB.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/event-catalog.json
|
|
4
|
+
var event_catalog_default = '# Event Catalog API\n\n- **Base URL:** `https://event-catalog.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/event-catalog](https://docs.epilot.io/api/event-catalog)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.eventCatalog.listEvents(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/event-catalog\'\n\nconst eventCatalogClient = getClient()\nauthorize(eventCatalogClient, () => \'<token>\')\nconst { data } = await eventCatalogClient.listEvents(...)\n```\n\n## Operations\n\n**Event Catalog**\n- [`listEvents`](#listevents)\n- [`getEvent`](#getevent)\n- [`patchEvent`](#patchevent)\n- [`getEventJSONSchema`](#geteventjsonschema)\n- [`getEventExample`](#geteventexample)\n- [`searchEventHistory`](#searcheventhistory)\n- [`searchEventHistoryV2`](#searcheventhistoryv2)\n- [`getHistoricalEvent`](#gethistoricalevent)\n- [`triggerEvent`](#triggerevent)\n\n**Schemas**\n- [`EventConfigBase`](#eventconfigbase)\n- [`EventConfig`](#eventconfig)\n- [`UpdateEventPayload`](#updateeventpayload)\n- [`PrimitiveField`](#primitivefield)\n- [`ContextEntity`](#contextentity)\n- [`AttachmentField`](#attachmentfield)\n- [`SchemaField`](#schemafield)\n- [`CommonEventMetadata`](#commoneventmetadata)\n- [`EventJsonSchema`](#eventjsonschema)\n- [`Event`](#event)\n- [`EventSummary`](#eventsummary)\n- [`GraphDefinition`](#graphdefinition)\n- [`GraphNode`](#graphnode)\n- [`GraphEdge`](#graphedge)\n- [`EntityOperationTrigger`](#entityoperationtrigger)\n- [`SearchOptions`](#searchoptions)\n- [`SearchOptionsV2`](#searchoptionsv2)\n- [`FieldsParam`](#fieldsparam)\n- [`TriggerEventPayload`](#triggereventpayload)\n- [`TriggerEventResponse`](#triggereventresponse)\n- [`EventAttachment`](#eventattachment)\n\n### `listEvents`\n\nRetrieve list of available business events\n\n`GET /v1/events`\n\n```ts\nconst { data } = await client.listEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getEvent`\n\nRetrieve the configuration of a specific business event\n\n`GET /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.getEvent({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true\n}\n```\n\n</details>\n\n---\n\n### `patchEvent`\n\nUpdate the configuration of a specific business event for the organization\n\n`PATCH /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.patchEvent(\n {\n event_name: \'example\',\n },\n {\n event_name: \'AddMeterReading\',\n event_title: \'Add Meter Reading\',\n event_description: \'Triggered when a new meter reading is added\',\n event_version: \'1.0.0\',\n event_status: \'active\',\n event_tags: [\'builtin\', \'metering\', \'erp\'],\n schema_fields: {},\n entity_graph: {\n nodes: [\n {\n id: \'contact\',\n schema: \'contact\',\n cardinality: \'one\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n }\n ],\n edges: [\n {\n from: \'contact\',\n to: \'billing_account\'\n }\n ]\n },\n entity_operation: {\n operation: [\'createEntity\', \'updateEntity\'],\n schema: [\'contact\', \'contract\', \'order\'],\n attribute: [\'email\', \'phone\', \'status\'],\n purpose: [\'K\xFCndigung\', \'Umzug/Auszug\']\n },\n enabled: true,\n auto_trigger: true,\n automation_trigger: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true\n}\n```\n\n</details>\n\n---\n\n### `getEventJSONSchema`\n\nRetrieve the JSON Schema of a specific business event\n\n`GET /v1/events/{event_name}/json_schema`\n\n```ts\nconst { data } = await client.getEventJSONSchema({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "object",\n "properties": {\n "_org_id": {\n "type": "string",\n "description": "epilot tenant/organization ID"\n },\n "_event_time": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when event occurred"\n },\n "_event_id": {\n "type": "string",\n "description": "Unique event identifier (ULID)"\n },\n "_event_name": {\n "type": "string",\n "description": "Event name from catalog"\n },\n "_event_version": {\n "type": "string",\n "description": "Event version (semver)"\n },\n "_event_source": {\n "type": "string",\n "description": "Source that triggered the event"\n },\n "reading_value": {\n "type": "number",\n "description": "The meter reading value"\n },\n "reading_date": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when reading was taken"\n },\n "read_by": {\n "type": "string",\n "description": "Name or identifier of who submitted the reading"\n },\n "reason": {\n "type": "string",\n "enum": ["regular", "move-in", "move-out", "supplier-change", "correction", "final"],\n "description": "Reason for the meter reading"\n },\n "direction": {\n "type": "string",\n "enum": ["feed-in", "feed-out"],\n "description": "Direction of energy flow"\n },\n "source": {\n "type": "string",\n "enum": ["portal", "360", "api", "automation"],\n "description": "Source system where reading was submitted"\n },\n "meter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter"\n },\n "counter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter counter"\n },\n "meter_number": {\n "type": "string",\n "description": "Human-readable meter number"\n },\n "obis_number": {\n "type": "string",\n "description": "OBIS code of the counter"\n },\n "unit": {\n "type": "string",\n "description": "Unit of measurement (e.g., kWh, m3)"\n },\n "customer_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the customer"\n },\n "contract_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the contract"\n },\n "user_id": {\n "type": "string",\n "description": "ID of the user who submitted the reading"\n },\n "user_email": {\n "type": "string",\n "format": "email",\n "description": "Email of the user who submitted the reading"\n }\n },\n "required": ["_org_id", "_event_time", "_event_id", "_event_name", "_event_version", "_event_source", "reading_value", "reading_date", "read_by", "reason", "direction", "source", "meter_id", "counter_id", "meter_number", "obis_number", "unit", "customer_id", "contract_id"]\n}\n```\n\n</details>\n\n---\n\n### `getEventExample`\n\nGenerate a sample event payload based on the event\'s JSON Schema\n\n`GET /v1/events/{event_name}/example`\n\n```ts\nconst { data } = await client.getEventExample({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{}\n```\n\n</details>\n\n---\n\n### `searchEventHistory`\n\nPaginated history of events\n\n`POST /v1/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistory(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `searchEventHistoryV2`\n\nPaginated history of events with projected/lightweight payload (v2).\n\n`POST /v2/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistoryV2(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "string",\n "_event_time": "1970-01-01T00:00:00.000Z",\n "_event_id": "string",\n "_event_name": "string",\n "_event_version": "1.0.0",\n "_event_source": "string",\n "_trigger_source_type": "api",\n "_trigger_source": "string",\n "_ack_id": "string"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `getHistoricalEvent`\n\nFetch a single historical event by id with full hydration\n\n`GET /v2/events/{event_name}/history/{event_id}`\n\n```ts\nconst { data } = await client.getHistoricalEvent({\n event_name: \'example\',\n event_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n}\n```\n\n</details>\n\n---\n\n### `triggerEvent`\n\nExplicitly trigger an event by providing input field values and an optional entity seed\nfor graph hydration. The event must be enabled for the organization.\n\n`POST /v1/events/{event_name}:trigger`\n\n```ts\nconst { data } = await client.triggerEvent(\n {\n event_name: \'example\',\n },\n {\n seed: {\n entity_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n node_id: \'string\'\n },\n fields: {},\n skip_hydration: [\'string\'],\n _trigger_source_type: \'string\',\n _trigger_source: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "event_id": "string",\n "event_bridge_event_id": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EventConfigBase`\n\nBase properties shared between EventConfig and UpdateEventPayload\n\n```ts\ntype EventConfigBase = {\n event_name?: string\n event_title?: string\n event_description?: string\n event_version?: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields?: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n}\n```\n\n### `EventConfig`\n\nEvent configuration with required fields\n\n```ts\ntype EventConfig = {\n event_name: string\n event_title?: string\n event_description?: string\n event_version: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n}\n```\n\n### `UpdateEventPayload`\n\nPayload for updating an event configuration.\nAccepts the same fields as EventConfig (all optional for PATCH).\nCurrently `enabled` and `auto_trigger` fields are processed.\n\n\n```ts\ntype UpdateEventPayload = {\n event_name?: string\n event_title?: string\n event_description?: string\n event_version?: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields?: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n}\n```\n\n### `PrimitiveField`\n\nA primitive JSON Schema field definition\n\n```ts\ntype PrimitiveField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n}\n```\n\n### `ContextEntity`\n\n```ts\ntype ContextEntity = {\n entity_schema: string\n required?: boolean\n}\n```\n\n### `AttachmentField`\n\nA schema field representing file attachments associated with the event.\nPresent in schema_fields for events tagged with "attachment".\n\n\n```ts\ntype AttachmentField = {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `SchemaField`\n\n```ts\ntype SchemaField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n} | {\n entity_schema: string\n required?: boolean\n} | {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `CommonEventMetadata`\n\nCommon metadata fields present in all event payloads\n\n```ts\ntype CommonEventMetadata = object\n```\n\n### `EventJsonSchema`\n\nJSON Schema declaring the event payload structure\n\n```ts\ntype EventJsonSchema = object\n```\n\n### `Event`\n\nAn event instance in the event history\n\n```ts\ntype Event = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n}\n```\n\n### `EventSummary`\n\nA lightweight event summary returned by the v2 history endpoint.\n\nIncludes the standard `_*` metadata fields plus a projected subset of the\nevent payload. Hydrated entity objects (values carrying `_schema` or `_id`\nand arrays of such objects) are stripped \u2014 fetch via\n`GET /v2/events/{event_name}/his\n\n```ts\ntype EventSummary = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n}\n```\n\n### `GraphDefinition`\n\nEntity graph definition for resolving related entities\n\n```ts\ntype GraphDefinition = {\n nodes: Array<{\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n }>\n edges: Array<{\n from: string\n to: string\n }>\n}\n```\n\n### `GraphNode`\n\nA node in the entity graph\n\n```ts\ntype GraphNode = {\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n}\n```\n\n### `GraphEdge`\n\nAn edge connecting two nodes in the graph\n\n```ts\ntype GraphEdge = {\n from: string\n to: string\n}\n```\n\n### `EntityOperationTrigger`\n\nConfiguration for triggering an event based on entity operations.\n\nWhen an entity operation matches the configured criteria, the event will be triggered.\n- On createEntity: the attribute must be present in the entity payload\n- On updateEntity: the attribute must be in diff.added, diff.updated, or di\n\n```ts\ntype EntityOperationTrigger = {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n}\n```\n\n### `SearchOptionsV2`\n\nSearch options for the v2 history endpoint.\n\nExtends `SearchOptions` with an optional `fields` projection. When `fields`\nis omitted, the response includes all `_*` metadata plus all scalar payload\nfields (and primitive arrays / empty objects/arrays) after entity stripping.\nWhen `fields` is provided,\n\n```ts\ntype SearchOptionsV2 = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n fields?: string[]\n}\n```\n\n### `FieldsParam`\n\nList of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n\n\n```ts\ntype FieldsParam = string[]\n```\n\n### `TriggerEventPayload`\n\nPayload for explicitly triggering an event via API\n\n```ts\ntype TriggerEventPayload = {\n seed?: {\n entity_id: string // uuid\n node_id: string\n }\n fields?: Record<string, unknown>\n skip_hydration?: string[]\n _trigger_source_type?: string\n _trigger_source?: string\n}\n```\n\n### `TriggerEventResponse`\n\nResponse from triggering an event\n\n```ts\ntype TriggerEventResponse = {\n success: boolean\n event_id: string\n event_bridge_event_id?: string\n}\n```\n\n### `EventAttachment`\n\nA file attachment associated with an event\n\n```ts\ntype EventAttachment = {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: string\n key: string\n }\n version_index: number\n readable_size?: string\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = event_catalog_default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCBDKPGO5cjs = require('./chunk-CBDKPGO5.cjs');
|
|
4
4
|
require('./chunk-NJK5F5TF.cjs');
|
|
5
|
-
exports. default =
|
|
5
|
+
exports. default = _chunkCBDKPGO5cjs.require_event_catalog_runtime.call(void 0, );
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
|
|
2
2
|
|
|
3
3
|
/* Auto-copied from event-catalog-client */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
declare namespace Components {
|
|
9
7
|
namespace Schemas {
|
|
8
|
+
/**
|
|
9
|
+
* A schema field representing file attachments associated with the event.
|
|
10
|
+
* Present in schema_fields for events tagged with "attachment".
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export interface AttachmentField {
|
|
14
|
+
items: /* A file attachment associated with an event */ EventAttachment;
|
|
15
|
+
/**
|
|
16
|
+
* Whether this field is required in the event payload
|
|
17
|
+
*/
|
|
18
|
+
required?: boolean;
|
|
19
|
+
}
|
|
10
20
|
/**
|
|
11
21
|
* Common metadata fields present in all event payloads
|
|
12
22
|
* example:
|
|
@@ -193,6 +203,48 @@ declare namespace Components {
|
|
|
193
203
|
*/
|
|
194
204
|
_ack_id?: string;
|
|
195
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* A file attachment associated with an event
|
|
208
|
+
*/
|
|
209
|
+
export interface EventAttachment {
|
|
210
|
+
/**
|
|
211
|
+
* Entity ID of the file
|
|
212
|
+
*/
|
|
213
|
+
entity_id: string; // uuid
|
|
214
|
+
/**
|
|
215
|
+
* Name of the file
|
|
216
|
+
*/
|
|
217
|
+
filename?: string;
|
|
218
|
+
/**
|
|
219
|
+
* MIME type of the file (e.g., application/pdf)
|
|
220
|
+
*/
|
|
221
|
+
mime_type?: string;
|
|
222
|
+
/**
|
|
223
|
+
* File size in bytes
|
|
224
|
+
*/
|
|
225
|
+
size_bytes?: number;
|
|
226
|
+
/**
|
|
227
|
+
* S3 reference for the file content
|
|
228
|
+
*/
|
|
229
|
+
s3ref?: {
|
|
230
|
+
/**
|
|
231
|
+
* S3 bucket name
|
|
232
|
+
*/
|
|
233
|
+
bucket: string;
|
|
234
|
+
/**
|
|
235
|
+
* S3 object key
|
|
236
|
+
*/
|
|
237
|
+
key: string;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* File version index (always 0 for newly created files)
|
|
241
|
+
*/
|
|
242
|
+
version_index: number;
|
|
243
|
+
/**
|
|
244
|
+
* Human-readable file size (e.g., "200 KB")
|
|
245
|
+
*/
|
|
246
|
+
readable_size?: string;
|
|
247
|
+
}
|
|
196
248
|
/**
|
|
197
249
|
* Event configuration with required fields
|
|
198
250
|
*/
|
|
@@ -634,6 +686,64 @@ declare namespace Components {
|
|
|
634
686
|
*/
|
|
635
687
|
export interface EventJsonSchema {
|
|
636
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* A lightweight event summary returned by the v2 history endpoint.
|
|
691
|
+
*
|
|
692
|
+
* Includes the standard `_*` metadata fields plus a projected subset of the
|
|
693
|
+
* event payload. Hydrated entity objects (values carrying `_schema` or `_id`
|
|
694
|
+
* and arrays of such objects) are stripped — fetch via
|
|
695
|
+
* `GET /v2/events/{event_name}/history/{event_id}` for full hydration.
|
|
696
|
+
*
|
|
697
|
+
* Projected scalar payload fields appear as additional top-level properties.
|
|
698
|
+
*
|
|
699
|
+
*/
|
|
700
|
+
export interface EventSummary {
|
|
701
|
+
[name: string]: any;
|
|
702
|
+
/**
|
|
703
|
+
* epilot tenant/organization ID
|
|
704
|
+
*/
|
|
705
|
+
_org_id: string;
|
|
706
|
+
/**
|
|
707
|
+
* ISO 8601 timestamp when event occurred
|
|
708
|
+
*/
|
|
709
|
+
_event_time: string; // date-time
|
|
710
|
+
/**
|
|
711
|
+
* Unique event identifier (ULID)
|
|
712
|
+
*/
|
|
713
|
+
_event_id: string;
|
|
714
|
+
/**
|
|
715
|
+
* Event name from catalog
|
|
716
|
+
*/
|
|
717
|
+
_event_name: string;
|
|
718
|
+
/**
|
|
719
|
+
* Event version (semver)
|
|
720
|
+
* example:
|
|
721
|
+
* 1.0.0
|
|
722
|
+
*/
|
|
723
|
+
_event_version: string;
|
|
724
|
+
/**
|
|
725
|
+
* Source that triggered the event
|
|
726
|
+
*/
|
|
727
|
+
_event_source: string;
|
|
728
|
+
/**
|
|
729
|
+
* The type of system that triggered the event.
|
|
730
|
+
* Common values: api, automation, operation, portal_user
|
|
731
|
+
*
|
|
732
|
+
* example:
|
|
733
|
+
* api
|
|
734
|
+
*/
|
|
735
|
+
_trigger_source_type?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Identifier of the specific trigger source.
|
|
738
|
+
*
|
|
739
|
+
*/
|
|
740
|
+
_trigger_source?: string;
|
|
741
|
+
/**
|
|
742
|
+
* Unique acknowledgment tracking ID for the event.
|
|
743
|
+
*
|
|
744
|
+
*/
|
|
745
|
+
_ack_id?: string;
|
|
746
|
+
}
|
|
637
747
|
/**
|
|
638
748
|
* List of entity fields to include or exclude in the response
|
|
639
749
|
*
|
|
@@ -762,7 +872,12 @@ declare namespace Components {
|
|
|
762
872
|
*/
|
|
763
873
|
graph_source?: string;
|
|
764
874
|
}
|
|
765
|
-
export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity
|
|
875
|
+
export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity | /**
|
|
876
|
+
* A schema field representing file attachments associated with the event.
|
|
877
|
+
* Present in schema_fields for events tagged with "attachment".
|
|
878
|
+
*
|
|
879
|
+
*/
|
|
880
|
+
AttachmentField;
|
|
766
881
|
export interface SearchOptions {
|
|
767
882
|
/**
|
|
768
883
|
* Maximum number of results to return
|
|
@@ -809,6 +924,81 @@ declare namespace Components {
|
|
|
809
924
|
*/
|
|
810
925
|
event_id?: string;
|
|
811
926
|
}
|
|
927
|
+
/**
|
|
928
|
+
* Search options for the v2 history endpoint.
|
|
929
|
+
*
|
|
930
|
+
* Extends `SearchOptions` with an optional `fields` projection. When `fields`
|
|
931
|
+
* is omitted, the response includes all `_*` metadata plus all scalar payload
|
|
932
|
+
* fields (and primitive arrays / empty objects/arrays) after entity stripping.
|
|
933
|
+
* When `fields` is provided, glob/exclusion semantics from `FieldsParam` apply
|
|
934
|
+
* against `payload.*` paths; `_*` metadata is always included. Entity stripping
|
|
935
|
+
* runs AFTER selection.
|
|
936
|
+
*
|
|
937
|
+
*/
|
|
938
|
+
export interface SearchOptionsV2 {
|
|
939
|
+
/**
|
|
940
|
+
* Maximum number of results to return
|
|
941
|
+
*/
|
|
942
|
+
limit?: number;
|
|
943
|
+
/**
|
|
944
|
+
* Cursor for pagination. Use the next_cursor from the previous response to get the next page.
|
|
945
|
+
*/
|
|
946
|
+
cursor?: {
|
|
947
|
+
/**
|
|
948
|
+
* Timestamp from the last event in the previous page
|
|
949
|
+
* example:
|
|
950
|
+
* 2025-10-31 12:34:56
|
|
951
|
+
*/
|
|
952
|
+
event_time?: string;
|
|
953
|
+
/**
|
|
954
|
+
* Event ID from the last event in the previous page
|
|
955
|
+
* example:
|
|
956
|
+
* evt_1234567890abcdef
|
|
957
|
+
*/
|
|
958
|
+
event_id?: string;
|
|
959
|
+
};
|
|
960
|
+
/**
|
|
961
|
+
* Filter events by timestamp range
|
|
962
|
+
*/
|
|
963
|
+
timestamp?: {
|
|
964
|
+
/**
|
|
965
|
+
* Start timestamp in ISO 8601 format
|
|
966
|
+
* example:
|
|
967
|
+
* 2025-10-01T00:00:00Z
|
|
968
|
+
*/
|
|
969
|
+
from?: string; // date-time
|
|
970
|
+
/**
|
|
971
|
+
* End timestamp in ISO 8601 format
|
|
972
|
+
* example:
|
|
973
|
+
* 2025-10-31T23:59:59Z
|
|
974
|
+
*/
|
|
975
|
+
to?: string; // date-time
|
|
976
|
+
};
|
|
977
|
+
/**
|
|
978
|
+
* Filter by specific event ID
|
|
979
|
+
* example:
|
|
980
|
+
* evt_1234567890abcdef
|
|
981
|
+
*/
|
|
982
|
+
event_id?: string;
|
|
983
|
+
fields?: /**
|
|
984
|
+
* List of entity fields to include or exclude in the response
|
|
985
|
+
*
|
|
986
|
+
* Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
|
|
987
|
+
*
|
|
988
|
+
* Globbing and globstart (**) is supported for nested fields.
|
|
989
|
+
*
|
|
990
|
+
* example:
|
|
991
|
+
* [
|
|
992
|
+
* "_id",
|
|
993
|
+
* "_title",
|
|
994
|
+
* "first_name",
|
|
995
|
+
* "account",
|
|
996
|
+
* "!account.*._files",
|
|
997
|
+
* "**._product"
|
|
998
|
+
* ]
|
|
999
|
+
*/
|
|
1000
|
+
FieldsParam;
|
|
1001
|
+
}
|
|
812
1002
|
/**
|
|
813
1003
|
* Payload for explicitly triggering an event via API
|
|
814
1004
|
*/
|
|
@@ -880,7 +1070,7 @@ declare namespace Components {
|
|
|
880
1070
|
/**
|
|
881
1071
|
* Payload for updating an event configuration.
|
|
882
1072
|
* Accepts the same fields as EventConfig (all optional for PATCH).
|
|
883
|
-
* Currently
|
|
1073
|
+
* Currently `enabled` and `auto_trigger` fields are processed.
|
|
884
1074
|
*
|
|
885
1075
|
*/
|
|
886
1076
|
export interface UpdateEventPayload {
|
|
@@ -1209,6 +1399,48 @@ declare namespace Paths {
|
|
|
1209
1399
|
Components.Schemas.EventJsonSchema;
|
|
1210
1400
|
}
|
|
1211
1401
|
}
|
|
1402
|
+
namespace GetHistoricalEvent {
|
|
1403
|
+
namespace Parameters {
|
|
1404
|
+
export type EventId = string;
|
|
1405
|
+
export type EventName = string;
|
|
1406
|
+
}
|
|
1407
|
+
export interface PathParameters {
|
|
1408
|
+
event_name: Parameters.EventName;
|
|
1409
|
+
event_id: Parameters.EventId;
|
|
1410
|
+
}
|
|
1411
|
+
namespace Responses {
|
|
1412
|
+
export type $200 = /**
|
|
1413
|
+
* An event instance in the event history
|
|
1414
|
+
* example:
|
|
1415
|
+
* {
|
|
1416
|
+
* "_org_id": "org_123456",
|
|
1417
|
+
* "_event_time": "2024-01-01T12:00:00Z",
|
|
1418
|
+
* "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
|
|
1419
|
+
* "_event_name": "MeterReading",
|
|
1420
|
+
* "_event_version": "1.0.0",
|
|
1421
|
+
* "_event_source": "api",
|
|
1422
|
+
* "_trigger_source_type": "api",
|
|
1423
|
+
* "_trigger_source": "user_123456",
|
|
1424
|
+
* "reading_value": 123.45,
|
|
1425
|
+
* "reading_date": "2024-01-01T11:59:00Z",
|
|
1426
|
+
* "read_by": "John Doe",
|
|
1427
|
+
* "reason": "regular",
|
|
1428
|
+
* "direction": "feed-out",
|
|
1429
|
+
* "source": "portal",
|
|
1430
|
+
* "meter_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
1431
|
+
* "counter_id": "660e8400-e29b-41d4-a716-446655440000",
|
|
1432
|
+
* "meter_number": "MT123456789",
|
|
1433
|
+
* "obis_number": "1-0:1.8.0",
|
|
1434
|
+
* "unit": "kWh",
|
|
1435
|
+
* "customer_id": "770e8400-e29b-41d4-a716-446655440000",
|
|
1436
|
+
* "contract_id": "880e8400-e29b-41d4-a716-446655440000"
|
|
1437
|
+
* }
|
|
1438
|
+
*/
|
|
1439
|
+
Components.Schemas.Event;
|
|
1440
|
+
export interface $404 {
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1212
1444
|
namespace ListEvents {
|
|
1213
1445
|
namespace Responses {
|
|
1214
1446
|
export interface $200 {
|
|
@@ -1226,7 +1458,7 @@ declare namespace Paths {
|
|
|
1226
1458
|
export type RequestBody = /**
|
|
1227
1459
|
* Payload for updating an event configuration.
|
|
1228
1460
|
* Accepts the same fields as EventConfig (all optional for PATCH).
|
|
1229
|
-
* Currently
|
|
1461
|
+
* Currently `enabled` and `auto_trigger` fields are processed.
|
|
1230
1462
|
*
|
|
1231
1463
|
*/
|
|
1232
1464
|
Components.Schemas.UpdateEventPayload;
|
|
@@ -1294,6 +1526,59 @@ declare namespace Paths {
|
|
|
1294
1526
|
}
|
|
1295
1527
|
}
|
|
1296
1528
|
}
|
|
1529
|
+
namespace SearchEventHistoryV2 {
|
|
1530
|
+
namespace Parameters {
|
|
1531
|
+
export type EventName = string;
|
|
1532
|
+
}
|
|
1533
|
+
export interface PathParameters {
|
|
1534
|
+
event_name: Parameters.EventName;
|
|
1535
|
+
}
|
|
1536
|
+
export type RequestBody = /**
|
|
1537
|
+
* Search options for the v2 history endpoint.
|
|
1538
|
+
*
|
|
1539
|
+
* Extends `SearchOptions` with an optional `fields` projection. When `fields`
|
|
1540
|
+
* is omitted, the response includes all `_*` metadata plus all scalar payload
|
|
1541
|
+
* fields (and primitive arrays / empty objects/arrays) after entity stripping.
|
|
1542
|
+
* When `fields` is provided, glob/exclusion semantics from `FieldsParam` apply
|
|
1543
|
+
* against `payload.*` paths; `_*` metadata is always included. Entity stripping
|
|
1544
|
+
* runs AFTER selection.
|
|
1545
|
+
*
|
|
1546
|
+
*/
|
|
1547
|
+
Components.Schemas.SearchOptionsV2;
|
|
1548
|
+
namespace Responses {
|
|
1549
|
+
export interface $200 {
|
|
1550
|
+
results?: /**
|
|
1551
|
+
* A lightweight event summary returned by the v2 history endpoint.
|
|
1552
|
+
*
|
|
1553
|
+
* Includes the standard `_*` metadata fields plus a projected subset of the
|
|
1554
|
+
* event payload. Hydrated entity objects (values carrying `_schema` or `_id`
|
|
1555
|
+
* and arrays of such objects) are stripped — fetch via
|
|
1556
|
+
* `GET /v2/events/{event_name}/history/{event_id}` for full hydration.
|
|
1557
|
+
*
|
|
1558
|
+
* Projected scalar payload fields appear as additional top-level properties.
|
|
1559
|
+
*
|
|
1560
|
+
*/
|
|
1561
|
+
Components.Schemas.EventSummary[];
|
|
1562
|
+
/**
|
|
1563
|
+
* Cursor for pagination. Use this to get the next page of results.
|
|
1564
|
+
*/
|
|
1565
|
+
next_cursor?: {
|
|
1566
|
+
/**
|
|
1567
|
+
* Timestamp from the last event in the current page
|
|
1568
|
+
* example:
|
|
1569
|
+
* 2025-10-31T12:34:56Z
|
|
1570
|
+
*/
|
|
1571
|
+
event_time?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Event ID from the last event in the current page
|
|
1574
|
+
* example:
|
|
1575
|
+
* evt_1234567890abcdef
|
|
1576
|
+
*/
|
|
1577
|
+
event_id?: string;
|
|
1578
|
+
} | null;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1297
1582
|
namespace TriggerEvent {
|
|
1298
1583
|
namespace Parameters {
|
|
1299
1584
|
export type EventName = string;
|
|
@@ -1376,6 +1661,32 @@ interface OperationMethods {
|
|
|
1376
1661
|
data?: Paths.SearchEventHistory.RequestBody,
|
|
1377
1662
|
config?: AxiosRequestConfig
|
|
1378
1663
|
): OperationResponse<Paths.SearchEventHistory.Responses.$200>
|
|
1664
|
+
/**
|
|
1665
|
+
* searchEventHistoryV2 - searchEventHistoryV2
|
|
1666
|
+
*
|
|
1667
|
+
* Paginated history of events with projected/lightweight payload (v2).
|
|
1668
|
+
*
|
|
1669
|
+
* Returns `EventSummary` objects instead of fully hydrated `Event` objects:
|
|
1670
|
+
* nested entity graphs (objects/arrays-of-objects carrying `_schema`/`_id`)
|
|
1671
|
+
* are stripped. Use GET /v2/events/{event_name}/history/{event_id} to fetch
|
|
1672
|
+
* the full hydrated event for a single result.
|
|
1673
|
+
*
|
|
1674
|
+
*/
|
|
1675
|
+
'searchEventHistoryV2'(
|
|
1676
|
+
parameters?: Parameters<Paths.SearchEventHistoryV2.PathParameters> | null,
|
|
1677
|
+
data?: Paths.SearchEventHistoryV2.RequestBody,
|
|
1678
|
+
config?: AxiosRequestConfig
|
|
1679
|
+
): OperationResponse<Paths.SearchEventHistoryV2.Responses.$200>
|
|
1680
|
+
/**
|
|
1681
|
+
* getHistoricalEvent - getHistoricalEvent
|
|
1682
|
+
*
|
|
1683
|
+
* Fetch a single historical event by id with full hydration
|
|
1684
|
+
*/
|
|
1685
|
+
'getHistoricalEvent'(
|
|
1686
|
+
parameters?: Parameters<Paths.GetHistoricalEvent.PathParameters> | null,
|
|
1687
|
+
data?: any,
|
|
1688
|
+
config?: AxiosRequestConfig
|
|
1689
|
+
): OperationResponse<Paths.GetHistoricalEvent.Responses.$200>
|
|
1379
1690
|
/**
|
|
1380
1691
|
* triggerEvent - triggerEvent
|
|
1381
1692
|
*
|
|
@@ -1466,6 +1777,36 @@ interface PathsDictionary {
|
|
|
1466
1777
|
config?: AxiosRequestConfig
|
|
1467
1778
|
): OperationResponse<Paths.SearchEventHistory.Responses.$200>
|
|
1468
1779
|
}
|
|
1780
|
+
['/v2/events/{event_name}:history']: {
|
|
1781
|
+
/**
|
|
1782
|
+
* searchEventHistoryV2 - searchEventHistoryV2
|
|
1783
|
+
*
|
|
1784
|
+
* Paginated history of events with projected/lightweight payload (v2).
|
|
1785
|
+
*
|
|
1786
|
+
* Returns `EventSummary` objects instead of fully hydrated `Event` objects:
|
|
1787
|
+
* nested entity graphs (objects/arrays-of-objects carrying `_schema`/`_id`)
|
|
1788
|
+
* are stripped. Use GET /v2/events/{event_name}/history/{event_id} to fetch
|
|
1789
|
+
* the full hydrated event for a single result.
|
|
1790
|
+
*
|
|
1791
|
+
*/
|
|
1792
|
+
'post'(
|
|
1793
|
+
parameters?: Parameters<Paths.SearchEventHistoryV2.PathParameters> | null,
|
|
1794
|
+
data?: Paths.SearchEventHistoryV2.RequestBody,
|
|
1795
|
+
config?: AxiosRequestConfig
|
|
1796
|
+
): OperationResponse<Paths.SearchEventHistoryV2.Responses.$200>
|
|
1797
|
+
}
|
|
1798
|
+
['/v2/events/{event_name}/history/{event_id}']: {
|
|
1799
|
+
/**
|
|
1800
|
+
* getHistoricalEvent - getHistoricalEvent
|
|
1801
|
+
*
|
|
1802
|
+
* Fetch a single historical event by id with full hydration
|
|
1803
|
+
*/
|
|
1804
|
+
'get'(
|
|
1805
|
+
parameters?: Parameters<Paths.GetHistoricalEvent.PathParameters> | null,
|
|
1806
|
+
data?: any,
|
|
1807
|
+
config?: AxiosRequestConfig
|
|
1808
|
+
): OperationResponse<Paths.GetHistoricalEvent.Responses.$200>
|
|
1809
|
+
}
|
|
1469
1810
|
['/v1/events/{event_name}:trigger']: {
|
|
1470
1811
|
/**
|
|
1471
1812
|
* triggerEvent - triggerEvent
|
|
@@ -1490,13 +1831,16 @@ interface PathsDictionary {
|
|
|
1490
1831
|
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
1491
1832
|
|
|
1492
1833
|
|
|
1834
|
+
type AttachmentField = Components.Schemas.AttachmentField;
|
|
1493
1835
|
type CommonEventMetadata = Components.Schemas.CommonEventMetadata;
|
|
1494
1836
|
type ContextEntity = Components.Schemas.ContextEntity;
|
|
1495
1837
|
type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger;
|
|
1496
1838
|
type Event = Components.Schemas.Event;
|
|
1839
|
+
type EventAttachment = Components.Schemas.EventAttachment;
|
|
1497
1840
|
type EventConfig = Components.Schemas.EventConfig;
|
|
1498
1841
|
type EventConfigBase = Components.Schemas.EventConfigBase;
|
|
1499
1842
|
type EventJsonSchema = Components.Schemas.EventJsonSchema;
|
|
1843
|
+
type EventSummary = Components.Schemas.EventSummary;
|
|
1500
1844
|
type FieldsParam = Components.Schemas.FieldsParam;
|
|
1501
1845
|
type GraphDefinition = Components.Schemas.GraphDefinition;
|
|
1502
1846
|
type GraphEdge = Components.Schemas.GraphEdge;
|
|
@@ -1504,8 +1848,9 @@ type GraphNode = Components.Schemas.GraphNode;
|
|
|
1504
1848
|
type PrimitiveField = Components.Schemas.PrimitiveField;
|
|
1505
1849
|
type SchemaField = Components.Schemas.SchemaField;
|
|
1506
1850
|
type SearchOptions = Components.Schemas.SearchOptions;
|
|
1851
|
+
type SearchOptionsV2 = Components.Schemas.SearchOptionsV2;
|
|
1507
1852
|
type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
|
|
1508
1853
|
type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
|
|
1509
1854
|
type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
|
|
1510
1855
|
|
|
1511
|
-
export { type Client as C, type EntityOperationTrigger as E, type FieldsParam as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type
|
|
1856
|
+
export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldsParam as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type GraphEdge as k, type GraphNode as l, type PrimitiveField as m, type SearchOptions as n, type SearchOptionsV2 as o, type TriggerEventResponse as p };
|