@epilot/entity-client 4.22.0 → 4.23.0
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/jest.config.ts +16 -0
- package/package-lock.json +17779 -0
- package/package.json +1 -1
- package/src/client.test.ts +25 -0
- package/src/client.ts +26 -0
- package/src/definition.ts +5 -0
- package/{dist → src}/openapi-runtime.json +74 -0
- package/{dist → src}/openapi.d.ts +409 -69
- package/{dist → src}/openapi.json +275 -85
- package/src/schema-model.ts +13 -0
- package/webpack.config.js +31 -0
- package/dist/client.d.ts +0 -3
- package/dist/client.js +0 -37
- package/dist/definition.d.ts +0 -3
- package/dist/definition.js +0 -1
- package/dist/index.js +0 -19
- package/dist/schema-model.d.ts +0 -11
- package/dist/schema-model.js +0 -13
- /package/{dist/index.d.ts → src/index.ts} +0 -0
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
"content": {
|
|
928
928
|
"application/json": {
|
|
929
929
|
"schema": {
|
|
930
|
-
"$ref": "#/components/schemas/
|
|
930
|
+
"$ref": "#/components/schemas/BaseActivityItem"
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
}
|
|
@@ -1015,7 +1015,7 @@
|
|
|
1015
1015
|
"content": {
|
|
1016
1016
|
"application/json": {
|
|
1017
1017
|
"schema": {
|
|
1018
|
-
"$ref": "#/components/schemas/
|
|
1018
|
+
"$ref": "#/components/schemas/BaseActivityItem"
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
@@ -1679,7 +1679,7 @@
|
|
|
1679
1679
|
"required": false,
|
|
1680
1680
|
"schema": {
|
|
1681
1681
|
"type": "integer",
|
|
1682
|
-
"default":
|
|
1682
|
+
"default": 150,
|
|
1683
1683
|
"minimum": 1,
|
|
1684
1684
|
"maximum": 250
|
|
1685
1685
|
}
|
|
@@ -2396,6 +2396,226 @@
|
|
|
2396
2396
|
}
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
|
+
},
|
|
2400
|
+
"/v1/entity/schemas/attributes/{composite_id}": {
|
|
2401
|
+
"get": {
|
|
2402
|
+
"operationId": "getSchemaAttribute",
|
|
2403
|
+
"summary": "getSchemaAttribute",
|
|
2404
|
+
"description": "Get a schema attribute from given attribute ID",
|
|
2405
|
+
"tags": [
|
|
2406
|
+
"Schemas"
|
|
2407
|
+
],
|
|
2408
|
+
"parameters": [
|
|
2409
|
+
{
|
|
2410
|
+
"name": "composite_id",
|
|
2411
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2412
|
+
"in": "path",
|
|
2413
|
+
"required": true,
|
|
2414
|
+
"schema": {
|
|
2415
|
+
"type": "string",
|
|
2416
|
+
"pattern": "^.+:.+$",
|
|
2417
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
],
|
|
2421
|
+
"responses": {
|
|
2422
|
+
"200": {
|
|
2423
|
+
"description": "Success",
|
|
2424
|
+
"content": {
|
|
2425
|
+
"application/json": {
|
|
2426
|
+
"schema": {
|
|
2427
|
+
"$ref": "#/components/schemas/AttributeWithCompositeID"
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2434
|
+
"put": {
|
|
2435
|
+
"operationId": "putSchemaAttribute",
|
|
2436
|
+
"summary": "putSchemaAttribute",
|
|
2437
|
+
"description": "Adds or updates an attribute in the schema",
|
|
2438
|
+
"tags": [
|
|
2439
|
+
"Schemas"
|
|
2440
|
+
],
|
|
2441
|
+
"parameters": [
|
|
2442
|
+
{
|
|
2443
|
+
"name": "composite_id",
|
|
2444
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2445
|
+
"in": "path",
|
|
2446
|
+
"required": true,
|
|
2447
|
+
"schema": {
|
|
2448
|
+
"type": "string",
|
|
2449
|
+
"pattern": "^.+:.+$",
|
|
2450
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
],
|
|
2454
|
+
"requestBody": {
|
|
2455
|
+
"content": {
|
|
2456
|
+
"application/json": {
|
|
2457
|
+
"schema": {
|
|
2458
|
+
"$ref": "#/components/schemas/AttributeWithCompositeID"
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
"responses": {
|
|
2464
|
+
"200": {
|
|
2465
|
+
"description": "Success",
|
|
2466
|
+
"content": {
|
|
2467
|
+
"application/json": {
|
|
2468
|
+
"schema": {
|
|
2469
|
+
"$ref": "#/components/schemas/AttributeWithCompositeID"
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
},
|
|
2476
|
+
"delete": {
|
|
2477
|
+
"operationId": "deleteSchemaAttribute",
|
|
2478
|
+
"summary": "deleteSchemaAttribute",
|
|
2479
|
+
"description": "Deletes an attribute from a schema",
|
|
2480
|
+
"tags": [
|
|
2481
|
+
"Schemas"
|
|
2482
|
+
],
|
|
2483
|
+
"parameters": [
|
|
2484
|
+
{
|
|
2485
|
+
"name": "composite_id",
|
|
2486
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2487
|
+
"in": "path",
|
|
2488
|
+
"required": true,
|
|
2489
|
+
"schema": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"pattern": "^.+:.+$",
|
|
2492
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
],
|
|
2496
|
+
"responses": {
|
|
2497
|
+
"200": {
|
|
2498
|
+
"description": "Success",
|
|
2499
|
+
"content": {
|
|
2500
|
+
"application/json": {
|
|
2501
|
+
"schema": {
|
|
2502
|
+
"$ref": "#/components/schemas/AttributeWithCompositeID"
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
},
|
|
2510
|
+
"/v1/entity/schemas/capabilities/{composite_id}": {
|
|
2511
|
+
"get": {
|
|
2512
|
+
"operationId": "getSchemaCapability",
|
|
2513
|
+
"summary": "getSchemaCapability",
|
|
2514
|
+
"description": "Get a schema capability from given capability ID",
|
|
2515
|
+
"tags": [
|
|
2516
|
+
"Schemas"
|
|
2517
|
+
],
|
|
2518
|
+
"parameters": [
|
|
2519
|
+
{
|
|
2520
|
+
"name": "composite_id",
|
|
2521
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2522
|
+
"in": "path",
|
|
2523
|
+
"required": true,
|
|
2524
|
+
"schema": {
|
|
2525
|
+
"type": "string",
|
|
2526
|
+
"pattern": "^.+:.+$",
|
|
2527
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
],
|
|
2531
|
+
"responses": {
|
|
2532
|
+
"200": {
|
|
2533
|
+
"description": "Success",
|
|
2534
|
+
"content": {
|
|
2535
|
+
"application/json": {
|
|
2536
|
+
"schema": {
|
|
2537
|
+
"$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
},
|
|
2544
|
+
"put": {
|
|
2545
|
+
"operationId": "putSchemaCapability",
|
|
2546
|
+
"summary": "putSchemaCapability",
|
|
2547
|
+
"description": "Adds or updates an capability in the schema",
|
|
2548
|
+
"tags": [
|
|
2549
|
+
"Schemas"
|
|
2550
|
+
],
|
|
2551
|
+
"parameters": [
|
|
2552
|
+
{
|
|
2553
|
+
"name": "composite_id",
|
|
2554
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2555
|
+
"in": "path",
|
|
2556
|
+
"required": true,
|
|
2557
|
+
"schema": {
|
|
2558
|
+
"type": "string",
|
|
2559
|
+
"pattern": "^.+:.+$",
|
|
2560
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
],
|
|
2564
|
+
"requestBody": {
|
|
2565
|
+
"content": {
|
|
2566
|
+
"application/json": {
|
|
2567
|
+
"schema": {
|
|
2568
|
+
"$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
},
|
|
2573
|
+
"responses": {
|
|
2574
|
+
"200": {
|
|
2575
|
+
"description": "Success",
|
|
2576
|
+
"content": {
|
|
2577
|
+
"application/json": {
|
|
2578
|
+
"schema": {
|
|
2579
|
+
"$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
},
|
|
2586
|
+
"delete": {
|
|
2587
|
+
"operationId": "deleteSchemaCapability",
|
|
2588
|
+
"summary": "deleteSchemaCapability",
|
|
2589
|
+
"description": "Deletes a Capability from a schema",
|
|
2590
|
+
"tags": [
|
|
2591
|
+
"Schemas"
|
|
2592
|
+
],
|
|
2593
|
+
"parameters": [
|
|
2594
|
+
{
|
|
2595
|
+
"name": "composite_id",
|
|
2596
|
+
"description": "Schema Slug and the Attribute ID",
|
|
2597
|
+
"in": "path",
|
|
2598
|
+
"required": true,
|
|
2599
|
+
"schema": {
|
|
2600
|
+
"type": "string",
|
|
2601
|
+
"pattern": "^.+:.+$",
|
|
2602
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
],
|
|
2606
|
+
"responses": {
|
|
2607
|
+
"200": {
|
|
2608
|
+
"description": "Success",
|
|
2609
|
+
"content": {
|
|
2610
|
+
"application/json": {
|
|
2611
|
+
"schema": {
|
|
2612
|
+
"$ref": "#/components/schemas/EntityCapabilityWithCompositeID"
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2399
2619
|
}
|
|
2400
2620
|
},
|
|
2401
2621
|
"components": {
|
|
@@ -2866,6 +3086,24 @@
|
|
|
2866
3086
|
}
|
|
2867
3087
|
]
|
|
2868
3088
|
},
|
|
3089
|
+
"AttributeWithCompositeID": {
|
|
3090
|
+
"allOf": [
|
|
3091
|
+
{
|
|
3092
|
+
"$ref": "#/components/schemas/Attribute"
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"type": "object",
|
|
3096
|
+
"description": "a readonly computed ID for the attribute including schema slug and the attribute ID",
|
|
3097
|
+
"properties": {
|
|
3098
|
+
"composite_id": {
|
|
3099
|
+
"type": "string",
|
|
3100
|
+
"readOnly": true,
|
|
3101
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
]
|
|
3106
|
+
},
|
|
2869
3107
|
"BaseAttribute": {
|
|
2870
3108
|
"type": "object",
|
|
2871
3109
|
"properties": {
|
|
@@ -3883,6 +4121,11 @@
|
|
|
3883
4121
|
},
|
|
3884
4122
|
"format": {
|
|
3885
4123
|
"type": "string"
|
|
4124
|
+
},
|
|
4125
|
+
"show_separator": {
|
|
4126
|
+
"description": "Whether or not to show a thousands separator",
|
|
4127
|
+
"type": "boolean",
|
|
4128
|
+
"default": true
|
|
3886
4129
|
}
|
|
3887
4130
|
}
|
|
3888
4131
|
}
|
|
@@ -4145,6 +4388,24 @@
|
|
|
4145
4388
|
"name"
|
|
4146
4389
|
]
|
|
4147
4390
|
},
|
|
4391
|
+
"EntityCapabilityWithCompositeID": {
|
|
4392
|
+
"allOf": [
|
|
4393
|
+
{
|
|
4394
|
+
"$ref": "#/components/schemas/EntityCapability"
|
|
4395
|
+
},
|
|
4396
|
+
{
|
|
4397
|
+
"type": "object",
|
|
4398
|
+
"description": "a readonly computed ID for the entity capability including schema slug and the capability ID",
|
|
4399
|
+
"properties": {
|
|
4400
|
+
"composite_id": {
|
|
4401
|
+
"type": "string",
|
|
4402
|
+
"readOnly": true,
|
|
4403
|
+
"example": "contact:97644baa-083f-4e49-9188-fcff2ecaad7d"
|
|
4404
|
+
}
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
]
|
|
4408
|
+
},
|
|
4148
4409
|
"EntityViewDisabled": {
|
|
4149
4410
|
"type": "object",
|
|
4150
4411
|
"properties": {
|
|
@@ -4432,87 +4693,6 @@
|
|
|
4432
4693
|
},
|
|
4433
4694
|
"additionalProperties": true
|
|
4434
4695
|
},
|
|
4435
|
-
"HydratedEntity": {
|
|
4436
|
-
"type": "object",
|
|
4437
|
-
"description": "Entity with relation data resolved into the attribute values",
|
|
4438
|
-
"properties": {
|
|
4439
|
-
"_relations": {
|
|
4440
|
-
"type": "array",
|
|
4441
|
-
"items": {
|
|
4442
|
-
"type": "object",
|
|
4443
|
-
"properties": {
|
|
4444
|
-
"entity_id": {
|
|
4445
|
-
"$ref": "#/components/schemas/EntityId"
|
|
4446
|
-
}
|
|
4447
|
-
},
|
|
4448
|
-
"required": [
|
|
4449
|
-
"entity_id"
|
|
4450
|
-
]
|
|
4451
|
-
}
|
|
4452
|
-
}
|
|
4453
|
-
},
|
|
4454
|
-
"additionalProperties": true,
|
|
4455
|
-
"required": [
|
|
4456
|
-
"_relations"
|
|
4457
|
-
],
|
|
4458
|
-
"example": {
|
|
4459
|
-
"_relations": [
|
|
4460
|
-
{
|
|
4461
|
-
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
4462
|
-
}
|
|
4463
|
-
],
|
|
4464
|
-
"status": "active",
|
|
4465
|
-
"customer_number": "abc123",
|
|
4466
|
-
"email": [
|
|
4467
|
-
{
|
|
4468
|
-
"label": "work",
|
|
4469
|
-
"email": "user@example.com"
|
|
4470
|
-
}
|
|
4471
|
-
],
|
|
4472
|
-
"phone": [
|
|
4473
|
-
{
|
|
4474
|
-
"label": "work",
|
|
4475
|
-
"phone": "+49123456789"
|
|
4476
|
-
}
|
|
4477
|
-
],
|
|
4478
|
-
"first_name": "First Name",
|
|
4479
|
-
"middle_name": "Middle Name",
|
|
4480
|
-
"last_name": "Last Name",
|
|
4481
|
-
"date_of_birth": "2019-08-24",
|
|
4482
|
-
"title": "Mr.",
|
|
4483
|
-
"account": [
|
|
4484
|
-
{
|
|
4485
|
-
"status": "active",
|
|
4486
|
-
"name": "Company name",
|
|
4487
|
-
"company_email": [
|
|
4488
|
-
{
|
|
4489
|
-
"label": "Company email",
|
|
4490
|
-
"email": "company@example.com"
|
|
4491
|
-
}
|
|
4492
|
-
],
|
|
4493
|
-
"company_phone": [
|
|
4494
|
-
{
|
|
4495
|
-
"label": "Support phone",
|
|
4496
|
-
"phone": "+49123456789"
|
|
4497
|
-
}
|
|
4498
|
-
],
|
|
4499
|
-
"company_website": "https://example.com",
|
|
4500
|
-
"tax_id": "DE123456789",
|
|
4501
|
-
"tax_exemption": "2019-08-24",
|
|
4502
|
-
"contacts": {
|
|
4503
|
-
"$relation": [
|
|
4504
|
-
{
|
|
4505
|
-
"_tags": [
|
|
4506
|
-
"CEO"
|
|
4507
|
-
],
|
|
4508
|
-
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
4509
|
-
}
|
|
4510
|
-
]
|
|
4511
|
-
}
|
|
4512
|
-
}
|
|
4513
|
-
]
|
|
4514
|
-
}
|
|
4515
|
-
},
|
|
4516
4696
|
"EntityItem": {
|
|
4517
4697
|
"allOf": [
|
|
4518
4698
|
{
|
|
@@ -5023,7 +5203,7 @@
|
|
|
5023
5203
|
"operation"
|
|
5024
5204
|
]
|
|
5025
5205
|
},
|
|
5026
|
-
"
|
|
5206
|
+
"BaseActivityItem": {
|
|
5027
5207
|
"allOf": [
|
|
5028
5208
|
{
|
|
5029
5209
|
"type": "object",
|
|
@@ -5047,6 +5227,13 @@
|
|
|
5047
5227
|
"$ref": "#/components/schemas/ActivityCallerContext"
|
|
5048
5228
|
}
|
|
5049
5229
|
}
|
|
5230
|
+
}
|
|
5231
|
+
]
|
|
5232
|
+
},
|
|
5233
|
+
"ActivityItem": {
|
|
5234
|
+
"allOf": [
|
|
5235
|
+
{
|
|
5236
|
+
"$ref": "#/components/schemas/BaseActivityItem"
|
|
5050
5237
|
},
|
|
5051
5238
|
{
|
|
5052
5239
|
"type": "object",
|
|
@@ -6197,6 +6384,9 @@
|
|
|
6197
6384
|
}
|
|
6198
6385
|
},
|
|
6199
6386
|
"servers": [
|
|
6387
|
+
{
|
|
6388
|
+
"url": "https://entity.sls.epilot.io"
|
|
6389
|
+
},
|
|
6200
6390
|
{
|
|
6201
6391
|
"url": "https://entity.sls.epilot.io"
|
|
6202
6392
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Components } from './openapi';
|
|
2
|
+
|
|
3
|
+
export enum RelationAffinityMode {
|
|
4
|
+
/**
|
|
5
|
+
* For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
|
|
6
|
+
* For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
|
|
7
|
+
*/
|
|
8
|
+
WEAK = 'weak',
|
|
9
|
+
STRONG = 'strong',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type Attribute = Components.Schemas.Attribute;
|
|
13
|
+
export type AttributeType = Attribute['type'];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const CopyPlugin = require('copy-webpack-plugin');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
entry: './src/definition.ts',
|
|
8
|
+
mode: 'production',
|
|
9
|
+
module: {
|
|
10
|
+
rules: [
|
|
11
|
+
{
|
|
12
|
+
test: /\.tsx?$/,
|
|
13
|
+
use: 'ts-loader',
|
|
14
|
+
exclude: /node_modules/,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
plugins: [
|
|
19
|
+
new CopyPlugin({
|
|
20
|
+
patterns: [
|
|
21
|
+
{ from: '*.d.ts', context: './src' },
|
|
22
|
+
{ from: '*.json', context: './src' },
|
|
23
|
+
],
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
output: {
|
|
27
|
+
path: path.join(__dirname, 'dist'),
|
|
28
|
+
filename: 'definition.js',
|
|
29
|
+
libraryTarget: 'commonjs',
|
|
30
|
+
},
|
|
31
|
+
};
|
package/dist/client.d.ts
DELETED
package/dist/client.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createClient = exports.getClient = void 0;
|
|
18
|
-
var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
|
|
19
|
-
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
20
|
-
var definition_1 = __importDefault(require("./definition"));
|
|
21
|
-
var client;
|
|
22
|
-
var getClient = function () {
|
|
23
|
-
if (!client) {
|
|
24
|
-
client = (0, exports.createClient)();
|
|
25
|
-
}
|
|
26
|
-
return client;
|
|
27
|
-
};
|
|
28
|
-
exports.getClient = getClient;
|
|
29
|
-
var createClient = function () {
|
|
30
|
-
var _a;
|
|
31
|
-
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
32
|
-
var apiClient = api.initSync();
|
|
33
|
-
apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
|
|
34
|
-
return apiClient;
|
|
35
|
-
};
|
|
36
|
-
exports.createClient = createClient;
|
|
37
|
-
//# sourceMappingURL=client.js.map
|
package/dist/definition.d.ts
DELETED
package/dist/definition.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e={914:function(e,a,t){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});var n=r(t(240));a.default=n.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/entity/schemas":{"get":{"operationId":"listSchemas","parameters":[{"in":"query","name":"unpublished"}]}},"/v1/entity/schemas/{slug}":{"get":{"operationId":"getSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"id"}]},"put":{"operationId":"putSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"draft"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"}]}},"/v1/entity/schemas/{slug}/versions":{"get":{"operationId":"getSchemaVersions","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"in":"query","name":"versions_from"},{"in":"query","name":"versions_size"},{"in":"query","name":"drafts_from"},{"in":"query","name":"drafts_size"},{"in":"query","name":"fields","required":false,"style":"form","explode":false}]}},"/v1/entity/schemas/blueprints":{"get":{"operationId":"listSchemaBlueprints"}},"/v1/entity/schemas/{slug}/taxonomy/{taxonomySlug}":{"get":{"operationId":"listTaxonomyClassificationsForSchema","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"query"},{"in":"query","name":"size"}]}},"/v1/entity:search":{"post":{"operationId":"searchEntities","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}":{"post":{"operationId":"createEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}:validate":{"post":{"operationId":"validateEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathPriceParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/{slug}:upsert":{"patch":{"operationId":"upsertEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/DryRunQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/{slug}/{id}":{"get":{"operationId":"getEntityV2","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"in":"query","name":"fields","style":"form","explode":false}]}},"/v1/entity/{slug}/{id}":{"get":{"operationId":"getEntity","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"}]},"put":{"operationId":"updateEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}}},"patch":{"operationId":"patchEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/DryRunQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}},"required":true}},"delete":{"operationId":"deleteEntity","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}]}},"/v1/entity:autocomplete":{"get":{"operationId":"autocomplete","parameters":[{"name":"input","in":"query"},{"name":"attribute","in":"query","required":true},{"name":"slug","in":"query"},{"name":"size","in":"query"}]}},"/v1/entity/activity":{"post":{"operationId":"createActivity","parameters":[{"in":"query","name":"entities","style":"form","explode":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/activity/{id}":{"get":{"operationId":"getActivity","parameters":[{"$ref":"#/components/parameters/ActivityIdPathParam"},{"in":"query","name":"operations_size"},{"in":"query","name":"operations_from"}]}},"/v1/entity/activity/{id}:attach":{"post":{"operationId":"attachActivity","parameters":[{"$ref":"#/components/parameters/ActivityIdPathParam"},{"in":"query","name":"entities","style":"form","explode":false}]}},"/v1/entity/{slug}/{id}/activity":{"get":{"operationId":"getEntityActivityFeed","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"query","name":"after"},{"in":"query","name":"before"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size"},{"in":"query","name":"type"},{"in":"query","name":"include_relations"}]}},"/v1/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelations","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"$ref":"#/components/parameters/IncludeReverseQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size","required":false},{"$ref":"#/components/parameters/IncludeSchemasQueryParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"}]},"post":{"operationId":"addRelations","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelationsV2","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"in":"query","name":"query"},{"$ref":"#/components/parameters/IncludeReverseQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size"},{"in":"query","name":"fields"}]}},"/v3/entity/{slug}/{id}/relations":{"get":{"operationId":"getRelationsV3","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/HydrateEntitiesQueryParam"},{"$ref":"#/components/parameters/IncludeReverseDeprecatedQueryParam"},{"$ref":"#/components/parameters/FromPageQueryParam"},{"in":"query","name":"size","required":false},{"$ref":"#/components/parameters/IncludeSchemasQueryParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"},{"$ref":"#/components/parameters/EntityRelationsModeQueryParam"}]}},"/v2/entity/{slug}/{id}/relations/count":{"get":{"operationId":"getRelatedEntitiesCount","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"$ref":"#/components/parameters/ExcludeSchemasQueryParam"}]}},"/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}":{"put":{"operationId":"updateRelation","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"path","name":"attribute","required":true},{"in":"path","name":"entity_id","required":true},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteRelation","parameters":[{"$ref":"#/components/parameters/EntitySlugPathParam"},{"$ref":"#/components/parameters/EntityIdPathParam"},{"in":"path","name":"attribute","required":true},{"in":"path","name":"entity_id","required":true},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/ActivityIdQueryParam"}]}},"/v1/entity:export":{"post":{"operationId":"exportEntities","parameters":[{"in":"query","name":"job_id"},{"in":"query","name":"is_template"},{"in":"query","name":"language"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity:import":{"post":{"operationId":"importEntities","parameters":[{"in":"query","name":"job_id"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/views":{"get":{"operationId":"listSavedViews","parameters":[{"in":"query","name":"slug","required":false},{"in":"query","name":"sort","required":false},{"in":"query","name":"from","required":false},{"in":"query","name":"size","required":false},{"in":"query","name":"fields","required":false}]}},"/v1/entity/view":{"post":{"operationId":"createSavedView","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/view/{id}":{"get":{"operationId":"getSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}]},"put":{"operationId":"updateSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSavedView","parameters":[{"$ref":"#/components/parameters/SavedViewIdPathParam"}]}},"/v1/entity/views/favorites":{"get":{"operationId":"listFavoriteViewsForUser"}},"/v1/entity/listTaxonomies":{"get":{"deprecated":true,"operationId":"listTaxonomies","parameters":[{"in":"query","name":"include_disabled"}]}},"/v1/entity/taxonomies":{"get":{"operationId":"listTaxonomies","parameters":[{"in":"query","name":"include_disabled"}]},"post":{"operationId":"createTaxonomy","requestBody":{"content":{"application/json":{}}}}},"/v1/entity/taxonomies/{taxonomySlug}":{"get":{"operationId":"getTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}]},"put":{"operationId":"updateTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"permanent"}]}},"/v1/entity/taxonomies/{taxonomySlug}:autocomplete":{"get":{"operationId":"taxonomyAutocomplete","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"in":"query","name":"query"},{"in":"query","name":"size"}]}},"/v1/entity/taxonomies/classifications:search":{"post":{"operationId":"taxonomiesClassificationsSearch","parameters":[{"$ref":"#/components/parameters/TaxonomySlugQueryParamOptional"},{"in":"query","name":"query"}],"requestBody":{"content":{"application/json":{}}}}},"/v1/entity/taxonomies/{taxonomySlug}/classifications":{"post":{"operationId":"updateClassificationsForTaxonomy","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/taxonomies/{taxonomySlug}/classifications":{"post":{"operationId":"createTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"}],"requestBody":{"content":{"application/json":{}}}}},"/v2/entity/taxonomies/{taxonomySlug}/classifications/{classificationSlug}":{"put":{"operationId":"updateTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"$ref":"#/components/parameters/TaxonomyClassificationSlugPathParam"}],"requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteTaxonomyClassification","parameters":[{"$ref":"#/components/parameters/TaxonomySlugPathParam"},{"$ref":"#/components/parameters/TaxonomyClassificationSlugPathParam"},{"in":"query","name":"permanent"}]}}},"components":{"parameters":{"EntityIdPathParam":{"name":"id","in":"path","required":true},"EntitySlugPathParam":{"name":"slug","in":"path","required":true},"EntitySlugPathPriceParam":{"name":"slug","in":"path","required":true},"TaxonomySlugPathParam":{"name":"taxonomySlug","in":"path","required":true},"TaxonomySlugQueryParamOptional":{"name":"taxonomySlug","in":"query"},"TaxonomyClassificationSlugPathParam":{"name":"classificationSlug","in":"path","required":true},"SavedViewIdPathParam":{"name":"id","in":"path","required":true},"AsyncOperationQueryParam":{"name":"async","in":"query","required":false},"HydrateEntitiesQueryParam":{"name":"hydrate","in":"query"},"ActivityIdQueryParam":{"name":"activity_id","in":"query","required":false},"ActivityIdPathParam":{"name":"id","in":"path","required":true},"FromPageQueryParam":{"name":"from","in":"query"},"IncludeReverseDeprecatedQueryParam":{"name":"include_reverse","in":"query","deprecated":true},"IncludeReverseQueryParam":{"name":"include_reverse","in":"query"},"IncludeSchemasQueryParam":{"name":"include_schemas","in":"query","required":false,"style":"form","explode":false},"ExcludeSchemasQueryParam":{"name":"exclude_schemas","in":"query","required":false,"style":"form","explode":false},"EntityRelationsModeQueryParam":{"name":"mode","in":"query","required":false},"DryRunQueryParam":{"name":"dry_run","in":"query","required":false}}},"servers":[{"url":"https://entity.sls.epilot.io"}]}')}},a={},t=function t(r){var n=a[r];if(void 0!==n)return n.exports;var o=a[r]={exports:{}};return e[r].call(o.exports,o,o.exports,t),o.exports}(914),r=exports;for(var n in t)r[n]=t[n];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
package/dist/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client"), exports);
|
|
18
|
-
__exportStar(require("./schema-model"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/dist/schema-model.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Components } from './openapi';
|
|
2
|
-
export declare enum RelationAffinityMode {
|
|
3
|
-
/**
|
|
4
|
-
* For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
|
|
5
|
-
* For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
|
|
6
|
-
*/
|
|
7
|
-
WEAK = "weak",
|
|
8
|
-
STRONG = "strong"
|
|
9
|
-
}
|
|
10
|
-
export type Attribute = Components.Schemas.Attribute;
|
|
11
|
-
export type AttributeType = Attribute['type'];
|
package/dist/schema-model.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelationAffinityMode = void 0;
|
|
4
|
-
var RelationAffinityMode;
|
|
5
|
-
(function (RelationAffinityMode) {
|
|
6
|
-
/**
|
|
7
|
-
* For strong affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will trigger a CASCADE delete or create to the relation entity itself.
|
|
8
|
-
* For weak affinity mode on a relation attribute, deleting or creating the parent or the relation linkage will NOT trigger a CASCADE delete or create to the relation entity itself.
|
|
9
|
-
*/
|
|
10
|
-
RelationAffinityMode["WEAK"] = "weak";
|
|
11
|
-
RelationAffinityMode["STRONG"] = "strong";
|
|
12
|
-
})(RelationAffinityMode = exports.RelationAffinityMode || (exports.RelationAffinityMode = {}));
|
|
13
|
-
//# sourceMappingURL=schema-model.js.map
|
|
File without changes
|