### Sample Response for App Installation Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Example JSON response structure for a successful app installation or update. ```json { "app_id": "string", "installer_org_id": "string", "owner_org_id": "string", "enabled": true, "name": "string", "option_values": [ { "component_id": "string", "options": [ { "key": "string", "value": {} } ] } ], "components": [ { "component_type": "CUSTOM_JOURNEY_BLOCK", "configuration": { "override_dev_mode": { "override_url": "http://localhost:3000" }, "component_url": "https://cdn.apps.com/123/v1.0.0/bundle.js", "component_tag": "string", "component_args": [ { "type": "text" } ], "component_size": 0, "component_mapping": {} } } ], "installed_version": "string", "role": "string", "blueprint_ref": { "manifest_id": "string", "job_id": "string" }, "installation_audit": { "created_at": "string", "created_by": "string", "updated_at": "string", "updated_by": "string" }, "_manifest": ["123e4567-e89b-12d3-a456-426614174000"] } ``` -------------------------------- ### Install and Run Local Development Server Source: https://github.com/epilot-dev/docs/blob/main/README.md Installs project dependencies and starts a local development server. Changes are reflected live without a server restart. ```bash npm install npm dev ``` -------------------------------- ### Install Blueprint Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/blueprint-manifest.md Starts a new blueprint installation job. The API returns a 202 Accepted status with a Location header pointing to the job resource for tracking the installation progress. ```typescript const { data } = await client.installBlueprint( null, { source_org_id: 'string', source_blueprint_id: 'c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341', source_blueprint_file: 'string', destination_org_id: 'string', destination_blueprint_id: 'c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341', options: { resources_to_ignore: ['string'] }, mode: 'simple', source_blueprint_type: 'marketplace', slug: 'string' }, ) ``` -------------------------------- ### Get App Installation Details Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Retrieve details of an installed app by its ID using named parameters. ```bash epilot app getInstallation \ -p appId=123e4567-e89b-12d3-a456-426614174000 ``` -------------------------------- ### Get App Installation Details with Positional Args Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Retrieve app installation details using the app ID as a positional argument. ```bash epilot app getInstallation 123e4567-e89b-12d3-a456-426614174000 ``` -------------------------------- ### Load Cycle Consumption Response Example Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/components/portal-extension.md Example of a consumption response for a load cycle setup with hourly intervals. It provides 'min', 'average', and 'max' values for power consumption at different timestamps. ```json { "consumptions": [ { "timestamp": "2026-01-20T03:00:00.000+00:00", "type": "min", "value": 118 }, { "timestamp": "2026-01-20T03:00:00.000+00:00", "type": "average", "value": 128 }, { "timestamp": "2026-01-20T03:00:00.000+00:00", "type": "max", "value": 139 }, { "timestamp": "2026-01-20T09:00:00.000+00:00", "type": "min", "value": 548 }, { "timestamp": "2026-01-20T09:00:00.000+00:00", "type": "average", "value": 642 }, { "timestamp": "2026-01-20T09:00:00.000+00:00", "type": "max", "value": 731 } ] } ``` -------------------------------- ### Initialize Notes Client with SDK Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/notes.md Import and authorize the Notes client using the main epilot SDK. This is the standard way to get started with the Notes API. ```typescript import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data } = await epilot.notes.createNote(...) ``` -------------------------------- ### Initialize Metering Client Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/metering.md Demonstrates how to initialize the Metering client using the epilot SDK and authorize it with a token. This is the standard way to get started with the Metering API. ```ts import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data } = await epilot.metering.getCustomerMeters(...) ``` -------------------------------- ### Get Schema Example Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/entity.md Generates a full example entity for the given schema. ```APIDOC ## getSchemaExample ### Description Get a full example entity for the given schema. ### Method GET ### Endpoint /v1/schemas/{schema_id}/example ``` -------------------------------- ### Get Schema Example Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/entity.md Retrieves a full example entity for a given schema slug. ```APIDOC ## GET /v1/entity/schemas/{slug}/json/example ### Description Get a full example entity for the given schema ### Method GET ### Endpoint /v1/entity/schemas/{slug}/json/example ### Parameters #### Query Parameters - **slug** (string) - Required - The schema slug for which to get an example entity. ### Response #### Success Response (200) - An example entity conforming to the specified schema. ### Response Example ```json {} ``` ``` -------------------------------- ### Asynchronous CDN Installation Source: https://github.com/epilot-dev/docs/blob/main/docs/journeys/sdk.md Use this stub in your to load the SDK asynchronously without blocking your page. The $epilot.onReady() queue handles callbacks until the SDK is fully loaded. ```html ;(function (h, o, u, n, d) { h = h[d] = h[d] || { q: [], onReady: function (c) { h.q.push(c) }, } d = o.createElement(u) d.async = 1 d.src = n n = o.getElementsByTagName(u)[0] n.parentNode.insertBefore(d, n) })( window, document, 'script', 'https://embed.journey.epilot.io/sdk/bundle.js', '$epilot' ) ``` -------------------------------- ### Install and Build Project Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/how-to-guides/build-a-custom-jb.md Install project dependencies and build the project for production. ```bash npm install npm run build ``` -------------------------------- ### Sample Response for continueInstallationJob Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/blueprint-manifest.md Shows the typical response structure after successfully continuing an installation job. ```json { "id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", "events": [ { "timestamp": "1970-01-01T00:00:00.000Z", "message": "string", "errors": [ { "error": "string", "code": "dependency_extraction", "data": { "formattedResource": { "id": "string", "name": "string", "type": "string" }, "resource": "string", "resourceDependency": "string", "resources": ["string"], "addresses": ["string"], "originalError": "string" } } ], "level": "info", "data": { "installed_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", "export_job_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", "resources": 0 } } ], "triggered_at": "1970-01-01T00:00:00.000Z", "created_by": { "name": "manifest@epilot.cloud", "org_id": "911690", "user_id": "11001045", "token_id": "api_5ZugdRXasLfWBypHi93Fk" }, "source_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", "source_blueprint_type": "custom", "source_org_id": "string", "source_blueprint_file": "string", "destination_blueprint_id": "c2d6cac8-bdd5-4ea2-8a6c-1cbdbe77b341", "destination_org_id": "string", "slug": "string", "status": "IN_PROGRESS" } ``` -------------------------------- ### Get Installed Portal Extensions V3 Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/customer-portal.md Retrieves a list of installed portal extensions for a given portal. Requires a portal ID. ```typescript const { data } = await client.getPortalExtensionsV3({ portal_id: 'example', }) ``` -------------------------------- ### Install @epilot/switching-deadlines Source: https://github.com/epilot-dev/docs/blob/main/docs/deadlines/deadlines-library/README.md Install the library using npm, yarn, or pnpm. ```bash npm install @epilot/switching-deadlines ``` -------------------------------- ### Synchronous CDN Installation Source: https://github.com/epilot-dev/docs/blob/main/docs/journeys/sdk.md Include this script tag in your HTML's for the simplest SDK installation. The $epilot object will be available immediately on window. ```html ``` -------------------------------- ### Get Public Key Response Example Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/webhooks.md An example of the JSON response structure when retrieving the public key for webhook signature verification. ```json { "public_key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----", "algorithm": "ed25519", "issuer": "epilot" } ``` -------------------------------- ### Initialize Kanban Client with SDK Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/kanban.md Demonstrates how to import and authorize the Kanban client using the epilot SDK. Ensure you have a valid token for authorization. ```typescript import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data } = await epilot.kanban.createKanbanBoard(...) ``` ```typescript import { getClient, authorize } from '@epilot/sdk/kanban' const kanbanClient = getClient() authorize(kanbanClient, () => '') const { data } = await kanbanClient.createKanbanBoard(...) ``` -------------------------------- ### Get App Installation Details with JSONata Filter Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Retrieve app installation details and filter the output using a JSONata expression. ```bash epilot app getInstallation -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'app_id' ``` -------------------------------- ### Complete Example with Router Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/components/custom-page.md A comprehensive example demonstrating initialization, context retrieval, internal navigation, and handling browser events for a multi-route custom page. ```typescript import { initialize, getPageContext, navigate, onLocationChange, updateContentHeight, } from '@epilot/app-bridge'; type Route = '/' | '/dashboard' | '/settings'; async function main() { const { token, lang } = await initialize(); const { slug, subPath } = await getPageContext(); // Initial render renderPage(subPath as Route); // Handle browser back/forward onLocationChange((newSubPath) => { renderPage(newSubPath as Route); }); // Set up internal navigation document.querySelectorAll('[data-nav]').forEach((el) => { el.addEventListener('click', (e) => { e.preventDefault(); const target = (e.currentTarget as HTMLElement).dataset.nav as Route; navigate(target); renderPage(target); }); }); } function renderPage(route: Route) { const app = document.getElementById('app')!; switch (route) { case '/dashboard': app.innerHTML = '

Dashboard

'; break; case '/settings': app.innerHTML = '

Settings

'; break; default: app.innerHTML = '

Home

'; } updateContentHeight(document.body.scrollHeight); } main().catch(console.error); ``` -------------------------------- ### Install epilot SDK with npm Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/overview.md Install the epilot SDK, axios, and openapi-client-axios using npm. ```bash npm i @epilot/sdk axios openapi-client-axios ``` -------------------------------- ### getBillingEvents Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/billing.md Get and filter billing events such as installments and reimbursements. ```APIDOC ## GET /v1/billing/events ### Description Get and filter billing events such as installments and reimbursements. ### Method GET ### Endpoint /v1/billing/events ### Parameters #### Query Parameters - **from** (number) - No - - **size** (number) - No - - **entity_id** (string[]) - No - Entity ID to filter billing events by - **event_type** ( "installment" | "reimbursement" ) - No - - **date_after** (string (date-time)) - No - - **date_before** (string (date-time)) - No - ### Request Example ```bash epilot billing getBillingEvents ``` ### Response #### Success Response (200) - **hits** (number) - - **results** (array) - - **billing_amount** (number) - - **billing_amount_decimal** (string) - - **billing_currency** (string) - - **external_id** (string) - - **contract** (object) - - **$relation** (array) - - **entity_id** (string) - - **_id** (string) - - **_title** (string) - - **_org** (string) - - **_schema** (string) - - **_tags** (array) - - (string) - - **_created_at** (string) - - **_updated_at** (string) - - **type** (string) - - **due_date** (string (date-time)) - - **paid_date** (string (date-time)) - #### Response Example ```json { "hits": 0, "results": [ { "billing_amount": 10050, "billing_amount_decimal": "100.50", "billing_currency": "EUR", "external_id": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e", "contract": { "$relation": [ { "entity_id": "f589786b-3024-43cd-9cb3-5a3c953f2896" } ] }, "_id": "5da0a718-c822-403d-9f5d-20d4584e0528", "_title": "string", "_org": "string", "_schema": "contact", "_tags": ["string"], "_created_at": "string", "_updated_at": "string", "type": "installment", "due_date": "1970-01-01T00:00:00.000Z", "paid_date": "1970-01-01T00:00:00.000Z" } ] } ``` ``` -------------------------------- ### Pre-install Blueprint from File Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/blueprint-manifest.md Initiates the pre-installation of a Blueprint using a provided blueprint file. This is useful for staging or preparing blueprints before a full installation. ```typescript const { data } = await client.preInstallBlueprint( null, { blueprint_file: 'string', source_blueprint_type: 'marketplace', slug: 'string' }, ) ``` -------------------------------- ### Get Webhook Example Payload Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/webhooks.md Use this to generate an example payload for a webhook configuration. Specify the configuration ID and optionally an automation ID. ```typescript const { data } = await client.getWebhookExample( { configId: 'example', }, { automation_id: 'automation_123' }, ) ``` -------------------------------- ### Build and Deploy Your App Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/getting-started/quick-start.md Build all your app's components locally and then deploy the app to the epilot platform. Deployment creates or updates the app and syncs your local manifest. ```bash # Build all components npm run build # Deploy — creates or updates the app on the epilot platform epilot app deploy ``` -------------------------------- ### Calculate Earliest Start Date Source: https://github.com/epilot-dev/docs/blob/main/docs/deadlines/deadlines-library/index/classes/DeadlineCalculator.md Instantiate DeadlineCalculator and call calculateEarliestStartDate with specific case details to get the earliest possible start date. ```typescript const calculator = new DeadlineCalculator() const result = calculator.calculateEarliestStartDate({ commodity: 'power', useCase: 'relocation', requiresTermination: false }) console.log(result.earliestStartDate) ``` -------------------------------- ### Batch Get Purposes with JSONata Filter Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/purpose.md Example of filtering the response from a batch get purposes request using JSONata, selecting the first hit. ```bash epilot purpose batchGetPurposes --jsonata 'results[0]' ``` -------------------------------- ### Sample Response for createConfiguration Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Example JSON response containing the newly created app's ID. ```json { "app_id": "string" } ``` -------------------------------- ### Install @epilot/pricing with npm Source: https://github.com/epilot-dev/docs/blob/main/docs/pricing/pricing-library/README.md Install the pricing library using npm. This command adds the package as a dependency to your project. ```bash npm install --save @epilot/pricing ``` -------------------------------- ### Get Schema Example Entity Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/entity.md Retrieve a full example entity for a given schema slug. This is useful for understanding the structure and expected data for an entity. ```typescript const { data } = await client.getSchemaExample({ slug: 'example', }) ``` -------------------------------- ### Sample Response for listConfigurations Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Example JSON response when listing app configurations, including metadata and pagination details. ```json { "configurations": [ { "app_id": "string", "name": "string", "author": { "name": "string", "company": "string", "email": "string" }, "dev_mode": true, "versions": ["string"], "public_versions": ["string"], "support_email": "string", "latest_version": "string", "category": "string", "icon_url": "string", "documentation_url": "string", "description": { "en": "string", "de": "string" }, "notifications": { "email": "developer@example.com", "events": ["app.installed"] }, "owner_org_id": "string", "internal": false, "pricing": { "pricing_type": "FREE", "billing_frequency": "MONTHLY" }, "configuration_audit": { "created_at": "string", "created_by": "string", "updated_at": "string", "updated_by": "string" } } ], "pagination": { "total": 0, "page": 0, "pageSize": 0 } } ``` -------------------------------- ### List Available Dashboard Examples Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/dashboard.md Use this command to retrieve a list of available examples for configuring new dashboard tiles. You can optionally filter the results using JSONata. ```bash epilot dashboard listAvailableExamples ``` ```bash epilot dashboard listAvailableExamples --jsonata 'results[0]' ``` -------------------------------- ### Get Custom Variable Example Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/template-variables.md This example demonstrates how to define and use custom variables for calculations within a template. It includes helper parameters and logic for dynamic computations. ```javascript "helper_params": ["param1", "param2"], "helper_logic": "return param1 * param2;" ``` -------------------------------- ### Get app installation details Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/app.md Retrieve specific details of an installed app using its unique application ID. This is useful for inspecting the configuration and status of a single app. ```typescript const { data } = await client.getInstallation({ appId: 'example', }) ``` -------------------------------- ### Initialize Pricing Client with Epilot SDK Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/pricing.md Demonstrates how to initialize the Pricing client using the main epilot object from the SDK. Requires authorization to be set beforehand. ```typescript import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data } = await epilot.pricing.$calculatePricingDetails(...) ``` -------------------------------- ### listAvailableExamples Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/dashboard.md Returns a list of available examples for visualizations that can be used to configure new dashboard tiles. ```APIDOC ## GET /v1/dashboard/examples ### Description Returns list of available examples for visualisations to configure new dashboard tiles. ### Method GET ### Endpoint /v1/dashboard/examples ### Response #### Success Response (200) - **results** (array) - An array of example objects, each containing details for a visualization. ### Response Example ```json { "results": [ { "id": "e4af1297-1fd6-440f-9846-f475f580d40f", "title": "Number of opportunities created by journeys every month", "visualisation": "timechart", "query": { "dataset": "entity_operations", "measure": "count_operations", "dimensions": [ { "time_with_granularity": "year-month" } ], "filters": [ { "entity_schema": "opportunity" } ] } } ] } ``` ``` -------------------------------- ### Entity Capability - CRM integration example Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/app-surfaces.md A complete example of an app that displays external CRM data for a contact, including initialization, API client setup, and UI rendering. ```typescript import { initialize, getEntityContext, updateContentHeight, authorizeClient, } from '@epilot/app-bridge'; import { getClient } from '@epilot/entity-client'; interface ExternalCRMData { score: number; lastContact: string; notes: string[]; } async function main() { // 1. Initialize app bridge const { token, lang } = await initialize(); // 2. Set up API client const entityClient = getClient(); authorizeClient(entityClient, token); // 3. Set language document.documentElement.lang = lang; // 4. Get entity context const { entityId, schema } = await getEntityContext(); // 5. Fetch entity data const entity = await entityClient.getEntity({ slug: schema, id: entityId }); // 6. Fetch external CRM data (your API) const externalData = await fetchExternalCRM(entity.data.email); // 7. Render UI renderCRMWidget(externalData); // 8. Update content height const observer = new ResizeObserver((entries) => { updateContentHeight(entries[0].contentRect.height); }); observer.observe(document.getElementById('app')!); } function renderCRMWidget(data: ExternalCRMData) { const app = document.getElementById('app')!; app.innerHTML = `
Score: ${data.score}
Last Contact: ${data.lastContact}
${data.notes.map(note => `

${note}

`).join('')}
`; } async function fetchExternalCRM(email: string): Promise { const response = await fetch(`https://api.mycrm.com/lookup?email=${email}`); return response.json(); } main().catch(console.error); ``` -------------------------------- ### Prosumer Consumption Response Example Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/components/portal-extension.md Example of a consumption response for a prosumer setup with hourly intervals. It includes both 'feed-in' (surplus) and 'feed-out' (grid draw) records per timestamp. ```json { "consumptions": [ { "timestamp": "2026-01-20T07:00:00.000+00:00", "type": "feed-in", "value": 0.0 }, { "timestamp": "2026-01-20T07:00:00.000+00:00", "type": "feed-out", "value": 0.31 }, { "timestamp": "2026-01-20T13:00:00.000+00:00", "type": "feed-in", "value": 4.12 }, { "timestamp": "2026-01-20T13:00:00.000+00:00", "type": "feed-out", "value": 0.0 }, { "timestamp": "2026-01-20T21:00:00.000+00:00", "type": "feed-in", "value": 0.0 }, { "timestamp": "2026-01-20T21:00:00.000+00:00", "type": "feed-out", "value": 0.58 } ] } ``` -------------------------------- ### Install epilot SDK with pnpm Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/overview.md Install the epilot SDK, axios, and openapi-client-axios using pnpm. ```bash pnpm add @epilot/sdk axios openapi-client-axios ``` -------------------------------- ### Setup .epilot/sdk-overrides.json Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/overrides.md Create this JSON file in your project root to map API names to local OpenAPI spec file paths. Keys should match `@epilot/sdk/` imports. ```json { "entity": "./specs/entity-openapi.json", "pricing": "./specs/pricing-openapi.json" } ``` -------------------------------- ### Get Public App Configuration Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Retrieves the specific public configuration of an app for installation. ```APIDOC ## GET /v1/app-configurations/public/{appId} ### Description Retrieve the public configuration of an app to install in your tenant. ### Method GET ### Endpoint /v1/app-configurations/public/{appId} ### Parameters #### Path Parameters - **appId** (string) - Required - ID of the app configuration to install #### Query Parameters - **version** (string) - Optional - Version of the app configuration to retrieve ### Request Example ```bash epilot app getPublicConfiguration -p appId=123e4567-e89b-12d3-a456-426614174000 ``` Using positional args for path parameters: ```bash epilot app getPublicConfiguration 123e4567-e89b-12d3-a456-426614174000 ``` With JSONata filter: ```bash epilot app getPublicConfiguration -p appId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'app_id' ``` ### Response #### Success Response (200) - **app_id** (string) - The unique identifier for the app. - **support_email** (string) - The support email for the app. - **owner_org_id** (string) - The ID of the organization that owns the app. - **name** (string) - The name of the app. - **author** (object) - Information about the app's author. - **dev_mode** (boolean) - Indicates if the app is in development mode. - **category** (string) - The category the app belongs to. - **icon_url** (string) - URL to the app's icon. - **documentation_url** (string) - URL to the app's documentation. - **description** (object) - Description of the app, potentially localized. - **pricing** (object) - Pricing information for the app. - **components** (array) - List of components included in the app. - **is_beta** (boolean) - Indicates if the app is a beta version. - **deprecated_at** (string) - Timestamp when the app was deprecated. - **version** (string) - The current version of the app configuration. - **role** (object) - Role information associated with the app. - **blueprint_ref** (object) - Reference to the app's blueprint. - **latest_version** (string) - The latest available version of the app. - **public** (boolean) - Indicates if the app configuration is public. - **versions** (array) - List of all available versions of the app. #### Response Example ```json { "app_id": "string", "support_email": "string", "owner_org_id": "string", "name": "string", "author": { "name": "string", "company": "string", "email": "string" }, "dev_mode": true, "category": "string", "icon_url": "string", "documentation_url": "string", "description": { "en": "string", "de": "string" }, "pricing": { "pricing_type": "FREE", "billing_frequency": "MONTHLY" }, "components": [ { "component_type": "CUSTOM_JOURNEY_BLOCK", "configuration": {} } ], "is_beta": true, "deprecated_at": "string", "version": "string", "role": { "id": "string", "grants": [ {} ] }, "blueprint_ref": { "manifest_id": "string", "job_id": "string" }, "latest_version": "string", "public": true, "versions": [ { "app_id": "string", "owner_org_id": "string", "components": [], "visibility": "private", "public": false, "pending": false, "version": "string", "is_beta": true, "deprecated_at": "string", "changelog": "string", "review_status": "approved", "role": {}, "blueprint_ref": {}, "version_audit": {} } ] } ``` ``` -------------------------------- ### Install App with Positional Args Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Install an app using its ID as a positional argument. ```bash epilot app install 123e4567-e89b-12d3-a456-426614174000 ``` -------------------------------- ### Get Portal Extensions V3 Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/customer-portal.md Retrieves a list of all installed portal extensions for a given portal. ```APIDOC ## GET /v3/portal/extensions ### Description Retrieves the installed portal extensions. ### Method GET ### Endpoint /v3/portal/extensions ### Parameters #### Query Parameters - **portal_id** (string) - Required - The ID of the portal. ### Response #### Success Response (200) - Returns an array of installed portal extensions. ### Response Example [ { "id": "string", "app_id": "string", "app_name": "string", "name": { "en": "string" }, "description": { "en": "string" }, "version": "string", "options": [ { "id": "string", "name": { "en": "string" }, "type": "text", "description": { "en": "string" }, "default": "string", "required": false } ], "links": [ { "id": "string", "name": { "en": "string" }, "description": { "en": "string" }, "type": "seamless", "condition": "{{Contact.customer_number | is_not_empty}}", "auth": { "method": "GET", "url": "string", "params": {}, "headers": {}, "body": {}, "cache": { "key": "{{Options.api_key}}", "ttl": "{{AuthResponse.data.expires_in}}" } }, "redirect": { "url": "string", "params": {} } } ], "hooks": [ { "type": "registrationIdentifiersCheck", "auth": { "method": "GET", "url": "string", "params": {}, "headers": {}, "body": {}, "cache": { "key": "{{Options.api_key}}", "ttl": "{{AuthResponse.data.expires_in}}" } }, "call": { "method": "POST", "url": "string", "params": {}, "headers": {}, "body": {}, "result": "string" }, "use_static_ips": false } ] } ] ``` -------------------------------- ### Start Local Development Server Source: https://github.com/epilot-dev/docs/blob/main/docs/apps/how-to-guides/build-a-custom-jb.md Run a local development server for convenient testing of changes in the context of a journey. ```bash npm run dev ``` -------------------------------- ### Install App with Request Body Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Install an app providing installation details in the request body. ```bash epilot app install \ -p appId=123e4567-e89b-12d3-a456-426614174000 \ -d "{\ \"version\": \"string\",\ \"option_values\": [\ {\"component_id\": \"string\",\ \"options\": [\ {\"key\": \"string\",\ \"value\": {}}\ ]}\ ],\ \"_manifest\": [\"123e4567-e89b-12d3-a456-426614174000\"] }" ``` -------------------------------- ### Get Purpose by ID Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/purpose.md Example of retrieving a single purpose by its unique identifier using the `getPurpose` method. ```typescript const { data } = await client.getPurpose({ purposeId: 'example', }) ``` -------------------------------- ### Install App with Named Parameters Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Install or update an app using its ID and named parameters. ```bash epilot app install \ -p appId=123e4567-e89b-12d3-a456-426614174000 ``` -------------------------------- ### Sample Response for Get Entity Identifiers Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/customer-portal.md Provides an example of the response structure when retrieving entity identifiers. ```json { "data": [ { "name": "contract_number", "type": "string" } ] } ``` -------------------------------- ### Install App via Stdin Pipe Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Install an app by piping the request body from a file via stdin. ```bash cat body.json | epilot app install -p appId=123e4567-e89b-12d3-a456-426614174000 ``` -------------------------------- ### Get Event Example Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/event-catalog.md Generate a sample event payload based on the event's JSON Schema. ```APIDOC ## getEventExample ### Description Generate a sample event payload based on the event's JSON Schema. ### Method GET ### Endpoint /v1/events/{event_name}/example ### Parameters #### Path Parameters - **event_name** (string) - Required - Unique human readable name of the event ### Request Example ```bash epilot event-catalog getEventExample -p event_name=example ``` ### Response #### Success Response (200) - **example** (object) - An example payload for the event. #### Response Example ```json {} ``` ``` -------------------------------- ### listAvailableExamples Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/dashboard.md Retrieves a list of available examples that can be used to configure new dashboard tiles. Supports filtering with JSONata. ```APIDOC ## GET /v1/dashboard/examples ### Description Returns a list of available examples for visualizations to configure new dashboard tiles. ### Method GET ### Endpoint /v1/dashboard/examples ### Parameters #### Query Parameters - **jsonata** (string) - Optional - A JSONata expression to filter the results. ### Response #### Success Response (200) - **results** (array) - A list of available dashboard example configurations. - **id** (string) - The unique identifier for the example. - **title** (string) - The title of the example visualization. - **visualisation** (string) - The type of visualization to be used. - **query** (object) - The query configuration for the visualization. - **dataset** (string) - The dataset to query. - **measure** (string) - The measure to aggregate. - **dimensions** (array) - The dimensions to group by. - **filters** (array) - Filters to apply to the query. ### Response Example ```json { "results": [ { "id": "e4af1297-1fd6-440f-9846-f475f580d40f", "title": "Number of opportunities created by journeys every month", "visualisation": "timechart", "query": { "dataset": "entity_operations", "measure": "count_operations", "dimensions": [ { "time_with_granularity": "year-month" } ], "filters": [ { "entity_schema": "opportunity" } ] } } ] } ``` ``` -------------------------------- ### Get Public Facing Component Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/app.md Retrieve public facing components for an installed app. Requires appId and componentId. ```typescript const { data } = await client.getPublicFacingComponent({ appId: 'example', componentId: 'example', }) ``` -------------------------------- ### Get Customer Portal Extensions Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/customer-portal.md Retrieves installed portal extensions. An optional origin parameter can filter by portal. ```bash epilot customer-portal getPortalExtensions ``` ```bash epilot customer-portal getPortalExtensions --jsonata '$' ``` -------------------------------- ### Install @epilot/pricing with Yarn Source: https://github.com/epilot-dev/docs/blob/main/docs/pricing/pricing-library/README.md Install the pricing library using Yarn. This command adds the package as a dependency to your project. ```bash yarn add @epilot/pricing ``` -------------------------------- ### Sample Response for Get Counter Details Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/metering.md Example JSON response structure detailing a specific meter counter. ```json { "data": { "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "_title": "Example Entity", "_org": "123", "_tags": ["example", "mock"], "_created_at": "2021-02-09T12:41:43.662Z", "_updated_at": "2021-02-09T12:41:43.662Z", "_schema": "meter_counter", "obis_number": "A-34", "direction": "feed-in", "transformer_ratio": 70, "unit": "string", "forecast_reading_value": 270, "forecast_as_of": "2022-12-10T00:00:00.000Z", "current_consumption": 240, "last_reading": "2022-10-10T00:00:00.000Z", "conversion_factor": 3, "tariff_type": "ht" } } ``` -------------------------------- ### Install epilot SDK with yarn Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/overview.md Install the epilot SDK, axios, and openapi-client-axios using yarn. ```bash yarn add @epilot/sdk axios openapi-client-axios ``` -------------------------------- ### Sample Response for Get Meter Counters Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/metering.md Example JSON response structure containing a list of counters for a given meter. ```json { "data": [ { "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "_title": "Example Entity", "_org": "123", "_tags": ["example", "mock"], "_created_at": "2021-02-09T12:41:43.662Z", "_updated_at": "2021-02-09T12:41:43.662Z", "_schema": "meter_counter", "obis_number": "A-34", "direction": "feed-in", "transformer_ratio": 70, "unit": "string", "forecast_reading_value": 270, "forecast_as_of": "2022-12-10T00:00:00.000Z", "current_consumption": 240, "last_reading": "2022-10-10T00:00:00.000Z", "conversion_factor": 3, "tariff_type": "ht" } ] } ``` -------------------------------- ### Initialize and Authorize User Client Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/user.md Import the epilot client and authorize it with a token. Then, use the user client to sign up a user. ```typescript import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data } = await epilot.user.signUpUser(...) ``` -------------------------------- ### Get Public Facing Component Source: https://github.com/epilot-dev/docs/blob/main/docs/cli/commands/app.md Retrieves public facing components for an installed app. Use parameters for appId and componentId. ```bash epilot app getPublicFacingComponent \ -p appId=123e4567-e89b-12d3-a456-426614174000 \ -p componentId=123e4567-e89b-12d3-a456-426614174000 ``` ```bash epilot app getPublicFacingComponent 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 ``` ```bash epilot app getPublicFacingComponent -p appId=123e4567-e89b-12d3-a456-426614174000 -p componentId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'component' ``` -------------------------------- ### Get User Login Parameters V2 Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/clients/user.md Retrieves login parameters for a user based on their username, useful for multi-organization setups. ```APIDOC ## GET /v2/users/public/username/{username}:getLoginParameters ### Description Get user organization login parameters by username. ### Method GET ### Endpoint /v2/users/public/username/{username}:getLoginParameters ### Parameters #### Path Parameters - **username** (string) - Required - The username for which to retrieve login parameters. ### Response #### Success Response (200) - **login_parameters** (array) - A list of login parameters for the user across different organizations. - **organization_id** (string) - The ID of the organization. - **organization_name** (string) - The name of the organization. - **organization_type** (string) - The type of the organization (e.g., Vendor). - **organization_use** (string) - The intended use of the organization (e.g., Production). - **cognito_region** (string) - The AWS Cognito region for the organization. - **cognito_user_pool_id** (string) - The AWS Cognito User Pool ID. - **cognito_user_pool_client_id** (string) - The AWS Cognito User Pool Client ID. - **cognito_oauth_domain** (string) - The AWS Cognito OAuth domain. - **cognito_oauth_scopes** (array) - List of OAuth scopes. - **oauth_response_type** (string) - The OAuth response type. - **passkey_enabled** (boolean) - Indicates if passkey authentication is enabled for the organization. ``` -------------------------------- ### Basic Operation Method Usage Source: https://github.com/epilot-dev/docs/blob/main/docs/sdk/client-usage.md Demonstrates how to import the SDK client and make basic API calls for entities and user information. ```APIDOC ## Basic Operation Method Usage Call operation methods directly on the SDK client. The SDK handles client creation, caching, and auth for you. ```ts import { epilot } from '@epilot/sdk' epilot.authorize(() => '') const { data: entity } = await epilot.entity.getEntity({ slug: 'contact', id: '123' }) const { data: user } = await epilot.user.getMe() ``` ```