@epilot/entity-client 4.34.1 → 4.34.3

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.json CHANGED
@@ -119,6 +119,9 @@
119
119
  }
120
120
  }
121
121
  }
122
+ },
123
+ "404": {
124
+ "$ref": "#/components/responses/NotFoundError"
122
125
  }
123
126
  }
124
127
  },
@@ -1074,6 +1077,9 @@
1074
1077
  }
1075
1078
  }
1076
1079
  }
1080
+ },
1081
+ "404": {
1082
+ "$ref": "#/components/responses/NotFoundError"
1077
1083
  }
1078
1084
  }
1079
1085
  }
@@ -1167,6 +1173,9 @@
1167
1173
  }
1168
1174
  }
1169
1175
  }
1176
+ },
1177
+ "404": {
1178
+ "$ref": "#/components/responses/NotFoundError"
1170
1179
  }
1171
1180
  }
1172
1181
  },
@@ -1508,6 +1517,9 @@
1508
1517
  }
1509
1518
  }
1510
1519
  }
1520
+ },
1521
+ "404": {
1522
+ "$ref": "#/components/responses/NotFoundError"
1511
1523
  }
1512
1524
  }
1513
1525
  }
@@ -1548,6 +1560,9 @@
1548
1560
  }
1549
1561
  }
1550
1562
  }
1563
+ },
1564
+ "404": {
1565
+ "$ref": "#/components/responses/NotFoundError"
1551
1566
  }
1552
1567
  }
1553
1568
  }
@@ -1639,6 +1654,9 @@
1639
1654
  }
1640
1655
  }
1641
1656
  }
1657
+ },
1658
+ "404": {
1659
+ "$ref": "#/components/responses/NotFoundError"
1642
1660
  }
1643
1661
  }
1644
1662
  }
@@ -1731,6 +1749,9 @@
1731
1749
  ]
1732
1750
  }
1733
1751
  }
1752
+ },
1753
+ "404": {
1754
+ "$ref": "#/components/responses/NotFoundError"
1734
1755
  }
1735
1756
  }
1736
1757
  },
@@ -1794,6 +1815,9 @@
1794
1815
  }
1795
1816
  }
1796
1817
  }
1818
+ },
1819
+ "404": {
1820
+ "$ref": "#/components/responses/NotFoundError"
1797
1821
  }
1798
1822
  }
1799
1823
  },
@@ -1850,6 +1874,9 @@
1850
1874
  "responses": {
1851
1875
  "204": {
1852
1876
  "description": "Relations deleted with success."
1877
+ },
1878
+ "404": {
1879
+ "$ref": "#/components/responses/NotFoundError"
1853
1880
  }
1854
1881
  }
1855
1882
  }
@@ -1916,6 +1943,9 @@
1916
1943
  }
1917
1944
  }
1918
1945
  }
1946
+ },
1947
+ "404": {
1948
+ "$ref": "#/components/responses/NotFoundError"
1919
1949
  }
1920
1950
  }
1921
1951
  }
@@ -1976,6 +2006,9 @@
1976
2006
  }
1977
2007
  }
1978
2008
  }
2009
+ },
2010
+ "404": {
2011
+ "$ref": "#/components/responses/NotFoundError"
1979
2012
  }
1980
2013
  }
1981
2014
  }
@@ -2009,6 +2042,9 @@
2009
2042
  }
2010
2043
  }
2011
2044
  }
2045
+ },
2046
+ "404": {
2047
+ "$ref": "#/components/responses/NotFoundError"
2012
2048
  }
2013
2049
  }
2014
2050
  }
@@ -2087,6 +2123,9 @@
2087
2123
  }
2088
2124
  }
2089
2125
  }
2126
+ },
2127
+ "404": {
2128
+ "$ref": "#/components/responses/NotFoundError"
2090
2129
  }
2091
2130
  }
2092
2131
  },
@@ -2132,6 +2171,9 @@
2132
2171
  "responses": {
2133
2172
  "204": {
2134
2173
  "description": "Relation deleted with success."
2174
+ },
2175
+ "404": {
2176
+ "$ref": "#/components/responses/NotFoundError"
2135
2177
  }
2136
2178
  }
2137
2179
  }
@@ -2347,6 +2389,9 @@
2347
2389
  }
2348
2390
  }
2349
2391
  }
2392
+ },
2393
+ "404": {
2394
+ "$ref": "#/components/responses/NotFoundError"
2350
2395
  }
2351
2396
  }
2352
2397
  },
@@ -2384,6 +2429,40 @@
2384
2429
  }
2385
2430
  }
2386
2431
  },
2432
+ "patch": {
2433
+ "operationId": "patchSavedView",
2434
+ "summary": "patchSavedView",
2435
+ "description": "Partially updates a saved view with the provided payload. If an updated_at is passed and the server contains a newer version of the view a `409` error is returned",
2436
+ "tags": [
2437
+ "Saved Views"
2438
+ ],
2439
+ "parameters": [
2440
+ {
2441
+ "$ref": "#/components/parameters/SavedViewIdPathParam"
2442
+ }
2443
+ ],
2444
+ "requestBody": {
2445
+ "content": {
2446
+ "application/json": {
2447
+ "schema": {
2448
+ "$ref": "#/components/schemas/SavedViewPartial"
2449
+ }
2450
+ }
2451
+ }
2452
+ },
2453
+ "responses": {
2454
+ "200": {
2455
+ "description": "Success",
2456
+ "content": {
2457
+ "application/json": {
2458
+ "schema": {
2459
+ "$ref": "#/components/schemas/SavedViewItem"
2460
+ }
2461
+ }
2462
+ }
2463
+ }
2464
+ }
2465
+ },
2387
2466
  "delete": {
2388
2467
  "operationId": "deleteSavedView",
2389
2468
  "summary": "deleteSavedView",
@@ -2529,6 +2608,9 @@
2529
2608
  }
2530
2609
  }
2531
2610
  }
2611
+ },
2612
+ "404": {
2613
+ "$ref": "#/components/responses/NotFoundError"
2532
2614
  }
2533
2615
  }
2534
2616
  },
@@ -2645,6 +2727,9 @@
2645
2727
  }
2646
2728
  }
2647
2729
  }
2730
+ },
2731
+ "404": {
2732
+ "$ref": "#/components/responses/NotFoundError"
2648
2733
  }
2649
2734
  }
2650
2735
  }
@@ -2674,7 +2759,7 @@
2674
2759
  }
2675
2760
  },
2676
2761
  "404": {
2677
- "description": "Taxonomy classification not found"
2762
+ "$ref": "#/components/responses/NotFoundError"
2678
2763
  }
2679
2764
  }
2680
2765
  },
@@ -3043,7 +3128,7 @@
3043
3128
  "post": {
3044
3129
  "operationId": "bulkDeleteClassifications",
3045
3130
  "summary": "bulkDeleteClassifications",
3046
- "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",
3131
+ "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",
3047
3132
  "tags": [
3048
3133
  "Taxonomy"
3049
3134
  ],
@@ -3153,6 +3238,9 @@
3153
3238
  }
3154
3239
  }
3155
3240
  }
3241
+ },
3242
+ "404": {
3243
+ "$ref": "#/components/responses/NotFoundError"
3156
3244
  }
3157
3245
  }
3158
3246
  },
@@ -3294,6 +3382,9 @@
3294
3382
  }
3295
3383
  }
3296
3384
  }
3385
+ },
3386
+ "404": {
3387
+ "$ref": "#/components/responses/NotFoundError"
3297
3388
  }
3298
3389
  }
3299
3390
  },
@@ -3435,6 +3526,9 @@
3435
3526
  }
3436
3527
  }
3437
3528
  }
3529
+ },
3530
+ "404": {
3531
+ "$ref": "#/components/responses/NotFoundError"
3438
3532
  }
3439
3533
  }
3440
3534
  },
@@ -3576,6 +3670,9 @@
3576
3670
  }
3577
3671
  }
3578
3672
  }
3673
+ },
3674
+ "404": {
3675
+ "$ref": "#/components/responses/NotFoundError"
3579
3676
  }
3580
3677
  }
3581
3678
  },
@@ -3737,16 +3834,7 @@
3737
3834
  },
3738
3835
  "category": {
3739
3836
  "type": "string",
3740
- "example": "customer_relations",
3741
- "enum": [
3742
- "customer_relations",
3743
- "sales",
3744
- "product_hub",
3745
- "contracts",
3746
- "journeys",
3747
- "messaging",
3748
- "system"
3749
- ]
3837
+ "example": "customer_relations"
3750
3838
  },
3751
3839
  "published": {
3752
3840
  "type": "boolean",
@@ -3843,6 +3931,19 @@
3843
3931
  "items": {
3844
3932
  "$ref": "#/components/schemas/EntityAction"
3845
3933
  }
3934
+ },
3935
+ "ui_config": {
3936
+ "type": "object",
3937
+ "properties": {
3938
+ "content_direction": {
3939
+ "type": "string",
3940
+ "enum": [
3941
+ "row",
3942
+ "column"
3943
+ ],
3944
+ "description": "Show attributes in a row or column"
3945
+ }
3946
+ }
3846
3947
  }
3847
3948
  }
3848
3949
  },
@@ -4267,6 +4368,9 @@
4267
4368
  {
4268
4369
  "$ref": "#/components/schemas/TagsAttribute"
4269
4370
  },
4371
+ {
4372
+ "$ref": "#/components/schemas/MessageEmailAddressAttribute"
4373
+ },
4270
4374
  {
4271
4375
  "$ref": "#/components/schemas/NumberAttribute"
4272
4376
  },
@@ -5146,6 +5250,38 @@
5146
5250
  }
5147
5251
  ]
5148
5252
  },
5253
+ "DefaultAddressFields": {
5254
+ "type": "array",
5255
+ "description": "Default fields visible on addresses",
5256
+ "items": {
5257
+ "type": "string",
5258
+ "enum": [
5259
+ "postal_code",
5260
+ "city",
5261
+ "street",
5262
+ "street_number",
5263
+ "plot_area",
5264
+ "plot_of_land",
5265
+ "suburb",
5266
+ "country",
5267
+ "additional_info",
5268
+ "coordinates",
5269
+ "start_date",
5270
+ "end_date",
5271
+ "salutation",
5272
+ "title",
5273
+ "first_name",
5274
+ "last_name",
5275
+ "company_name"
5276
+ ]
5277
+ },
5278
+ "default": [
5279
+ "postal_code",
5280
+ "city",
5281
+ "street",
5282
+ "street_number"
5283
+ ]
5284
+ },
5149
5285
  "AddressAttribute": {
5150
5286
  "allOf": [
5151
5287
  {
@@ -5162,36 +5298,7 @@
5162
5298
  ]
5163
5299
  },
5164
5300
  "default_address_fields": {
5165
- "description": "Default fields visible on addresses",
5166
- "default": [
5167
- "postal_code",
5168
- "city",
5169
- "street",
5170
- "street_number"
5171
- ],
5172
- "type": "array",
5173
- "items": {
5174
- "type": "string",
5175
- "enum": [
5176
- "postal_code",
5177
- "city",
5178
- "street",
5179
- "street_number",
5180
- "plot_area",
5181
- "plot_of_land",
5182
- "suburb",
5183
- "country",
5184
- "additional_info",
5185
- "coordinates",
5186
- "start_date",
5187
- "end_date",
5188
- "salutation",
5189
- "title",
5190
- "first_name",
5191
- "last_name",
5192
- "company_name"
5193
- ]
5194
- }
5301
+ "$ref": "#/components/schemas/DefaultAddressFields"
5195
5302
  }
5196
5303
  }
5197
5304
  }
@@ -5214,6 +5321,9 @@
5214
5321
  },
5215
5322
  "has_primary": {
5216
5323
  "type": "boolean"
5324
+ },
5325
+ "default_address_fields": {
5326
+ "$ref": "#/components/schemas/DefaultAddressFields"
5217
5327
  }
5218
5328
  }
5219
5329
  }
@@ -5353,7 +5463,8 @@
5353
5463
  "relation",
5354
5464
  "payment",
5355
5465
  "price_component",
5356
- "date"
5466
+ "date",
5467
+ "message_email_address"
5357
5468
  ]
5358
5469
  },
5359
5470
  "enable_relation_picker": {
@@ -5396,6 +5507,42 @@
5396
5507
  }
5397
5508
  ]
5398
5509
  },
5510
+ "MessageEmailAddressAttribute": {
5511
+ "allOf": [
5512
+ {
5513
+ "$ref": "#/components/schemas/BaseAttribute"
5514
+ },
5515
+ {
5516
+ "type": "object",
5517
+ "description": "Message emil address",
5518
+ "properties": {
5519
+ "type": {
5520
+ "type": "string",
5521
+ "enum": [
5522
+ "message_email_address"
5523
+ ]
5524
+ },
5525
+ "address": {
5526
+ "type": "string"
5527
+ },
5528
+ "name": {
5529
+ "type": "string"
5530
+ },
5531
+ "send_status": {
5532
+ "type": "string"
5533
+ },
5534
+ "email_type": {
5535
+ "type": "string"
5536
+ }
5537
+ },
5538
+ "required": [
5539
+ "type",
5540
+ "address",
5541
+ "name"
5542
+ ]
5543
+ }
5544
+ ]
5545
+ },
5399
5546
  "NumberAttribute": {
5400
5547
  "allOf": [
5401
5548
  {
@@ -5546,6 +5693,36 @@
5546
5693
  "items": {
5547
5694
  "$ref": "#/components/schemas/SettingFlag"
5548
5695
  }
5696
+ },
5697
+ "display_mode": {
5698
+ "type": "string",
5699
+ "enum": [
5700
+ "inline",
5701
+ "block"
5702
+ ],
5703
+ "description": "Defines the display mode of the summary attribute.\nWhen set to `inline`, the label and value will be displayed in the same line.\nWhen set to `block`, the label and value will be displayed in separate lines.\n"
5704
+ },
5705
+ "content_line_cap": {
5706
+ "type": "number",
5707
+ "description": "Defines the line numbers of the content.\nFor instance, When set to 1, the content will be displayed in a single line.\n"
5708
+ },
5709
+ "content_wrap": {
5710
+ "type": "string",
5711
+ "enum": [
5712
+ "normal",
5713
+ "nowrap",
5714
+ "pre",
5715
+ "pre-wrap"
5716
+ ],
5717
+ "description": "Defines white-space of the content.\n"
5718
+ },
5719
+ "hide_label": {
5720
+ "type": "boolean",
5721
+ "description": "When set to true, will hide the label of the field."
5722
+ },
5723
+ "highlight_container": {
5724
+ "type": "boolean",
5725
+ "description": "When set to true, will highlight the container of the field."
5549
5726
  }
5550
5727
  },
5551
5728
  "required": [
@@ -6486,6 +6663,10 @@
6486
6663
  "entity_id": {
6487
6664
  "$ref": "#/components/schemas/EntityId"
6488
6665
  },
6666
+ "org_id": {
6667
+ "type": "string",
6668
+ "description": "Organization Id the entity belongs to"
6669
+ },
6489
6670
  "attribute": {
6490
6671
  "type": "string"
6491
6672
  },
@@ -6536,9 +6717,7 @@
6536
6717
  "hydrate": {},
6537
6718
  "fields": {},
6538
6719
  "aggs": {},
6539
- "include_deleted": {
6540
- "$ref": "#/components/schemas/EntitySearchIncludeDeletedParam"
6541
- }
6720
+ "include_deleted": {}
6542
6721
  },
6543
6722
  "additionalProperties": false,
6544
6723
  "required": [
@@ -6568,7 +6747,8 @@
6568
6747
  "size": {},
6569
6748
  "hydrate": {},
6570
6749
  "fields": {},
6571
- "aggs": {}
6750
+ "aggs": {},
6751
+ "include_deleted": {}
6572
6752
  },
6573
6753
  "additionalProperties": false,
6574
6754
  "required": [
@@ -7192,7 +7372,7 @@
7192
7372
  }
7193
7373
  ]
7194
7374
  },
7195
- "SavedView": {
7375
+ "SavedViewPartial": {
7196
7376
  "description": "A saved entity view",
7197
7377
  "type": "object",
7198
7378
  "properties": {
@@ -7216,6 +7396,7 @@
7216
7396
  "example": "66"
7217
7397
  },
7218
7398
  "shared": {
7399
+ "deprecated": true,
7219
7400
  "description": "boolean property for if a view is shared with organisation",
7220
7401
  "type": "boolean",
7221
7402
  "example": true
@@ -7273,13 +7454,32 @@
7273
7454
  }
7274
7455
  }
7275
7456
  }
7457
+ },
7458
+ "shared_with": {
7459
+ "type": "array",
7460
+ "description": "List of users ('${userId}'), user groups ('group_${groupId}'), or partner users ('${partnerOrgId}_${partnerUserId}') that the view is shared with",
7461
+ "items": {
7462
+ "type": "string",
7463
+ "example": "112233"
7464
+ }
7465
+ }
7466
+ }
7467
+ },
7468
+ "SavedView": {
7469
+ "description": "A saved entity view",
7470
+ "allOf": [
7471
+ {
7472
+ "$ref": "#/components/schemas/SavedViewPartial"
7473
+ },
7474
+ {
7475
+ "type": "object",
7476
+ "required": [
7477
+ "slug",
7478
+ "name",
7479
+ "created_by",
7480
+ "ui_config"
7481
+ ]
7276
7482
  }
7277
- },
7278
- "required": [
7279
- "slug",
7280
- "name",
7281
- "created_by",
7282
- "ui_config"
7283
7483
  ]
7284
7484
  },
7285
7485
  "Taxonomy": {
@@ -7619,6 +7819,22 @@
7619
7819
  "description": "Whether the setting should be enabled or not"
7620
7820
  }
7621
7821
  }
7822
+ },
7823
+ "ErrorObject": {
7824
+ "description": "A generic error returned by the API",
7825
+ "type": "object",
7826
+ "properties": {
7827
+ "status": {
7828
+ "type": "integer",
7829
+ "description": "The HTTP status code of the error",
7830
+ "example": 400
7831
+ },
7832
+ "error": {
7833
+ "type": "string",
7834
+ "description": "The error message",
7835
+ "example": "Bad Request"
7836
+ }
7837
+ }
7622
7838
  }
7623
7839
  },
7624
7840
  "parameters": {
@@ -8501,6 +8717,28 @@
8501
8717
  ]
8502
8718
  }
8503
8719
  }
8720
+ },
8721
+ "responses": {
8722
+ "NotFoundError": {
8723
+ "description": "The requested resource was not found",
8724
+ "content": {
8725
+ "application/json": {
8726
+ "schema": {
8727
+ "allOf": [
8728
+ {
8729
+ "$ref": "#/components/schemas/ErrorObject"
8730
+ },
8731
+ {
8732
+ "example": {
8733
+ "status": 404,
8734
+ "error": "Not Found"
8735
+ }
8736
+ }
8737
+ ]
8738
+ }
8739
+ }
8740
+ }
8741
+ }
8504
8742
  }
8505
8743
  },
8506
8744
  "servers": [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-model.js","sourceRoot":"","sources":["../src/schema-model.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B;;;OAGG;IACH,qCAAa,CAAA;IACb,yCAAiB,CAAA;AACnB,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"}
package/jest.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { Config } from '@jest/types';
2
+
3
+ const config: Config.InitialOptions = {
4
+ preset: 'ts-jest',
5
+ testEnvironment: 'node',
6
+ testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
7
+ testPathIgnorePatterns: ['node_modules'],
8
+ coveragePathIgnorePatterns: ['__tests__', 'node_modules'],
9
+ verbose: true,
10
+ silent: true,
11
+ moduleNameMapper: {
12
+ '^axios$': require.resolve('axios'),
13
+ },
14
+ };
15
+
16
+ export default config;