diff --git a/clients/entity-client/package-lock.json b/clients/entity-client/package-lock.json index 02f22743..682b9cfd 100644 --- a/clients/entity-client/package-lock.json +++ b/clients/entity-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@epilot/entity-client", - "version": "4.32.0", + "version": "4.34.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@epilot/entity-client", - "version": "4.32.0", + "version": "4.34.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", diff --git a/clients/entity-client/package.json b/clients/entity-client/package.json index 1645fb8f..57b0e0f4 100644 --- a/clients/entity-client/package.json +++ b/clients/entity-client/package.json @@ -1,6 +1,6 @@ { "name": "@epilot/entity-client", - "version": "4.33.0", + "version": "4.34.0", "description": "JavaScript client library for the epilot Core Entity API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/clients/entity-client/src/openapi-runtime.json b/clients/entity-client/src/openapi-runtime.json index 90114b5b..785f1df0 100644 --- a/clients/entity-client/src/openapi-runtime.json +++ b/clients/entity-client/src/openapi-runtime.json @@ -376,8 +376,7 @@ }, { "in": "query", - "name": "purge", - "default": false + "name": "purge" } ], "responses": {} @@ -996,6 +995,10 @@ { "in": "query", "name": "query" + }, + { + "in": "query", + "name": "archived" } ], "requestBody": { @@ -1028,9 +1031,9 @@ "responses": {} } }, - "/v1/entity/taxonomies/jobs": { + "/v1/entity/taxonomies/bulk-jobs": { "get": { - "operationId": "getJobs", + "operationId": "getTaxonomyBulkActionJobs", "parameters": [ { "in": "query", @@ -1040,15 +1043,22 @@ "responses": {} } }, - "/v1/entity/taxonomies/classifications:move": { - "post": { - "operationId": "bulkMoveClassifications", + "/v1/entity/taxonomies/bulk-jobs/{job_id}": { + "get": { + "operationId": "getTaxonomyBulkActionJobById", "parameters": [ { - "in": "query", - "name": "target_taxonomy" + "in": "path", + "name": "job_id", + "required": true } ], + "responses": {} + } + }, + "/v1/entity/taxonomies/classifications:move": { + "post": { + "operationId": "bulkMoveClassifications", "requestBody": { "content": { "application/json": {} @@ -1060,12 +1070,6 @@ "/v1/entity/taxonomies/classifications:delete": { "post": { "operationId": "bulkDeleteClassifications", - "parameters": [ - { - "in": "query", - "name": "permanent" - } - ], "requestBody": { "content": { "application/json": {} diff --git a/clients/entity-client/src/openapi.d.ts b/clients/entity-client/src/openapi.d.ts index 22780ed0..c79ab6b1 100644 --- a/clients/entity-client/src/openapi.d.ts +++ b/clients/entity-client/src/openapi.d.ts @@ -21,7 +21,7 @@ declare namespace Components { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type AsyncOperationQueryParam = boolean; export type DryRunQueryParam = boolean; export type EntityIdPathParam = Schemas.EntityId /* uuid */; @@ -239,6 +239,146 @@ declare namespace Components { operations_total?: number; operations?: EntityOperation[]; } + /** + * Address attribute + */ + export interface AddressAttribute { + /** + * ID for the entity attribute + * example: + * d5839b94-ba20-4225-a78e-76951d352bd6 + */ + id?: string; + 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; + /** + * Allow sorting by this attribute in table views if `show_in_table` is true + */ + sortable?: 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?: /** + * example: + * taxonomy-slug:classification-slug + */ + ClassificationId[]; + /** + * Manifest ID used to create/update the schema attribute + */ + _manifest?: string /* uuid */[] | null; + /** + * 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 one of the provided settings have the correct value + */ + settings_flag?: SettingFlag[]; + 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?: "address"; + /** + * Default fields visible on addresses + */ + default_address_fields?: ("postal_code" | "city" | "street" | "street_number" | "plot_area" | "plot_of_land" | "suburb" | "country" | "additional_info" | "coordinates" | "start_date" | "end_date")[]; + } /** * Reference to an address attribute of another entity */ @@ -376,7 +516,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 | /* Shared Partner Organisations */ PartnerOrganisationAttribute; + 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 | /* Address attribute */ AddressAttribute | /* 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 */ PartnerOrganisationAttribute; /** * a readonly computed ID for the attribute including schema slug and the attribute ID */ @@ -392,7 +532,7 @@ declare namespace Components { * contact */ schema?: string; - } & (/* a readonly computed ID for the attribute including schema slug and the attribute ID */ /* 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 */ PartnerOrganisationAttribute); + } & (/* a readonly computed ID for the attribute including schema slug and the attribute ID */ /* 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 | /* Address attribute */ AddressAttribute | /* 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 */ PartnerOrganisationAttribute); /** * Automation entity */ @@ -2488,6 +2628,11 @@ declare namespace Components { * https://docs.epilot.io/docs/pricing/entities */ docs_url?: string; // uri + /** + * example: + * customer_relations + */ + category?: "customer_relations" | "sales" | "product_hub" | "contracts" | "journeys" | "messaging" | "system"; /** * example: * false @@ -2857,6 +3002,11 @@ declare namespace Components { * https://docs.epilot.io/docs/pricing/entities */ docs_url?: string; // uri + /** + * example: + * customer_relations + */ + category?: "customer_relations" | "sales" | "product_hub" | "contracts" | "journeys" | "messaging" | "system"; /** * example: * false @@ -5480,8 +5630,18 @@ declare namespace Components { * taxonomy-slug:classification-slug */ ClassificationId[]; + /** + * Color of the classification + * example: + * #FF5733 + */ + color?: string; created_at?: string; // date-time updated_at?: string; // date-time + /** + * Archived classification are not visible in the UI + */ + archived?: boolean; type?: "purpose"; } /** @@ -7065,20 +7225,60 @@ declare namespace Components { */ enabled_locations?: TaxonomyLocationId[]; } + /** + * example: + * { + * "job_id": "123e4567-e89b-12d3-a456-426614174000", + * "status": "PENDING", + * "action_type": "MOVE_LABELS", + * "created_by": 10598, + * "created_at": "2024-01-01T00:00:00.000Z", + * "updated_at": "2024-01-01T00:00:00.000Z", + * "org": 66, + * "progress": 0.5 + * } + */ export interface TaxonomyBulkJob { job_id?: string; // uuid - status?: /* The status of the bulk job */ TaxonomyBulkJobStatus; - type?: TaxonomyBulkJobType; + job_status?: /* The status of the bulk job */ TaxonomyBulkJobStatus; + action_type?: TaxonomyBulkJobActionType; + request?: { + target_taxonomy?: /** + * URL-friendly name for taxonomy + * example: + * purpose + */ + TaxonomySlug; + classification_ids?: /** + * example: + * taxonomy-slug:classification-slug + */ + ClassificationId[]; + }; + output?: { + target_entities?: EntityId /* uuid */[]; + affected_entities?: EntityId /* uuid */[]; + failures_count?: number; + failed_entities?: EntityId /* uuid */[]; + }; + created_by?: string; + created_at?: string; // date-time + updated_at?: string; // date-time + org?: string; + /** + * Progress of the job on a scale of 0 to 1 + */ + progress?: number; } + export type TaxonomyBulkJobActionType = "MOVE_CLASSIFICATIONS" | "DELETE_CLASSIFICATIONS"; /** * The status of the bulk job */ - export type TaxonomyBulkJobStatus = "PENDING" | "FAILED" | "COMPLETED"; + export type TaxonomyBulkJobStatus = "PENDING" | "FAILED" | "COMPLETED" | "CANCELLED"; export interface TaxonomyBulkJobTriggerResponse { job_id?: string; // uuid status?: /* The status of the bulk job */ TaxonomyBulkJobStatus; } - export type TaxonomyBulkJobType = "MOVE_LABELS" | "DELETE_LABELS"; export interface TaxonomyClassification { id?: /** * example: @@ -7101,8 +7301,18 @@ declare namespace Components { * taxonomy-slug:classification-slug */ ClassificationId[]; + /** + * Color of the classification + * example: + * #FF5733 + */ + color?: string; created_at?: string; // date-time updated_at?: string; // date-time + /** + * Archived classification are not visible in the UI + */ + archived?: boolean; /** * Manifest ID used to create/update the taxonomy classification */ @@ -7400,7 +7610,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type Id = Components.Schemas.EntityId /* uuid */; export type Slug = /** @@ -7489,13 +7699,11 @@ declare namespace Paths { } } namespace BulkDeleteClassifications { - namespace Parameters { - export type Permanent = boolean; - } - export interface QueryParameters { - permanent?: Parameters.Permanent; - } export interface RequestBody { + /** + * Job ID for tracking the status of a bulk operation request + */ + job_id?: string; classification_ids?: /** * example: * taxonomy-slug:classification-slug @@ -7507,18 +7715,20 @@ declare namespace Paths { } } namespace BulkMoveClassifications { - namespace Parameters { - export type TargetTaxonomy = /** + export interface RequestBody { + /** + * Job ID for tracking the status of a bulk operation request + */ + job_id?: string; + /** + * The target taxonomy to which the classifications will be moved + */ + target_taxonomy?: /** * URL-friendly name for taxonomy * example: * purpose */ Components.Schemas.TaxonomySlug; - } - export interface QueryParameters { - target_taxonomy?: Parameters.TargetTaxonomy; - } - export interface RequestBody { classification_ids?: /** * example: * taxonomy-slug:classification-slug @@ -7548,7 +7758,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type FillActivity = boolean; export type Slug = /** @@ -7700,7 +7910,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Id = Components.Schemas.EntityId /* uuid */; export type Purge = boolean; export type Slug = /** @@ -7730,7 +7940,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type Attribute = string; export type EntityId = string; @@ -8184,17 +8394,6 @@ declare namespace Paths { Components.Schemas.EntityItem; } } - namespace GetJobs { - namespace Parameters { - export type Status = /* The status of the bulk job */ Components.Schemas.TaxonomyBulkJobStatus; - } - export interface QueryParameters { - status?: Parameters.Status; - } - namespace Responses { - export type $200 = Components.Schemas.TaxonomyBulkJob[]; - } - } namespace GetJsonSchema { namespace Parameters { export type Slug = /** @@ -8314,7 +8513,8 @@ declare namespace Paths { * "enum": [ * "Dr.", * "Prof.", - * "Prof. Dr." + * "Prof. Dr.", + * null * ] * }, * "salutation": { @@ -8330,7 +8530,8 @@ declare namespace Paths { * "Family", * "Ownership", * "Assembly", - * "Other" + * "Other", + * null * ] * }, * "first_name": { @@ -8407,7 +8608,8 @@ declare namespace Paths { * "enum": [ * "DE", * "AT", - * "CH" + * "CH", + * null * ] * }, * "additional_info": { @@ -8852,6 +9054,54 @@ declare namespace Paths { export type $200 = Components.Schemas.Taxonomy; } } + namespace GetTaxonomyBulkActionJobById { + namespace Parameters { + export type JobId = string; + } + export interface PathParameters { + job_id: Parameters.JobId; + } + namespace Responses { + export type $200 = /** + * example: + * { + * "job_id": "123e4567-e89b-12d3-a456-426614174000", + * "status": "PENDING", + * "action_type": "MOVE_LABELS", + * "created_by": 10598, + * "created_at": "2024-01-01T00:00:00.000Z", + * "updated_at": "2024-01-01T00:00:00.000Z", + * "org": 66, + * "progress": 0.5 + * } + */ + Components.Schemas.TaxonomyBulkJob[]; + } + } + namespace GetTaxonomyBulkActionJobs { + namespace Parameters { + export type Status = /* The status of the bulk job */ Components.Schemas.TaxonomyBulkJobStatus; + } + export interface QueryParameters { + status?: Parameters.Status; + } + namespace Responses { + export type $200 = /** + * example: + * { + * "job_id": "123e4567-e89b-12d3-a456-426614174000", + * "status": "PENDING", + * "action_type": "MOVE_LABELS", + * "created_by": 10598, + * "created_at": "2024-01-01T00:00:00.000Z", + * "updated_at": "2024-01-01T00:00:00.000Z", + * "org": 66, + * "progress": 0.5 + * } + */ + Components.Schemas.TaxonomyBulkJob[]; + } + } namespace GetTaxonomyClassification { namespace Parameters { export type ClassificationSlug = string; @@ -9003,7 +9253,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type DryRun = boolean; export type FillActivity = boolean; @@ -9224,7 +9474,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type Id = Components.Schemas.EntityId /* uuid */; export type Slug = /** @@ -9255,7 +9505,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Id = Components.Schemas.EntityId /* uuid */; export type Slug = /** * URL-friendly identifier for the entity schema @@ -9338,6 +9588,11 @@ declare namespace Paths { } namespace TaxonomiesClassificationsSearch { namespace Parameters { + /** + * example: + * false + */ + export type Archived = boolean; /** * example: * sales @@ -9352,6 +9607,11 @@ declare namespace Paths { * sales */ Parameters.Query; + archived?: /** + * example: + * false + */ + Parameters.Archived; } export interface RequestBody { classificationIds?: /** @@ -9410,7 +9670,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type FillActivity = boolean; export type Id = Components.Schemas.EntityId /* uuid */; @@ -9526,7 +9786,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type Attribute = string; export type EntityId = string; @@ -9600,7 +9860,7 @@ declare namespace Paths { * example: * 01F130Q52Q6MWSNS8N2AVXV4JN */ - Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | (""); + Components.Schemas.ActivityId /* ulid ^01[0-9a-zA-Z]{24}$ */ | ("" | null); export type Async = boolean; export type DryRun = boolean; export type FillActivity = boolean; @@ -10683,15 +10943,30 @@ export interface OperationMethods { config?: AxiosRequestConfig ): OperationResponse /** - * getJobs - getJobs + * getTaxonomyBulkActionJobs - getTaxonomyBulkActionJobs + * + * Gets bulk actions jobs by job status: + * - = all active jobs + * - PENDING = all active jobs + * - FAILED = all failed jobs + * - COMPLETED = all completed jobs * - * Gets bulk jobs by job status */ - 'getJobs'( - parameters?: Parameters | null, + 'getTaxonomyBulkActionJobs'( + parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig - ): OperationResponse + ): OperationResponse + /** + * getTaxonomyBulkActionJobById - getTaxonomyBulkActionJobById + * + * Gets a bulk action job by job id + */ + 'getTaxonomyBulkActionJobById'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse /** * bulkMoveClassifications - bulkMoveClassifications * @@ -10700,19 +10975,20 @@ export interface OperationMethods { * */ 'bulkMoveClassifications'( - parameters?: Parameters | null, + parameters?: Parameters | null, data?: Paths.BulkMoveClassifications.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * bulkDeleteClassifications - bulkDeleteClassifications * - * Archives or permanently deletes taxonomy classifications. When permanent is true, the classifications are deleted through a bulk - * async operation which also deletes all references of the deleted classifications from the entities referencing them. + * Permanently deletes taxonomy classifications. The classifications are deleted through a bulk + * async operation which also deletes all references of the deleted classifications from the entities + * referencing them. * */ 'bulkDeleteClassifications'( - parameters?: Parameters | null, + parameters?: Parameters | null, data?: Paths.BulkDeleteClassifications.RequestBody, config?: AxiosRequestConfig ): OperationResponse @@ -11747,17 +12023,34 @@ export interface PathsDictionary { config?: AxiosRequestConfig ): OperationResponse } - ['/v1/entity/taxonomies/jobs']: { + ['/v1/entity/taxonomies/bulk-jobs']: { /** - * getJobs - getJobs + * getTaxonomyBulkActionJobs - getTaxonomyBulkActionJobs + * + * Gets bulk actions jobs by job status: + * - = all active jobs + * - PENDING = all active jobs + * - FAILED = all failed jobs + * - COMPLETED = all completed jobs * - * Gets bulk jobs by job status */ 'get'( - parameters?: Parameters | null, + parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig - ): OperationResponse + ): OperationResponse + } + ['/v1/entity/taxonomies/bulk-jobs/{job_id}']: { + /** + * getTaxonomyBulkActionJobById - getTaxonomyBulkActionJobById + * + * Gets a bulk action job by job id + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse } ['/v1/entity/taxonomies/classifications:move']: { /** @@ -11768,7 +12061,7 @@ export interface PathsDictionary { * */ 'post'( - parameters?: Parameters | null, + parameters?: Parameters | null, data?: Paths.BulkMoveClassifications.RequestBody, config?: AxiosRequestConfig ): OperationResponse @@ -11777,12 +12070,13 @@ export interface PathsDictionary { /** * bulkDeleteClassifications - bulkDeleteClassifications * - * Archives or permanently deletes taxonomy classifications. When permanent is true, the classifications are deleted through a bulk - * async operation which also deletes all references of the deleted classifications from the entities referencing them. + * Permanently deletes taxonomy classifications. The classifications are deleted through a bulk + * async operation which also deletes all references of the deleted classifications from the entities + * referencing them. * */ 'post'( - parameters?: Parameters | null, + parameters?: Parameters | null, data?: Paths.BulkDeleteClassifications.RequestBody, config?: AxiosRequestConfig ): OperationResponse @@ -11971,6 +12265,7 @@ export type Activity = Components.Schemas.Activity; export type ActivityCallerContext = Components.Schemas.ActivityCallerContext; export type ActivityId = Components.Schemas.ActivityId; export type ActivityItem = Components.Schemas.ActivityItem; +export type AddressAttribute = Components.Schemas.AddressAttribute; export type AddressRelationAttribute = Components.Schemas.AddressRelationAttribute; export type Attribute = Components.Schemas.Attribute; export type AttributeWithCompositeID = Components.Schemas.AttributeWithCompositeID; @@ -12070,9 +12365,9 @@ export type SummaryField = Components.Schemas.SummaryField; export type TagsAttribute = Components.Schemas.TagsAttribute; export type Taxonomy = Components.Schemas.Taxonomy; export type TaxonomyBulkJob = Components.Schemas.TaxonomyBulkJob; +export type TaxonomyBulkJobActionType = Components.Schemas.TaxonomyBulkJobActionType; export type TaxonomyBulkJobStatus = Components.Schemas.TaxonomyBulkJobStatus; export type TaxonomyBulkJobTriggerResponse = Components.Schemas.TaxonomyBulkJobTriggerResponse; -export type TaxonomyBulkJobType = Components.Schemas.TaxonomyBulkJobType; export type TaxonomyClassification = Components.Schemas.TaxonomyClassification; export type TaxonomyLocationId = Components.Schemas.TaxonomyLocationId; export type TaxonomySlug = Components.Schemas.TaxonomySlug; diff --git a/clients/entity-client/src/openapi.json b/clients/entity-client/src/openapi.json index 7c0a5d8a..3e5c122d 100644 --- a/clients/entity-client/src/openapi.json +++ b/clients/entity-client/src/openapi.json @@ -307,7 +307,8 @@ "enum": [ "Dr.", "Prof.", - "Prof. Dr." + "Prof. Dr.", + null ] }, "salutation": { @@ -323,7 +324,8 @@ "Family", "Ownership", "Assembly", - "Other" + "Other", + null ] }, "first_name": { @@ -400,7 +402,8 @@ "enum": [ "DE", "AT", - "CH" + "CH", + null ] }, "additional_info": { @@ -1315,9 +1318,9 @@ "in": "query", "name": "purge", "description": "Permanently deletes the entity when set to `true`", - "default": false, "schema": { - "type": "boolean" + "type": "boolean", + "default": false } } ], @@ -2809,6 +2812,15 @@ "type": "string", "example": "sales" } + }, + { + "in": "query", + "name": "archived", + "description": "Filter by archived status", + "schema": { + "type": "boolean", + "example": false + } } ], "requestBody": { @@ -2902,11 +2914,11 @@ } } }, - "/v1/entity/taxonomies/jobs": { + "/v1/entity/taxonomies/bulk-jobs": { "get": { - "operationId": "getJobs", - "summary": "getJobs", - "description": "Gets bulk jobs by job status", + "operationId": "getTaxonomyBulkActionJobs", + "summary": "getTaxonomyBulkActionJobs", + "description": "Gets bulk actions jobs by job status:\n- = all active jobs\n- PENDING = all active jobs\n- FAILED = all failed jobs\n- COMPLETED = all completed jobs\n", "tags": [ "Taxonomy" ], @@ -2936,23 +2948,48 @@ } } }, - "/v1/entity/taxonomies/classifications:move": { - "post": { - "operationId": "bulkMoveClassifications", - "summary": "bulkMoveClassifications", - "description": "Moves classifications from one taxonomy to another, through a bulk async operation which\nalso updates all references from the old classification to the new one under the target taxonomy.\n", + "/v1/entity/taxonomies/bulk-jobs/{job_id}": { + "get": { + "operationId": "getTaxonomyBulkActionJobById", + "summary": "getTaxonomyBulkActionJobById", + "description": "Gets a bulk action job by job id", "tags": [ "Taxonomy" ], "parameters": [ { - "in": "query", - "name": "target_taxonomy", - "description": "The target taxonomy to which the classifications will be moved", + "in": "path", + "name": "job_id", + "required": true, "schema": { - "$ref": "#/components/schemas/TaxonomySlug" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the job matching the given job id", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyBulkJob" + } + } + } } } + } + } + }, + "/v1/entity/taxonomies/classifications:move": { + "post": { + "operationId": "bulkMoveClassifications", + "summary": "bulkMoveClassifications", + "description": "Moves classifications from one taxonomy to another, through a bulk async operation which\nalso updates all references from the old classification to the new one under the target taxonomy.\n", + "tags": [ + "Taxonomy" ], "requestBody": { "content": { @@ -2960,6 +2997,14 @@ "schema": { "type": "object", "properties": { + "job_id": { + "description": "Job ID for tracking the status of a bulk operation request", + "type": "string" + }, + "target_taxonomy": { + "description": "The target taxonomy to which the classifications will be moved", + "$ref": "#/components/schemas/TaxonomySlug" + }, "classification_ids": { "type": "array", "items": { @@ -2998,27 +3043,20 @@ "post": { "operationId": "bulkDeleteClassifications", "summary": "bulkDeleteClassifications", - "description": "Archives or permanently deletes taxonomy classifications. When permanent is true, the classifications are deleted through a bulk \nasync operation which also deletes all references of the deleted classifications from the entities referencing them.\n", + "description": "Permanently deletes taxonomy classifications. The classifications are deleted through a bulk \nasync operation which also deletes all references of the deleted classifications from the entities \nreferencing them.\n", "tags": [ "Taxonomy" ], - "parameters": [ - { - "in": "query", - "name": "permanent", - "schema": { - "type": "boolean", - "default": false - }, - "description": "Whether to permanently delete the classifications or just archive them" - } - ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { + "job_id": { + "description": "Job ID for tracking the status of a bulk operation request", + "type": "string" + }, "classification_ids": { "type": "array", "items": { @@ -3697,6 +3735,19 @@ "format": "uri", "example": "https://docs.epilot.io/docs/pricing/entities" }, + "category": { + "type": "string", + "example": "customer_relations", + "enum": [ + "customer_relations", + "sales", + "product_hub", + "contracts", + "journeys", + "messaging", + "system" + ] + }, "published": { "type": "boolean", "example": false @@ -4198,6 +4249,9 @@ { "$ref": "#/components/schemas/UserRelationAttribute" }, + { + "$ref": "#/components/schemas/AddressAttribute" + }, { "$ref": "#/components/schemas/AddressRelationAttribute" }, @@ -5092,6 +5146,52 @@ } ] }, + "AddressAttribute": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseAttribute" + }, + { + "type": "object", + "description": "Address attribute", + "properties": { + "type": { + "type": "string", + "enum": [ + "address" + ] + }, + "default_address_fields": { + "description": "Default fields visible on addresses", + "default": [ + "postal_code", + "city", + "street", + "street_number" + ], + "type": "array", + "items": { + "type": "string", + "enum": [ + "postal_code", + "city", + "street", + "street_number", + "plot_area", + "plot_of_land", + "suburb", + "country", + "additional_info", + "coordinates", + "start_date", + "end_date" + ] + } + } + } + } + ] + }, "AddressRelationAttribute": { "allOf": [ { @@ -7293,6 +7393,11 @@ "$ref": "#/components/schemas/ClassificationId" } }, + "color": { + "type": "string", + "description": "Color of the classification", + "example": "#FF5733" + }, "created_at": { "type": "string", "format": "date-time" @@ -7301,6 +7406,11 @@ "type": "string", "format": "date-time" }, + "archived": { + "type": "boolean", + "description": "Archived classification are not visible in the UI", + "default": false + }, "_manifest": { "type": "array", "description": "Manifest ID used to create/update the taxonomy classification", @@ -7379,14 +7489,15 @@ "enum": [ "PENDING", "FAILED", - "COMPLETED" + "COMPLETED", + "CANCELLED" ] }, - "TaxonomyBulkJobType": { + "TaxonomyBulkJobActionType": { "type": "string", "enum": [ - "MOVE_LABELS", - "DELETE_LABELS" + "MOVE_CLASSIFICATIONS", + "DELETE_CLASSIFICATIONS" ] }, "TaxonomyBulkJob": { @@ -7396,12 +7507,80 @@ "type": "string", "format": "uuid" }, - "status": { + "job_status": { "$ref": "#/components/schemas/TaxonomyBulkJobStatus" }, - "type": { - "$ref": "#/components/schemas/TaxonomyBulkJobType" + "action_type": { + "$ref": "#/components/schemas/TaxonomyBulkJobActionType" + }, + "request": { + "type": "object", + "properties": { + "target_taxonomy": { + "$ref": "#/components/schemas/TaxonomySlug" + }, + "classification_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationId" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "target_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + }, + "affected_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + }, + "failures_count": { + "type": "number" + }, + "failed_entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + } + } + } + }, + "created_by": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "org": { + "type": "string" + }, + "progress": { + "description": "Progress of the job on a scale of 0 to 1", + "type": "number" } + }, + "example": { + "job_id": "123e4567-e89b-12d3-a456-426614174000", + "status": "PENDING", + "action_type": "MOVE_LABELS", + "created_by": 10598, + "created_at": "2024-01-01T00:00:00.000Z", + "updated_at": "2024-01-01T00:00:00.000Z", + "org": 66, + "progress": 0.5 } }, "ESClusterAssignment": { @@ -7542,7 +7721,8 @@ "type": "string", "nullable": true, "enum": [ - "" + "", + null ] } ] @@ -8313,9 +8493,6 @@ } }, "servers": [ - { - "url": "https://entity.sls.epilot.io" - }, { "url": "https://entity.sls.epilot.io" } diff --git a/clients/user-client/package-lock.json b/clients/user-client/package-lock.json index 7e28d723..18480b51 100644 --- a/clients/user-client/package-lock.json +++ b/clients/user-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@epilot/user-client", - "version": "3.9.1", + "version": "3.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@epilot/user-client", - "version": "3.9.1", + "version": "3.11.0", "license": "MIT", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", diff --git a/clients/user-client/package.json b/clients/user-client/package.json index 01c33d31..2ccda280 100644 --- a/clients/user-client/package.json +++ b/clients/user-client/package.json @@ -1,6 +1,6 @@ { "name": "@epilot/user-client", - "version": "3.9.1", + "version": "3.11.0", "description": "Client library for the epilot User API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/clients/user-client/src/openapi-runtime.json b/clients/user-client/src/openapi-runtime.json index bda158b8..06aaa463 100644 --- a/clients/user-client/src/openapi-runtime.json +++ b/clients/user-client/src/openapi-runtime.json @@ -240,6 +240,19 @@ "responses": {} } }, + "/v2/users/public/checkToken": { + "get": { + "operationId": "checkInviteToken", + "parameters": [ + { + "in": "query", + "name": "token", + "required": true + } + ], + "responses": {} + } + }, "/v2/users/public/activate": { "post": { "operationId": "activateUser", @@ -258,6 +271,19 @@ "responses": {} } }, + "/v2/users/public/reject": { + "delete": { + "operationId": "rejectInvite", + "parameters": [ + { + "in": "query", + "name": "token", + "required": true + } + ], + "responses": {} + } + }, "/v2/users/public/username/{username}:getLoginParameters": { "get": { "operationId": "getUserLoginParametersV2", @@ -271,6 +297,17 @@ "responses": {} } }, + "/v2/users/switchOrganization": { + "post": { + "operationId": "switchOrganization", + "requestBody": { + "content": { + "application/json": {} + } + }, + "responses": {} + } + }, "/v1/users/me": { "get": { "operationId": "getMe", diff --git a/clients/user-client/src/openapi.d.ts b/clients/user-client/src/openapi.d.ts index 8da0ae00..af0f396a 100644 --- a/clients/user-client/src/openapi.d.ts +++ b/clients/user-client/src/openapi.d.ts @@ -107,11 +107,8 @@ declare namespace Components { crt_assignee?: { id?: /* User's unique identifier */ UserId; organization_id?: OrganizationId; - /** - * example: - * 2022-02-08T04:44:32.246Z - */ - created_at?: string; + created_at?: string; // date-time + activated_at?: string; // date-time /** * User's display name (default: email address) * example: @@ -220,6 +217,26 @@ declare namespace Components { favorites?: { [name: string]: any; }; + /** + * example: + * { + * "added_participant_opportunity": true, + * "assigned_opportunity": true, + * "assigned_task": true, + * "comment_opportunity": true, + * "deleted_task": true, + * "escalated_task": true, + * "message_receive_opportunity": true, + * "message_send_opportunity": true, + * "created_task": true, + * "created_opportunity_manual": true, + * "created_opportunity_auto": true, + * "deleted_opportunity": true + * } + */ + email_notification_setting?: { + [name: string]: any; + }; properties?: { /** * example: @@ -522,11 +539,8 @@ declare namespace Components { export interface UserV2 { id?: /* User's unique identifier */ UserId; organization_id?: OrganizationId; - /** - * example: - * 2022-02-08T04:44:32.246Z - */ - created_at?: string; + created_at?: string; // date-time + activated_at?: string; // date-time /** * User's display name (default: email address) * example: @@ -635,6 +649,26 @@ declare namespace Components { favorites?: { [name: string]: any; }; + /** + * example: + * { + * "added_participant_opportunity": true, + * "assigned_opportunity": true, + * "assigned_task": true, + * "comment_opportunity": true, + * "deleted_task": true, + * "escalated_task": true, + * "message_receive_opportunity": true, + * "message_send_opportunity": true, + * "created_task": true, + * "created_opportunity_manual": true, + * "created_opportunity_auto": true, + * "deleted_opportunity": true + * } + */ + email_notification_setting?: { + [name: string]: any; + }; properties?: { /** * example: @@ -672,6 +706,8 @@ declare namespace Paths { namespace Responses { export interface $200 { } + export interface $400 { + } export interface $404 { } } @@ -691,6 +727,44 @@ declare namespace Paths { } } } + namespace CheckInviteToken { + namespace Parameters { + export type Token = /* Token used to invite a user to epilot */ Components.Schemas.InviteToken; + } + export interface QueryParameters { + token: Parameters.Token; + } + namespace Responses { + export interface $200 { + /** + * Organization ID of the organization that invited the user + */ + invitation_org_id: string; + /** + * Name of the organization that invited the user + */ + invitation_org_name: string; + /** + * Logo URL of the organization that invited the user + */ + invitation_org_logo_url?: string; + /** + * Logo Thumbnail URL of the organization that invited the user + */ + invitation_org_logo_thumbnail_url?: string; + /** + * User ID of the invited user + */ + invitee_user_id: string; + /** + * Organization ID of the primary organization of the user (when inviting an existing epilot user) + */ + invitee_primary_org_id?: string; + } + export interface $404 { + } + } + } namespace CreateGroup { export type RequestBody = Components.Schemas.CreateGroupReq; namespace Responses { @@ -874,6 +948,25 @@ declare namespace Paths { } } } + namespace RejectInvite { + namespace Parameters { + export type Token = /* Token used to invite a user to epilot */ Components.Schemas.InviteToken; + } + export interface QueryParameters { + token: Parameters.Token; + } + namespace Responses { + export interface $200 { + /** + * example: + * true + */ + success?: boolean; + } + export interface $404 { + } + } + } namespace ResendUserInvitation { export interface RequestBody { /** @@ -908,6 +1001,19 @@ declare namespace Paths { } } } + namespace SwitchOrganization { + export interface RequestBody { + org_id: Components.Schemas.OrganizationId; + } + namespace Responses { + export interface $200 { + /** + * A login token for the new organization to be used with CUSTOM_AUTH flow against login parameters + */ + login_token: string; + } + } + } namespace UpdateGroup { namespace Parameters { export type Id = /* Group unique identifier */ Components.Schemas.GroupId; @@ -1013,7 +1119,8 @@ export interface OperationMethods { /** * inviteUser - inviteUser * - * Creates a new user in the caller's organization and sends an invite email to activate + * Creates a new user in the caller's organization and sends an invite email to activate the user + * */ 'inviteUser'( parameters?: Parameters | null, @@ -1110,6 +1217,16 @@ export interface OperationMethods { data?: Paths.VerifyEmailWithToken.RequestBody, config?: AxiosRequestConfig ): OperationResponse + /** + * checkInviteToken - checkInviteToken + * + * Check an invite token + */ + 'checkInviteToken'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse /** * activateUser - activateUser * @@ -1120,16 +1237,39 @@ export interface OperationMethods { data?: Paths.ActivateUser.RequestBody, config?: AxiosRequestConfig ): OperationResponse + /** + * rejectInvite - rejectInvite + * + * Reject an invite + */ + 'rejectInvite'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse /** * getUserLoginParametersV2 - getUserLoginParametersV2 * * Get user organization login parameters by username + * + * The first item in the list corresponds to the user's primary organization and must be used for initial login. + * */ 'getUserLoginParametersV2'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse + /** + * switchOrganization - switchOrganization + * + * Switch to another organization the user is part of + */ + 'switchOrganization'( + parameters?: Parameters | null, + data?: Paths.SwitchOrganization.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse /** * getMe - getMe * @@ -1243,7 +1383,8 @@ export interface PathsDictionary { /** * inviteUser - inviteUser * - * Creates a new user in the caller's organization and sends an invite email to activate + * Creates a new user in the caller's organization and sends an invite email to activate the user + * */ 'post'( parameters?: Parameters | null, @@ -1353,6 +1494,18 @@ export interface PathsDictionary { config?: AxiosRequestConfig ): OperationResponse } + ['/v2/users/public/checkToken']: { + /** + * checkInviteToken - checkInviteToken + * + * Check an invite token + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } ['/v2/users/public/activate']: { /** * activateUser - activateUser @@ -1365,11 +1518,26 @@ export interface PathsDictionary { config?: AxiosRequestConfig ): OperationResponse } + ['/v2/users/public/reject']: { + /** + * rejectInvite - rejectInvite + * + * Reject an invite + */ + 'delete'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } ['/v2/users/public/username/{username}:getLoginParameters']: { /** * getUserLoginParametersV2 - getUserLoginParametersV2 * * Get user organization login parameters by username + * + * The first item in the list corresponds to the user's primary organization and must be used for initial login. + * */ 'get'( parameters?: Parameters | null, @@ -1377,6 +1545,18 @@ export interface PathsDictionary { config?: AxiosRequestConfig ): OperationResponse } + ['/v2/users/switchOrganization']: { + /** + * switchOrganization - switchOrganization + * + * Switch to another organization the user is part of + */ + 'post'( + parameters?: Parameters | null, + data?: Paths.SwitchOrganization.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse + } ['/v1/users/me']: { /** * getMe - getMe diff --git a/clients/user-client/src/openapi.json b/clients/user-client/src/openapi.json index b18f76f5..4e00cb96 100644 --- a/clients/user-client/src/openapi.json +++ b/clients/user-client/src/openapi.json @@ -34,7 +34,7 @@ { "name": "token", "in": "query", - "description": "Invitation partner token", + "description": "Partner invitation token", "required": false, "schema": { "$ref": "#/components/schemas/PartnerInvitationToken" @@ -264,7 +264,7 @@ "post": { "operationId": "inviteUser", "summary": "inviteUser", - "description": "Creates a new user in the caller's organization and sends an invite email to activate", + "description": "Creates a new user in the caller's organization and sends an invite email to activate the user\n", "tags": [ "User V2" ], @@ -666,7 +666,75 @@ "description": "Verified successfully" }, "404": { - "description": "Token not found for the user" + "description": "Token not found" + } + } + } + }, + "/v2/users/public/checkToken": { + "get": { + "operationId": "checkInviteToken", + "summary": "checkInviteToken", + "description": "Check an invite token", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "responses": { + "200": { + "description": "Invite token found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "invitation_org_id": { + "type": "string", + "description": "Organization ID of the organization that invited the user" + }, + "invitation_org_name": { + "type": "string", + "description": "Name of the organization that invited the user" + }, + "invitation_org_logo_url": { + "type": "string", + "description": "Logo URL of the organization that invited the user" + }, + "invitation_org_logo_thumbnail_url": { + "type": "string", + "description": "Logo Thumbnail URL of the organization that invited the user" + }, + "invitee_user_id": { + "type": "string", + "description": "User ID of the invited user" + }, + "invitee_primary_org_id": { + "type": "string", + "description": "Organization ID of the primary organization of the user (when inviting an existing epilot user)" + } + }, + "required": [ + "invitee_user_id", + "invitation_org_id", + "invitation_org_name" + ] + } + } + } + }, + "404": { + "description": "Token not found" } } } @@ -704,6 +772,52 @@ "200": { "description": "Activated successfully" }, + "400": { + "description": "Invalid payload" + }, + "404": { + "description": "Token not found for the user" + } + } + } + }, + "/v2/users/public/reject": { + "delete": { + "operationId": "rejectInvite", + "summary": "rejectInvite", + "description": "Reject an invite", + "security": [], + "tags": [ + "User V2" + ], + "parameters": [ + { + "in": "query", + "name": "token", + "schema": { + "$ref": "#/components/schemas/InviteToken" + }, + "required": true, + "description": "Invite Token" + } + ], + "responses": { + "200": { + "description": "Rejected invite successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + } + } + } + } + }, "404": { "description": "Token not found for the user" } @@ -714,7 +828,7 @@ "get": { "operationId": "getUserLoginParametersV2", "summary": "getUserLoginParametersV2", - "description": "Get user organization login parameters by username", + "description": "Get user organization login parameters by username\n\nThe first item in the list corresponds to the user's primary organization and must be used for initial login.\n", "security": [], "parameters": [ { @@ -752,6 +866,54 @@ } } }, + "/v2/users/switchOrganization": { + "post": { + "operationId": "switchOrganization", + "summary": "switchOrganization", + "description": "Switch to another organization the user is part of", + "tags": [ + "User V2" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "org_id": { + "$ref": "#/components/schemas/OrganizationId" + } + }, + "required": [ + "org_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "A login token for the new organization to be used with CUSTOM_AUTH flow", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "login_token": { + "type": "string", + "description": "A login token for the new organization to be used with CUSTOM_AUTH flow against login parameters" + } + }, + "required": [ + "login_token" + ] + } + } + } + } + } + } + }, "/v1/users/me": { "get": { "operationId": "getMe", @@ -1034,7 +1196,11 @@ }, "created_at": { "type": "string", - "example": "2022-02-08T04:44:32.246Z" + "format": "date-time" + }, + "activated_at": { + "type": "string", + "format": "date-time" }, "display_name": { "type": "string", @@ -1167,6 +1333,24 @@ "dashboard": "751ff121-9ac2-4511-a2e6-851f11287380" } }, + "email_notification_setting": { + "type": "object", + "additionalProperties": true, + "example": { + "added_participant_opportunity": true, + "assigned_opportunity": true, + "assigned_task": true, + "comment_opportunity": true, + "deleted_task": true, + "escalated_task": true, + "message_receive_opportunity": true, + "message_send_opportunity": true, + "created_task": true, + "created_opportunity_manual": true, + "created_opportunity_auto": true, + "deleted_opportunity": true + } + }, "properties": { "type": "array", "items": {