Skip to content

Commit

Permalink
chore(entity-client): update client with new spec for partner_organis…
Browse files Browse the repository at this point in the history
…ation attribute
  • Loading branch information
Ankur Kedia committed Sep 7, 2023
1 parent aa623f0 commit faca43f
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 9 deletions.
4 changes: 2 additions & 2 deletions clients/entity-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions clients/entity-client/src/openapi-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@
{
"in": "query",
"name": "type"
},
{
"in": "query",
"name": "include_relations"
}
]
}
Expand Down Expand Up @@ -662,6 +666,11 @@
]
}
},
"/v1/entity/views/favorites": {
"get": {
"operationId": "listFavoriteViewsForUser"
}
},
"/v1/entity/listTaxonomies": {
"get": {
"operationId": "listTaxonomies"
Expand Down
161 changes: 160 additions & 1 deletion clients/entity-client/src/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ declare namespace Components {
type?: "relation_address";
has_primary?: boolean;
}
export type Attribute = /* Textarea or text input */ TextAttribute | /* Link with title and href */ LinkAttribute | /* Date or Datetime picker */ DateAttribute | /* Country picker */ CountryAttribute | /* Yes / No Toggle */ BooleanAttribute | /* Dropdown select */ SelectAttribute | /* Multi Choice Selection */ MultiSelectAttribute | /* Status select */ StatusAttribute | /* Sequence of unique identifiers */ SequenceAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Reference to a payment method attribute of another entity */ PaymentMethodRelationAttribute | /* Currency input */ CurrencyAttribute | /* Repeatable (add N number of fields) */ RepeatableAttribute | /* Tags */ TagsAttribute | /* Numeric input */ NumberAttribute | /* Consent Management */ ConsentAttribute | /* No UI representation */ InternalAttribute | /* Type of attribute to render N number of ordered fields */ OrderedListAttribute | /* File or Image Attachment */ FileAttribute | /* An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes) */ ComputedAttribute | /* Partner Status */ PartnerStatusAttribute | /* Email address for send invitation */ InvitationEmailAttribute | /* Automation entity */ AutomationAttribute | /* Epilot internal user info */ InternalUserAttribute | /* Entity Taxonomy */ PurposeAttribute;
export type Attribute = /* Textarea or text input */ TextAttribute | /* Link with title and href */ LinkAttribute | /* Date or Datetime picker */ DateAttribute | /* Country picker */ CountryAttribute | /* Yes / No Toggle */ BooleanAttribute | /* Dropdown select */ SelectAttribute | /* Multi Choice Selection */ MultiSelectAttribute | /* Status select */ StatusAttribute | /* Sequence of unique identifiers */ SequenceAttribute | /* Entity Relationship */ RelationAttribute | /* User Relationship */ UserRelationAttribute | /* Reference to an address attribute of another entity */ AddressRelationAttribute | /* Reference to a payment method attribute of another entity */ PaymentMethodRelationAttribute | /* Currency input */ CurrencyAttribute | /* Repeatable (add N number of fields) */ RepeatableAttribute | /* Tags */ TagsAttribute | /* Numeric input */ NumberAttribute | /* Consent Management */ ConsentAttribute | /* No UI representation */ InternalAttribute | /* Type of attribute to render N number of ordered fields */ OrderedListAttribute | /* File or Image Attachment */ FileAttribute | /* An attribute that is computed from the entity data. For more details on how to use them, check the docs [here](https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5642977476/How+To+Computed+Schema+Attributes) */ ComputedAttribute | /* Partner Status */ PartnerStatusAttribute | /* Email address for send invitation */ InvitationEmailAttribute | /* Automation entity */ AutomationAttribute | /* Epilot internal user info */ InternalUserAttribute | /* Entity Taxonomy */ PurposeAttribute | /* Shared Partner Organisations */ ParterOrganisationAttribute;
/**
* Automation entity
*/
Expand Down Expand Up @@ -3746,6 +3746,126 @@ declare namespace Components {
};
type?: "ordered_list";
}
/**
* Shared Partner Organisations
*/
export interface ParterOrganisationAttribute {
name: string;
label: string;
placeholder?: string;
/**
* Do not render attribute in entity views
*/
hidden?: boolean;
/**
* Render as a column in table views. When defined, overrides `hidden`
*/
show_in_table?: boolean;
required?: boolean;
readonly?: boolean;
deprecated?: boolean;
default_value?: any;
/**
* Which group the attribute should appear in. Accepts group ID or group name
*/
group?: string;
/**
* Attribute sort order (ascending) in group
* example:
* 0
*/
order?: number;
/**
* example:
* full_width
*/
layout?: string;
/**
* When set to true, will hide the label of the field.
*/
hide_label?: boolean;
/**
* Code name of the icon to used to represent this attribute.
* The value must be a valid @epilot/base-elements Icon name
*
*/
icon?: string;
/**
* Defines the conditional rendering expression for showing this field.
* When a valid expression is parsed, their evaluation defines the visibility of this attribute.
* Note: Empty or invalid expression have no effect on the field visibility.
*
*/
render_condition?: string;
_purpose?: ClassificationId /* uuid */[];
/**
* A set of constraints applicable to the attribute.
* These constraints should and will be enforced by the attribute renderer.
*
* example:
* {
* "disablePast": true
* }
*/
constraints?: {
[key: string]: any;
};
/**
* This attribute should only be active when the feature flag is enabled
* example:
* FF_MY_FEATURE_FLAG
*/
feature_flag?: string;
/**
* This attribute should only be active when the setting is enabled
* example:
* MY_SETTING
*/
setting_flag?: string;
value_formatter?: string;
preview_value_formatter?: string;
/**
* Setting to `true` disables editing the attribute on the entity builder UI
*/
entity_builder_disable_edit?: boolean;
/**
* Setting to `true` prevents the attribute from being modified / deleted
*/
protected?: boolean;
/**
* A set of configurations meant to document and assist the user in filling the attribute.
*/
info_helpers?: {
/**
* The text to be displayed in the attribute hint helper.
* When specified it overrides the `hint_text_key` configuration.
*
*/
hint_text?: string;
/**
* The key of the hint text to be displayed in the attribute hint helper.
* The key should be a valid i18n key.
*
*/
hint_text_key?: string;
/**
* The name of the custom component to be used as the hint helper.
* The component should be registered in the `@epilot360/entity-ui` on the index of the components directory.
* When specified it overrides the `hint_text` or `hint_text_key` configuration.
*
*/
hint_custom_component?: string;
/**
* The placement of the hint tooltip.
* The value should be a valid `@mui/core` tooltip placement.
*
* example:
* top
*/
hint_tooltip_placement?: string;
};
type?: "partner_organisation";
}
/**
* Partner Status
*/
Expand Down Expand Up @@ -4648,6 +4768,10 @@ declare namespace Components {
* true
*/
shared?: boolean;
/**
* List of users (IDs) that have favorited the view
*/
isFavoritedBy?: string[];
created_by: {
/**
* example:
Expand Down Expand Up @@ -4717,6 +4841,10 @@ declare namespace Components {
* true
*/
shared?: boolean;
/**
* List of users (IDs) that have favorited the view
*/
isFavoritedBy?: string[];
created_by: {
/**
* example:
Expand Down Expand Up @@ -6074,6 +6202,7 @@ declare namespace Paths {
export type Before = string; // date-time
export type From = number;
export type Id = Components.Schemas.EntityId /* uuid */;
export type IncludeRelations = boolean;
export type Size = number;
export type Slug = /**
* URL-friendly identifier for the entity schema
Expand Down Expand Up @@ -6101,6 +6230,7 @@ declare namespace Paths {
* SyncActivity
*/
Parameters.Type;
include_relations?: Parameters.IncludeRelations;
}
namespace Responses {
export interface $200 {
Expand Down Expand Up @@ -6281,6 +6411,13 @@ declare namespace Paths {
}
}
}
namespace ListFavoriteViewsForUser {
namespace Responses {
export interface $200 {
results?: /* A saved entity view */ Components.Schemas.SavedViewItem[];
}
}
}
namespace ListSavedViews {
namespace Responses {
export interface $200 {
Expand Down Expand Up @@ -7388,6 +7525,16 @@ export interface OperationMethods {
data?: any,
config?: AxiosRequestConfig
): OperationResponse<Paths.DeleteSavedView.Responses.$200>
/**
* listFavoriteViewsForUser - listFavoriteViewsForUser
*
* Get the Favorite Saved Views for user based on the schema
*/
'listFavoriteViewsForUser'(
parameters?: Parameters<UnknownParamsObject> | null,
data?: any,
config?: AxiosRequestConfig
): OperationResponse<Paths.ListFavoriteViewsForUser.Responses.$200>
/**
* listTaxonomies - listTaxonomies
*
Expand Down Expand Up @@ -8033,6 +8180,18 @@ export interface PathsDictionary {
config?: AxiosRequestConfig
): OperationResponse<Paths.DeleteSavedView.Responses.$200>
}
['/v1/entity/views/favorites']: {
/**
* listFavoriteViewsForUser - listFavoriteViewsForUser
*
* Get the Favorite Saved Views for user based on the schema
*/
'get'(
parameters?: Parameters<UnknownParamsObject> | null,
data?: any,
config?: AxiosRequestConfig
): OperationResponse<Paths.ListFavoriteViewsForUser.Responses.$200>
}
['/v1/entity/listTaxonomies']: {
/**
* listTaxonomies - listTaxonomies
Expand Down
76 changes: 70 additions & 6 deletions clients/entity-client/src/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1151,11 +1151,20 @@
{
"in": "query",
"name": "type",
"description": "Activity type",
"description": "Filter by activity type",
"schema": {
"type": "string",
"example": "SyncActivity"
}
},
{
"in": "query",
"name": "include_relations",
"description": "Include activities from related entities",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
Expand Down Expand Up @@ -1863,6 +1872,36 @@
}
}
},
"/v1/entity/views/favorites": {
"get": {
"operationId": "listFavoriteViewsForUser",
"summary": "listFavoriteViewsForUser",
"description": "Get the Favorite Saved Views for user based on the schema",
"tags": [
"Saved Views"
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SavedViewItem"
}
}
}
}
}
}
}
}
}
},
"/v1/entity/listTaxonomies": {
"get": {
"operationId": "listTaxonomies",
Expand Down Expand Up @@ -2558,6 +2597,9 @@
},
{
"$ref": "#/components/schemas/PurposeAttribute"
},
{
"$ref": "#/components/schemas/ParterOrganisationAttribute"
}
]
},
Expand Down Expand Up @@ -2947,11 +2989,6 @@
"title": {
"description": "The displayed title of the option",
"type": "string"
},
"hidden": {
"description": "If true, the option will not be displayed in the UI",
"type": "boolean",
"default": false
}
},
"required": [
Expand Down Expand Up @@ -3310,6 +3347,25 @@
}
]
},
"ParterOrganisationAttribute": {
"allOf": [
{
"$ref": "#/components/schemas/BaseAttribute"
},
{
"type": "object",
"description": "Shared Partner Organisations",
"properties": {
"type": {
"type": "string",
"enum": [
"partner_organisation"
]
}
}
}
]
},
"AddressRelationAttribute": {
"allOf": [
{
Expand Down Expand Up @@ -4735,6 +4791,14 @@
"type": "boolean",
"example": true
},
"isFavoritedBy": {
"description": "List of users (IDs) that have favorited the view",
"type": "array",
"items": {
"type": "string",
"example": 11701
}
},
"created_by": {
"anyOf": [
{
Expand Down

0 comments on commit faca43f

Please sign in to comment.