@epilot/journey-client 0.2.4 → 0.3.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 +244 -7
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={187:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(871));t.default=n.default},871: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":[{"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"}}}}}},"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"}}}}}},"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"}}}}}}},"/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":{}}}}}},"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"},"__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":{}},"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}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"paramKey":{"type":"string"},"isRequired":{"type":"boolean"},"shouldLoadEntity":{"type":"boolean"}},"required":["paramKey","type"],"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,"deprecated":true,"description":"@deprecated Use addressSuggestionsFileId instead"},"addressSuggestionsFileId":{"type":"string","nullable":true},"useNewDesign":{"type":"boolean"},"accessMode":{"type":"string","enum":["PUBLIC","PRIVATE"]}},"required":["designId"],"additionalProperties":false},"createdBy":{"type":"string"},"__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":{}},"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}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"paramKey":{"type":"string"},"isRequired":{"type":"boolean"},"shouldLoadEntity":{"type":"boolean"}},"required":["paramKey","type"],"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"},"entityId":{"type":"string","nullable":true},"mappingsAutomationId":{"type":"string"},"templateId":{"type":"string"},"targetedCustomer":{"type":"string"},"description":{"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}},"additionalProperties":false}},"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"}},"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"},{"$ref":"#/components/schemas/JourneyFeatureFlags"}]},"JourneyFeatureFlags":{"type":"object","properties":{"featureFlags":{"type":"object","additionalProperties":true}}},"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={},r=function r(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,r),o.exports}(187),s=exports;for(var n in r)s[n]=r[n];r.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var e={187: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(871));t.default=s.default},871: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. Private journeys requires valid private 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":"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. 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"}}}}}},"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":[{"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"}}}}}},"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"}}}}}},"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"}}}}}}},"/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/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","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"}}}}}}}},"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"},"__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":{}},"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}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"paramKey":{"type":"string"},"isRequired":{"type":"boolean"},"shouldLoadEntity":{"type":"boolean"}},"required":["paramKey","type"],"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,"deprecated":true,"description":"@deprecated Use addressSuggestionsFileId instead"},"addressSuggestionsFileId":{"type":"string","nullable":true},"useNewDesign":{"type":"boolean"},"accessMode":{"type":"string","enum":["PUBLIC","PRIVATE"]},"isPublished":{"type":"boolean"}},"required":["designId"],"additionalProperties":false},"createdBy":{"type":"string"},"__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":{}},"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}},"contextSchema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"paramKey":{"type":"string"},"isRequired":{"type":"boolean"},"shouldLoadEntity":{"type":"boolean"}},"required":["paramKey","type"],"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"},"entityId":{"type":"string","nullable":true},"mappingsAutomationId":{"type":"string"},"templateId":{"type":"string"},"targetedCustomer":{"type":"string"},"description":{"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}},"additionalProperties":false}},"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"},"version":{"type":"number"},"revisions":{"type":"number"}},"required":["createdAt","lastModifiedAt","version","revisions"]},"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-7g8h-9i0j-1k2l3m4n5o6p"}}},"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":{"template_document":{"description":"Input template document","type":"object","properties":{"filename":{"type":"string","description":"Document original filename","example":"my-template.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"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":["template_document","context_data"]}},"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Authorization Bearer Token - public access token / user token","bearerFormat":"JWT"}}}}')}},t={},r=function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(187),n=exports;for(var s in r)n[s]=r[s];r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -9,6 +9,102 @@ import type {
|
|
|
9
9
|
|
|
10
10
|
declare namespace Components {
|
|
11
11
|
namespace Schemas {
|
|
12
|
+
export interface GenerateDocumentRequest {
|
|
13
|
+
/**
|
|
14
|
+
* Input template document
|
|
15
|
+
*/
|
|
16
|
+
template_document: {
|
|
17
|
+
/**
|
|
18
|
+
* Document original filename
|
|
19
|
+
* example:
|
|
20
|
+
* my-template.docx
|
|
21
|
+
*/
|
|
22
|
+
filename?: string;
|
|
23
|
+
s3ref?: S3Reference;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Custom values for variables in the template. Takes the higher precedence than others.
|
|
27
|
+
*/
|
|
28
|
+
context_data: {
|
|
29
|
+
additionalProperties?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Language code for the document
|
|
33
|
+
* example:
|
|
34
|
+
* de
|
|
35
|
+
*/
|
|
36
|
+
language?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface GenerateDocumentResponse {
|
|
39
|
+
job_id?: string; // uuid
|
|
40
|
+
/**
|
|
41
|
+
* Status of the job
|
|
42
|
+
*/
|
|
43
|
+
job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED";
|
|
44
|
+
/**
|
|
45
|
+
* A message explaining the progress
|
|
46
|
+
*/
|
|
47
|
+
message?: string;
|
|
48
|
+
pdf_output?: {
|
|
49
|
+
/**
|
|
50
|
+
* Pre-signed S3 GET URL for PDF preview
|
|
51
|
+
* example:
|
|
52
|
+
* https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf
|
|
53
|
+
*/
|
|
54
|
+
preview_url?: string;
|
|
55
|
+
/**
|
|
56
|
+
* example:
|
|
57
|
+
* {
|
|
58
|
+
* "s3ref": {
|
|
59
|
+
* "bucket": "document-api-preview-prod",
|
|
60
|
+
* "key": "preview/my-template.pdf"
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
output_document?: {
|
|
65
|
+
/**
|
|
66
|
+
* Generated document filename for PDF
|
|
67
|
+
* example:
|
|
68
|
+
* my-template-OR-001.pdf
|
|
69
|
+
*/
|
|
70
|
+
filename?: string;
|
|
71
|
+
s3ref?: S3Reference;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
docx_output?: {
|
|
75
|
+
/**
|
|
76
|
+
* Pre-signed S3 GET URL for DOCX preview
|
|
77
|
+
* example:
|
|
78
|
+
* https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx
|
|
79
|
+
*/
|
|
80
|
+
preview_url?: string;
|
|
81
|
+
/**
|
|
82
|
+
* example:
|
|
83
|
+
* {
|
|
84
|
+
* "s3ref": {
|
|
85
|
+
* "bucket": "document-api-preview-prod",
|
|
86
|
+
* "key": "preview/my-template.docx"
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
*/
|
|
90
|
+
output_document?: {
|
|
91
|
+
/**
|
|
92
|
+
* Generated document filename for DOCX
|
|
93
|
+
* example:
|
|
94
|
+
* my-template-OR-001.docx
|
|
95
|
+
*/
|
|
96
|
+
filename?: string;
|
|
97
|
+
s3ref?: S3Reference;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* List of variables and its corresponding replaced values from the document template
|
|
102
|
+
*/
|
|
103
|
+
variable_payload?: {
|
|
104
|
+
additionalProperties?: string;
|
|
105
|
+
};
|
|
106
|
+
template_settings?: /* Template Settings for document generation */ TemplateSettings;
|
|
107
|
+
}
|
|
12
108
|
export interface GetJourneysResponse {
|
|
13
109
|
}
|
|
14
110
|
export interface Journey {
|
|
@@ -86,6 +182,7 @@ declare namespace Components {
|
|
|
86
182
|
addressSuggestionsFileId?: string | null;
|
|
87
183
|
useNewDesign?: boolean;
|
|
88
184
|
accessMode?: "PUBLIC" | "PRIVATE";
|
|
185
|
+
isPublished?: boolean;
|
|
89
186
|
};
|
|
90
187
|
createdBy?: string;
|
|
91
188
|
/**
|
|
@@ -181,6 +278,7 @@ declare namespace Components {
|
|
|
181
278
|
addressSuggestionsFileId?: string | null;
|
|
182
279
|
useNewDesign?: boolean;
|
|
183
280
|
accessMode?: "PUBLIC" | "PRIVATE";
|
|
281
|
+
isPublished?: boolean;
|
|
184
282
|
};
|
|
185
283
|
createdBy?: string;
|
|
186
284
|
/**
|
|
@@ -298,6 +396,18 @@ declare namespace Components {
|
|
|
298
396
|
*/
|
|
299
397
|
__lastModifiedAt?: string | null;
|
|
300
398
|
}
|
|
399
|
+
export interface S3Reference {
|
|
400
|
+
/**
|
|
401
|
+
* example:
|
|
402
|
+
* document-api-prod
|
|
403
|
+
*/
|
|
404
|
+
bucket: string;
|
|
405
|
+
/**
|
|
406
|
+
* example:
|
|
407
|
+
* uploads/my-template.pdf
|
|
408
|
+
*/
|
|
409
|
+
key: string;
|
|
410
|
+
}
|
|
301
411
|
export interface SearchJourneysQueryRequest {
|
|
302
412
|
/**
|
|
303
413
|
* Lucene query syntax
|
|
@@ -379,6 +489,10 @@ declare namespace Components {
|
|
|
379
489
|
*/
|
|
380
490
|
_updated_at?: string; // date-time
|
|
381
491
|
_tags?: string[];
|
|
492
|
+
/**
|
|
493
|
+
* Manifest ID used to create/update the entity
|
|
494
|
+
*/
|
|
495
|
+
_manifest?: string /* uuid */[];
|
|
382
496
|
/**
|
|
383
497
|
* Journey Name
|
|
384
498
|
* example:
|
|
@@ -414,9 +528,84 @@ declare namespace Components {
|
|
|
414
528
|
/**
|
|
415
529
|
* Journey Version
|
|
416
530
|
*/
|
|
417
|
-
journey_version?: "Flex"
|
|
531
|
+
journey_version?: "Flex";
|
|
418
532
|
}[];
|
|
419
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* Template Settings for document generation
|
|
536
|
+
*/
|
|
537
|
+
export interface TemplateSettings {
|
|
538
|
+
/**
|
|
539
|
+
* Custom margins for the document
|
|
540
|
+
*/
|
|
541
|
+
custom_margins?: {
|
|
542
|
+
/**
|
|
543
|
+
* Top margin in cm
|
|
544
|
+
* example:
|
|
545
|
+
* 2.54
|
|
546
|
+
*/
|
|
547
|
+
top?: number;
|
|
548
|
+
/**
|
|
549
|
+
* Bottom margin in cm
|
|
550
|
+
* example:
|
|
551
|
+
* 2.54
|
|
552
|
+
*/
|
|
553
|
+
bottom?: number;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Suggested margins for the document
|
|
557
|
+
*/
|
|
558
|
+
suggested_margins?: {
|
|
559
|
+
/**
|
|
560
|
+
* Top margin in cm
|
|
561
|
+
* example:
|
|
562
|
+
* 2.54
|
|
563
|
+
*/
|
|
564
|
+
top?: number;
|
|
565
|
+
/**
|
|
566
|
+
* Bottom margin in cm
|
|
567
|
+
* example:
|
|
568
|
+
* 2.54
|
|
569
|
+
*/
|
|
570
|
+
bottom?: number;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* Display margin guidelines (applicable to partial generation only)
|
|
574
|
+
* example:
|
|
575
|
+
* true
|
|
576
|
+
*/
|
|
577
|
+
display_margin_guidelines?: boolean;
|
|
578
|
+
/**
|
|
579
|
+
* Enable data table margin autofix
|
|
580
|
+
* example:
|
|
581
|
+
* false
|
|
582
|
+
*/
|
|
583
|
+
enable_data_table_margin_autofix?: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* A flag that indicates whether the template has 1 or more data tables in it
|
|
586
|
+
* example:
|
|
587
|
+
* false
|
|
588
|
+
*/
|
|
589
|
+
template_with_datatable?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Enables the persistance of template settings
|
|
592
|
+
* example:
|
|
593
|
+
* false
|
|
594
|
+
*/
|
|
595
|
+
enabled_template_settings_persistence?: boolean;
|
|
596
|
+
/**
|
|
597
|
+
* An indication that the page margins are misconfigured
|
|
598
|
+
* example:
|
|
599
|
+
* false
|
|
600
|
+
*/
|
|
601
|
+
misconfigured_margins?: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* The file entity id, used when persisting a new template version with updated settings
|
|
604
|
+
* example:
|
|
605
|
+
* 1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p
|
|
606
|
+
*/
|
|
607
|
+
file_entity_id?: string; // uuid
|
|
608
|
+
}
|
|
420
609
|
}
|
|
421
610
|
}
|
|
422
611
|
declare namespace Paths {
|
|
@@ -460,6 +649,12 @@ declare namespace Paths {
|
|
|
460
649
|
export type $201 = Components.Schemas.JourneyCreationRequestV2;
|
|
461
650
|
}
|
|
462
651
|
}
|
|
652
|
+
namespace GenerateDocument {
|
|
653
|
+
export type RequestBody = Components.Schemas.GenerateDocumentRequest;
|
|
654
|
+
namespace Responses {
|
|
655
|
+
export type $200 = Components.Schemas.GenerateDocumentResponse;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
463
658
|
namespace GetJourney {
|
|
464
659
|
namespace Parameters {
|
|
465
660
|
/**
|
|
@@ -493,7 +688,6 @@ declare namespace Paths {
|
|
|
493
688
|
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
494
689
|
*/
|
|
495
690
|
export type Id = string; // uuid
|
|
496
|
-
export type OrgId = string;
|
|
497
691
|
export type PostalCode = string;
|
|
498
692
|
export type Source = string;
|
|
499
693
|
export type Street = string;
|
|
@@ -508,7 +702,6 @@ declare namespace Paths {
|
|
|
508
702
|
}
|
|
509
703
|
export interface QueryParameters {
|
|
510
704
|
source?: Parameters.Source;
|
|
511
|
-
orgId?: Parameters.OrgId;
|
|
512
705
|
postal_code?: Parameters.PostalCode;
|
|
513
706
|
city?: Parameters.City;
|
|
514
707
|
street?: Parameters.Street;
|
|
@@ -654,7 +847,7 @@ export interface OperationMethods {
|
|
|
654
847
|
/**
|
|
655
848
|
* getJourney - getJourney
|
|
656
849
|
*
|
|
657
|
-
* Get journey by id
|
|
850
|
+
* Get journey by id. Private journeys requires valid private token to be passed
|
|
658
851
|
*/
|
|
659
852
|
'getJourney'(
|
|
660
853
|
parameters?: Parameters<Paths.GetJourney.PathParameters & Paths.GetJourney.QueryParameters> | null,
|
|
@@ -674,7 +867,7 @@ export interface OperationMethods {
|
|
|
674
867
|
/**
|
|
675
868
|
* getJourneyProducts - getJourneyProducts
|
|
676
869
|
*
|
|
677
|
-
* Get products available in the journey by id
|
|
870
|
+
* Get products available in the journey by id. requires public journey token to be passed.
|
|
678
871
|
*/
|
|
679
872
|
'getJourneyProducts'(
|
|
680
873
|
parameters?: Parameters<Paths.GetJourneyProducts.PathParameters & Paths.GetJourneyProducts.QueryParameters> | null,
|
|
@@ -771,6 +964,27 @@ export interface OperationMethods {
|
|
|
771
964
|
data?: any,
|
|
772
965
|
config?: AxiosRequestConfig
|
|
773
966
|
): OperationResponse<any>
|
|
967
|
+
/**
|
|
968
|
+
* generateDocument - generateDocument
|
|
969
|
+
*
|
|
970
|
+
* Builds document generated from a template with journey values."
|
|
971
|
+
*
|
|
972
|
+
* Supported input document types:
|
|
973
|
+
* - .docx
|
|
974
|
+
*
|
|
975
|
+
* Supported output document types:
|
|
976
|
+
* - .pdf
|
|
977
|
+
* - .docx but limited to only text based variables
|
|
978
|
+
*
|
|
979
|
+
* Uses [Document API](https://gitlab.com/e-pilot/product/file-management/document-api) to generate the document.
|
|
980
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
'generateDocument'(
|
|
984
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
985
|
+
data?: Paths.GenerateDocument.RequestBody,
|
|
986
|
+
config?: AxiosRequestConfig
|
|
987
|
+
): OperationResponse<Paths.GenerateDocument.Responses.$200>
|
|
774
988
|
}
|
|
775
989
|
|
|
776
990
|
export interface PathsDictionary {
|
|
@@ -790,7 +1004,7 @@ export interface PathsDictionary {
|
|
|
790
1004
|
/**
|
|
791
1005
|
* getJourney - getJourney
|
|
792
1006
|
*
|
|
793
|
-
* Get journey by id
|
|
1007
|
+
* Get journey by id. Private journeys requires valid private token to be passed
|
|
794
1008
|
*/
|
|
795
1009
|
'get'(
|
|
796
1010
|
parameters?: Parameters<Paths.GetJourney.PathParameters & Paths.GetJourney.QueryParameters> | null,
|
|
@@ -812,7 +1026,7 @@ export interface PathsDictionary {
|
|
|
812
1026
|
/**
|
|
813
1027
|
* getJourneyProducts - getJourneyProducts
|
|
814
1028
|
*
|
|
815
|
-
* Get products available in the journey by id
|
|
1029
|
+
* Get products available in the journey by id. requires public journey token to be passed.
|
|
816
1030
|
*/
|
|
817
1031
|
'get'(
|
|
818
1032
|
parameters?: Parameters<Paths.GetJourneyProducts.PathParameters & Paths.GetJourneyProducts.QueryParameters> | null,
|
|
@@ -918,6 +1132,29 @@ export interface PathsDictionary {
|
|
|
918
1132
|
config?: AxiosRequestConfig
|
|
919
1133
|
): OperationResponse<any>
|
|
920
1134
|
}
|
|
1135
|
+
['/v1/journey/document:generate']: {
|
|
1136
|
+
/**
|
|
1137
|
+
* generateDocument - generateDocument
|
|
1138
|
+
*
|
|
1139
|
+
* Builds document generated from a template with journey values."
|
|
1140
|
+
*
|
|
1141
|
+
* Supported input document types:
|
|
1142
|
+
* - .docx
|
|
1143
|
+
*
|
|
1144
|
+
* Supported output document types:
|
|
1145
|
+
* - .pdf
|
|
1146
|
+
* - .docx but limited to only text based variables
|
|
1147
|
+
*
|
|
1148
|
+
* Uses [Document API](https://gitlab.com/e-pilot/product/file-management/document-api) to generate the document.
|
|
1149
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
1150
|
+
*
|
|
1151
|
+
*/
|
|
1152
|
+
'post'(
|
|
1153
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1154
|
+
data?: Paths.GenerateDocument.RequestBody,
|
|
1155
|
+
config?: AxiosRequestConfig
|
|
1156
|
+
): OperationResponse<Paths.GenerateDocument.Responses.$200>
|
|
1157
|
+
}
|
|
921
1158
|
}
|
|
922
1159
|
|
|
923
1160
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|