@epilot/entity-client 4.2.0 → 4.3.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/openapi.d.ts CHANGED
@@ -2723,7 +2723,9 @@ declare namespace Components {
2723
2723
  protected?: boolean;
2724
2724
  type?: "relation";
2725
2725
  relation_type?: "has_many" | "has_one";
2726
- delete_mode?: "cascade";
2726
+ /**
2727
+ * Weak relation attributes are kept when duplicating an entity. Strong relation attributes are discarded when duplicating an entity.
2728
+ */
2727
2729
  relation_affinity_mode?: "weak" | "strong";
2728
2730
  /**
2729
2731
  * 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.
@@ -2835,6 +2837,10 @@ declare namespace Components {
2835
2837
  * Optional label for the add button. The translated value for add_button_lable is used, if found else the string is used as is.
2836
2838
  */
2837
2839
  add_button_label?: string;
2840
+ /**
2841
+ * Optional placeholder text for the relation search input. The translated value for search_placeholder is used, if found else the string is used as is.
2842
+ */
2843
+ search_placeholder?: string;
2838
2844
  }
2839
2845
  /**
2840
2846
  * example:
@@ -2956,6 +2962,9 @@ declare namespace Components {
2956
2962
  protected?: boolean;
2957
2963
  repeatable?: boolean;
2958
2964
  has_primary?: boolean;
2965
+ /**
2966
+ * Weak repeatable attributes are kept when duplicating an entity. Strong repeatable attributes are discarded when duplicating an entity.
2967
+ */
2959
2968
  relation_affinity_mode?: "weak" | "strong";
2960
2969
  type?: "string" | "phone" | "email" | "address" | "relation" | "payment" | "price_component" | "date";
2961
2970
  /**
@@ -2963,6 +2972,113 @@ declare namespace Components {
2963
2972
  */
2964
2973
  enable_relation_picker?: boolean;
2965
2974
  }
2975
+ /**
2976
+ * A saved entity view
2977
+ */
2978
+ export interface SavedView {
2979
+ /**
2980
+ * list of schemas a view can belong to
2981
+ */
2982
+ slug: /**
2983
+ * URL-friendly identifier for the entity schema
2984
+ * example:
2985
+ * contact
2986
+ */
2987
+ EntitySlug[];
2988
+ /**
2989
+ * User-friendly identifier for the saved view
2990
+ * example:
2991
+ * View listing German customers
2992
+ */
2993
+ name: string;
2994
+ created_by: {
2995
+ /**
2996
+ * example:
2997
+ * 10598
2998
+ */
2999
+ user_id?: string;
3000
+ } | {
3001
+ [name: string]: any;
3002
+ source?: "SYSTEM" | "BLUEPRINT";
3003
+ };
3004
+ /**
3005
+ * example:
3006
+ * {
3007
+ * "filters": {
3008
+ * "customer_name": "suresh test",
3009
+ * "_tags": "360"
3010
+ * },
3011
+ * "table_layout": {
3012
+ * "opportunity": {
3013
+ * "page": 1,
3014
+ * "sort": "_created_at:desc",
3015
+ * "pageSize": 25,
3016
+ * "columnSettings": []
3017
+ * }
3018
+ * }
3019
+ * }
3020
+ */
3021
+ ui_config: {
3022
+ [key: string]: any;
3023
+ };
3024
+ }
3025
+ /**
3026
+ * Generated uuid for a saved view
3027
+ */
3028
+ export type SavedViewId = string; // uuid
3029
+ /**
3030
+ * A saved entity view
3031
+ */
3032
+ export interface SavedViewItem {
3033
+ id?: /* Generated uuid for a saved view */ SavedViewId /* uuid */;
3034
+ created_at?: string;
3035
+ updated_at?: string;
3036
+ /**
3037
+ * list of schemas a view can belong to
3038
+ */
3039
+ slug: /**
3040
+ * URL-friendly identifier for the entity schema
3041
+ * example:
3042
+ * contact
3043
+ */
3044
+ EntitySlug[];
3045
+ /**
3046
+ * User-friendly identifier for the saved view
3047
+ * example:
3048
+ * View listing German customers
3049
+ */
3050
+ name: string;
3051
+ created_by: {
3052
+ /**
3053
+ * example:
3054
+ * 10598
3055
+ */
3056
+ user_id?: string;
3057
+ } | {
3058
+ [name: string]: any;
3059
+ source?: "SYSTEM" | "BLUEPRINT";
3060
+ };
3061
+ /**
3062
+ * example:
3063
+ * {
3064
+ * "filters": {
3065
+ * "customer_name": "suresh test",
3066
+ * "_tags": "360"
3067
+ * },
3068
+ * "table_layout": {
3069
+ * "opportunity": {
3070
+ * "page": 1,
3071
+ * "sort": "_created_at:desc",
3072
+ * "pageSize": 25,
3073
+ * "columnSettings": []
3074
+ * }
3075
+ * }
3076
+ * }
3077
+ */
3078
+ ui_config: {
3079
+ [key: string]: any;
3080
+ };
3081
+ }
2966
3082
  /**
2967
3083
  * Generated uuid for schema
2968
3084
  */
@@ -3686,6 +3802,12 @@ declare namespace Paths {
3686
3802
  export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
3687
3803
  }
3688
3804
  }
3805
+ namespace CreateSavedView {
3806
+ export type RequestBody = /* A saved entity view */ Components.Schemas.SavedView;
3807
+ namespace Responses {
3808
+ export type $201 = /* A saved entity view */ Components.Schemas.SavedViewItem;
3809
+ }
3810
+ }
3689
3811
  namespace DeleteEntity {
3690
3812
  namespace Parameters {
3691
3813
  export type ActivityId = /**
@@ -3737,6 +3859,18 @@ declare namespace Paths {
3737
3859
  }
3738
3860
  }
3739
3861
  }
3862
+ namespace DeleteSavedView {
3863
+ namespace Parameters {
3864
+ export type Id = /* Generated uuid for a saved view */ Components.Schemas.SavedViewId /* uuid */;
3865
+ }
3866
+ export interface PathParameters {
3867
+ id: Parameters.Id;
3868
+ }
3869
+ namespace Responses {
3870
+ export interface $200 {
3871
+ }
3872
+ }
3873
+ }
3740
3874
  namespace DeleteSchemaById {
3741
3875
  namespace Parameters {
3742
3876
  export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
@@ -3911,6 +4045,19 @@ declare namespace Paths {
3911
4045
  export type $200 = Components.Schemas.GetRelationsResp;
3912
4046
  }
3913
4047
  }
4048
+ namespace GetSavedView {
4049
+ namespace Parameters {
4050
+ export type Id = /* Generated uuid for a saved view */ Components.Schemas.SavedViewId /* uuid */;
4051
+ }
4052
+ export interface PathParameters {
4053
+ id: Parameters.Id;
4054
+ }
4055
+ namespace Responses {
4056
+ export interface $200 {
4057
+ view?: /* A saved entity view */ Components.Schemas.SavedViewItem;
4058
+ }
4059
+ }
4060
+ }
3914
4061
  namespace GetSchema {
3915
4062
  namespace Parameters {
3916
4063
  export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
@@ -3963,6 +4110,13 @@ declare namespace Paths {
3963
4110
  }
3964
4111
  }
3965
4112
  }
4113
+ namespace ListSavedViews {
4114
+ namespace Responses {
4115
+ export interface $200 {
4116
+ results?: /* A saved entity view */ Components.Schemas.SavedViewItem[];
4117
+ }
4118
+ }
4119
+ }
3966
4120
  namespace ListSchemaBlueprints {
3967
4121
  namespace Responses {
3968
4122
  export interface $200 {
@@ -4056,6 +4210,18 @@ declare namespace Paths {
4056
4210
  export type $200 = Components.Schemas.RelationItem;
4057
4211
  }
4058
4212
  }
4213
+ namespace UpdateSavedView {
4214
+ namespace Parameters {
4215
+ export type Id = /* Generated uuid for a saved view */ Components.Schemas.SavedViewId /* uuid */;
4216
+ }
4217
+ export interface PathParameters {
4218
+ id: Parameters.Id;
4219
+ }
4220
+ export type RequestBody = /* A saved entity view */ Components.Schemas.SavedView;
4221
+ namespace Responses {
4222
+ export type $200 = /* A saved entity view */ Components.Schemas.SavedViewItem;
4223
+ }
4224
+ }
4059
4225
  namespace UpsertEntity {
4060
4226
  namespace Parameters {
4061
4227
  export type ActivityId = /**
@@ -4560,6 +4726,56 @@ export interface OperationMethods {
4560
4726
  data?: Paths.ImportEntities.RequestBody,
4561
4727
  config?: AxiosRequestConfig
4562
4728
  ): OperationResponse<Paths.ImportEntities.Responses.$201>
4729
+ /**
4730
+ * listSavedViews - listSavedViews
4731
+ *
4732
+ * Get the Saved Views based on the schema
4733
+ */
4734
+ 'listSavedViews'(
4735
+ parameters?: Parameters<UnknownParamsObject> | null,
4736
+ data?: any,
4737
+ config?: AxiosRequestConfig
4738
+ ): OperationResponse<Paths.ListSavedViews.Responses.$200>
4739
+ /**
4740
+ * createSavedView - createSavedView
4741
+ *
4742
+ * Creates a new saved view
4743
+ */
4744
+ 'createSavedView'(
4745
+ parameters?: Parameters<UnknownParamsObject> | null,
4746
+ data?: Paths.CreateSavedView.RequestBody,
4747
+ config?: AxiosRequestConfig
4748
+ ): OperationResponse<Paths.CreateSavedView.Responses.$201>
4749
+ /**
4750
+ * getSavedView - getSavedView
4751
+ *
4752
+ * Gets Saved View configuration by id.
4753
+ */
4754
+ 'getSavedView'(
4755
+ parameters?: Parameters<Paths.GetSavedView.PathParameters> | null,
4756
+ data?: any,
4757
+ config?: AxiosRequestConfig
4758
+ ): OperationResponse<Paths.GetSavedView.Responses.$200>
4759
+ /**
4760
+ * updateSavedView - updateSavedView
4761
+ *
4762
+ * Updates a saved view
4763
+ */
4764
+ 'updateSavedView'(
4765
+ parameters?: Parameters<Paths.UpdateSavedView.PathParameters> | null,
4766
+ data?: Paths.UpdateSavedView.RequestBody,
4767
+ config?: AxiosRequestConfig
4768
+ ): OperationResponse<Paths.UpdateSavedView.Responses.$200>
4769
+ /**
4770
+ * deleteSavedView - deleteSavedView
4771
+ *
4772
+ * Deletes a saved view
4773
+ */
4774
+ 'deleteSavedView'(
4775
+ parameters?: Parameters<Paths.DeleteSavedView.PathParameters> | null,
4776
+ data?: any,
4777
+ config?: AxiosRequestConfig
4778
+ ): OperationResponse<Paths.DeleteSavedView.Responses.$200>
4563
4779
  }
4564
4780
 
4565
4781
  export interface PathsDictionary {
@@ -5030,6 +5246,62 @@ export interface PathsDictionary {
5030
5246
  config?: AxiosRequestConfig
5031
5247
  ): OperationResponse<Paths.ImportEntities.Responses.$201>
5032
5248
  }
5249
+ ['/v1/entity/views']: {
5250
+ /**
5251
+ * listSavedViews - listSavedViews
5252
+ *
5253
+ * Get the Saved Views based on the schema
5254
+ */
5255
+ 'get'(
5256
+ parameters?: Parameters<UnknownParamsObject> | null,
5257
+ data?: any,
5258
+ config?: AxiosRequestConfig
5259
+ ): OperationResponse<Paths.ListSavedViews.Responses.$200>
5260
+ }
5261
+ ['/v1/entity/view']: {
5262
+ /**
5263
+ * createSavedView - createSavedView
5264
+ *
5265
+ * Creates a new saved view
5266
+ */
5267
+ 'post'(
5268
+ parameters?: Parameters<UnknownParamsObject> | null,
5269
+ data?: Paths.CreateSavedView.RequestBody,
5270
+ config?: AxiosRequestConfig
5271
+ ): OperationResponse<Paths.CreateSavedView.Responses.$201>
5272
+ }
5273
+ ['/v1/entity/view/{id}']: {
5274
+ /**
5275
+ * getSavedView - getSavedView
5276
+ *
5277
+ * Gets Saved View configuration by id.
5278
+ */
5279
+ 'get'(
5280
+ parameters?: Parameters<Paths.GetSavedView.PathParameters> | null,
5281
+ data?: any,
5282
+ config?: AxiosRequestConfig
5283
+ ): OperationResponse<Paths.GetSavedView.Responses.$200>
5284
+ /**
5285
+ * updateSavedView - updateSavedView
5286
+ *
5287
+ * Updates a saved view
5288
+ */
5289
+ 'put'(
5290
+ parameters?: Parameters<Paths.UpdateSavedView.PathParameters> | null,
5291
+ data?: Paths.UpdateSavedView.RequestBody,
5292
+ config?: AxiosRequestConfig
5293
+ ): OperationResponse<Paths.UpdateSavedView.Responses.$200>
5294
+ /**
5295
+ * deleteSavedView - deleteSavedView
5296
+ *
5297
+ * Deletes a saved view
5298
+ */
5299
+ 'delete'(
5300
+ parameters?: Parameters<Paths.DeleteSavedView.PathParameters> | null,
5301
+ data?: any,
5302
+ config?: AxiosRequestConfig
5303
+ ): OperationResponse<Paths.DeleteSavedView.Responses.$200>
5304
+ }
5033
5305
  }
5034
5306
 
5035
5307
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
package/dist/openapi.json CHANGED
@@ -25,6 +25,10 @@
25
25
  {
26
26
  "name": "Export",
27
27
  "description": "Export and Import entities via files"
28
+ },
29
+ {
30
+ "name": "Saved Views",
31
+ "description": "Saved Views for Entities"
28
32
  }
29
33
  ],
30
34
  "security": [
@@ -1333,6 +1337,169 @@
1333
1337
  }
1334
1338
  }
1335
1339
  }
1340
+ },
1341
+ "/v1/entity/views": {
1342
+ "get": {
1343
+ "operationId": "listSavedViews",
1344
+ "summary": "listSavedViews",
1345
+ "description": "Get the Saved Views based on the schema",
1346
+ "tags": [
1347
+ "Saved Views"
1348
+ ],
1349
+ "responses": {
1350
+ "200": {
1351
+ "description": "Success",
1352
+ "content": {
1353
+ "application/json": {
1354
+ "schema": {
1355
+ "type": "object",
1356
+ "properties": {
1357
+ "results": {
1358
+ "type": "array",
1359
+ "items": {
1360
+ "$ref": "#/components/schemas/SavedViewItem"
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ }
1370
+ },
1371
+ "/v1/entity/view": {
1372
+ "post": {
1373
+ "operationId": "createSavedView",
1374
+ "summary": "createSavedView",
1375
+ "description": "Creates a new saved view",
1376
+ "tags": [
1377
+ "Saved Views"
1378
+ ],
1379
+ "requestBody": {
1380
+ "content": {
1381
+ "application/json": {
1382
+ "schema": {
1383
+ "$ref": "#/components/schemas/SavedView"
1384
+ }
1385
+ }
1386
+ }
1387
+ },
1388
+ "responses": {
1389
+ "201": {
1390
+ "description": "Success",
1391
+ "content": {
1392
+ "application/json": {
1393
+ "schema": {
1394
+ "$ref": "#/components/schemas/SavedViewItem"
1395
+ }
1396
+ }
1397
+ }
1398
+ }
1399
+ }
1400
+ }
1401
+ },
1402
+ "/v1/entity/view/{id}": {
1403
+ "get": {
1404
+ "operationId": "getSavedView",
1405
+ "summary": "getSavedView",
1406
+ "description": "Gets Saved View configuration by id.",
1407
+ "tags": [
1408
+ "Saved Views"
1409
+ ],
1410
+ "parameters": [
1411
+ {
1412
+ "in": "path",
1413
+ "name": "id",
1414
+ "description": "View id",
1415
+ "required": true,
1416
+ "schema": {
1417
+ "$ref": "#/components/schemas/SavedViewId"
1418
+ }
1419
+ }
1420
+ ],
1421
+ "responses": {
1422
+ "200": {
1423
+ "description": "Success",
1424
+ "content": {
1425
+ "application/json": {
1426
+ "schema": {
1427
+ "type": "object",
1428
+ "properties": {
1429
+ "view": {
1430
+ "$ref": "#/components/schemas/SavedViewItem"
1431
+ }
1432
+ }
1433
+ }
1434
+ }
1435
+ }
1436
+ }
1437
+ }
1438
+ },
1439
+ "put": {
1440
+ "operationId": "updateSavedView",
1441
+ "summary": "updateSavedView",
1442
+ "description": "Updates a saved view",
1443
+ "tags": [
1444
+ "Saved Views"
1445
+ ],
1446
+ "parameters": [
1447
+ {
1448
+ "in": "path",
1449
+ "name": "id",
1450
+ "description": "View id",
1451
+ "required": true,
1452
+ "schema": {
1453
+ "$ref": "#/components/schemas/SavedViewId"
1454
+ }
1455
+ }
1456
+ ],
1457
+ "requestBody": {
1458
+ "content": {
1459
+ "application/json": {
1460
+ "schema": {
1461
+ "$ref": "#/components/schemas/SavedView"
1462
+ }
1463
+ }
1464
+ }
1465
+ },
1466
+ "responses": {
1467
+ "200": {
1468
+ "description": "Success",
1469
+ "content": {
1470
+ "application/json": {
1471
+ "schema": {
1472
+ "$ref": "#/components/schemas/SavedViewItem"
1473
+ }
1474
+ }
1475
+ }
1476
+ }
1477
+ }
1478
+ },
1479
+ "delete": {
1480
+ "operationId": "deleteSavedView",
1481
+ "summary": "deleteSavedView",
1482
+ "description": "Deletes a saved view",
1483
+ "parameters": [
1484
+ {
1485
+ "in": "path",
1486
+ "name": "id",
1487
+ "description": "View id",
1488
+ "required": true,
1489
+ "schema": {
1490
+ "$ref": "#/components/schemas/SavedViewId"
1491
+ }
1492
+ }
1493
+ ],
1494
+ "tags": [
1495
+ "Saved Views"
1496
+ ],
1497
+ "responses": {
1498
+ "200": {
1499
+ "description": "List of all available saved views"
1500
+ }
1501
+ }
1502
+ }
1336
1503
  }
1337
1504
  },
1338
1505
  "components": {
@@ -1388,7 +1555,7 @@
1388
1555
  "type": "array",
1389
1556
  "items": {
1390
1557
  "type": "string",
1391
- "example": "ecommerce_preview"
1558
+ "example": "360_features"
1392
1559
  }
1393
1560
  },
1394
1561
  "name": {
@@ -2290,13 +2457,8 @@
2290
2457
  "has_one"
2291
2458
  ]
2292
2459
  },
2293
- "delete_mode": {
2294
- "type": "string",
2295
- "enum": [
2296
- "cascade"
2297
- ]
2298
- },
2299
2460
  "relation_affinity_mode": {
2461
+ "description": "Weak relation attributes are kept when duplicating an entity. Strong relation attributes are discarded when duplicating an entity.",
2300
2462
  "type": "string",
2301
2463
  "enum": [
2302
2464
  "weak",
@@ -2419,6 +2581,10 @@
2419
2581
  "add_button_label": {
2420
2582
  "type": "string",
2421
2583
  "description": "Optional label for the add button. The translated value for add_button_lable is used, if found else the string is used as is."
2584
+ },
2585
+ "search_placeholder": {
2586
+ "type": "string",
2587
+ "description": "Optional placeholder text for the relation search input. The translated value for search_placeholder is used, if found else the string is used as is."
2422
2588
  }
2423
2589
  }
2424
2590
  }
@@ -2564,6 +2730,7 @@
2564
2730
  "type": "boolean"
2565
2731
  },
2566
2732
  "relation_affinity_mode": {
2733
+ "description": "Weak repeatable attributes are kept when duplicating an entity. Strong repeatable attributes are discarded when duplicating an entity.",
2567
2734
  "type": "string",
2568
2735
  "enum": [
2569
2736
  "weak",
@@ -3666,6 +3833,101 @@
3666
3833
  "description": "Reference to blueprint",
3667
3834
  "type": "string",
3668
3835
  "format": "uuid"
3836
+ },
3837
+ "SavedViewId": {
3838
+ "description": "Generated uuid for a saved view",
3839
+ "type": "string",
3840
+ "format": "uuid"
3841
+ },
3842
+ "SavedViewItem": {
3843
+ "allOf": [
3844
+ {
3845
+ "type": "object",
3846
+ "properties": {
3847
+ "id": {
3848
+ "$ref": "#/components/schemas/SavedViewId"
3849
+ },
3850
+ "created_at": {
3851
+ "type": "string"
3852
+ },
3853
+ "updated_at": {
3854
+ "type": "string"
3855
+ }
3856
+ }
3857
+ },
3858
+ {
3859
+ "$ref": "#/components/schemas/SavedView"
3860
+ }
3861
+ ]
3862
+ },
3863
+ "SavedView": {
3864
+ "description": "A saved entity view",
3865
+ "type": "object",
3866
+ "properties": {
3867
+ "slug": {
3868
+ "type": "array",
3869
+ "description": "list of schemas a view can belong to",
3870
+ "items": {
3871
+ "$ref": "#/components/schemas/EntitySlug"
3872
+ }
3873
+ },
3874
+ "name": {
3875
+ "description": "User-friendly identifier for the saved view",
3876
+ "type": "string",
3877
+ "example": "View listing German customers"
3878
+ },
3879
+ "created_by": {
3880
+ "anyOf": [
3881
+ {
3882
+ "type": "object",
3883
+ "description": "A user that created the view",
3884
+ "properties": {
3885
+ "user_id": {
3886
+ "type": "string",
3887
+ "example": "10598"
3888
+ }
3889
+ }
3890
+ },
3891
+ {
3892
+ "type": "object",
3893
+ "description": "A system-created view",
3894
+ "properties": {
3895
+ "source": {
3896
+ "type": "string",
3897
+ "enum": [
3898
+ "SYSTEM",
3899
+ "BLUEPRINT"
3900
+ ]
3901
+ }
3902
+ },
3903
+ "additionalProperties": true
3904
+ }
3905
+ ]
3906
+ },
3907
+ "ui_config": {
3908
+ "type": "object",
3909
+ "example": {
3910
+ "filters": {
3911
+ "customer_name": "suresh test",
3912
+ "_tags": "360"
3913
+ },
3914
+ "table_layout": {
3915
+ "opportunity": {
3916
+ "page": 1,
3917
+ "sort": "_created_at:desc",
3918
+ "pageSize": 25,
3919
+ "columnSettings": []
3920
+ }
3921
+ }
3922
+ }
3923
+ }
3924
+ },
3925
+ "required": [
3926
+ "slug",
3927
+ "name",
3928
+ "created_by",
3929
+ "ui_config"
3930
+ ]
3669
3931
  }
3670
3932
  },
3671
3933
  "examples": {