@epilot/customer-portal-client 0.48.1 → 0.50.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/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +39 -0
- package/dist/openapi.d.ts +489 -10
- package/package.json +14 -13
- package/src/openapi-runtime.json +39 -0
- package/src/openapi.json +364 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/customer-portal-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "API Client for epilot portal API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
"sdk",
|
|
19
19
|
"customer-portal"
|
|
20
20
|
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "vitest",
|
|
23
|
+
"typescript": "tsc",
|
|
24
|
+
"bundle-definition": "webpack",
|
|
25
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/customer-portal.yaml",
|
|
26
|
+
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
27
|
+
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
28
|
+
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
29
|
+
"build:watch": "npm run build && tsc -w",
|
|
30
|
+
"prepublishOnly": "npm run typegen && npm run build",
|
|
31
|
+
"lint": "biome check src"
|
|
32
|
+
},
|
|
21
33
|
"files": [
|
|
22
34
|
"*.js",
|
|
23
35
|
"*.d.ts",
|
|
@@ -55,16 +67,5 @@
|
|
|
55
67
|
"typescript": "^4.1.3",
|
|
56
68
|
"webpack": "^5.18.0",
|
|
57
69
|
"webpack-cli": "^4.4.0"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"test": "vitest",
|
|
61
|
-
"typescript": "tsc",
|
|
62
|
-
"bundle-definition": "webpack",
|
|
63
|
-
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/customer-portal.yaml",
|
|
64
|
-
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
65
|
-
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
66
|
-
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
67
|
-
"build:watch": "npm run build && tsc -w",
|
|
68
|
-
"lint": "biome check src"
|
|
69
70
|
}
|
|
70
|
-
}
|
|
71
|
+
}
|
package/src/openapi-runtime.json
CHANGED
|
@@ -1488,6 +1488,13 @@
|
|
|
1488
1488
|
"/v2/portal/contract/by-identifiers": {
|
|
1489
1489
|
"post": {
|
|
1490
1490
|
"operationId": "addContractByIdentifiers",
|
|
1491
|
+
"parameters": [
|
|
1492
|
+
{
|
|
1493
|
+
"in": "query",
|
|
1494
|
+
"name": "correlation_id",
|
|
1495
|
+
"required": false
|
|
1496
|
+
}
|
|
1497
|
+
],
|
|
1491
1498
|
"requestBody": {
|
|
1492
1499
|
"required": true,
|
|
1493
1500
|
"content": {
|
|
@@ -2702,6 +2709,28 @@
|
|
|
2702
2709
|
}
|
|
2703
2710
|
],
|
|
2704
2711
|
"responses": {}
|
|
2712
|
+
},
|
|
2713
|
+
"patch": {
|
|
2714
|
+
"operationId": "updatePortalRevision",
|
|
2715
|
+
"parameters": [
|
|
2716
|
+
{
|
|
2717
|
+
"in": "path",
|
|
2718
|
+
"name": "portal_id",
|
|
2719
|
+
"required": true
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
"in": "path",
|
|
2723
|
+
"name": "revision_id",
|
|
2724
|
+
"required": true
|
|
2725
|
+
}
|
|
2726
|
+
],
|
|
2727
|
+
"requestBody": {
|
|
2728
|
+
"required": true,
|
|
2729
|
+
"content": {
|
|
2730
|
+
"application/json": {}
|
|
2731
|
+
}
|
|
2732
|
+
},
|
|
2733
|
+
"responses": {}
|
|
2705
2734
|
}
|
|
2706
2735
|
},
|
|
2707
2736
|
"/v3/portal/config/{portal_id}/publish": {
|
|
@@ -2922,6 +2951,16 @@
|
|
|
2922
2951
|
"application/json": {}
|
|
2923
2952
|
}
|
|
2924
2953
|
},
|
|
2954
|
+
"ContractAssignmentNotFound": {
|
|
2955
|
+
"content": {
|
|
2956
|
+
"application/json": {}
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
2959
|
+
"ContactAmbiguousMatch": {
|
|
2960
|
+
"content": {
|
|
2961
|
+
"application/json": {}
|
|
2962
|
+
}
|
|
2963
|
+
},
|
|
2925
2964
|
"NotFound": {
|
|
2926
2965
|
"content": {
|
|
2927
2966
|
"application/json": {}
|
package/src/openapi.json
CHANGED
|
@@ -4011,6 +4011,17 @@
|
|
|
4011
4011
|
"NOT_FOUND"
|
|
4012
4012
|
],
|
|
4013
4013
|
"description": "Present only when exists is false. NOT_FOUND means the given identifiers did\nnot match any contact (definitive - the client should not retry). TIMEOUT\nmeans the contact was not found within the processing window but may still be\ningesting; the client may retry (ideally with trigger_identifiers_check=false).\n"
|
|
4014
|
+
},
|
|
4015
|
+
"correlation_id": {
|
|
4016
|
+
"type": "string",
|
|
4017
|
+
"minLength": 1,
|
|
4018
|
+
"maxLength": 255,
|
|
4019
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
4020
|
+
"description": "Correlation id of the triggered ERP sync. Present only for portals waiting on\nthe Integration Toolkit (`wait_for_toolkit`). Send it back with\n`trigger_identifiers_check: false` to keep waiting on the same correlation.\n"
|
|
4021
|
+
},
|
|
4022
|
+
"message": {
|
|
4023
|
+
"type": "string",
|
|
4024
|
+
"description": "Human-readable reason the identifiers did not resolve, when the portal knows\none. Set when the ERP finished sending for this correlation without the\nentities the portal needs (e.g. \"account data arrived, no contract\"), so\nsupport can tell a silent timeout from an incomplete delivery.\n"
|
|
4014
4025
|
}
|
|
4015
4026
|
}
|
|
4016
4027
|
}
|
|
@@ -4023,6 +4034,9 @@
|
|
|
4023
4034
|
"404": {
|
|
4024
4035
|
"$ref": "#/components/responses/NotFound"
|
|
4025
4036
|
},
|
|
4037
|
+
"409": {
|
|
4038
|
+
"$ref": "#/components/responses/ContactAmbiguousMatch"
|
|
4039
|
+
},
|
|
4026
4040
|
"429": {
|
|
4027
4041
|
"$ref": "#/components/responses/TooManyRequests"
|
|
4028
4042
|
},
|
|
@@ -4074,7 +4088,7 @@
|
|
|
4074
4088
|
},
|
|
4075
4089
|
"responses": {
|
|
4076
4090
|
"200": {
|
|
4077
|
-
"description": "The identification result. On a match, `contact_id` and `token` are present. When no\ncontact matched, only `reason` is present - the response is deliberately shaped the same\nway for every negative outcome so it cannot be used to enumerate contacts.\n",
|
|
4091
|
+
"description": "The identification result. On a match, `contact_id` and `token` are present. When no\ncontact matched, only `reason` is present - the response is deliberately shaped the same\nway for every negative outcome so it cannot be used to enumerate contacts. The one\naddition is `correlation_id` on a TIMEOUT from a portal waiting on the Integration\nToolkit, which a retry needs; what the ERP did or did not send is never part of it.\nThat includes an ERP delivery of several matching contacts: unlike\n`checkContactExistsV3`, which answers it with 409 `AMBIGUOUS_MATCH`, this endpoint\nanswers it as `NOT_FOUND`, because the 409 would confirm that the ERP knows the\nidentifiers.\n",
|
|
4078
4092
|
"content": {
|
|
4079
4093
|
"application/json": {
|
|
4080
4094
|
"schema": {
|
|
@@ -6262,7 +6276,7 @@
|
|
|
6262
6276
|
"post": {
|
|
6263
6277
|
"operationId": "addContractByIdentifiers",
|
|
6264
6278
|
"summary": "addContractByIdentifiers",
|
|
6265
|
-
"description": "Self-assign contract(s) by pre-configured identifiers.",
|
|
6279
|
+
"description": "Self-assign contract(s) by pre-configured identifiers.\n\nWhen the portal is configured to wait on the Integration Toolkit\n(`extension_hooks.contractIdentification.wait_for_toolkit`) and the ERP has not finished\nsending within the request budget, the call fails with 404 and `reason: TIMEOUT`, carrying\nthe `correlation_id` of the triggered sync. Repeating the call with that `correlation_id`\nkeeps waiting on the same correlation without calling the third party again.\n",
|
|
6266
6280
|
"tags": [
|
|
6267
6281
|
"ECP"
|
|
6268
6282
|
],
|
|
@@ -6271,6 +6285,20 @@
|
|
|
6271
6285
|
"PortalAuth": []
|
|
6272
6286
|
}
|
|
6273
6287
|
],
|
|
6288
|
+
"parameters": [
|
|
6289
|
+
{
|
|
6290
|
+
"in": "query",
|
|
6291
|
+
"name": "correlation_id",
|
|
6292
|
+
"required": false,
|
|
6293
|
+
"schema": {
|
|
6294
|
+
"type": "string",
|
|
6295
|
+
"minLength": 1,
|
|
6296
|
+
"maxLength": 255,
|
|
6297
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
6298
|
+
},
|
|
6299
|
+
"description": "Correlation id of an already triggered ERP sync, as returned by a previous call that\nfailed with `reason: TIMEOUT`. Keeps waiting on the same correlation instead of calling\nthe contract identification hook again. Ignored unless the portal is configured with\n`extension_hooks.contractIdentification.wait_for_toolkit`. At most 255 letters, digits,\nhyphens and underscores: the toolkit's bound for a correlation id and the charset it\nenforces on its identifiers.\n"
|
|
6300
|
+
}
|
|
6301
|
+
],
|
|
6274
6302
|
"requestBody": {
|
|
6275
6303
|
"description": "Identifiers to search by. Have to be pre-configured in Portal Configuration Permissions.",
|
|
6276
6304
|
"required": true,
|
|
@@ -6332,6 +6360,9 @@
|
|
|
6332
6360
|
"403": {
|
|
6333
6361
|
"$ref": "#/components/responses/Forbidden"
|
|
6334
6362
|
},
|
|
6363
|
+
"404": {
|
|
6364
|
+
"$ref": "#/components/responses/ContractAssignmentNotFound"
|
|
6365
|
+
},
|
|
6335
6366
|
"409": {
|
|
6336
6367
|
"$ref": "#/components/responses/ContractAssignmentConflict"
|
|
6337
6368
|
},
|
|
@@ -11077,6 +11108,80 @@
|
|
|
11077
11108
|
"$ref": "#/components/responses/InternalServerError"
|
|
11078
11109
|
}
|
|
11079
11110
|
}
|
|
11111
|
+
},
|
|
11112
|
+
"patch": {
|
|
11113
|
+
"operationId": "updatePortalRevision",
|
|
11114
|
+
"summary": "updatePortalRevision",
|
|
11115
|
+
"description": "Renames a revision without publishing it. Any revision can be renamed, published or not. Only the revision's `name` changes: its content, `published_at`, `published_by` and which revision is live stay as they are.\n\nThe server trims `name`. An empty name after trimming removes the revision's name, and clients fall back to a label derived from `published_at` / `created_at`. A later publish without a `name` keeps the renamed name.\n",
|
|
11116
|
+
"tags": [
|
|
11117
|
+
"ECP Admin"
|
|
11118
|
+
],
|
|
11119
|
+
"parameters": [
|
|
11120
|
+
{
|
|
11121
|
+
"in": "path",
|
|
11122
|
+
"name": "portal_id",
|
|
11123
|
+
"required": true,
|
|
11124
|
+
"schema": {
|
|
11125
|
+
"type": "string",
|
|
11126
|
+
"format": "uuid",
|
|
11127
|
+
"example": "5da0a718-c822-403d-9f5d-20d4584e0528"
|
|
11128
|
+
},
|
|
11129
|
+
"description": "Portal ID (readonly UUID generated on portal creation)"
|
|
11130
|
+
},
|
|
11131
|
+
{
|
|
11132
|
+
"in": "path",
|
|
11133
|
+
"name": "revision_id",
|
|
11134
|
+
"required": true,
|
|
11135
|
+
"schema": {
|
|
11136
|
+
"type": "string",
|
|
11137
|
+
"example": "2026-08-25T14:03:11.482Z-a7f3c1d9"
|
|
11138
|
+
},
|
|
11139
|
+
"description": "Revision ID. Contains `:` characters, so percent-encode it."
|
|
11140
|
+
}
|
|
11141
|
+
],
|
|
11142
|
+
"requestBody": {
|
|
11143
|
+
"description": "The new revision name",
|
|
11144
|
+
"required": true,
|
|
11145
|
+
"content": {
|
|
11146
|
+
"application/json": {
|
|
11147
|
+
"schema": {
|
|
11148
|
+
"$ref": "#/components/schemas/UpdatePortalRevisionRequest"
|
|
11149
|
+
}
|
|
11150
|
+
}
|
|
11151
|
+
}
|
|
11152
|
+
},
|
|
11153
|
+
"security": [
|
|
11154
|
+
{
|
|
11155
|
+
"EpilotAuth": []
|
|
11156
|
+
}
|
|
11157
|
+
],
|
|
11158
|
+
"responses": {
|
|
11159
|
+
"200": {
|
|
11160
|
+
"description": "Revision renamed successfully.",
|
|
11161
|
+
"content": {
|
|
11162
|
+
"application/json": {
|
|
11163
|
+
"schema": {
|
|
11164
|
+
"$ref": "#/components/schemas/PortalRevisionSummary"
|
|
11165
|
+
}
|
|
11166
|
+
}
|
|
11167
|
+
}
|
|
11168
|
+
},
|
|
11169
|
+
"400": {
|
|
11170
|
+
"$ref": "#/components/responses/InvalidRequest"
|
|
11171
|
+
},
|
|
11172
|
+
"401": {
|
|
11173
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
11174
|
+
},
|
|
11175
|
+
"403": {
|
|
11176
|
+
"$ref": "#/components/responses/Forbidden"
|
|
11177
|
+
},
|
|
11178
|
+
"404": {
|
|
11179
|
+
"$ref": "#/components/responses/NotFound"
|
|
11180
|
+
},
|
|
11181
|
+
"500": {
|
|
11182
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
11183
|
+
}
|
|
11184
|
+
}
|
|
11080
11185
|
}
|
|
11081
11186
|
},
|
|
11082
11187
|
"/v3/portal/config/{portal_id}/publish": {
|
|
@@ -11243,7 +11348,7 @@
|
|
|
11243
11348
|
"post": {
|
|
11244
11349
|
"operationId": "swapPortalConfig",
|
|
11245
11350
|
"summary": "swapPortalConfig",
|
|
11246
|
-
"description": "Swaps the portal configuration of two portals.",
|
|
11351
|
+
"description": "Swaps the portal configuration of two portals. Without `mode` both portals exchange pages and experience config live, as before. With `mode: copy` (portal versioning only) nothing live changes: the source's setup is saved as an unpublished revision on the target to review and publish. Domain and access/security settings never move.",
|
|
11247
11352
|
"tags": [
|
|
11248
11353
|
"ECP Admin"
|
|
11249
11354
|
],
|
|
@@ -11275,7 +11380,14 @@
|
|
|
11275
11380
|
"items": {
|
|
11276
11381
|
"$ref": "#/components/schemas/SwappableConfig"
|
|
11277
11382
|
},
|
|
11278
|
-
"description": "Optional, opt-in configuration items to additionally swap on top of the always-swapped pages and functional config. Defaults to an empty list (nothing extra swapped). Domain and access/security settings can never be swapped."
|
|
11383
|
+
"description": "Optional, opt-in configuration items to additionally swap on top of the always-swapped pages and functional config. Defaults to an empty list (nothing extra swapped). Domain and access/security settings can never be swapped. With `mode` the listed items are included in the draft revisions."
|
|
11384
|
+
},
|
|
11385
|
+
"mode": {
|
|
11386
|
+
"type": "string",
|
|
11387
|
+
"enum": [
|
|
11388
|
+
"copy"
|
|
11389
|
+
],
|
|
11390
|
+
"description": "Requires portal versioning (flag on, V3 target portal), otherwise 400. `copy` saves an unpublished revision on the target holding the source's setup; neither portal changes live and the source is untouched. Omit for the original live swap. Cannot be combined with the `portal_references` item, which only applies to a live swap."
|
|
11279
11391
|
}
|
|
11280
11392
|
}
|
|
11281
11393
|
}
|
|
@@ -11296,6 +11408,21 @@
|
|
|
11296
11408
|
},
|
|
11297
11409
|
"portal_references": {
|
|
11298
11410
|
"$ref": "#/components/schemas/SwapPortalReferencesResult"
|
|
11411
|
+
},
|
|
11412
|
+
"revisions": {
|
|
11413
|
+
"type": "array",
|
|
11414
|
+
"description": "Only with `mode`. The draft revision created on the target.",
|
|
11415
|
+
"items": {
|
|
11416
|
+
"type": "object",
|
|
11417
|
+
"properties": {
|
|
11418
|
+
"portal_id": {
|
|
11419
|
+
"$ref": "#/components/schemas/PortalId"
|
|
11420
|
+
},
|
|
11421
|
+
"revision_id": {
|
|
11422
|
+
"type": "string"
|
|
11423
|
+
}
|
|
11424
|
+
}
|
|
11425
|
+
}
|
|
11299
11426
|
}
|
|
11300
11427
|
}
|
|
11301
11428
|
}
|
|
@@ -12102,13 +12229,31 @@
|
|
|
12102
12229
|
},
|
|
12103
12230
|
{
|
|
12104
12231
|
"properties": {
|
|
12232
|
+
"status": {
|
|
12233
|
+
"type": "integer",
|
|
12234
|
+
"description": "The HTTP status code, repeated in the body.",
|
|
12235
|
+
"example": 409
|
|
12236
|
+
},
|
|
12237
|
+
"error": {
|
|
12238
|
+
"type": "string",
|
|
12239
|
+
"description": "Human-readable error message. For support, not for display to end customers."
|
|
12240
|
+
},
|
|
12105
12241
|
"reason": {
|
|
12106
12242
|
"type": "string",
|
|
12107
|
-
"description": "Reason why the contract is not assignable
|
|
12243
|
+
"description": "Reason why the contract is not assignable.\n- `DRAFT`: the contract is still a draft.\n- `MULTIPLE`: multiple contracts were found and the business logic does not allow it.\n- `SELF_ASSIGNMENT_DISABLED`: the contract already has a contact assigned and\n self-assignment is disabled.\n- `AMBIGUOUS_MATCH`: the portal waited on the Integration Toolkit and the ERP\n delivered entities it cannot tell apart (several matching the selector, or\n contracts naming different customers). Nothing was assigned, and retrying\n will not help.\n",
|
|
12108
12244
|
"enum": [
|
|
12109
12245
|
"DRAFT",
|
|
12110
|
-
"MULTIPLE"
|
|
12246
|
+
"MULTIPLE",
|
|
12247
|
+
"SELF_ASSIGNMENT_DISABLED",
|
|
12248
|
+
"AMBIGUOUS_MATCH"
|
|
12111
12249
|
]
|
|
12250
|
+
},
|
|
12251
|
+
"correlation_id": {
|
|
12252
|
+
"type": "string",
|
|
12253
|
+
"minLength": 1,
|
|
12254
|
+
"maxLength": 255,
|
|
12255
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
12256
|
+
"description": "Correlation id of the ERP sync that was waited on. Present only with `AMBIGUOUS_MATCH`."
|
|
12112
12257
|
}
|
|
12113
12258
|
},
|
|
12114
12259
|
"required": [
|
|
@@ -12120,6 +12265,84 @@
|
|
|
12120
12265
|
}
|
|
12121
12266
|
}
|
|
12122
12267
|
},
|
|
12268
|
+
"ContractAssignmentNotFound": {
|
|
12269
|
+
"description": "No contract could be assigned. Without a `reason`, the identifiers matched nothing. With\n`reason`, the portal waited on the Integration Toolkit\n(`extension_hooks.contractIdentification.wait_for_toolkit`):\n- `TIMEOUT`: the ERP has not finished sending yet. Repeat the request with the\n `correlation_id` query parameter set to the `correlation_id` of this body to keep waiting\n on the same ERP sync without calling the third party again.\n- `INCOMPLETE`: the ERP finished sending without the data needed. Definitive; `error` names\n what was missing, for support, not for display to end customers.\n",
|
|
12270
|
+
"content": {
|
|
12271
|
+
"application/json": {
|
|
12272
|
+
"schema": {
|
|
12273
|
+
"type": "object",
|
|
12274
|
+
"properties": {
|
|
12275
|
+
"status": {
|
|
12276
|
+
"type": "integer",
|
|
12277
|
+
"description": "The HTTP status code, repeated in the body.",
|
|
12278
|
+
"example": 404
|
|
12279
|
+
},
|
|
12280
|
+
"error": {
|
|
12281
|
+
"type": "string",
|
|
12282
|
+
"description": "Human-readable error message. For support, not for display to end customers."
|
|
12283
|
+
},
|
|
12284
|
+
"reason": {
|
|
12285
|
+
"type": "string",
|
|
12286
|
+
"enum": [
|
|
12287
|
+
"TIMEOUT",
|
|
12288
|
+
"INCOMPLETE"
|
|
12289
|
+
]
|
|
12290
|
+
},
|
|
12291
|
+
"correlation_id": {
|
|
12292
|
+
"type": "string",
|
|
12293
|
+
"minLength": 1,
|
|
12294
|
+
"maxLength": 255,
|
|
12295
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
12296
|
+
"description": "Correlation id of the ERP sync that was waited on. Present with `TIMEOUT` and `INCOMPLETE`."
|
|
12297
|
+
}
|
|
12298
|
+
},
|
|
12299
|
+
"required": [
|
|
12300
|
+
"status",
|
|
12301
|
+
"error"
|
|
12302
|
+
]
|
|
12303
|
+
}
|
|
12304
|
+
}
|
|
12305
|
+
}
|
|
12306
|
+
},
|
|
12307
|
+
"ContactAmbiguousMatch": {
|
|
12308
|
+
"description": "The portal waited on the Integration Toolkit\n(`extension_hooks.registrationIdentifiersCheck.wait_for_toolkit`) and the ERP delivered\nseveral contacts matching the identifiers. Nothing was linked; retrying will not help.\n",
|
|
12309
|
+
"content": {
|
|
12310
|
+
"application/json": {
|
|
12311
|
+
"schema": {
|
|
12312
|
+
"type": "object",
|
|
12313
|
+
"properties": {
|
|
12314
|
+
"status": {
|
|
12315
|
+
"type": "integer",
|
|
12316
|
+
"description": "The HTTP status code, repeated in the body.",
|
|
12317
|
+
"example": 409
|
|
12318
|
+
},
|
|
12319
|
+
"error": {
|
|
12320
|
+
"type": "string",
|
|
12321
|
+
"description": "Human-readable error message. For support, not for display to end customers."
|
|
12322
|
+
},
|
|
12323
|
+
"reason": {
|
|
12324
|
+
"type": "string",
|
|
12325
|
+
"enum": [
|
|
12326
|
+
"AMBIGUOUS_MATCH"
|
|
12327
|
+
]
|
|
12328
|
+
},
|
|
12329
|
+
"correlation_id": {
|
|
12330
|
+
"type": "string",
|
|
12331
|
+
"minLength": 1,
|
|
12332
|
+
"maxLength": 255,
|
|
12333
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
12334
|
+
"description": "Correlation id of the ERP sync that was waited on."
|
|
12335
|
+
}
|
|
12336
|
+
},
|
|
12337
|
+
"required": [
|
|
12338
|
+
"status",
|
|
12339
|
+
"error",
|
|
12340
|
+
"reason"
|
|
12341
|
+
]
|
|
12342
|
+
}
|
|
12343
|
+
}
|
|
12344
|
+
}
|
|
12345
|
+
},
|
|
12123
12346
|
"NotFound": {
|
|
12124
12347
|
"description": "The specified resource was not found",
|
|
12125
12348
|
"content": {
|
|
@@ -14233,6 +14456,14 @@
|
|
|
14233
14456
|
"type": "boolean",
|
|
14234
14457
|
"default": true,
|
|
14235
14458
|
"description": "Whether to (re)trigger the registration identifiers check hook, which issues a request\nto the connected ERP to (re)sync the contact, in addition to waiting for the entity to\narrive. Defaults to true to preserve existing behaviour. Set to false on retry attempts\nto only poll for an already-triggered sync to land, without issuing another upstream\nrequest to the ERP.\n"
|
|
14459
|
+
},
|
|
14460
|
+
"correlation_id": {
|
|
14461
|
+
"type": "string",
|
|
14462
|
+
"minLength": 1,
|
|
14463
|
+
"maxLength": 255,
|
|
14464
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
14465
|
+
"description": "Correlation id of an already triggered ERP sync, as returned by a previous call that\nanswered `reason: TIMEOUT`. Sent together with `trigger_identifiers_check: false` on a\nretry so the portal keeps waiting on the same correlation instead of starting over.\nOnly used by portals configured with\n`extension_hooks.registrationIdentifiersCheck.wait_for_toolkit`; ignored otherwise.\nAt most 255 letters, digits, hyphens and underscores: the toolkit's bound for a\ncorrelation id and the charset it enforces on its identifiers.\n",
|
|
14466
|
+
"example": "0199c0d5-6f1c-7a3b-9e21-9a9ce1d1b2c3"
|
|
14236
14467
|
}
|
|
14237
14468
|
}
|
|
14238
14469
|
},
|
|
@@ -14311,6 +14542,13 @@
|
|
|
14311
14542
|
"NOT_FOUND"
|
|
14312
14543
|
],
|
|
14313
14544
|
"description": "Present only when no token was issued. NOT_FOUND means the given identifiers did not\nmatch any contact (definitive - the client should not retry). TIMEOUT means the contact\nwas not found within the processing window but may still be ingesting; the client may\nretry (ideally with trigger_identifiers_check=false).\n"
|
|
14545
|
+
},
|
|
14546
|
+
"correlation_id": {
|
|
14547
|
+
"type": "string",
|
|
14548
|
+
"minLength": 1,
|
|
14549
|
+
"maxLength": 255,
|
|
14550
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
14551
|
+
"description": "Correlation id of the triggered ERP sync. Present only with `reason: TIMEOUT`, for\nportals waiting on the Integration Toolkit (`wait_for_toolkit`). Send it back with\n`trigger_identifiers_check: false` to keep waiting on the same correlation.\n"
|
|
14314
14552
|
}
|
|
14315
14553
|
}
|
|
14316
14554
|
},
|
|
@@ -17389,6 +17627,36 @@
|
|
|
17389
17627
|
"hook_id": {
|
|
17390
17628
|
"type": "string",
|
|
17391
17629
|
"description": "The ID of the selected hook."
|
|
17630
|
+
},
|
|
17631
|
+
"wait_for_toolkit": {
|
|
17632
|
+
"type": "boolean",
|
|
17633
|
+
"default": false,
|
|
17634
|
+
"description": "Opt in to waiting on the Integration Toolkit instead of polling entity search for the\ndata the ERP pushes after the hook returns. When true, the portal hands the hook a\ncorrelation id (`{{CorrelationId}}`) and then asks the toolkit whether the entities it\nneeds have landed under that correlation. Off by default: a portal that does not set it\nkeeps polling entity search exactly as before.\n\nOnly effective for hooks whose partner pushes through the Integration Toolkit and\nechoes the correlation id. A hook that answers with an epilot contact id is fetched\ndirectly, as today, whatever this flag says.\n"
|
|
17635
|
+
},
|
|
17636
|
+
"wait_for_entities": {
|
|
17637
|
+
"type": "object",
|
|
17638
|
+
"description": "The entities the portal waits for, keyed by entity slug. Configured explicitly per\nhook: nothing is derived from the hook type or from the portal's identifier\nconfiguration, and a hook that configures no requirement for the entity the portal\nlinks does not wait at all - it keeps polling entity search exactly as before.\n\nA selector may only name an attribute that is literally a member of that entity\ntarget's configured `unique_ids` in the inbound use case, because the toolkit reports\nexactly those and nothing else. A selector on any other attribute can never match. A\ntoolkit that validates selectors rejects such a wait (400) with the slug, the key and\nthe keys it accepts; the portal logs that at error level with the hook it came from\nand polls entity search for the request, so the customer is unaffected and never told.\n\nThe slug the portal resolves its link target from is fixed by the hook, and a\nrequirement for it must be configured for the wait to happen at all:\n`registrationIdentifiersCheck` resolves the contact, every `contractIdentification`\nassignment mode resolves the contract (in the contact modes the linked contact is the\ndelivered contract's `customer`). Every other configured slug is evidence that the push\ncarried what it promised, and is never linked.\n\nIgnored unless `wait_for_toolkit` is true.\n\nWorked examples, verified against the live integration configuration. Each block is the\n`wait_for_entities` of one hook selection, and each names the slug that hook links.\n\nRatingen / Wilken add-contract hook (`contractIdentification`, `contact_to_portal_user`).\nNo value the user types is a unique id anywhere in the org - every one is a Wilken\nsurrogate `external_id` - so the contact cannot be selected by attribute at all. Wait on\nthe contract and link its `customer`; the identity-keyed contact is evidence that the\nbusiness partner landed, and is never linked.\n\n```yaml\ncontract: {}\ncontact:\n key: external_id # the PROFILE contact's unique id is external_id\n from_caller_contact: external_id\n```\n\nWEMAG registration hook (`registrationIdentifiersCheck`). The contact's unique ids are\n`customer_pin` and `reenumber`; `meter.external_id` and `meter.meter_number` are both\nthe `ZNR` the user types.\n\n```yaml\ncontact:\n key: reenumber\n from_identifier: contact.complete_customer_number\n split_on: \"-\" # \"0002-<customer_pin>-<reenumber>\"\n part: 2\nmeter:\n key: external_id\n from_identifier: meter.meter_number\n```\n\nWEMAG add-contract hook (`contractIdentification`, `contact_to_portal_user`). The\ncontract's unique ids are `billing_account_number` (the `reenumber`, the same third\npart of `complete_customer_number`) and `customer_number` (the PIN). Wait on the\ncontract of the typed Rechnungseinheit and link its `customer`.\n\n```yaml\ncontract:\n key: billing_account_number\n from_identifier: contact.complete_customer_number\n split_on: \"-\" # \"0002-<customer_pin>-<reenumber>\"\n part: 2\nmeter:\n key: external_id\n from_identifier: meter.meter_number\n```\n\nNever `complete_customer_number` or `customer_number` on a WEMAG contact - neither is a\nunique id there - and never `customer_pin` alone on a contact or `customer_number` alone\non a contract, both of which are the PIN and ambiguous, because one person has one\ncontact and one contract per Rechnungseinheit. Never a key-less `contract` either: WEMAG's\n`EKM Anlagedaten` writes contracts of its own, keyed on `contract_number`.\n",
|
|
17639
|
+
"additionalProperties": {
|
|
17640
|
+
"$ref": "#/components/schemas/WaitForEntityRule"
|
|
17641
|
+
},
|
|
17642
|
+
"example": {
|
|
17643
|
+
"contract": {},
|
|
17644
|
+
"contact": {
|
|
17645
|
+
"key": "external_id",
|
|
17646
|
+
"from_caller_contact": "external_id"
|
|
17647
|
+
}
|
|
17648
|
+
}
|
|
17649
|
+
},
|
|
17650
|
+
"wait_for_use_cases": {
|
|
17651
|
+
"type": "array",
|
|
17652
|
+
"description": "Inbound use case slugs the portal additionally waits for. A requirement is met once at\nleast one event of that use case slug has finished processing, whether or not it\nproduced an entity, so it covers pushes whose entity set varies and pushes whose\noutcome is a file or a relation rather than an entity.\n\nEntity requirements stay primary - the portal links by entity id, so it always waits\nfor the entity it links. Use case slugs are an additional bar: when both are\nconfigured, both must be met. Empty by default. Ignored unless `wait_for_toolkit` is\ntrue.\n",
|
|
17653
|
+
"items": {
|
|
17654
|
+
"type": "string"
|
|
17655
|
+
},
|
|
17656
|
+
"default": [],
|
|
17657
|
+
"example": [
|
|
17658
|
+
"wilken_contract_changed"
|
|
17659
|
+
]
|
|
17392
17660
|
}
|
|
17393
17661
|
},
|
|
17394
17662
|
"required": [
|
|
@@ -17397,6 +17665,39 @@
|
|
|
17397
17665
|
"hook_id"
|
|
17398
17666
|
]
|
|
17399
17667
|
},
|
|
17668
|
+
"WaitForEntityRule": {
|
|
17669
|
+
"type": "object",
|
|
17670
|
+
"description": "One requirement of a hook's correlation wait, for the entity slug it is configured under.\n\nWithout `key` the requirement is satisfied by any entity of that slug. That is safe for\nevidence, and for a linked slug only where the inbound use case writes exactly one entity\nof it per push - Wilken's `BusinessPartnerChanged` always writes two contacts, and WEMAG's\n`DocumentChange` / `D3Metadata` write contacts under the same unique-id keys a registration\npush uses - so a second match answers 409 rather than linking a guess.\n\nWith `key`, the value comes from exactly one declared source, `from_identifier` or\n`from_caller_contact`. A rule whose source has no value produces no wait at all, so the\nhook keeps polling rather than waiting on a requirement that cannot be met.\n",
|
|
17671
|
+
"properties": {
|
|
17672
|
+
"key": {
|
|
17673
|
+
"type": "string",
|
|
17674
|
+
"description": "Unique-id attribute the selector matches on. Must be a member of that entity target's\nconfigured `unique_ids` in the inbound use case; the toolkit reports nothing else.\n",
|
|
17675
|
+
"example": "reenumber"
|
|
17676
|
+
},
|
|
17677
|
+
"from_identifier": {
|
|
17678
|
+
"type": "string",
|
|
17679
|
+
"description": "Identifier the user submitted to take the value from, as `<schema>.<name>` - the same\nschema and name the portal's `registration_identifiers` / `contract_identifiers` use.\nMutually exclusive with `from_caller_contact`.\n",
|
|
17680
|
+
"example": "contact.complete_customer_number"
|
|
17681
|
+
},
|
|
17682
|
+
"from_caller_contact": {
|
|
17683
|
+
"type": "string",
|
|
17684
|
+
"description": "Attribute of the calling portal user's own contact to take the value from. Only\navailable to hooks called by a signed-in user. Mutually exclusive with\n`from_identifier`.\n",
|
|
17685
|
+
"example": "external_id"
|
|
17686
|
+
},
|
|
17687
|
+
"split_on": {
|
|
17688
|
+
"type": "string",
|
|
17689
|
+
"description": "Separator the source value is split on before `part` is taken, for identifiers that\ncarry a unique id inside a larger value the user types. WEMAG's\n`complete_customer_number` is `\"0002-<customer_pin>-<reenumber>\"`, so splitting on `-`\nand taking part 2 yields the contact's `reenumber` unique id.\n",
|
|
17690
|
+
"example": "-"
|
|
17691
|
+
},
|
|
17692
|
+
"part": {
|
|
17693
|
+
"type": "integer",
|
|
17694
|
+
"minimum": 0,
|
|
17695
|
+
"default": 0,
|
|
17696
|
+
"description": "Zero-based index of the part to use after splitting on `split_on`.",
|
|
17697
|
+
"example": 2
|
|
17698
|
+
}
|
|
17699
|
+
}
|
|
17700
|
+
},
|
|
17400
17701
|
"PublicExtensionCapabilities": {
|
|
17401
17702
|
"type": "object",
|
|
17402
17703
|
"properties": {
|
|
@@ -18135,6 +18436,10 @@
|
|
|
18135
18436
|
"type": "string",
|
|
18136
18437
|
"deprecated": true,
|
|
18137
18438
|
"description": "Deprecated. Use `resolved.result` instead. Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation."
|
|
18439
|
+
},
|
|
18440
|
+
"result_correlation_id": {
|
|
18441
|
+
"type": "string",
|
|
18442
|
+
"description": "Correlation id to wait for inbound ERP events under, resolved from the third-party\nresponse, e.g. `{{CallResponse.data.acknowledgeId}}`. Only read when the portal is\nconfigured to wait on the Integration Toolkit\n(`extension_hooks.<hook>.wait_for_toolkit`).\n\nThere is no default: unless a hook declares this, the portal waits on the id it\nminted and handed the hook as `{{CorrelationId}}`, whatever the response carries. A\npartner that pushes under that id leaves this unset; only a partner that pushes\nunder an id of its own declares where the response carries it. A declared id that\nis absent from the response falls back to the minted one; one that is not a valid\ncorrelation id (at most 255 letters, digits, `-` and `_`) is not waited on, and\nthe portal polls entity search instead.\n"
|
|
18138
18443
|
}
|
|
18139
18444
|
},
|
|
18140
18445
|
"required": [
|
|
@@ -18149,6 +18454,10 @@
|
|
|
18149
18454
|
"type": "string",
|
|
18150
18455
|
"description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation. Supersedes the deprecated `call.result`."
|
|
18151
18456
|
},
|
|
18457
|
+
"result_correlation_id": {
|
|
18458
|
+
"type": "string",
|
|
18459
|
+
"description": "Correlation id to wait for inbound ERP events under, resolved from the third-party\nresponse, e.g. `{{CallResponse.data.acknowledgeId}}`. Supersedes\n`call.result_correlation_id`. No default; see `call.result_correlation_id`.\n"
|
|
18460
|
+
},
|
|
18152
18461
|
"error_message_path": {
|
|
18153
18462
|
"type": "string",
|
|
18154
18463
|
"description": "Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).\nIf specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.\n",
|
|
@@ -18220,6 +18529,10 @@
|
|
|
18220
18529
|
"type": "string",
|
|
18221
18530
|
"deprecated": true,
|
|
18222
18531
|
"description": "Deprecated. Use `resolved.result` instead. Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation."
|
|
18532
|
+
},
|
|
18533
|
+
"result_correlation_id": {
|
|
18534
|
+
"type": "string",
|
|
18535
|
+
"description": "Correlation id to wait for inbound ERP events under, resolved from the third-party\nresponse, e.g. `{{CallResponse.data.acknowledgeId}}`. Only read when the portal is\nconfigured to wait on the Integration Toolkit\n(`extension_hooks.<hook>.wait_for_toolkit`).\n\nThere is no default: unless a hook declares this, the portal waits on the id it\nminted and handed the hook as `{{CorrelationId}}`, whatever the response carries. A\npartner that pushes under that id leaves this unset; only a partner that pushes\nunder an id of its own declares where the response carries it. A declared id that\nis absent from the response falls back to the minted one; one that is not a valid\ncorrelation id (at most 255 letters, digits, `-` and `_`) is not waited on, and\nthe portal polls entity search instead.\n"
|
|
18223
18536
|
}
|
|
18224
18537
|
},
|
|
18225
18538
|
"required": [
|
|
@@ -18234,6 +18547,10 @@
|
|
|
18234
18547
|
"type": "string",
|
|
18235
18548
|
"description": "Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation. Supersedes the deprecated `call.result`."
|
|
18236
18549
|
},
|
|
18550
|
+
"result_correlation_id": {
|
|
18551
|
+
"type": "string",
|
|
18552
|
+
"description": "Correlation id to wait for inbound ERP events under, resolved from the third-party\nresponse, e.g. `{{CallResponse.data.acknowledgeId}}`. Supersedes\n`call.result_correlation_id`. No default; see `call.result_correlation_id`.\n"
|
|
18553
|
+
},
|
|
18237
18554
|
"error_message_path": {
|
|
18238
18555
|
"type": "string",
|
|
18239
18556
|
"description": "Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).\nIf specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.\n",
|
|
@@ -21282,6 +21599,9 @@
|
|
|
21282
21599
|
"based_on_revision_id": {
|
|
21283
21600
|
"type": "string"
|
|
21284
21601
|
},
|
|
21602
|
+
"revision_source": {
|
|
21603
|
+
"$ref": "#/components/schemas/RevisionSource"
|
|
21604
|
+
},
|
|
21285
21605
|
"pages": {
|
|
21286
21606
|
"type": "array",
|
|
21287
21607
|
"items": {
|
|
@@ -21315,6 +21635,40 @@
|
|
|
21315
21635
|
}
|
|
21316
21636
|
}
|
|
21317
21637
|
},
|
|
21638
|
+
"UpdatePortalRevisionRequest": {
|
|
21639
|
+
"type": "object",
|
|
21640
|
+
"required": [
|
|
21641
|
+
"name"
|
|
21642
|
+
],
|
|
21643
|
+
"properties": {
|
|
21644
|
+
"name": {
|
|
21645
|
+
"type": "string",
|
|
21646
|
+
"maxLength": 255,
|
|
21647
|
+
"description": "New label for the revision. Trimmed by the server; an empty name after trimming removes the revision's name.\n",
|
|
21648
|
+
"example": "FAQ page launch"
|
|
21649
|
+
}
|
|
21650
|
+
}
|
|
21651
|
+
},
|
|
21652
|
+
"RevisionSource": {
|
|
21653
|
+
"type": "object",
|
|
21654
|
+
"description": "Where a revision came from, when it was not saved in the builder. Not part of the portal config. The builder renders it in the viewer's language for an unnamed revision.\n",
|
|
21655
|
+
"additionalProperties": false,
|
|
21656
|
+
"required": [
|
|
21657
|
+
"type"
|
|
21658
|
+
],
|
|
21659
|
+
"properties": {
|
|
21660
|
+
"type": {
|
|
21661
|
+
"type": "string",
|
|
21662
|
+
"enum": [
|
|
21663
|
+
"blueprint_sync"
|
|
21664
|
+
]
|
|
21665
|
+
},
|
|
21666
|
+
"blueprint_title": {
|
|
21667
|
+
"type": "string",
|
|
21668
|
+
"maxLength": 200
|
|
21669
|
+
}
|
|
21670
|
+
}
|
|
21671
|
+
},
|
|
21318
21672
|
"PortalRevisionSummary": {
|
|
21319
21673
|
"type": "object",
|
|
21320
21674
|
"required": [
|
|
@@ -21338,12 +21692,15 @@
|
|
|
21338
21692
|
},
|
|
21339
21693
|
"name": {
|
|
21340
21694
|
"type": "string",
|
|
21341
|
-
"description": "Set at publish time
|
|
21695
|
+
"description": "Set at publish time when the publish request carries one, or by renaming the revision with `updatePortalRevision`. A revision can have been published and still have no name; `published_at` is the signal that a revision was live at some point, not this field.\n",
|
|
21342
21696
|
"example": "FAQ page launch"
|
|
21343
21697
|
},
|
|
21344
21698
|
"description": {
|
|
21345
21699
|
"type": "string"
|
|
21346
21700
|
},
|
|
21701
|
+
"source": {
|
|
21702
|
+
"$ref": "#/components/schemas/RevisionSource"
|
|
21703
|
+
},
|
|
21347
21704
|
"page_count": {
|
|
21348
21705
|
"type": "number"
|
|
21349
21706
|
},
|