@epilot/entity-client 2.4.1 → 2.6.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/README.md +1 -1
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +279 -8
- package/dist/openapi.json +393 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ defaults:
|
|
|
39
39
|
```typescript
|
|
40
40
|
const client = getClient();
|
|
41
41
|
client.defaults.baseURL = config.ENTITY_API_URL;
|
|
42
|
-
client.defaults.headers['authorization'] = `Bearer ${token}`;
|
|
42
|
+
client.defaults.headers.common['authorization'] = `Bearer ${token}`;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## API Docs:
|
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(i(279));t.default=a.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"Entity API","version":"1.0.0","description":"Flexible data layer for epilot Entities.\\n\\nUse this API configure and access your business objects like Contacts, Opportunities and Products.\\n\\n[Feature Documentation](https://docs.epilot.io/docs/entities/flexible-entities)\\n"},"tags":[{"name":"Schemas","description":"Model Entities"},{"name":"Entities","description":"CRUD Access for Entities"},{"name":"Activity","description":"Entity Events"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/entity/schemas":{"get":{"operationId":"listSchemas","summary":"listSchemas","tags":["Schemas"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}}}}}},"/v1/entity/schemas/{slug}":{"get":{"operationId":"getSchema","summary":"getSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}},"put":{"operationId":"putSchema","summary":"putSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchema"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}},"delete":{"operationId":"deleteSchema","summary":"deleteSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"responses":{"204":{"description":"Success"}}}},"/v1/entity:search":{"post":{"operationId":"searchEntities","summary":"searchEntities","description":"Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.\\n\\n## Relations\\n\\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\\n\\nExample:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n ]\\n }\\n}\\n```\\n\\nBecomes:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": [\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n \\"_id\\": \\"456\\",\\n \\"name\\": \\"child 1\\",\\n \\"_tags\\": [\\"child\\"]\\n },\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n \\"_id\\": \\"789\\",\\n \\"name\\": \\"child 2\\",\\n \\"_tags\\": [\\"child\\"]\\n }\\n ]\\n}\\n```\\n","tags":["Entities"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchParams"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchResults"}}}}}}},"/v1/entity/{slug}":{"post":{"operationId":"createEntity","summary":"createEntity","description":"Creates a new entity using a key.\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated`\\n\\n## Relations\\n\\nTo create a relation, store a property object that defines a `$relation` array.\\n\\nExample:\\n\\n```json\\n{\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\" }\\n ]\\n }\\n}\\n```\\n\\nThe items in `$relation` support two properties:\\n- `entity_id` - The ID of the entity to link\\n- `_tags` - Tags or labels for the relation (optional)\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Schema","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"},"examples":{"contact":{"$ref":"#/components/examples/ContactEntity"},"account":{"$ref":"#/components/examples/AccountEntity"},"product":{"$ref":"#/components/examples/ProductEntity"},"price":{"$ref":"#/components/examples/PriceEntity"},"tax":{"$ref":"#/components/examples/TaxEntity"},"order":{"$ref":"#/components/examples/OrderEntity"},"opportunity":{"$ref":"#/components/examples/OpportunityEntity"},"email template":{"$ref":"#/components/examples/EmailTemplateEntity"},"file":{"$ref":"#/components/examples/FileEntity"},"workflow step":{"$ref":"#/components/examples/WorkflowStepEntity"},"submission":{"$ref":"#/components/examples/SubmissionEntity"}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}}}}},"/v1/entity/{slug}:upsert":{"patch":{"operationId":"upsertEntity","summary":"upsertEntity","description":"Create or update an entity using `unique_key`\\n\\n- If no entities are matched, a new entity is created.\\n- If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.\\n- If more than one entity is matched a `409` Error is returned\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Schema","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"unique_key":{"type":"array","items":{"type":"string","example":"email.0.email"},"example":["_id"]},"entity":{"$ref":"#/components/schemas/Entity"}},"required":["unique_key","entity"]}}}},"responses":{"200":{"description":"Entity was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}},"201":{"description":"Entity was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}},"409":{"description":"Conflict: multiple entities were matched with `unique_key`"}}}},"/v1/entity/{slug}/{id}":{"get":{"operationId":"getEntity","summary":"getEntity","description":"Gets Entity and relations by id.\\n\\n## Relations\\n\\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\\n\\nExample:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n ]\\n }\\n}\\n```\\n\\nBecomes:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": [\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n \\"_id\\": \\"456\\",\\n \\"name\\": \\"child 1\\",\\n \\"_tags\\": [\\"child\\"]\\n },\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n \\"_id\\": \\"789\\",\\n \\"name\\": \\"child 2\\",\\n \\"_tags\\": [\\"child\\"]\\n }\\n ]\\n}\\n```\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"hydrate","description":"When true, enables entity hydration to resolve nested $relation references in-place.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/EntityItem"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}}}}}}},"put":{"operationId":"updateEntity","summary":"updateEntity","description":"Updates an Entity\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`\\n\\n## Relations\\n\\nTo create a relation, store a property that defines a `$relation` array.\\n\\nExample:\\n\\n```json\\n{\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\" }\\n ]\\n }\\n}\\n```\\n\\nThe items in `$relation` support two properties:\\n- `entity_id` - The ID of the entity to link\\n- `_tags` - Tags or labels for the relation (optional)\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"},"example":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}}}},"delete":{"operationId":"deleteEntity","summary":"deleteEntity","description":"Deletes an Entity\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityDeleted`\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"responses":{"200":{"description":"Success"}}}},"/v1/entity:autocomplete":{"get":{"operationId":"autocomplete","summary":"autocomplete","description":"Autocomplete entity attributes\\n","tags":["Entities"],"parameters":[{"name":"input","in":"query","description":"Input to autocomplete","schema":{"type":"string"}},{"name":"attribute","in":"query","description":"Autocomplete attribute","schema":{"type":"string","example":"_tags"},"required":true},{"name":"slug","in":"query","description":"Limit results to entity schema","schema":{"$ref":"#/components/schemas/EntitySlug"}},{"name":"size","in":"query","description":"Maximum number of results to return","schema":{"type":"integer","default":10,"minimum":1,"maximum":250}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"number","example":1},"results":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"object","additionalProperties":true}]},"example":["value"]}}}}}}}}},"/v1/entity/activity":{"post":{"operationId":"createActivity","summary":"createActivity","description":"Create an activity that can be displayed in activity feeds.\\n\\n- All activites are published as events on the event bus\\n- Entity mutations are always part of an activity\\n","tags":["Activity"],"parameters":[{"in":"query","name":"entities","description":"Comma-separated list of entities which the activity primarily concerns","style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/activity/{id}":{"get":{"operationId":"getActivity","summary":"getActivity","description":"Get activity by id","tags":["Activity"],"parameters":[{"in":"path","name":"id","description":"Activity Id","required":true,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/activity/{id}:attach":{"post":{"operationId":"attachActivity","summary":"attachActivity","description":"Attach existing activity to entity activity feeds","tags":["Activity"],"parameters":[{"in":"path","name":"id","description":"Activity Id","required":true,"schema":{"$ref":"#/components/schemas/ActivityId"}},{"in":"query","name":"entities","description":"Comma-separated list of entities which the activity primarily concerns","style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/{slug}/{id}/activity":{"get":{"operationId":"getEntityActivityFeed","summary":"getEntityActivityFeed","description":"Get activity feed for an entity\\n","tags":["Activity"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"after","description":"Get activities after this timestamp","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"get activities before this timestamp","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"from","description":"start from page","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"size","description":"max number of results to return","schema":{"type":"integer","minimum":1,"default":25}},{"in":"query","name":"type","description":"Activity type","schema":{"type":"string","example":"SyncActivity"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"SchemaId":{"description":"Generated uuid for schema","type":"string","format":"uuid"},"EntitySchema":{"description":"The \\"type\\" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.","type":"object","properties":{"slug":{"$ref":"#/components/schemas/EntitySlug"},"blueprint":{"$ref":"#/components/schemas/BlueprintEntityId"},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This schema should only be active when the feature flag is enabled"},"enable_setting":{"description":"This schema should only be active when one of the organization settings is enabled","type":"array","items":{"type":"string","example":"ecommerce_preview"}},"name":{"description":"User-friendly identifier for the entity schema","type":"string","example":"Contact"},"plural":{"type":"string","example":"Contacts"},"icon":{"type":"string","example":"person"},"title_template":{"type":"string","description":"Template for rendering the title field. Uses handlebars","example":"{{first_name}} {{last_name}}"},"ui_config":{"type":"object","properties":{"table_view":{"$ref":"#/components/schemas/EntityViewConfig"},"create_view":{"$ref":"#/components/schemas/EntityViewConfig"},"edit_view":{"$ref":"#/components/schemas/EntityViewConfig"},"list_item":{"type":"object","properties":{"summary_attributes":{"type":"array","items":{"type":"string","description":"List of attributes to show in list item","example":"email"}},"enable_relation_tags":{"type":"boolean","default":true}}}}},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EntityCapability"}},"group_settings":{"type":"object","description":"A dictionary of Group Titles and associated settings if present.","additionalProperties":{"type":"object","properties":{"expanded":{"type":"boolean"},"order":{"description":"Render order of the group","type":"integer","default":0}}},"example":{"Order Info":{"expanded":true},"Contact Details":{"expanded":false}}},"layout_settings":{"type":"object","description":"Custom grid definitions for the layout","additionalProperties":{"type":"object","properties":{"grid_gap":{"type":"string"},"grid_template_columns":{"type":"string"}}}},"attributes":{"description":"An ordered list of attributes the entity contains","type":"array","items":{"$ref":"#/components/schemas/Attribute"},"example":[{"name":"email","type":"email","label":"Email","required":true},{"name":"first_name","type":"string","label":"First Name"},{"name":"last_name","type":"string","label":"Last Name"},{"name":"birthdate","type":"date","label":"Birthdate"},{"name":"salutation","type":"select","label":"Salutation","options":["Mr.","Ms. / Mrs.","Other"]},{"name":"marketing_permission","type":"boolean","label":"Marketing permission"},{"name":"image","type":"file","label":"Image"}]}},"required":["slug","name","plural","attributes","capabilities","views"]},"EntitySchemaItem":{"allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/SchemaId"}}},{"$ref":"#/components/schemas/EntitySchema"}]},"Attribute":{"oneOf":[{"$ref":"#/components/schemas/TextAttribute"},{"$ref":"#/components/schemas/LinkAttribute"},{"$ref":"#/components/schemas/DateAttribute"},{"$ref":"#/components/schemas/CountryAttribute"},{"$ref":"#/components/schemas/BooleanAttribute"},{"$ref":"#/components/schemas/SelectAttribute"},{"$ref":"#/components/schemas/RelationAttribute"},{"$ref":"#/components/schemas/UserRelationAttribute"},{"$ref":"#/components/schemas/AddressRelationAttribute"},{"$ref":"#/components/schemas/CurrencyAttribute"},{"$ref":"#/components/schemas/RepeatableAttribute"},{"$ref":"#/components/schemas/TagsAttribute"},{"$ref":"#/components/schemas/NumberAttribute"},{"$ref":"#/components/schemas/ConsentAttribute"},{"$ref":"#/components/schemas/InternalAttribute"},{"$ref":"#/components/schemas/OrderedListAttribute"},{"$ref":"#/components/schemas/FileAttribute"},{"$ref":"#/components/schemas/CustomAttribute"}]},"BaseAttribute":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"hidden":{"description":"Do not render attribute in entity views","type":"boolean","default":false},"show_in_table":{"description":"Render as a column in table views. When defined, overrides `hidden`","type":"boolean"},"required":{"type":"boolean","default":false},"readonly":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"default_value":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"array"}]},"group":{"type":"string"},"layout":{"type":"string"},"hide_label":{"type":"boolean","description":"When set to true, will hide the label of the field."},"icon":{"type":"string","description":"Code name of the icon to used to represent this attribute.\\nThe value must be a valid @epilot/base-elements Icon name\\n"},"render_condition":{"type":"string","description":"Defines the conditional rendering expression for showing this field.\\nWhen a valid expression is parsed, their evaluation defines the visibility of this attribute.\\nNote: Empty or invalid expression have no effect on the field visibility.\\n"},"constraints":{"type":"object","description":"A set of constraints applicable to the attribute.\\nThese constraints should and will be enforced by the attribute renderer.\\n","example":{"disablePast":true}},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This attribute should only be active when the feature flag is enabled"},"value_formatter":{"type":"string"},"preview_value_formatter":{"type":"string"}},"required":["name","label"]},"TextAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Textarea or text input","properties":{"type":{"type":"string","enum":["string"]},"multiline":{"type":"boolean"}}}]},"LinkAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Link with title and href","properties":{"type":{"type":"string","enum":["link"]}}}]},"InternalAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"No UI representation","properties":{"type":{"type":"string","enum":["internal"]}}}]},"BooleanAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Yes / No Toggle","properties":{"type":{"type":"string","enum":["boolean"]}}}]},"DateAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Date or Datetime picker","properties":{"type":{"type":"string","enum":["date","datetime"]}}}]},"CountryAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Country picker","properties":{"type":{"type":"string","enum":["country"]}}}]},"SelectAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Dropdown select","properties":{"type":{"type":"string","enum":["select","radio"]},"options":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"title":{"type":"string"}},"required":["value"]}]}}}}]},"FileAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"File or Image Attachment","properties":{"type":{"type":"string","enum":["image","file"]},"multiple":{"type":"boolean"},"allowed_types":{"description":"List of unique content type specifiers (mime-types / extension)","type":"array","items":{"type":"string","example":"image/*"}},"default_access_control":{"type":"string","enum":["public-read","private"]}},"required":["type","attachments"]}]},"CurrencyAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Currency input","properties":{"type":{"type":"string","enum":["currency"]},"currency":{"description":"An array of currency configurations with a country code (ISO-4217)","type":"array","items":{"anyOf":[{"type":"object","description":"A currency configuration","properties":{"code":{"type":"string"},"description":{"type":"string"},"symbol":{"type":"string"},"flag":{"type":"string"}},"required":["code","description","symbol"],"example":{"code":"EUR","description":"Euro","symbol":"€","flag":"🇪🇺"}}]}}},"required":["type","currency"]}]},"SummaryField":{"type":"object","description":"Summary Fields are displayed inside list view as a resume of the relation entity.","properties":{"field":{"type":"string","description":"The field from the entity attributes to display"},"display_as":{"type":"string","description":"An hint on how to display the summary field"}}},"RelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Entity Relationship","properties":{"type":{"type":"string","enum":["relation"]},"relation_type":{"type":"string","enum":["belongs_to","has_many"]},"delete_mode":{"type":"string","enum":["cascade"]},"relation_affinity_mode":{"type":"string","enum":["weak","strong"]},"enable_relation_picker":{"type":"boolean","default":true,"description":"when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link."},"edit_mode":{"type":"string","enum":["list-view"]},"drawer_size":{"type":"string","enum":["small","medium","large"]},"icon":{"type":"string"},"summary_fields":{"type":"array","items":{"anyOf":[{"type":"string","description":"The field name from the entity attributes to display"},{"$ref":"#/components/schemas/SummaryField"}]}},"has_primary":{"type":"boolean"},"allowedSchemas":{"type":"array","items":{"$ref":"#/components/schemas/EntitySlug"}}}}]},"UserRelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"User Relationship","properties":{"type":{"type":"string","enum":["relation_user"]},"multiple":{"type":"boolean","default":false}}}]},"AddressRelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Reference to an address attribute of another entity","properties":{"type":{"type":"string","enum":["relation_address"]},"has_primary":{"type":"boolean"}}}]},"RepeatableAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Repeatable (add N number of fields)","properties":{"repeatable":{"type":"boolean"},"has_primary":{"type":"boolean"},"relation_affinity_mode":{"type":"string","enum":["weak","strong"]},"type":{"type":"string","enum":["string","phone","email","address","relation"]},"enable_relation_picker":{"type":"boolean","default":true,"description":"when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link."}}}]},"TagsAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Tags","properties":{"type":{"type":"string","enum":["tags"]},"options":{"type":"array","items":{"type":"string"}},"suggestions":{"type":"array","items":{"type":"string"}}}}]},"NumberAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Numeric input","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string"}}}]},"ConsentAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Consent Management","properties":{"type":{"type":"string","enum":["consent"]},"topic":{"type":"string"},"identifiers":{"type":"array","items":{"type":"string"}}},"required":["type","topic"]}]},"OrderedListAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Type of attribute to render N number of ordered fields","properties":{"type":{"type":"string","enum":["ordered_list"]}}}]},"CustomAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Custom input","properties":{"type":{"type":"string","enum":["custom"]}}}]},"Attachment":{"type":"object","deprecated":true,"properties":{"key":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"image_url":{"type":"string"},"download_url":{"type":"string"},"alt_text":{"type":"string"}},"required":["key","mime","name","size","image_url","download_url"]},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"EntityCapability":{"description":"Capabilities the Entity has. Turn features on/off for entities.","type":"object","properties":{"name":{"type":"string","description":"Unique name for the capability","example":"customer_messaging"},"title":{"type":"string","description":"Human readable title of the capability","example":"Messaging"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}},"ui_hooks":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"hook":{"type":"string","description":"name of the hook to use","example":"EntityDetailsV2:Tab"},"order":{"type":"integer","description":"render order (ascending)","example":10},"title":{"type":"string","example":"Notes"},"group_expanded":{"type":"boolean","description":"Sets the group expand/collapse default state"},"import":{"type":"string","description":"package to be imported","example":"@epilot360/notes"},"component":{"type":"string","description":"the component to be dynamically loaded","example":"PricingItems"},"route":{"type":"string","description":"route for specified capability","example":"notes"},"icon":{"type":"string","description":"Preview icon name(As in Base elements) for the capability","example":"email"},"disabled":{"type":"boolean","description":"Whether capability should be disabled"},"header":{"type":"boolean","description":"Specific to Activity pilot"}},"required":["hook"]}},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This capability should only be active when the feature flag is enabled"},"legacy":{"type":"boolean","description":"Only show capability for legacy tenants (ivy)"}},"required":["name"]},"EntityViewConfig":{"anyOf":[{"$ref":"#/components/schemas/EntityDefaultCreate"},{"$ref":"#/components/schemas/EntityDefaultEdit"},{"$ref":"#/components/schemas/EntityDefaultOverview"},{"$ref":"#/components/schemas/RedirectEntityView"},{"$ref":"#/components/schemas/EntityParcelView"},{"$ref":"#/components/schemas/EntityViewDisabled"}]},"EntityViewDisabled":{"type":"object","properties":{"view_type":{"type":"string","enum":["disabled"]}}},"EntityDefaultOverview":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]},"dropdown_items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This dropdown item should only be active when the feature flag is enabled"},"legacy":{"type":"boolean","description":"Only show item for legacy tenants (ivy)"}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity"]},"entity":{"$ref":"#/components/schemas/EntitySlug"}}},{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"title":{"type":"string","example":"Opportunities"},"uri":{"type":"string","format":"uri"}}}]}]}},"row_actions":{"type":"array","items":{"type":"string"}},"classic_view":{"type":"string","format":"uri"}}},"EntityDefaultCreate":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]}}},"EntityDefaultEdit":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]}}},"RedirectEntityView":{"type":"object","properties":{"view_type":{"type":"string","enum":["redirect"]},"route":{"type":"string","example":"/app/pricing-hub/product/:entityId"}},"example":{"type":"redirect","route":"/app/pricing-hub/product/:entityId"}},"EntityParcelView":{"type":"object","properties":{"view_type":{"type":"string","enum":["parcel"]},"import":{"type":"string","example":"@epilot360/pricing-hub-app"}},"example":{"type":"redirect","route":"/app/pricing-hub/product/:entityId"}},"EntityId":{"type":"string","format":"uuid"},"BaseEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/EntityId"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"$ref":"#/components/schemas/EntitySlug"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"HydratedEntity":{"type":"object","description":"Entity with relation data resolved into the attribute values","properties":{},"additionalProperties":true,"example":{"status":"active","customer_number":"abc123","email":[{"label":"work","email":"user@example.com"}],"phone":[{"label":"work","phone":"+49123456789"}],"first_name":"First Name","middle_name":"Middle Name","last_name":"Last Name","date_of_birth":"2019-08-24","title":"Mr.","account":[{"status":"active","name":"Company name","company_email":[{"label":"Company email","email":"company@example.com"}],"company_phone":[{"label":"Support phone","phone":"+49123456789"}],"company_website":"https://example.com","tax_id":"DE123456789","tax_exemption":"2019-08-24","contacts":{"$relation":[{"_tags":["CEO"],"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}]}}]}},"EntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/Entity"}]},"HydratedEntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/HydratedEntity"}]},"EntitySearchParams":{"type":"object","properties":{"q":{"description":"Lucene queries supported with ElasticSearch","type":"string","example":"_schema:contact AND status:active"},"sort":{"type":"string","example":"_created_at:desc"},"from":{"type":"integer","minimum":0,"default":0},"size":{"type":"integer","minimum":1,"default":10},"hydrate":{"type":"boolean","description":"When true, enables entity hydration to resolve nested $relation references in-place.","default":false},"fields":{"type":"array","description":"List of entity fields to include in search results","items":{"type":"string"},"example":["_id","_title","first_name"]},"expand":{"deprecated":true,"type":"array","description":"Deprecated. Use hydrate=true instead","items":{"type":"string"}}},"required":["q"]},"EntitySearchResults":{"type":"object","properties":{"hits":{"type":"number","example":1},"results":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}},"ActivityId":{"type":"string","format":"ulid","description":"See https://github.com/ulid/spec","example":"01F130Q52Q6MWSNS8N2AVXV4JN"},"ActivityCallerContext":{"type":"object","additionalProperties":true,"properties":{"EpilotAuth":{"type":"object","properties":{"token":{"type":"object","properties":{"sub":{"type":"string","example":"476e9b48-42f4-4234-a2b0-4668b34626ce"},"email":{"type":"string","example":"example@epilot.cloud"},"cognito:username":{"type":"string","example":"example@epilot.cloud"},"custom:ivy_user_id":{"type":"string","example":"10006129"}},"example":{"sub":"476e9b48-42f4-4234-a2b0-4668b34626ce","cognito:groups":["Administrator"],"cognito:preferred_role":"arn:aws:iam::912468240823:role/base-administrator-role","iss":"https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D","custom:ivy_org_id":"739224","cognito:username":"n.ahmad@epilot.cloud","custom:ivy_user_id":"10006129","cognito:roles":["arn:aws:iam::912468240823:role/base-administrator-role"],"aud":"6e0jbdnger7nmoktaaflarue1l","event_id":"cd5f5583-d90c-4db5-8e99-5f5dd29a4d75","token_use":"id","auth_time":1614333023,"exp":1614336623,"iat":1614333023,"email":"n.ahmad@epilot.cloud"}}}}}},"Activity":{"type":"object","properties":{"type":{"type":"string","example":"MyCustomActivity"},"title":{"type":"string","description":"Title for activity. Supports handlebars syntax.","example":"My custom activity"},"message":{"type":"string","description":"Message for activity. Supports handlebars syntax.","example":"{{caller}} did something with {{entity payload.entity.id}}."},"payload":{"type":"object","properties":{},"additionalProperties":true,"example":{"entity":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","schema":"contact"}}}},"required":["type","title","message"]},"EntityOperation":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/EntityId"},"operation":{"type":"string","example":"updateEntity"},"params":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EntityId"},"slug":{"$ref":"#/components/schemas/EntitySlug"}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","slug":"contact"}},"payload":{"allOf":[{"$ref":"#/components/schemas/Entity"},{"example":{"_schema":"contact","_org":"123","status":"Inactive"}}]}},"required":["entity","name"]},"ActivityItem":{"allOf":[{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ActivityId"},"timestamp":{"type":"string","format":"date-time"}}},{"$ref":"#/components/schemas/Activity"},{"type":"object","properties":{"caller":{"$ref":"#/components/schemas/ActivityCallerContext"}}},{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/EntityOperation"}}}}]},"BlueprintEntityId":{"description":"Reference to blueprint","type":"string","format":"uuid"}},"examples":{"TaxEntity":{"description":"Example of a Tax Rate entity","value":{"active":true,"type":"VAT","region":"Germany","region_label":"All Regions","rate":19,"behavior":"Exclusive","description":"MwSt. 19%"}},"ContactEntity":{"description":"Example of a contact entity","value":{"status":"Active","customer_number":"abc123","first_name":"First","middle_name":"Middle","last_name":"Last","title":"Herr Prof. Dr.","email":[{"email":"user@example.com","_tags":["work"]}],"phone":[{"phone":"+49123456789","_tags":["personal","mobile"]}],"address":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}],"birthdate":"2019-08-24","account":{"$relation":[{"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_tags":["company"]}]},"consent_email_marketing":{"status":"OPTED_IN","events":[{"type":"OPT_IN","organization_id":"123","created_at":"2021-07-05T09:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"https://consent.sls.epilot.io/optin?token=abc123","meta":{"ip_address":"1.1.1.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"}},{"type":"DOUBLE_OPT_IN_REQUEST","organization_id":"123","created_at":"2021-07-05T08:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"consent-api","meta":{"token":"abc123"}},{"type":"OPT_IN","organization_id":"123","created_at":"2021-07-04T09:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"https://frontend.epilot.cloud","meta":{"ip_address":"1.1.1.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"}}]}}},"AccountEntity":{"description":"Example of an account entity","value":{"status":"Active","name":"Example Company","tax_id":"DE123456789","email":[{"email":"user@example.com","_tags":["work"]}],"phone":[{"phone":"+49123456789","_tags":["personal","mobile"]}],"address":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}],"website":"http://company.com","tax_exemption":"2021-02-23T09:08:57.320Z","registry_court":"Amtsgericht Köln","registry_number":"HRB 95505","company_size":"50-99","industry":["ecommerce","tech"],"annual_revenue":"5000000","contact":{"$relation":[{"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_tags":["CEO"]}]}}},"ProductEntity":{"description":"Example of a product entity","value":{"code":"SunrockSolar375","type":"Product","name":"Sunrock Solar Panel","description":"Sunrock Solar Panel, provide high capacity power generation even at night.","shippable":"true,","_files":{"type":"file","attachments":[{"key":"f001-32123-asdasd-23213","mime":"application/pdf","name":"wallbox-premium.pdf","size":6933430,"image_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213","download_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213"}]},"_images":{"type":"image","attachments":[{"key":"i001-32123-asdasd-23213","mime":"application/pdf","name":"wallbox-premium.pdf","size":6933430,"image_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213","download_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213"}]},"prices":{"$relation":[{"entity_id":"a38cca03-18a2-4e9c-8516-0918d81e7830","_tags":["price"]},{"entity_id":"3d10c912-c419-42d7-9270-02b7d05294e5","_tags":["price"]}]}}},"PriceEntity":{"description":"Example of a price entity","value":{"code":"MODEL_375KW_PREMIUM","type":"One Time","description":"Solar Panel 375 kWp Premium","billing_scheme":"per_unit","unit_amount":"€ 28500","tiers_mode":"Standard"}},"OrderEntity":{"description":"Example of a Order entity","value":{"amount_subtotal":23045,"amount_total":27424,"billing_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"billing_company_name":"Epilot","billing_contact":{"$relation":[{"entity_id":"0691f503-5a3c-4e9e-b036-ffb21ea1d284","relationText":"Daniel Test","_schema":"contact","_tags":[]}]},"billing_email":"x@email.xyz","billing_first_name":"Paulo","billing_last_name":"Henriques","billing_phone":"00351912611099","billing_vat":"123456789","currency":"EUR","delivery_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"footer_notes":"Footer","line_items":[{"amount_subtotal":23045,"amount_total":27424,"currency":"EUR","description":"Basic Model - No Wifi","price_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","product_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","quantity":1,"taxes":[{"amount":4379,"rate":"standard"}],"unit_amount":23045,"_price":{"active":false,"billing_duration_amount":"2","billing_duration_unit":"years","billing_period":"monthly","description":"Basic Model - No Wifi","notice_time_amount":"1","notice_time_unit":"months","price_display_in_journeys":"show_price","renewal_duration_amount":"1","renewal_duration_unit":"years","sales_tax":"standard","tax_behavior":"exclusive","termination_time_amount":"1","termination_time_unit":"months","type":"recurring","unit_amount":23045,"unit_amount_currency":"EUR","unit_amount_decimal":"230.4524","_created_at":"2021-12-15T12:34:59.579Z","_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","_org":"739224","_schema":"price","_tags":["basic-model","wifi"],"_title":"Basic Model - No Wifi","_updated_at":"2021-12-31T13:07:51.392Z"},"_product":{"active":true,"code":"PWB","feature":[{"_tags":[],"feature":"Pure Energon Fueled"},{"_tags":[],"feature":"Mobile App Available"}],"name":"Pinho Walls in a Box","price_options":{"$relation":[{"entity_id":"efe9ff76-865c-4287-8de9-422cfc741ff9"}]},"type":"product","_created_at":"2021-12-15T12:35:08.438Z","_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","_org":"739224","_schema":"product","_tags":["energon","eco-friendly","wallbox"],"_title":"Pinho Walls in a Box","_updated_at":"2022-01-03T17:14:41.042Z"}}],"memo":"Memo","status":"Paid","total_details":{"amount_tax":4379,"breakdown":{"recurrences":[{"amount_subtotal":23045,"amount_tax":4379,"amount_total":27424,"billing_period":"monthly","type":"recurring"}],"taxes":[{"amount":4379,"rate":"standard"}]}}}},"OpportunityEntity":{"description":"Example of an Opportunity entity","value":{"amount_subtotal":23045,"amount_total":27424,"assignees":{"$relation":[{"entity_id":"66a1a6a3-38ee-4ffe-b68d-ee90e3bb1a77","relationText":"Claudius Iohannis","_schema":"contact","_tags":[]}]},"billing_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"billing_company_name":"Epilot","billing_contact":{"$relation":[{"entity_id":"0691f503-5a3c-4e9e-b036-ffb21ea1d284","relationText":"Daniel Test","_schema":"contact","_tags":[]}]},"billing_email":"customer@email.xyz","billing_first_name":"Customer First Name","billing_last_name":"Customer Last Name","billing_phone":"00351912611098","billing_vat":"123456789","currency":"EUR","delivery_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"line_items":[{"amount_subtotal":23045,"amount_total":27424,"currency":"EUR","description":"Basic Model - No Wifi","price_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","product_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","quantity":1,"taxes":[{"amount":4379,"rate":"standard"}],"unit_amount":23045,"_price":{"active":false,"billing_duration_amount":"2","billing_duration_unit":"years","billing_period":"monthly","description":"Basic Model - No Wifi","notice_time_amount":"1","notice_time_unit":"months","price_display_in_journeys":"show_price","renewal_duration_amount":"1","renewal_duration_unit":"years","sales_tax":"standard","tax_behavior":"exclusive","termination_time_amount":"1","termination_time_unit":"months","type":"recurring","unit_amount":23045,"unit_amount_currency":"EUR","unit_amount_decimal":"230.4524","_created_at":"2021-12-15T12:34:59.579Z","_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","_org":"739224","_schema":"price","_tags":["basic-model","wifi"],"_title":"Basic Model - No Wifi","_updated_at":"2021-12-31T13:07:51.392Z"},"_product":{"active":true,"code":"PWB","feature":[{"_tags":[],"feature":"Pure Energon Fueled"},{"_tags":[],"feature":"Mobile App Available"}],"name":"Pinho Walls in a Box","price_options":{"$relation":[{"entity_id":"efe9ff76-865c-4287-8de9-422cfc741ff9"}]},"type":"product","_created_at":"2021-12-15T12:35:08.438Z","_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","_org":"739224","_schema":"product","_tags":["energon","eco-friendly","wallbox"],"_title":"Pinho Walls in a Box","_updated_at":"2022-01-03T17:14:41.042Z"}}],"opportunity_number":"20220105-768854819","participants":{"$relation":[{"entity_id":"9bbfdaa9-22b2-4100-a256-67600202e3f4","relationText":"Alex Marques","_schema":"contact","_tags":[]}]},"status":"Lead","total_details":{"amount_tax":4379,"breakdown":{"recurrences":[{"amount_subtotal":23045,"amount_tax":4379,"amount_total":27424,"billing_period":"monthly","type":"recurring"}],"taxes":[{"amount":4379,"rate":"standard"}]}}}},"EmailTemplateEntity":{"description":"Example of an email template entity","value":{"attachments":[],"body":"<p fr-original-style=\\"caret-color: rgb(65, 65, 65); color: rgb(65, 65, 65); font-family: sans-serif;\\" id=\\"isPasted\\" style=\\"caret-color: rgb(65, 65, 65); color: rgb(65, 65, 65); font-family: sans-serif; box-sizing: inherit; border-color: rgba(229, 231, 235, var(--tw-border-opacity));\\"><span fr-original-style=\\"font-weight: 700;\\" style=\\"font-weight: 700; box-sizing: inherit; border-color: rgba(229, 231, 235, var(--tw-border-opacity));\\">Variablen - Kontakt</span></p>","brand_id":7066103,"from":{"name":"Name","email":"admin@email.xyz"},"name":"PH Test","subject":"Example Subject","system_template":false,"to":[{"id":"1","name":"Contact Name","email":"Contact email"}],"_tags":["Bestellung"]}},"FileEntity":{"description":"Example of a file template entity","value":{"access_control":"private","filename":"solar_panel_ph.jpeg","s3ref":{"bucket":"epilot-staging-user-content","key":"728/temp/6d450fd1-2d63-435f-b598-c605dfb89cbc/solar_panel_ph.jpeg"}}},"WorkflowStepEntity":{"description":"Example of a workflow step template entity","value":{"name":"Name","assigned_to\\"":["10000563"],"status":"Unassigned","order":123,"tags":["tag1"]}},"SubmissionEntity":{"description":"Example of a submission step template entity","value":{"mapped_entities":{"$relation":[{"entity_id":"4ffb071c-2821-4505-86d0-09b801ffd97a","relationText":"4ffb071c-2821-4505-86d0-09b801ffd97a","_schema":"price","_tags":[]}]}}}}}}')}},t={};return function i(n){if(t[n])return t[n].exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}(914)})());
|
|
1
|
+
!function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(i(279));t.default=a.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"Entity API","version":"1.0.0","description":"Flexible data layer for epilot Entities.\\n\\nUse this API configure and access your business objects like Contacts, Opportunities and Products.\\n\\n[Feature Documentation](https://docs.epilot.io/docs/entities/flexible-entities)\\n"},"tags":[{"name":"Schemas","description":"Model Entities"},{"name":"Entities","description":"CRUD Access for Entities"},{"name":"Activity","description":"Entity Events"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/entity/schemas":{"get":{"operationId":"listSchemas","summary":"listSchemas","tags":["Schemas"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}}}}}},"/v1/entity/schemas/{slug}":{"get":{"operationId":"getSchema","summary":"getSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}},"put":{"operationId":"putSchema","summary":"putSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchema"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySchemaItem"}}}}}},"delete":{"operationId":"deleteSchema","summary":"deleteSchema","tags":["Schemas"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}}],"responses":{"204":{"description":"Success"}}}},"/v1/entity:search":{"post":{"operationId":"searchEntities","summary":"searchEntities","description":"Search for entities. Supports ordering and pagination. Lucene query syntax supported for complex querying.\\n\\n## Relations\\n\\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\\n\\nExample:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n ]\\n }\\n}\\n```\\n\\nBecomes:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": [\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n \\"_id\\": \\"456\\",\\n \\"name\\": \\"child 1\\",\\n \\"_tags\\": [\\"child\\"]\\n },\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n \\"_id\\": \\"789\\",\\n \\"name\\": \\"child 2\\",\\n \\"_tags\\": [\\"child\\"]\\n }\\n ]\\n}\\n```\\n","tags":["Entities"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchParams"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchResults"}}}}}}},"/v1/entity/{slug}":{"post":{"operationId":"createEntity","summary":"createEntity","description":"Creates a new entity using a key.\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated`\\n\\n## Relations\\n\\nTo create a relation, store a property object that defines a `$relation` array.\\n\\nExample:\\n\\n```json\\n{\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\" }\\n ]\\n }\\n}\\n```\\n\\nThe items in `$relation` support two properties:\\n- `entity_id` - The ID of the entity to link\\n- `_tags` - Tags or labels for the relation (optional)\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Schema","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"},"examples":{"contact":{"$ref":"#/components/examples/ContactEntity"},"account":{"$ref":"#/components/examples/AccountEntity"},"product":{"$ref":"#/components/examples/ProductEntity"},"price":{"$ref":"#/components/examples/PriceEntity"},"tax":{"$ref":"#/components/examples/TaxEntity"},"order":{"$ref":"#/components/examples/OrderEntity"},"opportunity":{"$ref":"#/components/examples/OpportunityEntity"},"email template":{"$ref":"#/components/examples/EmailTemplateEntity"},"file":{"$ref":"#/components/examples/FileEntity"},"workflow step":{"$ref":"#/components/examples/WorkflowStepEntity"},"submission":{"$ref":"#/components/examples/SubmissionEntity"}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}}}}},"/v1/entity/{slug}:upsert":{"patch":{"operationId":"upsertEntity","summary":"upsertEntity","description":"Create or update an entity using `unique_key`\\n\\n- If no entities are matched, a new entity is created.\\n- If exactly one entity is matched, a `PATCH`-style update is applied to the existing entity.\\n- If more than one entity is matched a `409` Error is returned\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityCreated` or `EntityUpdated`\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Schema","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"unique_key":{"type":"array","items":{"type":"string","example":"email.0.email"},"example":["_id"]},"entity":{"$ref":"#/components/schemas/Entity"}},"required":["unique_key","entity"]}}}},"responses":{"200":{"description":"Entity was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}},"201":{"description":"Entity was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}},"409":{"description":"Conflict: multiple entities were matched with `unique_key`"}}}},"/v1/entity/{slug}/{id}":{"get":{"operationId":"getEntity","summary":"getEntity","description":"Gets Entity and relations by id.\\n\\n## Relations\\n\\nWhen `hydrate=true`, relation attributes are replaced in-place with nested entity values.\\n\\nExample:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n ]\\n }\\n}\\n```\\n\\nBecomes:\\n```json\\n{\\n \\"_id\\": \\"123\\",\\n \\"name\\": \\"parent\\",\\n \\"_tags\\": [\\"parent\\"],\\n \\"contacts\\": [\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"456\\", \\"_tags\\": [\\"primary\\"] },\\n \\"_id\\": \\"456\\",\\n \\"name\\": \\"child 1\\",\\n \\"_tags\\": [\\"child\\"]\\n },\\n {\\n \\"$relation\\": { \\"entity_id\\": \\"789\\", \\"_tags\\": [\\"secondary\\"] },\\n \\"_id\\": \\"789\\",\\n \\"name\\": \\"child 2\\",\\n \\"_tags\\": [\\"child\\"]\\n }\\n ]\\n}\\n```\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"hydrate","description":"When true, enables entity hydration to resolve nested $relation references in-place.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/EntityItem"},"relations":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}}}}}}},"put":{"operationId":"updateEntity","summary":"updateEntity","description":"Updates an Entity\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityUpdated`\\n\\n## Relations\\n\\nTo create a relation, store a property that defines a `$relation` array.\\n\\nExample:\\n\\n```json\\n{\\n \\"contacts\\": {\\n \\"$relation\\": [\\n { \\"entity_id\\": \\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\" }\\n ]\\n }\\n}\\n```\\n\\nThe items in `$relation` support two properties:\\n- `entity_id` - The ID of the entity to link\\n- `_tags` - Tags or labels for the relation (optional)\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"},"example":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityItem"}}}}}},"delete":{"operationId":"deleteEntity","summary":"deleteEntity","description":"Deletes an Entity\\n\\n## Activity\\n\\nIf no `activity_id` query parameter is provided, implicitly creates Activity of type `EntityDeleted`\\n","tags":["Entities"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"activity_id","description":"Activity to include in event feed","required":false,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"responses":{"200":{"description":"Success"}}}},"/v1/entity:autocomplete":{"get":{"operationId":"autocomplete","summary":"autocomplete","description":"Autocomplete entity attributes\\n","tags":["Entities"],"parameters":[{"name":"input","in":"query","description":"Input to autocomplete","schema":{"type":"string"}},{"name":"attribute","in":"query","description":"Autocomplete attribute","schema":{"type":"string","example":"_tags"},"required":true},{"name":"slug","in":"query","description":"Limit results to entity schema","schema":{"$ref":"#/components/schemas/EntitySlug"}},{"name":"size","in":"query","description":"Maximum number of results to return","schema":{"type":"integer","default":10,"minimum":1,"maximum":250}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"number","example":1},"results":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"object","additionalProperties":true}]},"example":["value"]}}}}}}}}},"/v1/entity/activity":{"post":{"operationId":"createActivity","summary":"createActivity","description":"Create an activity that can be displayed in activity feeds.\\n\\n- All activites are published as events on the event bus\\n- Entity mutations are always part of an activity\\n","tags":["Activity"],"parameters":[{"in":"query","name":"entities","description":"Comma-separated list of entities which the activity primarily concerns","style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/activity/{id}":{"get":{"operationId":"getActivity","summary":"getActivity","description":"Get activity by id","tags":["Activity"],"parameters":[{"in":"path","name":"id","description":"Activity Id","required":true,"schema":{"$ref":"#/components/schemas/ActivityId"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/activity/{id}:attach":{"post":{"operationId":"attachActivity","summary":"attachActivity","description":"Attach existing activity to entity activity feeds","tags":["Activity"],"parameters":[{"in":"path","name":"id","description":"Activity Id","required":true,"schema":{"$ref":"#/components/schemas/ActivityId"}},{"in":"query","name":"entities","description":"Comma-separated list of entities which the activity primarily concerns","style":"form","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityId"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityItem"}}}}}}},"/v1/entity/{slug}/{id}/activity":{"get":{"operationId":"getEntityActivityFeed","summary":"getEntityActivityFeed","description":"Get activity feed for an entity\\n","tags":["Activity"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"after","description":"Get activities after this timestamp","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"get activities before this timestamp","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"from","description":"start from page","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"size","description":"max number of results to return","schema":{"type":"integer","minimum":1,"default":25}},{"in":"query","name":"type","description":"Activity type","schema":{"type":"string","example":"SyncActivity"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"}}}}}}}}}},"/v1/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelations","summary":"getRelations","description":"It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.","tags":["Relations"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"query","name":"hydrate","description":"When true, expand relation items with full blown entities.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRelationsResp"},"example":[{"attribute":"contacts","entity_id":"ed27830b-984c-4bca-9b87-2849bb5789ca","_tags":["primary","billing"]},{"attribute":"contacts","entity_id":"fadfc950-6e43-4e38-bae0-ffcf4b8b90e1"},{"_id":"9924c4de-d3ed-4752-821d-fc0b9bd57c1b","order_number":"a34234jd","customer_email":"johndoe@epilot.cloud","billing_first_name":"john","billing_last_name":"doe","billing_company_name":"ePilot Gmbh","billing_vat":"234823948,","billing_email":"johndoe@nowhere.com","billing_phone":"1234234545,","billing_address":"wallstreet, 1","billing_contact":"villy or zilly","$relation":{"attribute":"orders","entity_id":"9924c4de-d3ed-4752-821d-fc0b9bd57c1b","_tags":["solar_panel","one_time"]}}]}}}}},"post":{"operationId":"addRelations","summary":"addRelations","description":"It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.","tags":["Relations"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationItem"}},"example":[{"attribute":"contacts","entity_id":"e8878f62-2d3d-4c86-bfe7-01a4180ff048","_tags":["billing"]},{"attribute":"contacts","entity_id":"ee8a2af9-fb36-4981-b848-4e65275851af"},{"attribute":"opportunities","entity_id":"30990430-a53d-41a2-83db-2de072dc4dd4"}]}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationItem"}}}}}}},"/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}":{"put":{"operationId":"updateRelation","summary":"updateRelation","description":"It updates a relation between two entities.","tags":["Relations"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"path","name":"attribute","description":"The attribute that express meaning","required":true,"schema":{"type":"string"}},{"in":"path","name":"entity_id","description":"The attribute that express meaning","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"_tags":{"type":"array","items":{"type":"string"}}}},"example":{"_tags":["billing","prepaid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationItem"}}}}}},"delete":{"operationId":"deleteRelation","summary":"deleteRelation","description":"It deletes a relation between one entity and the other.","tags":["Relations"],"parameters":[{"in":"path","name":"slug","description":"Entity Type","required":true,"schema":{"$ref":"#/components/schemas/EntitySlug"}},{"in":"path","name":"id","description":"Entity id","required":true,"schema":{"$ref":"#/components/schemas/EntityId"}},{"in":"path","name":"attribute","description":"The attribute that express meaning","required":true,"schema":{"type":"string"}},{"in":"path","name":"entity_id","description":"The attribute that express meaning","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Relation deleted with success."}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"SchemaId":{"description":"Generated uuid for schema","type":"string","format":"uuid"},"EntitySchema":{"description":"The \\"type\\" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.","type":"object","properties":{"slug":{"$ref":"#/components/schemas/EntitySlug"},"blueprint":{"$ref":"#/components/schemas/BlueprintEntityId"},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This schema should only be active when the feature flag is enabled"},"enable_setting":{"description":"This schema should only be active when one of the organization settings is enabled","type":"array","items":{"type":"string","example":"ecommerce_preview"}},"name":{"description":"User-friendly identifier for the entity schema","type":"string","example":"Contact"},"plural":{"type":"string","example":"Contacts"},"icon":{"type":"string","example":"person"},"title_template":{"type":"string","description":"Template for rendering the title field. Uses handlebars","example":"{{first_name}} {{last_name}}"},"ui_config":{"type":"object","properties":{"table_view":{"$ref":"#/components/schemas/EntityViewConfig"},"create_view":{"$ref":"#/components/schemas/EntityViewConfig"},"edit_view":{"$ref":"#/components/schemas/EntityViewConfig"},"list_item":{"type":"object","properties":{"summary_attributes":{"type":"array","items":{"type":"string","description":"List of attributes to show in list item","example":"email"}}}}}},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EntityCapability"}},"group_settings":{"type":"object","description":"A dictionary of Group Titles and associated settings if present.","additionalProperties":{"type":"object","properties":{"expanded":{"type":"boolean"},"order":{"description":"Render order of the group","type":"integer","default":0}}},"example":{"Order Info":{"expanded":true},"Contact Details":{"expanded":false}}},"layout_settings":{"type":"object","description":"Custom grid definitions for the layout","additionalProperties":{"type":"object","properties":{"grid_gap":{"type":"string"},"grid_template_columns":{"type":"string"}}}},"attributes":{"description":"An ordered list of attributes the entity contains","type":"array","items":{"$ref":"#/components/schemas/Attribute"},"example":[{"name":"email","type":"email","label":"Email","required":true},{"name":"first_name","type":"string","label":"First Name"},{"name":"last_name","type":"string","label":"Last Name"},{"name":"birthdate","type":"date","label":"Birthdate"},{"name":"salutation","type":"select","label":"Salutation","options":["Mr.","Ms. / Mrs.","Other"]},{"name":"marketing_permission","type":"boolean","label":"Marketing permission"},{"name":"image","type":"file","label":"Image"}]},"explicit_search_mappings":{"$ref":"#/components/schemas/SearchMappings"}},"required":["slug","name","plural","attributes","capabilities","views"]},"EntitySchemaItem":{"allOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/SchemaId"}}},{"$ref":"#/components/schemas/EntitySchema"}]},"Attribute":{"oneOf":[{"$ref":"#/components/schemas/TextAttribute"},{"$ref":"#/components/schemas/LinkAttribute"},{"$ref":"#/components/schemas/DateAttribute"},{"$ref":"#/components/schemas/CountryAttribute"},{"$ref":"#/components/schemas/BooleanAttribute"},{"$ref":"#/components/schemas/SelectAttribute"},{"$ref":"#/components/schemas/RelationAttribute"},{"$ref":"#/components/schemas/UserRelationAttribute"},{"$ref":"#/components/schemas/AddressRelationAttribute"},{"$ref":"#/components/schemas/CurrencyAttribute"},{"$ref":"#/components/schemas/RepeatableAttribute"},{"$ref":"#/components/schemas/TagsAttribute"},{"$ref":"#/components/schemas/NumberAttribute"},{"$ref":"#/components/schemas/ConsentAttribute"},{"$ref":"#/components/schemas/InternalAttribute"},{"$ref":"#/components/schemas/OrderedListAttribute"},{"$ref":"#/components/schemas/FileAttribute"},{"$ref":"#/components/schemas/CustomAttribute"}]},"BaseAttribute":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"hidden":{"description":"Do not render attribute in entity views","type":"boolean","default":false},"show_in_table":{"description":"Render as a column in table views. When defined, overrides `hidden`","type":"boolean"},"required":{"type":"boolean","default":false},"readonly":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"default_value":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"array"}]},"group":{"type":"string"},"layout":{"type":"string"},"hide_label":{"type":"boolean","description":"When set to true, will hide the label of the field."},"icon":{"type":"string","description":"Code name of the icon to used to represent this attribute.\\nThe value must be a valid @epilot/base-elements Icon name\\n"},"render_condition":{"type":"string","description":"Defines the conditional rendering expression for showing this field.\\nWhen a valid expression is parsed, their evaluation defines the visibility of this attribute.\\nNote: Empty or invalid expression have no effect on the field visibility.\\n"},"constraints":{"type":"object","description":"A set of constraints applicable to the attribute.\\nThese constraints should and will be enforced by the attribute renderer.\\n","example":{"disablePast":true}},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This attribute should only be active when the feature flag is enabled"},"value_formatter":{"type":"string"},"preview_value_formatter":{"type":"string"}},"required":["name","label"]},"TextAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Textarea or text input","properties":{"type":{"type":"string","enum":["string"]},"multiline":{"type":"boolean"}}}]},"LinkAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Link with title and href","properties":{"type":{"type":"string","enum":["link"]}}}]},"InternalAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"No UI representation","properties":{"type":{"type":"string","enum":["internal"]}}}]},"BooleanAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Yes / No Toggle","properties":{"type":{"type":"string","enum":["boolean"]}}}]},"DateAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Date or Datetime picker","properties":{"type":{"type":"string","enum":["date","datetime"]}}}]},"CountryAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Country picker","properties":{"type":{"type":"string","enum":["country"]}}}]},"SelectAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Dropdown select","properties":{"type":{"type":"string","enum":["select","radio"]},"options":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"value":{"type":"string"},"title":{"type":"string"}},"required":["value"]}]}}}}]},"FileAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"File or Image Attachment","properties":{"type":{"type":"string","enum":["image","file"]},"multiple":{"type":"boolean"},"allowed_types":{"description":"List of unique content type specifiers (mime-types / extension)","type":"array","items":{"type":"string","example":"image/*"}},"default_access_control":{"type":"string","enum":["public-read","private"]}},"required":["type","attachments"]}]},"CurrencyAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Currency input","properties":{"type":{"type":"string","enum":["currency"]},"currency":{"description":"An array of currency configurations with a country code (ISO-4217)","type":"array","items":{"anyOf":[{"type":"object","description":"A currency configuration","properties":{"code":{"type":"string"},"description":{"type":"string"},"symbol":{"type":"string"},"flag":{"type":"string"}},"required":["code","description","symbol"],"example":{"code":"EUR","description":"Euro","symbol":"€","flag":"🇪🇺"}}]}}},"required":["type","currency"]}]},"SummaryField":{"type":"object","description":"Summary Fields are displayed inside list view as a resume of the relation entity.","properties":{"field":{"type":"string","description":"The field from the entity attributes to display"},"display_as":{"type":"string","description":"An hint on how to display the summary field"}}},"RelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Entity Relationship","properties":{"type":{"type":"string","enum":["relation"]},"relation_type":{"type":"string","enum":["belongs_to","has_many"]},"delete_mode":{"type":"string","enum":["cascade"]},"relation_affinity_mode":{"type":"string","enum":["weak","strong"]},"enable_relation_picker":{"type":"boolean","default":true,"description":"when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link."},"edit_mode":{"type":"string","enum":["list-view"]},"drawer_size":{"type":"string","enum":["small","medium","large"]},"icon":{"type":"string"},"summary_fields":{"type":"array","items":{"anyOf":[{"type":"string","description":"The field name from the entity attributes to display"},{"$ref":"#/components/schemas/SummaryField"}]}},"has_primary":{"type":"boolean"},"allowedSchemas":{"type":"array","items":{"$ref":"#/components/schemas/EntitySlug"}},"enable_relation_tags":{"type":"boolean","default":true,"description":"when enable_relation_tags is set to true the user will be able to set tags(labels) in each relation item"}}}]},"UserRelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"User Relationship","properties":{"type":{"type":"string","enum":["relation_user"]},"multiple":{"type":"boolean","default":false}}}]},"AddressRelationAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Reference to an address attribute of another entity","properties":{"type":{"type":"string","enum":["relation_address"]},"has_primary":{"type":"boolean"}}}]},"RepeatableAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Repeatable (add N number of fields)","properties":{"repeatable":{"type":"boolean"},"has_primary":{"type":"boolean"},"relation_affinity_mode":{"type":"string","enum":["weak","strong"]},"type":{"type":"string","enum":["string","phone","email","address","relation"]},"enable_relation_picker":{"type":"boolean","default":true,"description":"when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link."}}}]},"TagsAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Tags","properties":{"type":{"type":"string","enum":["tags"]},"options":{"type":"array","items":{"type":"string"}},"suggestions":{"type":"array","items":{"type":"string"}}}}]},"NumberAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Numeric input","properties":{"type":{"type":"string","enum":["number"]},"format":{"type":"string"}}}]},"ConsentAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Consent Management","properties":{"type":{"type":"string","enum":["consent"]},"topic":{"type":"string"},"identifiers":{"type":"array","items":{"type":"string"}}},"required":["type","topic"]}]},"OrderedListAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Type of attribute to render N number of ordered fields","properties":{"type":{"type":"string","enum":["ordered_list"]}}}]},"CustomAttribute":{"allOf":[{"$ref":"#/components/schemas/BaseAttribute"},{"type":"object","description":"Custom input","properties":{"type":{"type":"string","enum":["custom"]}}}]},"Attachment":{"type":"object","deprecated":true,"properties":{"key":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"image_url":{"type":"string"},"download_url":{"type":"string"},"alt_text":{"type":"string"}},"required":["key","mime","name","size","image_url","download_url"]},"EntitySlug":{"description":"URL-friendly identifier for the entity schema","type":"string","example":"contact"},"EntityCapability":{"description":"Capabilities the Entity has. Turn features on/off for entities.","type":"object","properties":{"name":{"type":"string","description":"Unique name for the capability","example":"customer_messaging"},"title":{"type":"string","description":"Human readable title of the capability","example":"Messaging"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}},"ui_hooks":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"hook":{"type":"string","description":"name of the hook to use","example":"EntityDetailsV2:Tab"},"order":{"type":"integer","description":"render order (ascending)","example":10},"title":{"type":"string","example":"Notes"},"group_expanded":{"type":"boolean","description":"Sets the group expand/collapse default state"},"import":{"type":"string","description":"package to be imported","example":"@epilot360/notes"},"component":{"type":"string","description":"the component to be dynamically loaded","example":"PricingItems"},"route":{"type":"string","description":"route for specified capability","example":"notes"},"icon":{"type":"string","description":"Preview icon name(As in Base elements) for the capability","example":"email"},"disabled":{"type":"boolean","description":"Whether capability should be disabled"},"header":{"type":"boolean","description":"Specific to Activity pilot"}},"required":["hook"]}},"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This capability should only be active when the feature flag is enabled"},"legacy":{"type":"boolean","description":"Only show capability for legacy tenants (ivy)"}},"required":["name"]},"EntityViewConfig":{"anyOf":[{"$ref":"#/components/schemas/EntityDefaultCreate"},{"$ref":"#/components/schemas/EntityDefaultEdit"},{"$ref":"#/components/schemas/EntityDefaultOverview"},{"$ref":"#/components/schemas/RedirectEntityView"},{"$ref":"#/components/schemas/EntityParcelView"},{"$ref":"#/components/schemas/EntityViewDisabled"}]},"EntityViewDisabled":{"type":"object","properties":{"view_type":{"type":"string","enum":["disabled"]}}},"EntityDefaultOverview":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]},"dropdown_items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"feature_flag":{"type":"string","example":"FF_MY_FEATURE_FLAG","description":"This dropdown item should only be active when the feature flag is enabled"},"legacy":{"type":"boolean","description":"Only show item for legacy tenants (ivy)"}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["entity"]},"entity":{"$ref":"#/components/schemas/EntitySlug"}}},{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"title":{"type":"string","example":"Opportunities"},"uri":{"type":"string","format":"uri"}}}]}]}},"row_actions":{"type":"array","items":{"type":"string"}},"classic_view":{"type":"string","format":"uri"}}},"EntityDefaultCreate":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]}}},"EntityDefaultEdit":{"type":"object","properties":{"view_type":{"type":"string","enum":["default"]}}},"RedirectEntityView":{"type":"object","properties":{"view_type":{"type":"string","enum":["redirect"]},"route":{"type":"string","example":"/app/pricing-hub/product/:entityId"}},"example":{"type":"redirect","route":"/app/pricing-hub/product/:entityId"}},"EntityParcelView":{"type":"object","properties":{"view_type":{"type":"string","enum":["parcel"]},"import":{"type":"string","example":"@epilot360/pricing-hub-app"}},"example":{"type":"redirect","route":"/app/pricing-hub/product/:entityId"}},"EntityId":{"type":"string","format":"uuid"},"BaseEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/EntityId"},"_title":{"type":"string","description":"Title of entity"},"_org":{"type":"string","description":"Organization Id the entity belongs to"},"_schema":{"$ref":"#/components/schemas/EntitySlug"},"_tags":{"type":"array","items":{"type":"string"}},"_created_at":{"type":"string","format":"date-time"},"_updated_at":{"type":"string","format":"date-time"}},"required":["_id","_title","_org","_schema","_created_at","_updated_at"],"example":{"_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_org":"123","_schema":"contact","_tags":["example","mock"],"_created_at":"2021-02-09T12:41:43.662Z","_updated_at":"2021-02-09T12:41:43.662Z"}},"Entity":{"type":"object","properties":{},"additionalProperties":true},"HydratedEntity":{"type":"object","description":"Entity with relation data resolved into the attribute values","properties":{},"additionalProperties":true,"example":{"status":"active","customer_number":"abc123","email":[{"label":"work","email":"user@example.com"}],"phone":[{"label":"work","phone":"+49123456789"}],"first_name":"First Name","middle_name":"Middle Name","last_name":"Last Name","date_of_birth":"2019-08-24","title":"Mr.","account":[{"status":"active","name":"Company name","company_email":[{"label":"Company email","email":"company@example.com"}],"company_phone":[{"label":"Support phone","phone":"+49123456789"}],"company_website":"https://example.com","tax_id":"DE123456789","tax_exemption":"2019-08-24","contacts":{"$relation":[{"_tags":["CEO"],"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}]}}]}},"EntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/Entity"}]},"HydratedEntityItem":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"$ref":"#/components/schemas/HydratedEntity"}]},"GetRelationsResp":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RelationItem"},{"$ref":"#/components/schemas/RelationEntity"}]}},"RelationEntity":{"allOf":[{"$ref":"#/components/schemas/BaseEntity"},{"type":"object","properties":{"$relation":{"$ref":"#/components/schemas/RelationItem"}}}]},"RelationItem":{"type":"object","properties":{"entity_id":{"$ref":"#/components/schemas/EntityId"},"attribute":{"type":"string"},"_tags":{"type":"array","items":{"type":"string"}}},"required":["entity_id","attribute"]},"EntitySearchParams":{"type":"object","properties":{"q":{"description":"Lucene queries supported with ElasticSearch","type":"string","example":"_schema:contact AND status:active"},"sort":{"type":"string","example":"_created_at:desc"},"from":{"type":"integer","minimum":0,"default":0},"size":{"type":"integer","minimum":1,"default":10},"hydrate":{"type":"boolean","description":"When true, enables entity hydration to resolve nested $relation references in-place.","default":false},"fields":{"type":"array","description":"List of entity fields to include in search results","items":{"type":"string"},"example":["_id","_title","first_name"]}},"required":["q"]},"EntitySearchResults":{"type":"object","properties":{"hits":{"type":"number","example":1},"results":{"type":"array","items":{"$ref":"#/components/schemas/EntityItem"}}}},"SearchMappings":{"description":"Advanced: explicit Elasticsearch index mapping definitions for entity data\\n","example":{"image":{"type":"keyword","index":false}},"type":"object","additionalProperties":{"type":"object","properties":{"index":{"type":"boolean","default":true},"type":{"type":"string","enum":["keyword","text","boolean","integer","long","float","date","flattened","nested"]},"fields":{"additionalProperties":true}}}},"ActivityId":{"type":"string","format":"ulid","description":"See https://github.com/ulid/spec","example":"01F130Q52Q6MWSNS8N2AVXV4JN"},"ActivityCallerContext":{"type":"object","additionalProperties":true,"properties":{"EpilotAuth":{"type":"object","properties":{"token":{"type":"object","properties":{"sub":{"type":"string","example":"476e9b48-42f4-4234-a2b0-4668b34626ce"},"email":{"type":"string","example":"example@epilot.cloud"},"cognito:username":{"type":"string","example":"example@epilot.cloud"},"custom:ivy_user_id":{"type":"string","example":"10006129"}},"example":{"sub":"476e9b48-42f4-4234-a2b0-4668b34626ce","cognito:groups":["Administrator"],"cognito:preferred_role":"arn:aws:iam::912468240823:role/base-administrator-role","iss":"https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D","custom:ivy_org_id":"739224","cognito:username":"n.ahmad@epilot.cloud","custom:ivy_user_id":"10006129","cognito:roles":["arn:aws:iam::912468240823:role/base-administrator-role"],"aud":"6e0jbdnger7nmoktaaflarue1l","event_id":"cd5f5583-d90c-4db5-8e99-5f5dd29a4d75","token_use":"id","auth_time":1614333023,"exp":1614336623,"iat":1614333023,"email":"n.ahmad@epilot.cloud"}}}}}},"Activity":{"type":"object","properties":{"type":{"type":"string","example":"MyCustomActivity"},"title":{"type":"string","description":"Title for activity. Supports handlebars syntax.","example":"My custom activity"},"message":{"type":"string","description":"Message for activity. Supports handlebars syntax.","example":"{{caller}} did something with {{entity payload.entity.id}}."},"payload":{"type":"object","properties":{},"additionalProperties":true,"example":{"entity":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","schema":"contact"}}}},"required":["type","title","message"]},"EntityOperation":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/EntityId"},"org":{"type":"string","example":"123"},"operation":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]},"params":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EntityId"},"slug":{"$ref":"#/components/schemas/EntitySlug"}},"example":{"id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","slug":"contact"}},"payload":{"allOf":[{"$ref":"#/components/schemas/Entity"},{"example":{"_schema":"contact","_org":"123","status":"Inactive"}}]}},"required":["entity","org","operation"]},"ActivityItem":{"allOf":[{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ActivityId"},"timestamp":{"type":"string","format":"date-time"}}},{"$ref":"#/components/schemas/Activity"},{"type":"object","properties":{"caller":{"$ref":"#/components/schemas/ActivityCallerContext"}}},{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/EntityOperation"}}}}]},"BlueprintEntityId":{"description":"Reference to blueprint","type":"string","format":"uuid"}},"examples":{"TaxEntity":{"description":"Example of a Tax Rate entity","value":{"active":true,"type":"VAT","region":"Germany","region_label":"All Regions","rate":19,"behavior":"Exclusive","description":"MwSt. 19%"}},"ContactEntity":{"description":"Example of a contact entity","value":{"status":"Active","customer_number":"abc123","first_name":"First","middle_name":"Middle","last_name":"Last","title":"Herr Prof. Dr.","email":[{"email":"user@example.com","_tags":["work"]}],"phone":[{"phone":"+49123456789","_tags":["personal","mobile"]}],"address":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}],"birthdate":"2019-08-24","account":{"$relation":[{"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_tags":["company"]}]},"consent_email_marketing":{"status":"OPTED_IN","events":[{"type":"OPT_IN","organization_id":"123","created_at":"2021-07-05T09:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"https://consent.sls.epilot.io/optin?token=abc123","meta":{"ip_address":"1.1.1.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"}},{"type":"DOUBLE_OPT_IN_REQUEST","organization_id":"123","created_at":"2021-07-05T08:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"consent-api","meta":{"token":"abc123"}},{"type":"OPT_IN","organization_id":"123","created_at":"2021-07-04T09:12:29.352Z","topic":"EMAIL_MARKETING","identifier":"user@example.com","source":"https://frontend.epilot.cloud","meta":{"ip_address":"1.1.1.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"}}]}}},"AccountEntity":{"description":"Example of an account entity","value":{"status":"Active","name":"Example Company","tax_id":"DE123456789","email":[{"email":"user@example.com","_tags":["work"]}],"phone":[{"phone":"+49123456789","_tags":["personal","mobile"]}],"address":[{"country":"Germany","city":"Koln","postal_code":81475,"street":"Melatengürtel","street_number":71,"additional_info":"5. Etage","_tags":["billing","delivery"]}],"website":"http://company.com","tax_exemption":"2021-02-23T09:08:57.320Z","registry_court":"Amtsgericht Köln","registry_number":"HRB 95505","company_size":"50-99","industry":["ecommerce","tech"],"annual_revenue":"5000000","contact":{"$relation":[{"entity_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","_tags":["CEO"]}]}}},"ProductEntity":{"description":"Example of a product entity","value":{"code":"SunrockSolar375","type":"Product","name":"Sunrock Solar Panel","description":"Sunrock Solar Panel, provide high capacity power generation even at night.","shippable":"true,","_files":{"type":"file","attachments":[{"key":"f001-32123-asdasd-23213","mime":"application/pdf","name":"wallbox-premium.pdf","size":6933430,"image_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213","download_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213"}]},"_images":{"type":"image","attachments":[{"key":"i001-32123-asdasd-23213","mime":"application/pdf","name":"wallbox-premium.pdf","size":6933430,"image_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213","download_url":"https://s3-bucket.epilot.cloud/uid/f001-32123-asdasd-23213"}]},"prices":{"$relation":[{"entity_id":"a38cca03-18a2-4e9c-8516-0918d81e7830","_tags":["price"]},{"entity_id":"3d10c912-c419-42d7-9270-02b7d05294e5","_tags":["price"]}]}}},"PriceEntity":{"description":"Example of a price entity","value":{"code":"MODEL_375KW_PREMIUM","type":"One Time","description":"Solar Panel 375 kWp Premium","billing_scheme":"per_unit","unit_amount":"€ 28500","tiers_mode":"Standard"}},"OrderEntity":{"description":"Example of a Order entity","value":{"amount_subtotal":23045,"amount_total":27424,"billing_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"billing_company_name":"Epilot","billing_contact":{"$relation":[{"entity_id":"0691f503-5a3c-4e9e-b036-ffb21ea1d284","relationText":"Daniel Test","_schema":"contact","_tags":[]}]},"billing_email":"x@email.xyz","billing_first_name":"Paulo","billing_last_name":"Henriques","billing_phone":"00351912611099","billing_vat":"123456789","currency":"EUR","delivery_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"footer_notes":"Footer","line_items":[{"amount_subtotal":23045,"amount_total":27424,"currency":"EUR","description":"Basic Model - No Wifi","price_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","product_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","quantity":1,"taxes":[{"amount":4379,"rate":"standard"}],"unit_amount":23045,"_price":{"active":false,"billing_duration_amount":"2","billing_duration_unit":"years","billing_period":"monthly","description":"Basic Model - No Wifi","notice_time_amount":"1","notice_time_unit":"months","price_display_in_journeys":"show_price","renewal_duration_amount":"1","renewal_duration_unit":"years","sales_tax":"standard","tax_behavior":"exclusive","termination_time_amount":"1","termination_time_unit":"months","type":"recurring","unit_amount":23045,"unit_amount_currency":"EUR","unit_amount_decimal":"230.4524","_created_at":"2021-12-15T12:34:59.579Z","_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","_org":"739224","_schema":"price","_tags":["basic-model","wifi"],"_title":"Basic Model - No Wifi","_updated_at":"2021-12-31T13:07:51.392Z"},"_product":{"active":true,"code":"PWB","feature":[{"_tags":[],"feature":"Pure Energon Fueled"},{"_tags":[],"feature":"Mobile App Available"}],"name":"Pinho Walls in a Box","price_options":{"$relation":[{"entity_id":"efe9ff76-865c-4287-8de9-422cfc741ff9"}]},"type":"product","_created_at":"2021-12-15T12:35:08.438Z","_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","_org":"739224","_schema":"product","_tags":["energon","eco-friendly","wallbox"],"_title":"Pinho Walls in a Box","_updated_at":"2022-01-03T17:14:41.042Z"}}],"memo":"Memo","status":"Paid","total_details":{"amount_tax":4379,"breakdown":{"recurrences":[{"amount_subtotal":23045,"amount_tax":4379,"amount_total":27424,"billing_period":"monthly","type":"recurring"}],"taxes":[{"amount":4379,"rate":"standard"}]}}}},"OpportunityEntity":{"description":"Example of an Opportunity entity","value":{"amount_subtotal":23045,"amount_total":27424,"assignees":{"$relation":[{"entity_id":"66a1a6a3-38ee-4ffe-b68d-ee90e3bb1a77","relationText":"Claudius Iohannis","_schema":"contact","_tags":[]}]},"billing_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"billing_company_name":"Epilot","billing_contact":{"$relation":[{"entity_id":"0691f503-5a3c-4e9e-b036-ffb21ea1d284","relationText":"Daniel Test","_schema":"contact","_tags":[]}]},"billing_email":"customer@email.xyz","billing_first_name":"Customer First Name","billing_last_name":"Customer Last Name","billing_phone":"00351912611098","billing_vat":"123456789","currency":"EUR","delivery_address":[{"additional_info":"","city":"City","country":"DE","postal_code":"123","street":"Street 1","street_number":"2","_tags":[]}],"line_items":[{"amount_subtotal":23045,"amount_total":27424,"currency":"EUR","description":"Basic Model - No Wifi","price_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","product_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","quantity":1,"taxes":[{"amount":4379,"rate":"standard"}],"unit_amount":23045,"_price":{"active":false,"billing_duration_amount":"2","billing_duration_unit":"years","billing_period":"monthly","description":"Basic Model - No Wifi","notice_time_amount":"1","notice_time_unit":"months","price_display_in_journeys":"show_price","renewal_duration_amount":"1","renewal_duration_unit":"years","sales_tax":"standard","tax_behavior":"exclusive","termination_time_amount":"1","termination_time_unit":"months","type":"recurring","unit_amount":23045,"unit_amount_currency":"EUR","unit_amount_decimal":"230.4524","_created_at":"2021-12-15T12:34:59.579Z","_id":"efe9ff76-865c-4287-8de9-422cfc741ff9","_org":"739224","_schema":"price","_tags":["basic-model","wifi"],"_title":"Basic Model - No Wifi","_updated_at":"2021-12-31T13:07:51.392Z"},"_product":{"active":true,"code":"PWB","feature":[{"_tags":[],"feature":"Pure Energon Fueled"},{"_tags":[],"feature":"Mobile App Available"}],"name":"Pinho Walls in a Box","price_options":{"$relation":[{"entity_id":"efe9ff76-865c-4287-8de9-422cfc741ff9"}]},"type":"product","_created_at":"2021-12-15T12:35:08.438Z","_id":"beefa9f1-29a8-448e-94d5-ebf1963428f8","_org":"739224","_schema":"product","_tags":["energon","eco-friendly","wallbox"],"_title":"Pinho Walls in a Box","_updated_at":"2022-01-03T17:14:41.042Z"}}],"opportunity_number":"20220105-768854819","participants":{"$relation":[{"entity_id":"9bbfdaa9-22b2-4100-a256-67600202e3f4","relationText":"Alex Marques","_schema":"contact","_tags":[]}]},"status":"Lead","total_details":{"amount_tax":4379,"breakdown":{"recurrences":[{"amount_subtotal":23045,"amount_tax":4379,"amount_total":27424,"billing_period":"monthly","type":"recurring"}],"taxes":[{"amount":4379,"rate":"standard"}]}}}},"EmailTemplateEntity":{"description":"Example of an email template entity","value":{"attachments":[],"body":"<p fr-original-style=\\"caret-color: rgb(65, 65, 65); color: rgb(65, 65, 65); font-family: sans-serif;\\" id=\\"isPasted\\" style=\\"caret-color: rgb(65, 65, 65); color: rgb(65, 65, 65); font-family: sans-serif; box-sizing: inherit; border-color: rgba(229, 231, 235, var(--tw-border-opacity));\\"><span fr-original-style=\\"font-weight: 700;\\" style=\\"font-weight: 700; box-sizing: inherit; border-color: rgba(229, 231, 235, var(--tw-border-opacity));\\">Variablen - Kontakt</span></p>","brand_id":7066103,"from":{"name":"Name","email":"admin@email.xyz"},"name":"PH Test","subject":"Example Subject","system_template":false,"to":[{"id":"1","name":"Contact Name","email":"Contact email"}],"_tags":["Bestellung"]}},"FileEntity":{"description":"Example of a file template entity","value":{"access_control":"private","filename":"solar_panel_ph.jpeg","s3ref":{"bucket":"epilot-staging-user-content","key":"728/temp/6d450fd1-2d63-435f-b598-c605dfb89cbc/solar_panel_ph.jpeg"}}},"WorkflowStepEntity":{"description":"Example of a workflow step template entity","value":{"name":"Name","assigned_to\\"":["10000563"],"status":"Unassigned","order":123,"tags":["tag1"]}},"SubmissionEntity":{"description":"Example of a submission step template entity","value":{"mapped_entities":{"$relation":[{"entity_id":"4ffb071c-2821-4505-86d0-09b801ffd97a","relationText":"4ffb071c-2821-4505-86d0-09b801ffd97a","_schema":"price","_tags":[]}]}}}}}}')}},t={};return function i(n){if(t[n])return t[n].exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -864,9 +864,10 @@ declare namespace Components {
|
|
|
864
864
|
entity: EntityId /* uuid */;
|
|
865
865
|
/**
|
|
866
866
|
* example:
|
|
867
|
-
*
|
|
867
|
+
* 123
|
|
868
868
|
*/
|
|
869
|
-
|
|
869
|
+
org: string;
|
|
870
|
+
operation: "createEntity" | "updateEntity" | "deleteEntity";
|
|
870
871
|
/**
|
|
871
872
|
* example:
|
|
872
873
|
* {
|
|
@@ -959,7 +960,6 @@ declare namespace Components {
|
|
|
959
960
|
edit_view?: EntityViewConfig;
|
|
960
961
|
list_item?: {
|
|
961
962
|
summary_attributes?: string[];
|
|
962
|
-
enable_relation_tags?: boolean;
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
965
|
capabilities: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
|
|
@@ -1041,6 +1041,18 @@ declare namespace Components {
|
|
|
1041
1041
|
* ]
|
|
1042
1042
|
*/
|
|
1043
1043
|
attributes: Attribute[];
|
|
1044
|
+
explicit_search_mappings?: /**
|
|
1045
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1046
|
+
*
|
|
1047
|
+
* example:
|
|
1048
|
+
* {
|
|
1049
|
+
* "image": {
|
|
1050
|
+
* "type": "keyword",
|
|
1051
|
+
* "index": false
|
|
1052
|
+
* }
|
|
1053
|
+
* }
|
|
1054
|
+
*/
|
|
1055
|
+
SearchMappings;
|
|
1044
1056
|
}
|
|
1045
1057
|
/**
|
|
1046
1058
|
* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.
|
|
@@ -1092,7 +1104,6 @@ declare namespace Components {
|
|
|
1092
1104
|
edit_view?: EntityViewConfig;
|
|
1093
1105
|
list_item?: {
|
|
1094
1106
|
summary_attributes?: string[];
|
|
1095
|
-
enable_relation_tags?: boolean;
|
|
1096
1107
|
};
|
|
1097
1108
|
};
|
|
1098
1109
|
capabilities: /* Capabilities the Entity has. Turn features on/off for entities. */ EntityCapability[];
|
|
@@ -1174,6 +1185,18 @@ declare namespace Components {
|
|
|
1174
1185
|
* ]
|
|
1175
1186
|
*/
|
|
1176
1187
|
attributes: Attribute[];
|
|
1188
|
+
explicit_search_mappings?: /**
|
|
1189
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1190
|
+
*
|
|
1191
|
+
* example:
|
|
1192
|
+
* {
|
|
1193
|
+
* "image": {
|
|
1194
|
+
* "type": "keyword",
|
|
1195
|
+
* "index": false
|
|
1196
|
+
* }
|
|
1197
|
+
* }
|
|
1198
|
+
*/
|
|
1199
|
+
SearchMappings;
|
|
1177
1200
|
}
|
|
1178
1201
|
export interface EntitySearchParams {
|
|
1179
1202
|
/**
|
|
@@ -1203,10 +1226,6 @@ declare namespace Components {
|
|
|
1203
1226
|
* ]
|
|
1204
1227
|
*/
|
|
1205
1228
|
fields?: string[];
|
|
1206
|
-
/**
|
|
1207
|
-
* Deprecated. Use hydrate=true instead
|
|
1208
|
-
*/
|
|
1209
|
-
expand?: string[];
|
|
1210
1229
|
}
|
|
1211
1230
|
export interface EntitySearchResults {
|
|
1212
1231
|
/**
|
|
@@ -1322,6 +1341,21 @@ declare namespace Components {
|
|
|
1322
1341
|
allowed_types?: string[];
|
|
1323
1342
|
default_access_control?: "public-read" | "private";
|
|
1324
1343
|
}
|
|
1344
|
+
export type GetRelationsResp = (RelationItem | /**
|
|
1345
|
+
* example:
|
|
1346
|
+
* {
|
|
1347
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1348
|
+
* "_org": "123",
|
|
1349
|
+
* "_schema": "contact",
|
|
1350
|
+
* "_tags": [
|
|
1351
|
+
* "example",
|
|
1352
|
+
* "mock"
|
|
1353
|
+
* ],
|
|
1354
|
+
* "_created_at": {},
|
|
1355
|
+
* "_updated_at": {}
|
|
1356
|
+
* }
|
|
1357
|
+
*/
|
|
1358
|
+
RelationEntity)[];
|
|
1325
1359
|
/**
|
|
1326
1360
|
* Entity with relation data resolved into the attribute values
|
|
1327
1361
|
* example:
|
|
@@ -1809,6 +1843,50 @@ declare namespace Components {
|
|
|
1809
1843
|
* contact
|
|
1810
1844
|
*/
|
|
1811
1845
|
EntitySlug[];
|
|
1846
|
+
/**
|
|
1847
|
+
* when enable_relation_tags is set to true the user will be able to set tags(labels) in each relation item
|
|
1848
|
+
*/
|
|
1849
|
+
enable_relation_tags?: boolean;
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* example:
|
|
1853
|
+
* {
|
|
1854
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1855
|
+
* "_org": "123",
|
|
1856
|
+
* "_schema": "contact",
|
|
1857
|
+
* "_tags": [
|
|
1858
|
+
* "example",
|
|
1859
|
+
* "mock"
|
|
1860
|
+
* ],
|
|
1861
|
+
* "_created_at": {},
|
|
1862
|
+
* "_updated_at": {}
|
|
1863
|
+
* }
|
|
1864
|
+
*/
|
|
1865
|
+
export interface RelationEntity {
|
|
1866
|
+
_id: EntityId /* uuid */;
|
|
1867
|
+
/**
|
|
1868
|
+
* Title of entity
|
|
1869
|
+
*/
|
|
1870
|
+
_title: string;
|
|
1871
|
+
/**
|
|
1872
|
+
* Organization Id the entity belongs to
|
|
1873
|
+
*/
|
|
1874
|
+
_org: string;
|
|
1875
|
+
_schema: /**
|
|
1876
|
+
* URL-friendly identifier for the entity schema
|
|
1877
|
+
* example:
|
|
1878
|
+
* contact
|
|
1879
|
+
*/
|
|
1880
|
+
EntitySlug;
|
|
1881
|
+
_tags?: string[];
|
|
1882
|
+
_created_at: string; // date-time
|
|
1883
|
+
_updated_at: string; // date-time
|
|
1884
|
+
$relation?: RelationItem;
|
|
1885
|
+
}
|
|
1886
|
+
export interface RelationItem {
|
|
1887
|
+
entity_id: EntityId /* uuid */;
|
|
1888
|
+
attribute: string;
|
|
1889
|
+
_tags?: string[];
|
|
1812
1890
|
}
|
|
1813
1891
|
/**
|
|
1814
1892
|
* Repeatable (add N number of fields)
|
|
@@ -1883,6 +1961,26 @@ declare namespace Components {
|
|
|
1883
1961
|
* Generated uuid for schema
|
|
1884
1962
|
*/
|
|
1885
1963
|
export type SchemaId = string; // uuid
|
|
1964
|
+
/**
|
|
1965
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1966
|
+
*
|
|
1967
|
+
* example:
|
|
1968
|
+
* {
|
|
1969
|
+
* "image": {
|
|
1970
|
+
* "type": "keyword",
|
|
1971
|
+
* "index": false
|
|
1972
|
+
* }
|
|
1973
|
+
* }
|
|
1974
|
+
*/
|
|
1975
|
+
export interface SearchMappings {
|
|
1976
|
+
[name: string]: {
|
|
1977
|
+
index?: boolean;
|
|
1978
|
+
type?: "keyword" | "text" | "boolean" | "integer" | "long" | "float" | "date" | "flattened" | "nested";
|
|
1979
|
+
fields?: {
|
|
1980
|
+
[name: string]: any;
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1886
1984
|
/**
|
|
1887
1985
|
* Dropdown select
|
|
1888
1986
|
*/
|
|
@@ -2155,6 +2253,25 @@ declare namespace Components {
|
|
|
2155
2253
|
}
|
|
2156
2254
|
}
|
|
2157
2255
|
declare namespace Paths {
|
|
2256
|
+
namespace AddRelations {
|
|
2257
|
+
namespace Parameters {
|
|
2258
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2259
|
+
export type Slug = /**
|
|
2260
|
+
* URL-friendly identifier for the entity schema
|
|
2261
|
+
* example:
|
|
2262
|
+
* contact
|
|
2263
|
+
*/
|
|
2264
|
+
Components.Schemas.EntitySlug;
|
|
2265
|
+
}
|
|
2266
|
+
export interface PathParameters {
|
|
2267
|
+
slug: Parameters.Slug;
|
|
2268
|
+
id: Parameters.Id;
|
|
2269
|
+
}
|
|
2270
|
+
export type RequestBody = Components.Schemas.RelationItem[];
|
|
2271
|
+
namespace Responses {
|
|
2272
|
+
export type $200 = Components.Schemas.RelationItem;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2158
2275
|
namespace AttachActivity {
|
|
2159
2276
|
namespace Parameters {
|
|
2160
2277
|
export type Entities = Components.Schemas.EntityId /* uuid */[];
|
|
@@ -2300,6 +2417,29 @@ declare namespace Paths {
|
|
|
2300
2417
|
}
|
|
2301
2418
|
}
|
|
2302
2419
|
}
|
|
2420
|
+
namespace DeleteRelation {
|
|
2421
|
+
namespace Parameters {
|
|
2422
|
+
export type Attribute = string;
|
|
2423
|
+
export type EntityId = string;
|
|
2424
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2425
|
+
export type Slug = /**
|
|
2426
|
+
* URL-friendly identifier for the entity schema
|
|
2427
|
+
* example:
|
|
2428
|
+
* contact
|
|
2429
|
+
*/
|
|
2430
|
+
Components.Schemas.EntitySlug;
|
|
2431
|
+
}
|
|
2432
|
+
export interface PathParameters {
|
|
2433
|
+
slug: Parameters.Slug;
|
|
2434
|
+
id: Parameters.Id;
|
|
2435
|
+
attribute: Parameters.Attribute;
|
|
2436
|
+
entity_id: Parameters.EntityId;
|
|
2437
|
+
}
|
|
2438
|
+
namespace Responses {
|
|
2439
|
+
export interface $204 {
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2303
2443
|
namespace DeleteSchema {
|
|
2304
2444
|
namespace Parameters {
|
|
2305
2445
|
export type Slug = /**
|
|
@@ -2431,6 +2571,28 @@ declare namespace Paths {
|
|
|
2431
2571
|
}
|
|
2432
2572
|
}
|
|
2433
2573
|
}
|
|
2574
|
+
namespace GetRelations {
|
|
2575
|
+
namespace Parameters {
|
|
2576
|
+
export type Hydrate = boolean;
|
|
2577
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2578
|
+
export type Slug = /**
|
|
2579
|
+
* URL-friendly identifier for the entity schema
|
|
2580
|
+
* example:
|
|
2581
|
+
* contact
|
|
2582
|
+
*/
|
|
2583
|
+
Components.Schemas.EntitySlug;
|
|
2584
|
+
}
|
|
2585
|
+
export interface PathParameters {
|
|
2586
|
+
slug: Parameters.Slug;
|
|
2587
|
+
id: Parameters.Id;
|
|
2588
|
+
}
|
|
2589
|
+
export interface QueryParameters {
|
|
2590
|
+
hydrate?: Parameters.Hydrate;
|
|
2591
|
+
}
|
|
2592
|
+
namespace Responses {
|
|
2593
|
+
export type $200 = Components.Schemas.GetRelationsResp;
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2434
2596
|
namespace GetSchema {
|
|
2435
2597
|
namespace Parameters {
|
|
2436
2598
|
export type Slug = /**
|
|
@@ -2519,6 +2681,31 @@ declare namespace Paths {
|
|
|
2519
2681
|
Components.Schemas.EntityItem;
|
|
2520
2682
|
}
|
|
2521
2683
|
}
|
|
2684
|
+
namespace UpdateRelation {
|
|
2685
|
+
namespace Parameters {
|
|
2686
|
+
export type Attribute = string;
|
|
2687
|
+
export type EntityId = string;
|
|
2688
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2689
|
+
export type Slug = /**
|
|
2690
|
+
* URL-friendly identifier for the entity schema
|
|
2691
|
+
* example:
|
|
2692
|
+
* contact
|
|
2693
|
+
*/
|
|
2694
|
+
Components.Schemas.EntitySlug;
|
|
2695
|
+
}
|
|
2696
|
+
export interface PathParameters {
|
|
2697
|
+
slug: Parameters.Slug;
|
|
2698
|
+
id: Parameters.Id;
|
|
2699
|
+
attribute: Parameters.Attribute;
|
|
2700
|
+
entity_id: Parameters.EntityId;
|
|
2701
|
+
}
|
|
2702
|
+
export interface RequestBody {
|
|
2703
|
+
_tags?: string[];
|
|
2704
|
+
}
|
|
2705
|
+
namespace Responses {
|
|
2706
|
+
export type $200 = Components.Schemas.RelationItem;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2522
2709
|
namespace UpsertEntity {
|
|
2523
2710
|
namespace Parameters {
|
|
2524
2711
|
export type ActivityId = /**
|
|
@@ -2886,6 +3073,46 @@ export interface OperationMethods {
|
|
|
2886
3073
|
data?: any,
|
|
2887
3074
|
config?: AxiosRequestConfig
|
|
2888
3075
|
): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
|
|
3076
|
+
/**
|
|
3077
|
+
* getRelations - getRelations
|
|
3078
|
+
*
|
|
3079
|
+
* It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
|
|
3080
|
+
*/
|
|
3081
|
+
'getRelations'(
|
|
3082
|
+
parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
|
|
3083
|
+
data?: any,
|
|
3084
|
+
config?: AxiosRequestConfig
|
|
3085
|
+
): OperationResponse<Paths.GetRelations.Responses.$200>
|
|
3086
|
+
/**
|
|
3087
|
+
* addRelations - addRelations
|
|
3088
|
+
*
|
|
3089
|
+
* It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
|
|
3090
|
+
*/
|
|
3091
|
+
'addRelations'(
|
|
3092
|
+
parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
|
|
3093
|
+
data?: Paths.AddRelations.RequestBody,
|
|
3094
|
+
config?: AxiosRequestConfig
|
|
3095
|
+
): OperationResponse<Paths.AddRelations.Responses.$200>
|
|
3096
|
+
/**
|
|
3097
|
+
* updateRelation - updateRelation
|
|
3098
|
+
*
|
|
3099
|
+
* It updates a relation between two entities.
|
|
3100
|
+
*/
|
|
3101
|
+
'updateRelation'(
|
|
3102
|
+
parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
|
|
3103
|
+
data?: Paths.UpdateRelation.RequestBody,
|
|
3104
|
+
config?: AxiosRequestConfig
|
|
3105
|
+
): OperationResponse<Paths.UpdateRelation.Responses.$200>
|
|
3106
|
+
/**
|
|
3107
|
+
* deleteRelation - deleteRelation
|
|
3108
|
+
*
|
|
3109
|
+
* It deletes a relation between one entity and the other.
|
|
3110
|
+
*/
|
|
3111
|
+
'deleteRelation'(
|
|
3112
|
+
parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
|
|
3113
|
+
data?: any,
|
|
3114
|
+
config?: AxiosRequestConfig
|
|
3115
|
+
): OperationResponse<Paths.DeleteRelation.Responses.$204>
|
|
2889
3116
|
}
|
|
2890
3117
|
|
|
2891
3118
|
export interface PathsDictionary {
|
|
@@ -3209,6 +3436,50 @@ export interface PathsDictionary {
|
|
|
3209
3436
|
config?: AxiosRequestConfig
|
|
3210
3437
|
): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
|
|
3211
3438
|
}
|
|
3439
|
+
['/v1/entity/{slug}/{id}/relations']: {
|
|
3440
|
+
/**
|
|
3441
|
+
* getRelations - getRelations
|
|
3442
|
+
*
|
|
3443
|
+
* It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
|
|
3444
|
+
*/
|
|
3445
|
+
'get'(
|
|
3446
|
+
parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
|
|
3447
|
+
data?: any,
|
|
3448
|
+
config?: AxiosRequestConfig
|
|
3449
|
+
): OperationResponse<Paths.GetRelations.Responses.$200>
|
|
3450
|
+
/**
|
|
3451
|
+
* addRelations - addRelations
|
|
3452
|
+
*
|
|
3453
|
+
* It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
|
|
3454
|
+
*/
|
|
3455
|
+
'post'(
|
|
3456
|
+
parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
|
|
3457
|
+
data?: Paths.AddRelations.RequestBody,
|
|
3458
|
+
config?: AxiosRequestConfig
|
|
3459
|
+
): OperationResponse<Paths.AddRelations.Responses.$200>
|
|
3460
|
+
}
|
|
3461
|
+
['/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}']: {
|
|
3462
|
+
/**
|
|
3463
|
+
* updateRelation - updateRelation
|
|
3464
|
+
*
|
|
3465
|
+
* It updates a relation between two entities.
|
|
3466
|
+
*/
|
|
3467
|
+
'put'(
|
|
3468
|
+
parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
|
|
3469
|
+
data?: Paths.UpdateRelation.RequestBody,
|
|
3470
|
+
config?: AxiosRequestConfig
|
|
3471
|
+
): OperationResponse<Paths.UpdateRelation.Responses.$200>
|
|
3472
|
+
/**
|
|
3473
|
+
* deleteRelation - deleteRelation
|
|
3474
|
+
*
|
|
3475
|
+
* It deletes a relation between one entity and the other.
|
|
3476
|
+
*/
|
|
3477
|
+
'delete'(
|
|
3478
|
+
parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
|
|
3479
|
+
data?: any,
|
|
3480
|
+
config?: AxiosRequestConfig
|
|
3481
|
+
): OperationResponse<Paths.DeleteRelation.Responses.$204>
|
|
3482
|
+
}
|
|
3212
3483
|
}
|
|
3213
3484
|
|
|
3214
3485
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/dist/openapi.json
CHANGED
|
@@ -819,6 +819,295 @@
|
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
+
},
|
|
823
|
+
"/v1/entity/{slug}/{id}/relations": {
|
|
824
|
+
"get": {
|
|
825
|
+
"operationId": "getRelations",
|
|
826
|
+
"summary": "getRelations",
|
|
827
|
+
"description": "It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.",
|
|
828
|
+
"tags": [
|
|
829
|
+
"Relations"
|
|
830
|
+
],
|
|
831
|
+
"parameters": [
|
|
832
|
+
{
|
|
833
|
+
"in": "path",
|
|
834
|
+
"name": "slug",
|
|
835
|
+
"description": "Entity Type",
|
|
836
|
+
"required": true,
|
|
837
|
+
"schema": {
|
|
838
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"in": "path",
|
|
843
|
+
"name": "id",
|
|
844
|
+
"description": "Entity id",
|
|
845
|
+
"required": true,
|
|
846
|
+
"schema": {
|
|
847
|
+
"$ref": "#/components/schemas/EntityId"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"in": "query",
|
|
852
|
+
"name": "hydrate",
|
|
853
|
+
"description": "When true, expand relation items with full blown entities.",
|
|
854
|
+
"schema": {
|
|
855
|
+
"default": false,
|
|
856
|
+
"type": "boolean"
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
],
|
|
860
|
+
"responses": {
|
|
861
|
+
"200": {
|
|
862
|
+
"description": "Success",
|
|
863
|
+
"content": {
|
|
864
|
+
"application/json": {
|
|
865
|
+
"schema": {
|
|
866
|
+
"$ref": "#/components/schemas/GetRelationsResp"
|
|
867
|
+
},
|
|
868
|
+
"example": [
|
|
869
|
+
{
|
|
870
|
+
"attribute": "contacts",
|
|
871
|
+
"entity_id": "ed27830b-984c-4bca-9b87-2849bb5789ca",
|
|
872
|
+
"_tags": [
|
|
873
|
+
"primary",
|
|
874
|
+
"billing"
|
|
875
|
+
]
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"attribute": "contacts",
|
|
879
|
+
"entity_id": "fadfc950-6e43-4e38-bae0-ffcf4b8b90e1"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"_id": "9924c4de-d3ed-4752-821d-fc0b9bd57c1b",
|
|
883
|
+
"order_number": "a34234jd",
|
|
884
|
+
"customer_email": "johndoe@epilot.cloud",
|
|
885
|
+
"billing_first_name": "john",
|
|
886
|
+
"billing_last_name": "doe",
|
|
887
|
+
"billing_company_name": "ePilot Gmbh",
|
|
888
|
+
"billing_vat": "234823948,",
|
|
889
|
+
"billing_email": "johndoe@nowhere.com",
|
|
890
|
+
"billing_phone": "1234234545,",
|
|
891
|
+
"billing_address": "wallstreet, 1",
|
|
892
|
+
"billing_contact": "villy or zilly",
|
|
893
|
+
"$relation": {
|
|
894
|
+
"attribute": "orders",
|
|
895
|
+
"entity_id": "9924c4de-d3ed-4752-821d-fc0b9bd57c1b",
|
|
896
|
+
"_tags": [
|
|
897
|
+
"solar_panel",
|
|
898
|
+
"one_time"
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
"post": {
|
|
909
|
+
"operationId": "addRelations",
|
|
910
|
+
"summary": "addRelations",
|
|
911
|
+
"description": "It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.",
|
|
912
|
+
"tags": [
|
|
913
|
+
"Relations"
|
|
914
|
+
],
|
|
915
|
+
"parameters": [
|
|
916
|
+
{
|
|
917
|
+
"in": "path",
|
|
918
|
+
"name": "slug",
|
|
919
|
+
"description": "Entity Type",
|
|
920
|
+
"required": true,
|
|
921
|
+
"schema": {
|
|
922
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"in": "path",
|
|
927
|
+
"name": "id",
|
|
928
|
+
"description": "Entity id",
|
|
929
|
+
"required": true,
|
|
930
|
+
"schema": {
|
|
931
|
+
"$ref": "#/components/schemas/EntityId"
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
],
|
|
935
|
+
"requestBody": {
|
|
936
|
+
"content": {
|
|
937
|
+
"application/json": {
|
|
938
|
+
"schema": {
|
|
939
|
+
"type": "array",
|
|
940
|
+
"items": {
|
|
941
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"example": [
|
|
945
|
+
{
|
|
946
|
+
"attribute": "contacts",
|
|
947
|
+
"entity_id": "e8878f62-2d3d-4c86-bfe7-01a4180ff048",
|
|
948
|
+
"_tags": [
|
|
949
|
+
"billing"
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"attribute": "contacts",
|
|
954
|
+
"entity_id": "ee8a2af9-fb36-4981-b848-4e65275851af"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"attribute": "opportunities",
|
|
958
|
+
"entity_id": "30990430-a53d-41a2-83db-2de072dc4dd4"
|
|
959
|
+
}
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
"responses": {
|
|
965
|
+
"200": {
|
|
966
|
+
"description": "Success",
|
|
967
|
+
"content": {
|
|
968
|
+
"application/json": {
|
|
969
|
+
"schema": {
|
|
970
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}": {
|
|
979
|
+
"put": {
|
|
980
|
+
"operationId": "updateRelation",
|
|
981
|
+
"summary": "updateRelation",
|
|
982
|
+
"description": "It updates a relation between two entities.",
|
|
983
|
+
"tags": [
|
|
984
|
+
"Relations"
|
|
985
|
+
],
|
|
986
|
+
"parameters": [
|
|
987
|
+
{
|
|
988
|
+
"in": "path",
|
|
989
|
+
"name": "slug",
|
|
990
|
+
"description": "Entity Type",
|
|
991
|
+
"required": true,
|
|
992
|
+
"schema": {
|
|
993
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"in": "path",
|
|
998
|
+
"name": "id",
|
|
999
|
+
"description": "Entity id",
|
|
1000
|
+
"required": true,
|
|
1001
|
+
"schema": {
|
|
1002
|
+
"$ref": "#/components/schemas/EntityId"
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"in": "path",
|
|
1007
|
+
"name": "attribute",
|
|
1008
|
+
"description": "The attribute that express meaning",
|
|
1009
|
+
"required": true,
|
|
1010
|
+
"schema": {
|
|
1011
|
+
"type": "string"
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"in": "path",
|
|
1016
|
+
"name": "entity_id",
|
|
1017
|
+
"description": "The attribute that express meaning",
|
|
1018
|
+
"required": true,
|
|
1019
|
+
"schema": {
|
|
1020
|
+
"type": "string"
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
],
|
|
1024
|
+
"requestBody": {
|
|
1025
|
+
"content": {
|
|
1026
|
+
"application/json": {
|
|
1027
|
+
"schema": {
|
|
1028
|
+
"type": "object",
|
|
1029
|
+
"properties": {
|
|
1030
|
+
"_tags": {
|
|
1031
|
+
"type": "array",
|
|
1032
|
+
"items": {
|
|
1033
|
+
"type": "string"
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
"example": {
|
|
1039
|
+
"_tags": [
|
|
1040
|
+
"billing",
|
|
1041
|
+
"prepaid"
|
|
1042
|
+
]
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
"responses": {
|
|
1048
|
+
"200": {
|
|
1049
|
+
"description": "Success",
|
|
1050
|
+
"content": {
|
|
1051
|
+
"application/json": {
|
|
1052
|
+
"schema": {
|
|
1053
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
"delete": {
|
|
1061
|
+
"operationId": "deleteRelation",
|
|
1062
|
+
"summary": "deleteRelation",
|
|
1063
|
+
"description": "It deletes a relation between one entity and the other.",
|
|
1064
|
+
"tags": [
|
|
1065
|
+
"Relations"
|
|
1066
|
+
],
|
|
1067
|
+
"parameters": [
|
|
1068
|
+
{
|
|
1069
|
+
"in": "path",
|
|
1070
|
+
"name": "slug",
|
|
1071
|
+
"description": "Entity Type",
|
|
1072
|
+
"required": true,
|
|
1073
|
+
"schema": {
|
|
1074
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"in": "path",
|
|
1079
|
+
"name": "id",
|
|
1080
|
+
"description": "Entity id",
|
|
1081
|
+
"required": true,
|
|
1082
|
+
"schema": {
|
|
1083
|
+
"$ref": "#/components/schemas/EntityId"
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"in": "path",
|
|
1088
|
+
"name": "attribute",
|
|
1089
|
+
"description": "The attribute that express meaning",
|
|
1090
|
+
"required": true,
|
|
1091
|
+
"schema": {
|
|
1092
|
+
"type": "string"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
"in": "path",
|
|
1097
|
+
"name": "entity_id",
|
|
1098
|
+
"description": "The attribute that express meaning",
|
|
1099
|
+
"required": true,
|
|
1100
|
+
"schema": {
|
|
1101
|
+
"type": "string"
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
],
|
|
1105
|
+
"responses": {
|
|
1106
|
+
"204": {
|
|
1107
|
+
"description": "Relation deleted with success."
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
822
1111
|
}
|
|
823
1112
|
},
|
|
824
1113
|
"components": {
|
|
@@ -899,10 +1188,6 @@
|
|
|
899
1188
|
"description": "List of attributes to show in list item",
|
|
900
1189
|
"example": "email"
|
|
901
1190
|
}
|
|
902
|
-
},
|
|
903
|
-
"enable_relation_tags": {
|
|
904
|
-
"type": "boolean",
|
|
905
|
-
"default": true
|
|
906
1191
|
}
|
|
907
1192
|
}
|
|
908
1193
|
}
|
|
@@ -1003,6 +1288,9 @@
|
|
|
1003
1288
|
"label": "Image"
|
|
1004
1289
|
}
|
|
1005
1290
|
]
|
|
1291
|
+
},
|
|
1292
|
+
"explicit_search_mappings": {
|
|
1293
|
+
"$ref": "#/components/schemas/SearchMappings"
|
|
1006
1294
|
}
|
|
1007
1295
|
},
|
|
1008
1296
|
"required": [
|
|
@@ -1542,6 +1830,11 @@
|
|
|
1542
1830
|
"items": {
|
|
1543
1831
|
"$ref": "#/components/schemas/EntitySlug"
|
|
1544
1832
|
}
|
|
1833
|
+
},
|
|
1834
|
+
"enable_relation_tags": {
|
|
1835
|
+
"type": "boolean",
|
|
1836
|
+
"default": true,
|
|
1837
|
+
"description": "when enable_relation_tags is set to true the user will be able to set tags(labels) in each relation item"
|
|
1545
1838
|
}
|
|
1546
1839
|
}
|
|
1547
1840
|
}
|
|
@@ -2199,6 +2492,55 @@
|
|
|
2199
2492
|
}
|
|
2200
2493
|
]
|
|
2201
2494
|
},
|
|
2495
|
+
"GetRelationsResp": {
|
|
2496
|
+
"type": "array",
|
|
2497
|
+
"items": {
|
|
2498
|
+
"anyOf": [
|
|
2499
|
+
{
|
|
2500
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"$ref": "#/components/schemas/RelationEntity"
|
|
2504
|
+
}
|
|
2505
|
+
]
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
"RelationEntity": {
|
|
2509
|
+
"allOf": [
|
|
2510
|
+
{
|
|
2511
|
+
"$ref": "#/components/schemas/BaseEntity"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"type": "object",
|
|
2515
|
+
"properties": {
|
|
2516
|
+
"$relation": {
|
|
2517
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
]
|
|
2522
|
+
},
|
|
2523
|
+
"RelationItem": {
|
|
2524
|
+
"type": "object",
|
|
2525
|
+
"properties": {
|
|
2526
|
+
"entity_id": {
|
|
2527
|
+
"$ref": "#/components/schemas/EntityId"
|
|
2528
|
+
},
|
|
2529
|
+
"attribute": {
|
|
2530
|
+
"type": "string"
|
|
2531
|
+
},
|
|
2532
|
+
"_tags": {
|
|
2533
|
+
"type": "array",
|
|
2534
|
+
"items": {
|
|
2535
|
+
"type": "string"
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
},
|
|
2539
|
+
"required": [
|
|
2540
|
+
"entity_id",
|
|
2541
|
+
"attribute"
|
|
2542
|
+
]
|
|
2543
|
+
},
|
|
2202
2544
|
"EntitySearchParams": {
|
|
2203
2545
|
"type": "object",
|
|
2204
2546
|
"properties": {
|
|
@@ -2237,14 +2579,6 @@
|
|
|
2237
2579
|
"_title",
|
|
2238
2580
|
"first_name"
|
|
2239
2581
|
]
|
|
2240
|
-
},
|
|
2241
|
-
"expand": {
|
|
2242
|
-
"deprecated": true,
|
|
2243
|
-
"type": "array",
|
|
2244
|
-
"description": "Deprecated. Use hydrate=true instead",
|
|
2245
|
-
"items": {
|
|
2246
|
-
"type": "string"
|
|
2247
|
-
}
|
|
2248
2582
|
}
|
|
2249
2583
|
},
|
|
2250
2584
|
"required": [
|
|
@@ -2266,6 +2600,42 @@
|
|
|
2266
2600
|
}
|
|
2267
2601
|
}
|
|
2268
2602
|
},
|
|
2603
|
+
"SearchMappings": {
|
|
2604
|
+
"description": "Advanced: explicit Elasticsearch index mapping definitions for entity data\n",
|
|
2605
|
+
"example": {
|
|
2606
|
+
"image": {
|
|
2607
|
+
"type": "keyword",
|
|
2608
|
+
"index": false
|
|
2609
|
+
}
|
|
2610
|
+
},
|
|
2611
|
+
"type": "object",
|
|
2612
|
+
"additionalProperties": {
|
|
2613
|
+
"type": "object",
|
|
2614
|
+
"properties": {
|
|
2615
|
+
"index": {
|
|
2616
|
+
"type": "boolean",
|
|
2617
|
+
"default": true
|
|
2618
|
+
},
|
|
2619
|
+
"type": {
|
|
2620
|
+
"type": "string",
|
|
2621
|
+
"enum": [
|
|
2622
|
+
"keyword",
|
|
2623
|
+
"text",
|
|
2624
|
+
"boolean",
|
|
2625
|
+
"integer",
|
|
2626
|
+
"long",
|
|
2627
|
+
"float",
|
|
2628
|
+
"date",
|
|
2629
|
+
"flattened",
|
|
2630
|
+
"nested"
|
|
2631
|
+
]
|
|
2632
|
+
},
|
|
2633
|
+
"fields": {
|
|
2634
|
+
"additionalProperties": true
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2269
2639
|
"ActivityId": {
|
|
2270
2640
|
"type": "string",
|
|
2271
2641
|
"format": "ulid",
|
|
@@ -2366,9 +2736,17 @@
|
|
|
2366
2736
|
"entity": {
|
|
2367
2737
|
"$ref": "#/components/schemas/EntityId"
|
|
2368
2738
|
},
|
|
2739
|
+
"org": {
|
|
2740
|
+
"type": "string",
|
|
2741
|
+
"example": "123"
|
|
2742
|
+
},
|
|
2369
2743
|
"operation": {
|
|
2370
2744
|
"type": "string",
|
|
2371
|
-
"
|
|
2745
|
+
"enum": [
|
|
2746
|
+
"createEntity",
|
|
2747
|
+
"updateEntity",
|
|
2748
|
+
"deleteEntity"
|
|
2749
|
+
]
|
|
2372
2750
|
},
|
|
2373
2751
|
"params": {
|
|
2374
2752
|
"type": "object",
|
|
@@ -2402,7 +2780,8 @@
|
|
|
2402
2780
|
},
|
|
2403
2781
|
"required": [
|
|
2404
2782
|
"entity",
|
|
2405
|
-
"
|
|
2783
|
+
"org",
|
|
2784
|
+
"operation"
|
|
2406
2785
|
]
|
|
2407
2786
|
},
|
|
2408
2787
|
"ActivityItem": {
|