@epilot/journey-client 0.5.1 → 0.5.3

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 epilot GmbH
3
+ Copyright (c) 2026 epilot GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/client.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
@@ -1 +1 @@
1
- (()=>{"use strict";var e={799:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(r(871));t.default=o.default},871:e=>{e.exports=JSON.parse('{"openapi":"3.0.0","info":{"title":"Journey API","description":"API to configure journeys","version":"1.4.0"},"security":[{"EpilotAuth":[]}],"tags":[{"name":"Journeys","description":"Journey operations"},{"name":"Journeys V2","description":"Journey V2 operations"},{"name":"journey_schema","x-displayName":"Journey","description":"<SchemaDefinition schemaRef=\\"#/components/schemas/Journey\\" />\\n"}],"x-tagGroups":[{"name":"APIs","tags":["Journeys","Journeys V2"]},{"name":"Schemas","tags":["journey_schema"]}],"paths":{"/v1/journey/organization/{id}":{"get":{"operationId":"getJourneysByOrgId","summary":"getJourneysByOrgId","description":"Get all journeys by organization id","tags":["Journeys"],"parameters":[{"name":"id","in":"path","description":"Organization ID","required":true,"schema":{"type":"string","example":"123"}},{"name":"hydrate","in":"query","description":"Hydrate","required":false,"schema":{"type":"string","example":"true"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJourneysResponse"}}}}}}},"/v1/journey/configuration/{id}":{"get":{"operationId":"getJourney","summary":"getJourney","description":"Get journey by id. Private journeys requires valid private token to be passed","security":[{},{"EpilotAuth":[]},{"PortalAuth":[]}],"tags":["Journeys"],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}},{"name":"source","in":"query","description":"What source ID. Journey or Entity ID","required":false,"schema":{"type":"string"}},{"name":"orgId","in":"query","description":"Organization ID","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journey"}}}}}},"delete":{"operationId":"removeJourney","summary":"removeJourney","description":"Remove journey by id","tags":["Journeys"],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}}],"responses":{"200":{"description":"Success","content":{}},"404":{"description":"Journey not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"journey not found"}}}}}}}}},"/v1/journey/products/{id}":{"get":{"operationId":"getJourneyProducts","summary":"getJourneyProducts","description":"Get products available in the journey by id. requires public journey token to be passed.","security":[{"EpilotAuth":[]}],"tags":["Journeys"],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}},{"name":"source","in":"query","description":"What source ID. Journey or Entity ID","required":false,"schema":{"type":"string"}},{"name":"postal_code","in":"query","description":"Zip Code for availibility","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","description":"city for availibility","required":false,"schema":{"type":"string"}},{"name":"street","in":"query","description":"street name for availibility","required":false,"schema":{"type":"string"}},{"name":"street_number","in":"query","description":"street number for availibility","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyProductsResponse"}}}}}}},"/v1/journey/configuration":{"post":{"operationId":"createJourney","summary":"createJourney","description":"Create a Journey","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequest"}}},"description":"Payload"},"parameters":[{"name":"skipAutomation","in":"query","description":"skip creating an Automation (it takes Yn format \\"true, yes, 1, y\\")","required":false,"schema":{"type":"string","format":"Yn","example":"true"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journey"}}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}}}},"put":{"operationId":"updateJourney","summary":"updateJourney","description":"Update a Journey","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequest"}}},"description":"Payload"},"parameters":[],"responses":{"204":{"description":"Success","headers":{"X-Resource-Revisions":{"schema":{"type":"integer","minimum":0},"description":"Last revisions number of the updated resource"}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}},"409":{"description":"The Journey has been modified since your last read, please refresh it and try again"}}},"patch":{"operationId":"patchUpdateJourney","summary":"patchUpdateJourney","description":"Update a Journey (partially / patch). Support for nested properties updates (e.g. \\"property[0].name\\").","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchUpdateJourneyRequest"},"example":{"journeyId":"509cdffe-424f-457a-95c2-9708c304ce77","name":"New Journey Name","steps[0].uischema.elements[0].products":["123456","654321"]}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyResponse"}}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}},"404":{"description":"Journey or associated entity not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"journey not found"}}}}}}}}},"/v1/journey/configuration/search":{"post":{"operationId":"searchJourneys","summary":"searchJourneys","description":"Search Journeys","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchJourneysQueryRequest"}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchJourneysResponse"}}}}}}},"/v1/journey/document:generate":{"post":{"operationId":"generateDocument","summary":"generateDocument","description":"Builds document generated from a template with journey values.\\"\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n- .docx but limited to only text based variables\\n\\nUses [Document API](https://gitlab.com/e-pilot/product/file-management/document-api) to generate the document.\\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\\n","security":[{},{"EpilotAuth":[]}],"tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDocumentRequest"}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDocumentResponse"}}}}}}},"/v2/journey/configuration":{"post":{"operationId":"createJourneyV2","summary":"createJourneyV2","description":"Create a Journey","tags":["Journeys V2"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}},"description":"Payload"},"parameters":[{"name":"skipAutomation","in":"query","description":"skip creating an Automation (it takes Yn format \\"true, yes, 1, y\\")","required":false,"schema":{"type":"string","format":"Yn","example":"true"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}}}},"put":{"operationId":"updateJourneyV2","summary":"updateJourneyV2","description":"Update a Journey","tags":["Journeys V2"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}},"404":{"description":"Journey or associated entity not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"journey not found"}}}}}}}},"patch":{"operationId":"patchUpdateJourneyV2","summary":"patchUpdateJourneyV2","description":"Update a Journey (partially / patch). Support for nested properties updates (e.g. \\"property[0].name\\").","tags":["Journeys V2"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchUpdateJourneyRequest"},"example":{"journeyId":"509cdffe-424f-457a-95c2-9708c304ce77","name":"New Journey Name","steps[0].uischema.elements[0].products":["123456","654321"]}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}}},"400":{"description":"Validation failed (when validation mode is STRICT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyValidationError"}}}},"404":{"description":"Journey or associated entity not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"journey not found"}}}}}}}}},"/v2/journey/configuration/{id}":{"get":{"operationId":"getJourneyV2","summary":"getJourneyV2","description":"Get journey by id","security":[],"tags":["Journeys V2"],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequestV2"}}}}}},"delete":{"operationId":"removeJourneyV2","summary":"removeJourneyV2","description":"Remove journey by id","tags":["Journeys V2"],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}}],"responses":{"200":{"description":"Success","content":{}}}}},"/v1/journey/{id}/settings":{"get":{"operationId":"getSettingsForJourney","summary":"getSettingsForJourney","description":"Get settings related to the journey using journey ID.","tags":["Journeys"],"security":[{}],"parameters":[{"name":"id","in":"path","description":"Journey ID","required":true,"schema":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSettingsForJourney"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"journey not found"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unknown API Error"}}}}}}}}},"/v1/journey/button-options":{"get":{"operationId":"getButtonOptions","summary":"getButtonOptions","description":"Get button options from a csv file.","security":[{"EpilotAuth":[]}],"tags":["Journeys"],"parameters":[{"in":"query","name":"fileId","required":true,"description":"file id to get button options from","schema":{"type":"string","example":"535ef74a-dd66-4d01-94a9-725016e70d1c"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ButtonOption"}}}}},"400":{"description":"Bad Request - Invalid file or content","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"UTF-8 encoding error while processing CSV content"},"details":{"type":"string","example":"Please ensure your CSV file is properly encoded in UTF-8 format"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"File with ID 535ef74a-dd66-4d01-94a9-725016e70d1c not found."}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Unknown API Error"}}}}}}}}}},"components":{"schemas":{"GetJourneysResponse":{"type":"object"},"JourneyResponse":{"type":"object","properties":{"createdJourney":{"$ref":"#/components/schemas/Journey"}}},"JourneyProductsResponse":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"_schema":{"type":"string"},"_title":{"type":"string"},"name":{"type":"string"},"_id":{"type":"string"},"_org":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"feature":{"type":"array","items":{}},"product_images":{"type":"array","items":{}},"legal_footnote":{"type":"string"},"product_downloads":{"type":"array","items":{}},"price":{"type":"object"}}}},"PatchUpdateJourneyRequest":{"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"},"__lastModifiedAt":{"type":"string","description":"If passed with value of null, the API won\'t modify the lastModifiedAt field on updating the journey","nullable":true}},"additionalProperties":true,"description":"Patch request to update a journey (journey id is required) Support for nested properties (e.g. steps[0].uischema.elements[0].products) is supported.\\n","required":["journeyId"]},"JourneyCreationRequest":{"type":"object","properties":{"journeyId":{"type":"string"},"organizationId":{"type":"string"},"brandId":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"showStepName":{"type":"boolean","nullable":true},"title":{"type":"string","nullable":true},"subTitle":{"type":"string","nullable":true},"showStepSubtitle":{"type":"boolean","nullable":true},"showStepper":{"type":"boolean","nullable":true},"showStepperLabels":{"type":"boolean","nullable":true},"hideNextButton":{"type":"boolean","nullable":true},"name":{"type":"string"},"stepId":{"type":"string"},"schema":{},"uischema":{},"maxWidth":{"type":"string","enum":["small","medium","large","extra large"]}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}},"designTokens":{"type":"object"}},"additionalProperties":false},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["inject","injectWithKey"]},"sourceType":{"type":"string","enum":["journey","step","block"]},"source":{"type":"string"},"target":{"type":"string"}},"required":["type","sourceType","source","target"],"additionalProperties":false}},"logics":{"type":"array","items":{"type":"object","properties":{"autoGeneratedId":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"type":"string"}}},"required":["conditions","actions"],"additionalProperties":false}},"logicsV4":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for logic. Use uuidv7"},"protected":{"type":"boolean","description":"If true, logic can\'t be manipulated by the configuring user"},"action":{"type":"string","description":"Indicates which action to take in case logic evaluates to true"},"triggeredOn":{"type":"string","description":"Indicates when the logic should be evaluated"},"conditions":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","description":"Operator to be applied between the fact value and the value"},"functionName":{"type":"string","description":"If operator is a custom function, this needs to be provided"},"fact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for a fact"},"referenceType":{"type":"string","description":"Indicates reference type (block or context parameter)"},"referenceId":{"type":"string","description":"Id of the reference"},"path":{"type":"string","description":"Path to a property. Used if only part of the value is needed"},"meaning":{"type":"string","description":"If path is a reference, indicates the intention of it"}}},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}}]},"args":{"type":"object"}}}}},"settings":{"type":"object","description":"Logic specific settings. Will vary by type of logic"}}}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the context schema item"},"type":{"type":"string","description":"Type of the parameter. It could be either an entity slug, or a text"},"paramKey":{"type":"string","description":"Expected key to be received in the context"},"isRequired":{"type":"boolean","description":"Indicates if a value is expected to be provided"},"shouldLoadEntity":{"type":"boolean","description":"If type is not text, we can instruct the journey to fetch the entity id we receive as value"}},"required":["paramKey","type"],"additionalProperties":false}},"journey_type":{"type":"string","description":"Journey Template","example":"Sales template (Premium)"},"settings":{"type":"object","properties":{"embedOptions":{"type":"object","properties":{"mode":{"type":"string","enum":["full-screen","inline"]},"lang":{"type":"string","enum":["de","en","fr"]},"width":{"type":"string"},"topBar":{"type":"boolean"},"scrollToTop":{"type":"boolean"},"button":{"type":"object","properties":{"text":{"type":"string","nullable":true},"align":{"type":"string","enum":["left","center","right"]}}}}},"safeModeAutomation":{"type":"boolean"},"canary":{"deprecated":true,"description":"DEPRECATED - This API will return hardcoded value of false. Please note that this field is internal to epilot and should not be used by external clients. If you wish to get the canary flag, please use the /v1/journey/{id}/settings API.","type":"boolean"},"designId":{"type":"string"},"templateId":{"type":"string"},"entityId":{"type":"string","nullable":true},"mappingsAutomationId":{"type":"string"},"targetedCustomer":{"type":"string"},"description":{"type":"string","nullable":true},"organizationSettings":{"type":"object","additionalProperties":{"type":"boolean"},"nullable":true},"publicToken":{"type":"string","nullable":true},"runtimeEntities":{"type":"array","items":{"type":"string","enum":["ORDER","OPPORTUNITY"]}},"filePurposes":{"type":"array","items":{"type":"string"}},"entityTags":{"type":"array","items":{"type":"string"}},"addressSuggestionsFileUrl":{"type":"string","nullable":true,"deprecated":true,"description":"@deprecated Use addressSuggestionsFileId instead"},"addressSuggestionsFileId":{"type":"string","nullable":true},"addressSuggestionsCountryCode":{"type":"string","nullable":true,"description":"Country code for address format (e.g. DE, AT, CH, LU)"},"addressSuggestionsEnableAutoComplete":{"type":"boolean","description":"Whether address auto-complete is enabled"},"addressSuggestionsSource":{"type":"array","items":{"type":"string"},"description":"Sources for address auto-complete (e.g. deutschePostService, customAddressesFile)"},"addressSuggestionsEnableFreeText":{"type":"boolean","description":"Whether free text input is allowed when auto-complete is on"},"useNewDesign":{"type":"boolean","deprecated":true,"description":"This property is deprecated and will be removed in a future version"},"useAustrianLabels":{"type":"boolean","description":"If true, some journey input labels are in Austrian format"},"enableDarkMode":{"type":"boolean","description":"If true, the journey shows an icon to toggle dark mode"},"accessMode":{"type":"string","enum":["PUBLIC","PRIVATE"]},"isPublished":{"type":"boolean"},"status":{"type":"string"},"isActive":{"type":"boolean"},"savingProgress":{"type":"object","properties":{"savingMode":{"type":"string","enum":["auto","local","remote","none"]},"supportedVersion":{"type":"number"}}},"thirdPartyCookies":{"type":"boolean","description":"If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent."}},"required":["designId"],"additionalProperties":false},"validationRules":{"$ref":"#/components/schemas/ValidationRuleRef"},"createdBy":{"type":"string"},"updatedBy":{"type":"string","nullable":true},"__lastModifiedAt":{"type":"string","description":"If passed with value of null, the API won\'t modify the lastModifiedAt field on updating the journey","nullable":true}},"required":["organizationId","name","steps"],"additionalProperties":true},"JourneyCreationRequestV2":{"type":"object","properties":{"journeyId":{"type":"string"},"brandId":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"showStepName":{"type":"boolean","nullable":true},"title":{"type":"string","nullable":true},"subTitle":{"type":"string","nullable":true},"showStepSubtitle":{"type":"boolean","nullable":true},"showStepper":{"type":"boolean","nullable":true},"showStepperLabels":{"type":"boolean","nullable":true},"hideNextButton":{"type":"boolean","nullable":true},"name":{"type":"string"},"stepId":{"type":"string"},"schema":{},"uischema":{},"maxWidth":{"type":"string","enum":["small","medium","large","extra large"]}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}},"designTokens":{"type":"object"}},"additionalProperties":false},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["inject","injectWithKey"]},"sourceType":{"type":"string","enum":["journey","step","block"]},"source":{"type":"string"},"target":{"type":"string"}},"required":["type","sourceType","source","target"],"additionalProperties":false}},"logics":{"type":"array","items":{"type":"object","properties":{"autoGeneratedId":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"type":"string"}}},"required":["conditions","actions"],"additionalProperties":false}},"logicsV4":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for logic. Use uuidv7"},"protected":{"type":"boolean","description":"If true, logic can\'t be manipulated by the configuring user"},"action":{"type":"string","description":"Indicates which action to take in case logic evaluates to true"},"triggeredOn":{"type":"string","description":"Indicates when the logic should be evaluated"},"conditions":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","description":"Operator to be applied between the fact value and the value"},"functionName":{"type":"string","description":"If operator is a custom function, this needs to be provided"},"fact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for a fact"},"referenceType":{"type":"string","description":"Indicates reference type (block or context parameter)"},"referenceId":{"type":"string","description":"Id of the reference"},"path":{"type":"string","description":"Path to a property. Used if only part of the value is needed"},"meaning":{"type":"string","description":"If path is a reference, indicates the intention of it"}}},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}}]},"args":{"type":"object"}}}}},"settings":{"type":"object","description":"Logic specific settings. Will vary by type of logic"}}}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the context schema item"},"type":{"type":"string","description":"Type of the parameter. It could be either an entity slug, or a text"},"paramKey":{"type":"string","description":"Expected key to be received in the context"},"isRequired":{"type":"boolean","description":"Indicates if a value is expected to be provided"},"shouldLoadEntity":{"type":"boolean","description":"If type is not text, we can instruct the journey to fetch the entity id we receive as value"}},"required":["paramKey","type"],"additionalProperties":false}},"journey_type":{"type":"string","description":"Journey Template","example":"Sales template (Premium)"},"settings":{"type":"object","properties":{"embedOptions":{"type":"object","properties":{"mode":{"type":"string","enum":["full-screen","inline"]},"lang":{"type":"string","enum":["de","en","fr"]},"width":{"type":"string"},"topBar":{"type":"boolean"},"scrollToTop":{"type":"boolean"},"button":{"type":"object","properties":{"text":{"type":"string","nullable":true},"align":{"type":"string","enum":["left","center","right"]}}}}},"safeModeAutomation":{"type":"boolean"},"designId":{"type":"string"},"entityId":{"type":"string","nullable":true},"mappingsAutomationId":{"type":"string"},"templateId":{"type":"string"},"targetedCustomer":{"type":"string"},"description":{"type":"string","nullable":true},"publicToken":{"type":"string","nullable":true},"runtimeEntities":{"type":"array","items":{"type":"string","enum":["ORDER","OPPORTUNITY"]}},"filePurposes":{"type":"array","items":{"type":"string"}},"entityTags":{"type":"array","items":{"type":"string"}},"addressSuggestionsFileUrl":{"type":"string","nullable":true,"deprecated":true,"description":"@deprecated Use addressSuggestionsFileId instead"},"addressSuggestionsFileId":{"type":"string","nullable":true},"addressSuggestionsCountryCode":{"type":"string","nullable":true,"description":"Country code for address format (e.g. DE, AT, CH, LU)"},"addressSuggestionsEnableAutoComplete":{"type":"boolean","description":"Whether address auto-complete is enabled"},"addressSuggestionsSource":{"type":"array","items":{"type":"string"},"description":"Sources for address auto-complete (e.g. deutschePostService, customAddressesFile)"},"addressSuggestionsEnableFreeText":{"type":"boolean","description":"Whether free text input is allowed when auto-complete is on"},"useNewDesign":{"type":"boolean","deprecated":true,"description":"This property is deprecated and will be removed in a future version"},"thirdPartyCookies":{"type":"boolean","description":"If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent."},"accessMode":{"type":"string","enum":["PUBLIC","PRIVATE"]},"enableDarkMode":{"type":"boolean","description":"If true, the journey shows an icon to toggle dark mode"}},"additionalProperties":false},"validationRules":{"$ref":"#/components/schemas/ValidationRuleRef"},"_manifest":{"type":"array","description":"Manifest/Blueprint ID used to create/update the entity","items":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["name","steps"]},"SearchJourneysQueryRequest":{"type":"object","properties":{"q":{"type":"string","description":"Lucene query syntax\\nSee https://lucene.apache.org/core/2_9_4/queryparsersyntax.html ; https://www.elastic.co/guide/en/kibana/current/lucene-query.html\\n","example":"_tags:*Flex*","default":"*"},"from":{"type":"integer","description":"The offset of the first result to return.\\nSee https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html\\n","example":0,"default":0},"size":{"type":"integer","description":"The maximum number of results to return.\\nSee https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html\\n","example":25,"default":25},"sort":{"type":"string","description":"The sort order. Follows Lucene syntax.\\n","example":"_created_at:desc","default":"_created_at:desc"}}},"SearchJourneysResponse":{"type":"object","properties":{"hits":{"type":"number","description":"The total number of hits.\\n","example":1},"results":{"type":"array","description":"The results.\\n","items":{"type":"object","properties":{"_id":{"type":"string","description":"Journey Entity ID","format":"uuid","example":"e0f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"},"_schema":{"type":"string","description":"Entity Schema (journey always in this case)","example":"journey"},"_title":{"type":"string","description":"Journey Entity Title","example":"Journey Entity Title"},"_org":{"type":"string","description":"Organization ID","example":"739224"},"_created_at":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00.000Z"},"_updated_at":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00.000Z"},"_tags":{"type":"array","items":{"type":"string","example":"Flex"}},"_manifest":{"type":"array","description":"Manifest ID used to create/update the entity","items":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"}},"journey_name":{"type":"string","description":"Journey Name","example":"Journey Name"},"journey_id":{"type":"string","format":"uuid","description":"Journey config ID","example":"de7df470-253e-11ed-9174-116b8a718c0a"},"journey_type":{"type":"string","description":"Journey Template","example":"Sales template"},"design":{"type":"string","description":"Journey Design Name","example":"Design EPILOT"},"created_by":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User ID","example":"12345"}}}},"journey_version":{"type":"string","description":"Journey Version","enum":["Flex"]}}}}}},"Journey":{"allOf":[{"$ref":"#/components/schemas/JourneyCreationRequest"},{"$ref":"#/components/schemas/JourneyAuditInfo"},{"$ref":"#/components/schemas/JourneyFeatureFlags"}]},"JourneyFeatureFlags":{"type":"object","properties":{"featureFlags":{"type":"object","additionalProperties":true}}},"JourneyAuditInfo":{"type":"object","properties":{"createdAt":{"type":"string"},"lastModifiedAt":{"type":"string"},"deletedAt":{"type":"string"},"version":{"type":"number"},"revisions":{"type":"number"}},"required":["createdAt","lastModifiedAt","version","revisions"]},"JourneyValidationResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the journey configuration is valid"},"errors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Pattern type (e.g. PatternA_DotsInStepId)"},"severity":{"type":"string","enum":["critical","high","medium","low"]},"message":{"type":"string"},"affectedStepIds":{"type":"array","items":{"type":"string"}},"count":{"type":"integer"},"autoFix":{"type":"object","properties":{"feasible":{"type":"boolean"},"confidence":{"type":"string","enum":["high","medium","low"]},"reason":{"type":"string"},"details":{"type":"string"}}}}},"description":"List of detected validation errors"},"warnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}},"description":"List of warnings (non-critical issues)"}},"required":["valid","errors"]},"JourneyValidationError":{"type":"object","properties":{"error":{"type":"string","example":"ValidationError","description":"Error type identifier"},"message":{"type":"string","example":"Journey configuration validation failed","description":"High-level error message"},"details":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","description":"Validation pattern that failed"},"severity":{"type":"string","enum":["critical","high","medium","low"]},"message":{"type":"string","description":"Detailed error message"},"count":{"type":"integer","description":"Number of issues found"}}},"description":"Detailed validation errors for each pattern that failed"}},"required":["error","message","details"]},"S3Reference":{"type":"object","properties":{"bucket":{"type":"string","example":"document-api-prod"},"key":{"type":"string","example":"uploads/my-template.pdf"}},"required":["bucket","key"]},"TemplateSettings":{"type":"object","description":"Template Settings for document generation","properties":{"custom_margins":{"description":"Custom margins for the document","type":"object","properties":{"top":{"description":"Top margin in cm","type":"number","example":2.54},"bottom":{"description":"Bottom margin in cm","type":"number","example":2.54}}},"suggested_margins":{"description":"Suggested margins for the document","type":"object","properties":{"top":{"description":"Top margin in cm","type":"number","example":2.54},"bottom":{"description":"Bottom margin in cm","type":"number","example":2.54}}},"display_margin_guidelines":{"description":"Display margin guidelines (applicable to partial generation only)","type":"boolean","example":true},"enable_data_table_margin_autofix":{"description":"Enable data table margin autofix","type":"boolean","example":false},"template_with_datatable":{"description":"A flag that indicates whether the template has 1 or more data tables in it","type":"boolean","example":false},"enabled_template_settings_persistence":{"description":"Enables the persistance of template settings","type":"boolean","example":false},"misconfigured_margins":{"description":"An indication that the page margins are misconfigured","type":"boolean","example":false},"file_entity_id":{"description":"The file entity id, used when persisting a new template version with updated settings","type":"string","format":"uuid","example":"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"}}},"GenerateDocumentResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"job_status":{"description":"Status of the job","type":"string","enum":["STARTED","PROCESSING","SUCCESS","FAILED"]},"message":{"description":"A message explaining the progress","type":"string"},"pdf_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for PDF preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for PDF","type":"string","example":"my-template-OR-001.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}},"docx_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for DOCX preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for DOCX","type":"string","example":"my-template-OR-001.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.docx"}}}}},"variable_payload":{"description":"List of variables and its corresponding replaced values from the document template","type":"object","properties":{"additionalProperties":{"type":"string"}}},"template_settings":{"$ref":"#/components/schemas/TemplateSettings"}}},"GenerateDocumentRequest":{"type":"object","properties":{"file_id":{"description":"Entity id for the template being used","type":"string","example":"1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"},"context_data":{"description":"Custom values for variables in the template. Takes the higher precedence than others.","type":"object","properties":{"additionalProperties":{"type":"string"}}},"language":{"description":"Language code for the document","type":"string","example":"de"}},"required":["file_id","context_data"]},"GetSettingsForJourney":{"type":"object","properties":{"organizationId":{"type":"string","description":"ID of an organization in epilot platform","example":"739224"},"canary":{"type":"boolean","description":"The canary flag controls update frequency of epilot application: when true, customers receive continuous updates; when false, they only get updates with new version releases.","example":true},"thirdPartyCookies":{"type":"boolean","description":"When set to false, third-party cookies and resources should be completely disabled to comply with GDPR regulations.","example":true}}},"ButtonOption":{"type":"object","description":"A single button option data","properties":{"value":{"type":"string","example":"Button Hidden Value","description":"The value of the button"},"label":{"type":"string","example":"Button Label","description":"The label of the button"}}},"ValidationRuleRef":{"type":"object","description":"References to validation rules organized by blocks and fields.\\nMaps block IDs to either rule IDs (for block-level rules) or rule references (for field-level rules).\\n","additionalProperties":{"oneOf":[{"type":"string","description":"Rule ID for block-level validation"},{"$ref":"#/components/schemas/RuleRef"}]},"example":{"block1":"rule123","block2":{"field1":"rule456","field2":"rule789"}}},"RuleRef":{"type":"object","description":"Field-level rule references within a block.\\nMaps field names to rule IDs.\\n","additionalProperties":{"type":"string","description":"Rule ID for field-level validation"},"example":{"firstName":"rule123","lastName":"rule456","email":"rule789"}}},"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Authorization Bearer Token - public access token / user token","bearerFormat":"JWT"},"PortalAuth":{"type":"http","scheme":"bearer","description":"Portal Authorization Bearer Token","bearerFormat":"JWT"}}},"servers":[{"url":"https://journey-config.sls.epilot.io"}]}')}},t={},r=function r(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}(799),i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={223(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.0","info":{"title":"","version":""},"paths":{"/v1/journey/organization/{id}":{"get":{"operationId":"getJourneysByOrgId","parameters":[{"name":"id","in":"path","required":true},{"name":"hydrate","in":"query","required":false}],"responses":{}}},"/v1/journey/configuration/{id}":{"get":{"operationId":"getJourney","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query","required":false},{"name":"source","in":"query","required":false},{"name":"orgId","in":"query","required":false}],"responses":{}},"delete":{"operationId":"removeJourney","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/products/{id}":{"get":{"operationId":"getJourneyProducts","parameters":[{"name":"id","in":"path","required":true},{"name":"source","in":"query","required":false},{"name":"postal_code","in":"query","required":false},{"name":"city","in":"query","required":false},{"name":"street","in":"query","required":false},{"name":"street_number","in":"query","required":false}],"responses":{}}},"/v1/journey/configuration":{"post":{"operationId":"createJourney","requestBody":{"content":{"application/json":{}}},"parameters":[{"name":"skipAutomation","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateJourney","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}},"patch":{"operationId":"patchUpdateJourney","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v1/journey/configuration/search":{"post":{"operationId":"searchJourneys","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v1/journey/document:generate":{"post":{"operationId":"generateDocument","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/journey/configuration":{"post":{"operationId":"createJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[{"name":"skipAutomation","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}},"patch":{"operationId":"patchUpdateJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v2/journey/configuration/{id}":{"get":{"operationId":"getJourneyV2","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query","required":false}],"responses":{}},"delete":{"operationId":"removeJourneyV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/{id}/settings":{"get":{"operationId":"getSettingsForJourney","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/button-options":{"get":{"operationId":"getButtonOptions","parameters":[{"in":"query","name":"fileId","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://journey-config.sls.epilot.io"}]}')}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(223),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -271,6 +269,14 @@ declare namespace Components {
271
269
  * Sales template (Premium)
272
270
  */
273
271
  journey_type?: string;
272
+ /**
273
+ * If true, journey is displayed in read-only mode
274
+ */
275
+ protected?: boolean;
276
+ /**
277
+ * Whitelist of paths that remain editable when the journey is protected. Supports wildcard patterns (e.g. steps/*​/blocks/**).
278
+ */
279
+ protectedEditable?: string[];
274
280
  settings?: {
275
281
  embedOptions?: {
276
282
  mode?: "full-screen" | "inline";
@@ -361,6 +367,10 @@ declare namespace Components {
361
367
  * }
362
368
  */
363
369
  ValidationRuleRef;
370
+ /**
371
+ * Manifest/Blueprint ID used to create/update the entity
372
+ */
373
+ _manifest?: string /* uuid */[];
364
374
  createdBy?: string;
365
375
  updatedBy?: string | null;
366
376
  /**
@@ -515,6 +525,14 @@ declare namespace Components {
515
525
  * Sales template (Premium)
516
526
  */
517
527
  journey_type?: string;
528
+ /**
529
+ * If true, journey is displayed in read-only mode
530
+ */
531
+ protected?: boolean;
532
+ /**
533
+ * Whitelist of paths that remain editable when the journey is protected. Supports wildcard patterns (e.g. steps/*​/blocks/**).
534
+ */
535
+ protectedEditable?: string[];
518
536
  settings?: {
519
537
  embedOptions?: {
520
538
  mode?: "full-screen" | "inline";
@@ -605,6 +623,10 @@ declare namespace Components {
605
623
  * }
606
624
  */
607
625
  ValidationRuleRef;
626
+ /**
627
+ * Manifest/Blueprint ID used to create/update the entity
628
+ */
629
+ _manifest?: string /* uuid */[];
608
630
  createdBy?: string;
609
631
  updatedBy?: string | null;
610
632
  /**
@@ -742,6 +764,14 @@ declare namespace Components {
742
764
  * Sales template (Premium)
743
765
  */
744
766
  journey_type?: string;
767
+ /**
768
+ * If true, journey is displayed in read-only mode
769
+ */
770
+ protected?: boolean;
771
+ /**
772
+ * Whitelist of paths that remain editable when the journey is protected. Supports wildcard patterns (e.g. steps/*​/blocks/**).
773
+ */
774
+ protectedEditable?: string[];
745
775
  settings?: {
746
776
  embedOptions?: {
747
777
  mode?: "full-screen" | "inline";
@@ -799,6 +829,7 @@ declare namespace Components {
799
829
  * If true, the journey shows an icon to toggle dark mode
800
830
  */
801
831
  enableDarkMode?: boolean;
832
+ isActive?: boolean;
802
833
  };
803
834
  validationRules?: /**
804
835
  * References to validation rules organized by blocks and fields.
@@ -1280,6 +1311,7 @@ declare namespace Paths {
1280
1311
  export type Id = string; // uuid
1281
1312
  export type OrgId = string;
1282
1313
  export type Source = string;
1314
+ export type Version = number;
1283
1315
  }
1284
1316
  export interface PathParameters {
1285
1317
  id: /**
@@ -1289,6 +1321,7 @@ declare namespace Paths {
1289
1321
  Parameters.Id /* uuid */;
1290
1322
  }
1291
1323
  export interface QueryParameters {
1324
+ version?: Parameters.Version;
1292
1325
  source?: Parameters.Source;
1293
1326
  orgId?: Parameters.OrgId;
1294
1327
  }
@@ -1334,6 +1367,7 @@ declare namespace Paths {
1334
1367
  * 509cdffe-424f-457a-95c2-9708c304ce77
1335
1368
  */
1336
1369
  export type Id = string; // uuid
1370
+ export type Version = number;
1337
1371
  }
1338
1372
  export interface PathParameters {
1339
1373
  id: /**
@@ -1342,6 +1376,9 @@ declare namespace Paths {
1342
1376
  */
1343
1377
  Parameters.Id /* uuid */;
1344
1378
  }
1379
+ export interface QueryParameters {
1380
+ version?: Parameters.Version;
1381
+ }
1345
1382
  namespace Responses {
1346
1383
  export type $200 = Components.Schemas.JourneyCreationRequestV2;
1347
1384
  }
@@ -1658,7 +1695,7 @@ export interface OperationMethods {
1658
1695
  * Get journey by id
1659
1696
  */
1660
1697
  'getJourneyV2'(
1661
- parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
1698
+ parameters?: Parameters<Paths.GetJourneyV2.QueryParameters & Paths.GetJourneyV2.PathParameters> | null,
1662
1699
  data?: any,
1663
1700
  config?: AxiosRequestConfig
1664
1701
  ): OperationResponse<Paths.GetJourneyV2.Responses.$200>
@@ -1847,7 +1884,7 @@ export interface PathsDictionary {
1847
1884
  * Get journey by id
1848
1885
  */
1849
1886
  'get'(
1850
- parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
1887
+ parameters?: Parameters<Paths.GetJourneyV2.QueryParameters & Paths.GetJourneyV2.PathParameters> | null,
1851
1888
  data?: any,
1852
1889
  config?: AxiosRequestConfig
1853
1890
  ): OperationResponse<Paths.GetJourneyV2.Responses.$200>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/journey-client",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "API Client for epilot Journey API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "keywords": [],
24
24
  "author": "epilot GmbH",
25
- "license": "UNLICENSED",
25
+ "license": "MIT",
26
26
  "peerDependencies": {
27
27
  "axios": "^1.0.0 || >=0.25.0 <1.0.0"
28
28
  },
@@ -41,7 +41,7 @@
41
41
  "copy-webpack-plugin": "^7.0.0",
42
42
  "json-loader": "^0.5.7",
43
43
  "openapi-client-axios-typegen": "^7.5.1",
44
- "openapicmd": "^2.7.0",
44
+ "openapicmd": "^2.9.2",
45
45
  "ts-loader": "^8.3.0",
46
46
  "typescript": "^5.4.5",
47
47
  "vitest": "^1.6.0",
@@ -53,7 +53,7 @@
53
53
  "typescript": "tsc",
54
54
  "bundle-definition": "webpack",
55
55
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/journey-config.yaml",
56
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
56
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
57
57
  "build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
58
58
  "eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml"
59
59
  }