@epilot/journey-client 0.1.8 → 0.1.9-alpha.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/dist/definition.js +1 -1
- package/dist/openapi.d.ts +20 -10
- package/package.json +5 -4
- package/src/openapi.d.ts +20 -10
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(r(279));t.default=s.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.0","info":{"title":"Journey API","description":"API to configure journeys","version":"1.0.0"},"security":[{"EpilotAuth":[]}],"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","security":[],"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/JourneyResponse"}}}}}},"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":{}}}}},"/v1/journey/products/{id}":{"get":{"operationId":"getJourneyProducts","summary":"getJourneyProducts","description":"Get products available in the journey by id","security":[],"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"}},{"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":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyResponse"}}}}}},"put":{"operationId":"updateJourney","summary":"updateJourney","description":"Update a Journey","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequest"}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyResponse"}}}}}},"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"}}}}}}},"/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"}}}}}}},"/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":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journey"}}}}}},"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/Journey"}}}}}},"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/Journey"}}}}}}},"/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"}},{"name":"source","in":"query","description":"What source ID. Journey or Entity ID","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journey"}}}}}},"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":{}}}}}},"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"},"product_images":{"type":"array"},"legal_footnote":{"type":"string"},"product_downloads":{"type":"array"},"price":{"type":"object"}}}},"PatchUpdateJourneyRequest":{"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}},"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":{}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}}},"required":["theme"],"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}},"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"},"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}},"required":["designId"],"additionalProperties":false},"createdBy":{"type":"string"}},"required":["organizationId","name","steps"],"additionalProperties":true},"JourneyCreationRequestV2":{"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":{}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}}},"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}},"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"},"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}},"additionalProperties":false},"createdBy":{"type":"string"}},"required":["name","steps"],"additionalProperties":true},"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"}},"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","Widget"]}}}}}},"Journey":{"allOf":[{"$ref":"#/components/schemas/JourneyCreationRequest"},{"$ref":"#/components/schemas/JourneyAuditInfo"}]},"JourneyAuditInfo":{"type":"object","properties":{"createdAt":{"type":"string"},"lastModifiedAt":{"type":"string"},"version":{"type":"number"},"revisions":{"type":"number"}},"required":["createdAt","lastModifiedAt","version","revisions"]}},"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}}}}')}},t={};return function r(n){if(t[n])return t[n].exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(914)})());
|
|
1
|
+
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(r(279));t.default=s.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.0","info":{"title":"Journey API","description":"API to configure journeys","version":"1.0.0"},"security":[{"EpilotAuth":[]}],"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","security":[],"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":{}}}}},"/v1/journey/products/{id}":{"get":{"operationId":"getJourneyProducts","summary":"getJourneyProducts","description":"Get products available in the journey by id","security":[],"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"}},{"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"}}}}}},"put":{"operationId":"updateJourney","summary":"updateJourney","description":"Update a Journey","tags":["Journeys"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyCreationRequest"}}},"description":"Payload"},"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyResponse"}}}}}},"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"}}}}}}},"/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"}}}}}}},"/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":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journey"}}}}}},"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/Journey"}}}}}},"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/Journey"}}}}}}},"/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/Journey"}}}}}},"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":{}}}}}},"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"},"product_images":{"type":"array"},"legal_footnote":{"type":"string"},"product_downloads":{"type":"array"},"price":{"type":"object"}}}},"PatchUpdateJourneyRequest":{"type":"object","properties":{"journeyId":{"type":"string","format":"uuid","example":"509cdffe-424f-457a-95c2-9708c304ce77"}},"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":{}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}}},"required":["theme"],"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}},"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"},"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}},"required":["designId"],"additionalProperties":false},"createdBy":{"type":"string"}},"required":["organizationId","name","steps"],"additionalProperties":true},"JourneyCreationRequestV2":{"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":{}},"required":["name","schema","uischema"]}},"design":{"type":"object","properties":{"logoUrl":{"type":"string","nullable":true},"theme":{"type":"object","additionalProperties":{}}},"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}},"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"},"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}},"additionalProperties":false},"createdBy":{"type":"string"}},"required":["name","steps"],"additionalProperties":true},"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"}},"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","Widget"]}}}}}},"Journey":{"allOf":[{"$ref":"#/components/schemas/JourneyCreationRequest"},{"$ref":"#/components/schemas/JourneyAuditInfo"}]},"JourneyAuditInfo":{"type":"object","properties":{"createdAt":{"type":"string"},"lastModifiedAt":{"type":"string"},"version":{"type":"number"},"revisions":{"type":"number"}},"required":["createdAt","lastModifiedAt","version","revisions"]}},"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}}}}')}},t={};return function r(n){if(t[n])return t[n].exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -374,9 +374,23 @@ declare namespace Components {
|
|
|
374
374
|
}
|
|
375
375
|
declare namespace Paths {
|
|
376
376
|
namespace CreateJourney {
|
|
377
|
+
namespace Parameters {
|
|
378
|
+
/**
|
|
379
|
+
* example:
|
|
380
|
+
* true
|
|
381
|
+
*/
|
|
382
|
+
export type SkipAutomation = string; // Yn
|
|
383
|
+
}
|
|
384
|
+
export interface QueryParameters {
|
|
385
|
+
skipAutomation?: /**
|
|
386
|
+
* example:
|
|
387
|
+
* true
|
|
388
|
+
*/
|
|
389
|
+
Parameters.SkipAutomation /* Yn */;
|
|
390
|
+
}
|
|
377
391
|
export type RequestBody = Components.Schemas.JourneyCreationRequest;
|
|
378
392
|
namespace Responses {
|
|
379
|
-
export type $201 = Components.Schemas.
|
|
393
|
+
export type $201 = Components.Schemas.Journey;
|
|
380
394
|
}
|
|
381
395
|
}
|
|
382
396
|
namespace CreateJourneyV2 {
|
|
@@ -407,7 +421,7 @@ declare namespace Paths {
|
|
|
407
421
|
orgId?: Parameters.OrgId;
|
|
408
422
|
}
|
|
409
423
|
namespace Responses {
|
|
410
|
-
export type $200 = Components.Schemas.
|
|
424
|
+
export type $200 = Components.Schemas.Journey;
|
|
411
425
|
}
|
|
412
426
|
}
|
|
413
427
|
namespace GetJourneyProducts {
|
|
@@ -450,7 +464,6 @@ declare namespace Paths {
|
|
|
450
464
|
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
451
465
|
*/
|
|
452
466
|
export type Id = string; // uuid
|
|
453
|
-
export type Source = string;
|
|
454
467
|
}
|
|
455
468
|
export interface PathParameters {
|
|
456
469
|
id: /**
|
|
@@ -459,9 +472,6 @@ declare namespace Paths {
|
|
|
459
472
|
*/
|
|
460
473
|
Parameters.Id /* uuid */;
|
|
461
474
|
}
|
|
462
|
-
export interface QueryParameters {
|
|
463
|
-
source?: Parameters.Source;
|
|
464
|
-
}
|
|
465
475
|
namespace Responses {
|
|
466
476
|
export type $200 = Components.Schemas.Journey;
|
|
467
477
|
}
|
|
@@ -626,7 +636,7 @@ export interface OperationMethods {
|
|
|
626
636
|
* Create a Journey
|
|
627
637
|
*/
|
|
628
638
|
'createJourney'(
|
|
629
|
-
parameters?: Parameters<
|
|
639
|
+
parameters?: Parameters<Paths.CreateJourney.QueryParameters> | null,
|
|
630
640
|
data?: Paths.CreateJourney.RequestBody,
|
|
631
641
|
config?: AxiosRequestConfig
|
|
632
642
|
): OperationResponse<Paths.CreateJourney.Responses.$201>
|
|
@@ -686,7 +696,7 @@ export interface OperationMethods {
|
|
|
686
696
|
* Get journey by id
|
|
687
697
|
*/
|
|
688
698
|
'getJourneyV2'(
|
|
689
|
-
parameters?: Parameters<Paths.GetJourneyV2.PathParameters
|
|
699
|
+
parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
|
|
690
700
|
data?: any,
|
|
691
701
|
config?: AxiosRequestConfig
|
|
692
702
|
): OperationResponse<Paths.GetJourneyV2.Responses.$200>
|
|
@@ -756,7 +766,7 @@ export interface PathsDictionary {
|
|
|
756
766
|
* Create a Journey
|
|
757
767
|
*/
|
|
758
768
|
'post'(
|
|
759
|
-
parameters?: Parameters<
|
|
769
|
+
parameters?: Parameters<Paths.CreateJourney.QueryParameters> | null,
|
|
760
770
|
data?: Paths.CreateJourney.RequestBody,
|
|
761
771
|
config?: AxiosRequestConfig
|
|
762
772
|
): OperationResponse<Paths.CreateJourney.Responses.$201>
|
|
@@ -832,7 +842,7 @@ export interface PathsDictionary {
|
|
|
832
842
|
* Get journey by id
|
|
833
843
|
*/
|
|
834
844
|
'get'(
|
|
835
|
-
parameters?: Parameters<Paths.GetJourneyV2.PathParameters
|
|
845
|
+
parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
|
|
836
846
|
data?: any,
|
|
837
847
|
config?: AxiosRequestConfig
|
|
838
848
|
): OperationResponse<Paths.GetJourneyV2.Responses.$200>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/journey-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9-alpha.0",
|
|
4
4
|
"description": "API Client for epilot Journey API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
"@types/jest": "^26.0.20",
|
|
50
50
|
"axios": "^1.6.5",
|
|
51
51
|
"copy-webpack-plugin": "^7.0.0",
|
|
52
|
-
"jest": "^
|
|
52
|
+
"jest": "^28.1.3",
|
|
53
|
+
"jest-junit": "^16.0.0",
|
|
53
54
|
"json-loader": "^0.5.7",
|
|
54
55
|
"openapi-client-axios-typegen": "^7.5.1",
|
|
55
56
|
"openapicmd": "^2.1.0",
|
|
56
|
-
"ts-jest": "^
|
|
57
|
+
"ts-jest": "^28.0.8",
|
|
57
58
|
"ts-loader": "^8.3.0",
|
|
58
|
-
"ts-node": "^9.1
|
|
59
|
+
"ts-node": "^10.9.1",
|
|
59
60
|
"typescript": "^4.5.4",
|
|
60
61
|
"webpack": "^5.18.0",
|
|
61
62
|
"webpack-cli": "^4.4.0"
|
package/src/openapi.d.ts
CHANGED
|
@@ -374,9 +374,23 @@ declare namespace Components {
|
|
|
374
374
|
}
|
|
375
375
|
declare namespace Paths {
|
|
376
376
|
namespace CreateJourney {
|
|
377
|
+
namespace Parameters {
|
|
378
|
+
/**
|
|
379
|
+
* example:
|
|
380
|
+
* true
|
|
381
|
+
*/
|
|
382
|
+
export type SkipAutomation = string; // Yn
|
|
383
|
+
}
|
|
384
|
+
export interface QueryParameters {
|
|
385
|
+
skipAutomation?: /**
|
|
386
|
+
* example:
|
|
387
|
+
* true
|
|
388
|
+
*/
|
|
389
|
+
Parameters.SkipAutomation /* Yn */;
|
|
390
|
+
}
|
|
377
391
|
export type RequestBody = Components.Schemas.JourneyCreationRequest;
|
|
378
392
|
namespace Responses {
|
|
379
|
-
export type $201 = Components.Schemas.
|
|
393
|
+
export type $201 = Components.Schemas.Journey;
|
|
380
394
|
}
|
|
381
395
|
}
|
|
382
396
|
namespace CreateJourneyV2 {
|
|
@@ -407,7 +421,7 @@ declare namespace Paths {
|
|
|
407
421
|
orgId?: Parameters.OrgId;
|
|
408
422
|
}
|
|
409
423
|
namespace Responses {
|
|
410
|
-
export type $200 = Components.Schemas.
|
|
424
|
+
export type $200 = Components.Schemas.Journey;
|
|
411
425
|
}
|
|
412
426
|
}
|
|
413
427
|
namespace GetJourneyProducts {
|
|
@@ -450,7 +464,6 @@ declare namespace Paths {
|
|
|
450
464
|
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
451
465
|
*/
|
|
452
466
|
export type Id = string; // uuid
|
|
453
|
-
export type Source = string;
|
|
454
467
|
}
|
|
455
468
|
export interface PathParameters {
|
|
456
469
|
id: /**
|
|
@@ -459,9 +472,6 @@ declare namespace Paths {
|
|
|
459
472
|
*/
|
|
460
473
|
Parameters.Id /* uuid */;
|
|
461
474
|
}
|
|
462
|
-
export interface QueryParameters {
|
|
463
|
-
source?: Parameters.Source;
|
|
464
|
-
}
|
|
465
475
|
namespace Responses {
|
|
466
476
|
export type $200 = Components.Schemas.Journey;
|
|
467
477
|
}
|
|
@@ -626,7 +636,7 @@ export interface OperationMethods {
|
|
|
626
636
|
* Create a Journey
|
|
627
637
|
*/
|
|
628
638
|
'createJourney'(
|
|
629
|
-
parameters?: Parameters<
|
|
639
|
+
parameters?: Parameters<Paths.CreateJourney.QueryParameters> | null,
|
|
630
640
|
data?: Paths.CreateJourney.RequestBody,
|
|
631
641
|
config?: AxiosRequestConfig
|
|
632
642
|
): OperationResponse<Paths.CreateJourney.Responses.$201>
|
|
@@ -686,7 +696,7 @@ export interface OperationMethods {
|
|
|
686
696
|
* Get journey by id
|
|
687
697
|
*/
|
|
688
698
|
'getJourneyV2'(
|
|
689
|
-
parameters?: Parameters<Paths.GetJourneyV2.PathParameters
|
|
699
|
+
parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
|
|
690
700
|
data?: any,
|
|
691
701
|
config?: AxiosRequestConfig
|
|
692
702
|
): OperationResponse<Paths.GetJourneyV2.Responses.$200>
|
|
@@ -756,7 +766,7 @@ export interface PathsDictionary {
|
|
|
756
766
|
* Create a Journey
|
|
757
767
|
*/
|
|
758
768
|
'post'(
|
|
759
|
-
parameters?: Parameters<
|
|
769
|
+
parameters?: Parameters<Paths.CreateJourney.QueryParameters> | null,
|
|
760
770
|
data?: Paths.CreateJourney.RequestBody,
|
|
761
771
|
config?: AxiosRequestConfig
|
|
762
772
|
): OperationResponse<Paths.CreateJourney.Responses.$201>
|
|
@@ -832,7 +842,7 @@ export interface PathsDictionary {
|
|
|
832
842
|
* Get journey by id
|
|
833
843
|
*/
|
|
834
844
|
'get'(
|
|
835
|
-
parameters?: Parameters<Paths.GetJourneyV2.PathParameters
|
|
845
|
+
parameters?: Parameters<Paths.GetJourneyV2.PathParameters> | null,
|
|
836
846
|
data?: any,
|
|
837
847
|
config?: AxiosRequestConfig
|
|
838
848
|
): OperationResponse<Paths.GetJourneyV2.Responses.$200>
|