@epilot/entity-client 2.4.3 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +281 -6
- package/dist/openapi.json +392 -10
- package/package-lock.json +18779 -0
- package/package.json +1 -1
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
|
* {
|
|
@@ -992,6 +993,9 @@ declare namespace Components {
|
|
|
992
993
|
grid_template_columns?: string;
|
|
993
994
|
};
|
|
994
995
|
};
|
|
996
|
+
dialog_config?: {
|
|
997
|
+
[name: string]: any;
|
|
998
|
+
};
|
|
995
999
|
/**
|
|
996
1000
|
* An ordered list of attributes the entity contains
|
|
997
1001
|
* example:
|
|
@@ -1040,6 +1044,18 @@ declare namespace Components {
|
|
|
1040
1044
|
* ]
|
|
1041
1045
|
*/
|
|
1042
1046
|
attributes: Attribute[];
|
|
1047
|
+
explicit_search_mappings?: /**
|
|
1048
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1049
|
+
*
|
|
1050
|
+
* example:
|
|
1051
|
+
* {
|
|
1052
|
+
* "image": {
|
|
1053
|
+
* "type": "keyword",
|
|
1054
|
+
* "index": false
|
|
1055
|
+
* }
|
|
1056
|
+
* }
|
|
1057
|
+
*/
|
|
1058
|
+
SearchMappings;
|
|
1043
1059
|
}
|
|
1044
1060
|
/**
|
|
1045
1061
|
* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities.
|
|
@@ -1124,6 +1140,9 @@ declare namespace Components {
|
|
|
1124
1140
|
grid_template_columns?: string;
|
|
1125
1141
|
};
|
|
1126
1142
|
};
|
|
1143
|
+
dialog_config?: {
|
|
1144
|
+
[name: string]: any;
|
|
1145
|
+
};
|
|
1127
1146
|
/**
|
|
1128
1147
|
* An ordered list of attributes the entity contains
|
|
1129
1148
|
* example:
|
|
@@ -1172,6 +1191,18 @@ declare namespace Components {
|
|
|
1172
1191
|
* ]
|
|
1173
1192
|
*/
|
|
1174
1193
|
attributes: Attribute[];
|
|
1194
|
+
explicit_search_mappings?: /**
|
|
1195
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1196
|
+
*
|
|
1197
|
+
* example:
|
|
1198
|
+
* {
|
|
1199
|
+
* "image": {
|
|
1200
|
+
* "type": "keyword",
|
|
1201
|
+
* "index": false
|
|
1202
|
+
* }
|
|
1203
|
+
* }
|
|
1204
|
+
*/
|
|
1205
|
+
SearchMappings;
|
|
1175
1206
|
}
|
|
1176
1207
|
export interface EntitySearchParams {
|
|
1177
1208
|
/**
|
|
@@ -1201,10 +1232,6 @@ declare namespace Components {
|
|
|
1201
1232
|
* ]
|
|
1202
1233
|
*/
|
|
1203
1234
|
fields?: string[];
|
|
1204
|
-
/**
|
|
1205
|
-
* Deprecated. Use hydrate=true instead
|
|
1206
|
-
*/
|
|
1207
|
-
expand?: string[];
|
|
1208
1235
|
}
|
|
1209
1236
|
export interface EntitySearchResults {
|
|
1210
1237
|
/**
|
|
@@ -1320,6 +1347,21 @@ declare namespace Components {
|
|
|
1320
1347
|
allowed_types?: string[];
|
|
1321
1348
|
default_access_control?: "public-read" | "private";
|
|
1322
1349
|
}
|
|
1350
|
+
export type GetRelationsResp = (RelationItem | /**
|
|
1351
|
+
* example:
|
|
1352
|
+
* {
|
|
1353
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1354
|
+
* "_org": "123",
|
|
1355
|
+
* "_schema": "contact",
|
|
1356
|
+
* "_tags": [
|
|
1357
|
+
* "example",
|
|
1358
|
+
* "mock"
|
|
1359
|
+
* ],
|
|
1360
|
+
* "_created_at": {},
|
|
1361
|
+
* "_updated_at": {}
|
|
1362
|
+
* }
|
|
1363
|
+
*/
|
|
1364
|
+
RelationEntity)[];
|
|
1323
1365
|
/**
|
|
1324
1366
|
* Entity with relation data resolved into the attribute values
|
|
1325
1367
|
* example:
|
|
@@ -1812,6 +1854,46 @@ declare namespace Components {
|
|
|
1812
1854
|
*/
|
|
1813
1855
|
enable_relation_tags?: boolean;
|
|
1814
1856
|
}
|
|
1857
|
+
/**
|
|
1858
|
+
* example:
|
|
1859
|
+
* {
|
|
1860
|
+
* "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1861
|
+
* "_org": "123",
|
|
1862
|
+
* "_schema": "contact",
|
|
1863
|
+
* "_tags": [
|
|
1864
|
+
* "example",
|
|
1865
|
+
* "mock"
|
|
1866
|
+
* ],
|
|
1867
|
+
* "_created_at": {},
|
|
1868
|
+
* "_updated_at": {}
|
|
1869
|
+
* }
|
|
1870
|
+
*/
|
|
1871
|
+
export interface RelationEntity {
|
|
1872
|
+
_id: EntityId /* uuid */;
|
|
1873
|
+
/**
|
|
1874
|
+
* Title of entity
|
|
1875
|
+
*/
|
|
1876
|
+
_title: string;
|
|
1877
|
+
/**
|
|
1878
|
+
* Organization Id the entity belongs to
|
|
1879
|
+
*/
|
|
1880
|
+
_org: string;
|
|
1881
|
+
_schema: /**
|
|
1882
|
+
* URL-friendly identifier for the entity schema
|
|
1883
|
+
* example:
|
|
1884
|
+
* contact
|
|
1885
|
+
*/
|
|
1886
|
+
EntitySlug;
|
|
1887
|
+
_tags?: string[];
|
|
1888
|
+
_created_at: string; // date-time
|
|
1889
|
+
_updated_at: string; // date-time
|
|
1890
|
+
$relation?: RelationItem;
|
|
1891
|
+
}
|
|
1892
|
+
export interface RelationItem {
|
|
1893
|
+
entity_id: EntityId /* uuid */;
|
|
1894
|
+
attribute: string;
|
|
1895
|
+
_tags?: string[];
|
|
1896
|
+
}
|
|
1815
1897
|
/**
|
|
1816
1898
|
* Repeatable (add N number of fields)
|
|
1817
1899
|
*/
|
|
@@ -1885,6 +1967,26 @@ declare namespace Components {
|
|
|
1885
1967
|
* Generated uuid for schema
|
|
1886
1968
|
*/
|
|
1887
1969
|
export type SchemaId = string; // uuid
|
|
1970
|
+
/**
|
|
1971
|
+
* Advanced: explicit Elasticsearch index mapping definitions for entity data
|
|
1972
|
+
*
|
|
1973
|
+
* example:
|
|
1974
|
+
* {
|
|
1975
|
+
* "image": {
|
|
1976
|
+
* "type": "keyword",
|
|
1977
|
+
* "index": false
|
|
1978
|
+
* }
|
|
1979
|
+
* }
|
|
1980
|
+
*/
|
|
1981
|
+
export interface SearchMappings {
|
|
1982
|
+
[name: string]: {
|
|
1983
|
+
index?: boolean;
|
|
1984
|
+
type?: "keyword" | "text" | "boolean" | "integer" | "long" | "float" | "date" | "flattened" | "nested";
|
|
1985
|
+
fields?: {
|
|
1986
|
+
[name: string]: any;
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1888
1990
|
/**
|
|
1889
1991
|
* Dropdown select
|
|
1890
1992
|
*/
|
|
@@ -2157,6 +2259,25 @@ declare namespace Components {
|
|
|
2157
2259
|
}
|
|
2158
2260
|
}
|
|
2159
2261
|
declare namespace Paths {
|
|
2262
|
+
namespace AddRelations {
|
|
2263
|
+
namespace Parameters {
|
|
2264
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2265
|
+
export type Slug = /**
|
|
2266
|
+
* URL-friendly identifier for the entity schema
|
|
2267
|
+
* example:
|
|
2268
|
+
* contact
|
|
2269
|
+
*/
|
|
2270
|
+
Components.Schemas.EntitySlug;
|
|
2271
|
+
}
|
|
2272
|
+
export interface PathParameters {
|
|
2273
|
+
slug: Parameters.Slug;
|
|
2274
|
+
id: Parameters.Id;
|
|
2275
|
+
}
|
|
2276
|
+
export type RequestBody = Components.Schemas.RelationItem[];
|
|
2277
|
+
namespace Responses {
|
|
2278
|
+
export type $200 = Components.Schemas.RelationItem;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2160
2281
|
namespace AttachActivity {
|
|
2161
2282
|
namespace Parameters {
|
|
2162
2283
|
export type Entities = Components.Schemas.EntityId /* uuid */[];
|
|
@@ -2302,6 +2423,29 @@ declare namespace Paths {
|
|
|
2302
2423
|
}
|
|
2303
2424
|
}
|
|
2304
2425
|
}
|
|
2426
|
+
namespace DeleteRelation {
|
|
2427
|
+
namespace Parameters {
|
|
2428
|
+
export type Attribute = string;
|
|
2429
|
+
export type EntityId = string;
|
|
2430
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2431
|
+
export type Slug = /**
|
|
2432
|
+
* URL-friendly identifier for the entity schema
|
|
2433
|
+
* example:
|
|
2434
|
+
* contact
|
|
2435
|
+
*/
|
|
2436
|
+
Components.Schemas.EntitySlug;
|
|
2437
|
+
}
|
|
2438
|
+
export interface PathParameters {
|
|
2439
|
+
slug: Parameters.Slug;
|
|
2440
|
+
id: Parameters.Id;
|
|
2441
|
+
attribute: Parameters.Attribute;
|
|
2442
|
+
entity_id: Parameters.EntityId;
|
|
2443
|
+
}
|
|
2444
|
+
namespace Responses {
|
|
2445
|
+
export interface $204 {
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2305
2449
|
namespace DeleteSchema {
|
|
2306
2450
|
namespace Parameters {
|
|
2307
2451
|
export type Slug = /**
|
|
@@ -2433,6 +2577,28 @@ declare namespace Paths {
|
|
|
2433
2577
|
}
|
|
2434
2578
|
}
|
|
2435
2579
|
}
|
|
2580
|
+
namespace GetRelations {
|
|
2581
|
+
namespace Parameters {
|
|
2582
|
+
export type Hydrate = boolean;
|
|
2583
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2584
|
+
export type Slug = /**
|
|
2585
|
+
* URL-friendly identifier for the entity schema
|
|
2586
|
+
* example:
|
|
2587
|
+
* contact
|
|
2588
|
+
*/
|
|
2589
|
+
Components.Schemas.EntitySlug;
|
|
2590
|
+
}
|
|
2591
|
+
export interface PathParameters {
|
|
2592
|
+
slug: Parameters.Slug;
|
|
2593
|
+
id: Parameters.Id;
|
|
2594
|
+
}
|
|
2595
|
+
export interface QueryParameters {
|
|
2596
|
+
hydrate?: Parameters.Hydrate;
|
|
2597
|
+
}
|
|
2598
|
+
namespace Responses {
|
|
2599
|
+
export type $200 = Components.Schemas.GetRelationsResp;
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2436
2602
|
namespace GetSchema {
|
|
2437
2603
|
namespace Parameters {
|
|
2438
2604
|
export type Slug = /**
|
|
@@ -2521,6 +2687,31 @@ declare namespace Paths {
|
|
|
2521
2687
|
Components.Schemas.EntityItem;
|
|
2522
2688
|
}
|
|
2523
2689
|
}
|
|
2690
|
+
namespace UpdateRelation {
|
|
2691
|
+
namespace Parameters {
|
|
2692
|
+
export type Attribute = string;
|
|
2693
|
+
export type EntityId = string;
|
|
2694
|
+
export type Id = Components.Schemas.EntityId /* uuid */;
|
|
2695
|
+
export type Slug = /**
|
|
2696
|
+
* URL-friendly identifier for the entity schema
|
|
2697
|
+
* example:
|
|
2698
|
+
* contact
|
|
2699
|
+
*/
|
|
2700
|
+
Components.Schemas.EntitySlug;
|
|
2701
|
+
}
|
|
2702
|
+
export interface PathParameters {
|
|
2703
|
+
slug: Parameters.Slug;
|
|
2704
|
+
id: Parameters.Id;
|
|
2705
|
+
attribute: Parameters.Attribute;
|
|
2706
|
+
entity_id: Parameters.EntityId;
|
|
2707
|
+
}
|
|
2708
|
+
export interface RequestBody {
|
|
2709
|
+
_tags?: string[];
|
|
2710
|
+
}
|
|
2711
|
+
namespace Responses {
|
|
2712
|
+
export type $200 = Components.Schemas.RelationItem;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2524
2715
|
namespace UpsertEntity {
|
|
2525
2716
|
namespace Parameters {
|
|
2526
2717
|
export type ActivityId = /**
|
|
@@ -2888,6 +3079,46 @@ export interface OperationMethods {
|
|
|
2888
3079
|
data?: any,
|
|
2889
3080
|
config?: AxiosRequestConfig
|
|
2890
3081
|
): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
|
|
3082
|
+
/**
|
|
3083
|
+
* getRelations - getRelations
|
|
3084
|
+
*
|
|
3085
|
+
* It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
|
|
3086
|
+
*/
|
|
3087
|
+
'getRelations'(
|
|
3088
|
+
parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
|
|
3089
|
+
data?: any,
|
|
3090
|
+
config?: AxiosRequestConfig
|
|
3091
|
+
): OperationResponse<Paths.GetRelations.Responses.$200>
|
|
3092
|
+
/**
|
|
3093
|
+
* addRelations - addRelations
|
|
3094
|
+
*
|
|
3095
|
+
* It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
|
|
3096
|
+
*/
|
|
3097
|
+
'addRelations'(
|
|
3098
|
+
parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
|
|
3099
|
+
data?: Paths.AddRelations.RequestBody,
|
|
3100
|
+
config?: AxiosRequestConfig
|
|
3101
|
+
): OperationResponse<Paths.AddRelations.Responses.$200>
|
|
3102
|
+
/**
|
|
3103
|
+
* updateRelation - updateRelation
|
|
3104
|
+
*
|
|
3105
|
+
* It updates a relation between two entities.
|
|
3106
|
+
*/
|
|
3107
|
+
'updateRelation'(
|
|
3108
|
+
parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
|
|
3109
|
+
data?: Paths.UpdateRelation.RequestBody,
|
|
3110
|
+
config?: AxiosRequestConfig
|
|
3111
|
+
): OperationResponse<Paths.UpdateRelation.Responses.$200>
|
|
3112
|
+
/**
|
|
3113
|
+
* deleteRelation - deleteRelation
|
|
3114
|
+
*
|
|
3115
|
+
* It deletes a relation between one entity and the other.
|
|
3116
|
+
*/
|
|
3117
|
+
'deleteRelation'(
|
|
3118
|
+
parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
|
|
3119
|
+
data?: any,
|
|
3120
|
+
config?: AxiosRequestConfig
|
|
3121
|
+
): OperationResponse<Paths.DeleteRelation.Responses.$204>
|
|
2891
3122
|
}
|
|
2892
3123
|
|
|
2893
3124
|
export interface PathsDictionary {
|
|
@@ -3211,6 +3442,50 @@ export interface PathsDictionary {
|
|
|
3211
3442
|
config?: AxiosRequestConfig
|
|
3212
3443
|
): OperationResponse<Paths.GetEntityActivityFeed.Responses.$200>
|
|
3213
3444
|
}
|
|
3445
|
+
['/v1/entity/{slug}/{id}/relations']: {
|
|
3446
|
+
/**
|
|
3447
|
+
* getRelations - getRelations
|
|
3448
|
+
*
|
|
3449
|
+
* It loads 1st level relations for the mentioned entity. You can control whether entire related entity is loaded or not via hydrate param.
|
|
3450
|
+
*/
|
|
3451
|
+
'get'(
|
|
3452
|
+
parameters?: Parameters<Paths.GetRelations.PathParameters & Paths.GetRelations.QueryParameters> | null,
|
|
3453
|
+
data?: any,
|
|
3454
|
+
config?: AxiosRequestConfig
|
|
3455
|
+
): OperationResponse<Paths.GetRelations.Responses.$200>
|
|
3456
|
+
/**
|
|
3457
|
+
* addRelations - addRelations
|
|
3458
|
+
*
|
|
3459
|
+
* It relates one or more entities to some parent entity, by providing meaning for relations via attribute field.
|
|
3460
|
+
*/
|
|
3461
|
+
'post'(
|
|
3462
|
+
parameters?: Parameters<Paths.AddRelations.PathParameters> | null,
|
|
3463
|
+
data?: Paths.AddRelations.RequestBody,
|
|
3464
|
+
config?: AxiosRequestConfig
|
|
3465
|
+
): OperationResponse<Paths.AddRelations.Responses.$200>
|
|
3466
|
+
}
|
|
3467
|
+
['/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}']: {
|
|
3468
|
+
/**
|
|
3469
|
+
* updateRelation - updateRelation
|
|
3470
|
+
*
|
|
3471
|
+
* It updates a relation between two entities.
|
|
3472
|
+
*/
|
|
3473
|
+
'put'(
|
|
3474
|
+
parameters?: Parameters<Paths.UpdateRelation.PathParameters> | null,
|
|
3475
|
+
data?: Paths.UpdateRelation.RequestBody,
|
|
3476
|
+
config?: AxiosRequestConfig
|
|
3477
|
+
): OperationResponse<Paths.UpdateRelation.Responses.$200>
|
|
3478
|
+
/**
|
|
3479
|
+
* deleteRelation - deleteRelation
|
|
3480
|
+
*
|
|
3481
|
+
* It deletes a relation between one entity and the other.
|
|
3482
|
+
*/
|
|
3483
|
+
'delete'(
|
|
3484
|
+
parameters?: Parameters<Paths.DeleteRelation.PathParameters> | null,
|
|
3485
|
+
data?: any,
|
|
3486
|
+
config?: AxiosRequestConfig
|
|
3487
|
+
): OperationResponse<Paths.DeleteRelation.Responses.$204>
|
|
3488
|
+
}
|
|
3214
3489
|
}
|
|
3215
3490
|
|
|
3216
3491
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|