@epilot/customer-portal-client 0.49.0 → 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 +17 -0
- package/dist/openapi.d.ts +367 -103
- package/package.json +1 -1
- package/src/openapi-runtime.json +17 -0
- package/src/openapi.json +225 -51
package/dist/openapi.d.ts
CHANGED
|
@@ -20,15 +20,72 @@ declare namespace Components {
|
|
|
20
20
|
reason: "invalid_token";
|
|
21
21
|
}
|
|
22
22
|
export type Conflict = Schemas.ErrorResp;
|
|
23
|
+
export interface ContactAmbiguousMatch {
|
|
24
|
+
/**
|
|
25
|
+
* The HTTP status code, repeated in the body.
|
|
26
|
+
* example:
|
|
27
|
+
* 409
|
|
28
|
+
*/
|
|
29
|
+
status: number;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable error message. For support, not for display to end customers.
|
|
32
|
+
*/
|
|
33
|
+
error: string;
|
|
34
|
+
reason: "AMBIGUOUS_MATCH";
|
|
35
|
+
/**
|
|
36
|
+
* Correlation id of the ERP sync that was waited on.
|
|
37
|
+
*/
|
|
38
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
39
|
+
}
|
|
23
40
|
export interface ContractAssignmentConflict {
|
|
24
41
|
/**
|
|
25
42
|
* Error message
|
|
26
43
|
*/
|
|
27
44
|
message?: string;
|
|
28
45
|
/**
|
|
29
|
-
* Reason why the contract is not assignable.
|
|
46
|
+
* Reason why the contract is not assignable.
|
|
47
|
+
* - `DRAFT`: the contract is still a draft.
|
|
48
|
+
* - `MULTIPLE`: multiple contracts were found and the business logic does not allow it.
|
|
49
|
+
* - `SELF_ASSIGNMENT_DISABLED`: the contract already has a contact assigned and
|
|
50
|
+
* self-assignment is disabled.
|
|
51
|
+
* - `AMBIGUOUS_MATCH`: the portal waited on the Integration Toolkit and the ERP
|
|
52
|
+
* delivered entities it cannot tell apart (several matching the selector, or
|
|
53
|
+
* contracts naming different customers). Nothing was assigned, and retrying
|
|
54
|
+
* will not help.
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
reason: "DRAFT" | "MULTIPLE" | "SELF_ASSIGNMENT_DISABLED" | "AMBIGUOUS_MATCH";
|
|
58
|
+
/**
|
|
59
|
+
* The HTTP status code, repeated in the body.
|
|
60
|
+
* example:
|
|
61
|
+
* 409
|
|
62
|
+
*/
|
|
63
|
+
status?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Human-readable error message. For support, not for display to end customers.
|
|
66
|
+
*/
|
|
67
|
+
error?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Correlation id of the ERP sync that was waited on. Present only with `AMBIGUOUS_MATCH`.
|
|
70
|
+
*/
|
|
71
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
72
|
+
}
|
|
73
|
+
export interface ContractAssignmentNotFound {
|
|
74
|
+
/**
|
|
75
|
+
* The HTTP status code, repeated in the body.
|
|
76
|
+
* example:
|
|
77
|
+
* 404
|
|
78
|
+
*/
|
|
79
|
+
status: number;
|
|
80
|
+
/**
|
|
81
|
+
* Human-readable error message. For support, not for display to end customers.
|
|
30
82
|
*/
|
|
31
|
-
|
|
83
|
+
error: string;
|
|
84
|
+
reason?: "TIMEOUT" | "INCOMPLETE";
|
|
85
|
+
/**
|
|
86
|
+
* Correlation id of the ERP sync that was waited on. Present with `TIMEOUT` and `INCOMPLETE`.
|
|
87
|
+
*/
|
|
88
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
32
89
|
}
|
|
33
90
|
export type Forbidden = Schemas.ErrorResp;
|
|
34
91
|
export type ForbiddenByRule = Schemas.ErrorResp | Schemas.FailedRuleErrorResp;
|
|
@@ -1307,13 +1364,6 @@ declare namespace Components {
|
|
|
1307
1364
|
* ]
|
|
1308
1365
|
*/
|
|
1309
1366
|
contract_identifiers?: ContractIdentifier[];
|
|
1310
|
-
/**
|
|
1311
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
1312
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
1313
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
1314
|
-
*
|
|
1315
|
-
*/
|
|
1316
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
1317
1367
|
/**
|
|
1318
1368
|
* Configuration for contract selector in the portal
|
|
1319
1369
|
*/
|
|
@@ -1854,13 +1904,6 @@ declare namespace Components {
|
|
|
1854
1904
|
* ]
|
|
1855
1905
|
*/
|
|
1856
1906
|
contract_identifiers?: ContractIdentifier[];
|
|
1857
|
-
/**
|
|
1858
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
1859
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
1860
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
1861
|
-
*
|
|
1862
|
-
*/
|
|
1863
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
1864
1907
|
/**
|
|
1865
1908
|
* Configuration for contract selector in the portal
|
|
1866
1909
|
*/
|
|
@@ -2187,6 +2230,19 @@ declare namespace Components {
|
|
|
2187
2230
|
*
|
|
2188
2231
|
*/
|
|
2189
2232
|
trigger_identifiers_check?: boolean;
|
|
2233
|
+
/**
|
|
2234
|
+
* Correlation id of an already triggered ERP sync, as returned by a previous call that
|
|
2235
|
+
* answered `reason: TIMEOUT`. Sent together with `trigger_identifiers_check: false` on a
|
|
2236
|
+
* retry so the portal keeps waiting on the same correlation instead of starting over.
|
|
2237
|
+
* Only used by portals configured with
|
|
2238
|
+
* `extension_hooks.registrationIdentifiersCheck.wait_for_toolkit`; ignored otherwise.
|
|
2239
|
+
* At most 255 letters, digits, hyphens and underscores: the toolkit's bound for a
|
|
2240
|
+
* correlation id and the charset it enforces on its identifiers.
|
|
2241
|
+
*
|
|
2242
|
+
* example:
|
|
2243
|
+
* 0199c0d5-6f1c-7a3b-9e21-9a9ce1d1b2c3
|
|
2244
|
+
*/
|
|
2245
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
2190
2246
|
}
|
|
2191
2247
|
/**
|
|
2192
2248
|
* ContactExistsRequest plus the surface the token is requested for. `registration_identifiers` carries the values of the surface's effective identifiers (keyed by schema, then attribute name): the surface's own `identifiers` when it configures any, otherwise the portal's `registration_identifiers`.
|
|
@@ -2225,6 +2281,19 @@ declare namespace Components {
|
|
|
2225
2281
|
*
|
|
2226
2282
|
*/
|
|
2227
2283
|
trigger_identifiers_check?: boolean;
|
|
2284
|
+
/**
|
|
2285
|
+
* Correlation id of an already triggered ERP sync, as returned by a previous call that
|
|
2286
|
+
* answered `reason: TIMEOUT`. Sent together with `trigger_identifiers_check: false` on a
|
|
2287
|
+
* retry so the portal keeps waiting on the same correlation instead of starting over.
|
|
2288
|
+
* Only used by portals configured with
|
|
2289
|
+
* `extension_hooks.registrationIdentifiersCheck.wait_for_toolkit`; ignored otherwise.
|
|
2290
|
+
* At most 255 letters, digits, hyphens and underscores: the toolkit's bound for a
|
|
2291
|
+
* correlation id and the charset it enforces on its identifiers.
|
|
2292
|
+
*
|
|
2293
|
+
* example:
|
|
2294
|
+
* 0199c0d5-6f1c-7a3b-9e21-9a9ce1d1b2c3
|
|
2295
|
+
*/
|
|
2296
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
2228
2297
|
/**
|
|
2229
2298
|
* Id of the portal surface (see `surfaces` on the portal config) this token is
|
|
2230
2299
|
* for. The surface must exist and use `authentication: registration_identifiers`;
|
|
@@ -2308,6 +2377,13 @@ declare namespace Components {
|
|
|
2308
2377
|
*
|
|
2309
2378
|
*/
|
|
2310
2379
|
reason?: "TIMEOUT" | "NOT_FOUND";
|
|
2380
|
+
/**
|
|
2381
|
+
* Correlation id of the triggered ERP sync. Present only with `reason: TIMEOUT`, for
|
|
2382
|
+
* portals waiting on the Integration Toolkit (`wait_for_toolkit`). Send it back with
|
|
2383
|
+
* `trigger_identifiers_check: false` to keep waiting on the same correlation.
|
|
2384
|
+
*
|
|
2385
|
+
*/
|
|
2386
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
2311
2387
|
}
|
|
2312
2388
|
export interface ContentWidget {
|
|
2313
2389
|
id: string;
|
|
@@ -4164,12 +4240,35 @@ declare namespace Components {
|
|
|
4164
4240
|
* 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.
|
|
4165
4241
|
*/
|
|
4166
4242
|
result?: string;
|
|
4243
|
+
/**
|
|
4244
|
+
* Correlation id to wait for inbound ERP events under, resolved from the third-party
|
|
4245
|
+
* response, e.g. `{{CallResponse.data.acknowledgeId}}`. Only read when the portal is
|
|
4246
|
+
* configured to wait on the Integration Toolkit
|
|
4247
|
+
* (`extension_hooks.<hook>.wait_for_toolkit`).
|
|
4248
|
+
*
|
|
4249
|
+
* There is no default: unless a hook declares this, the portal waits on the id it
|
|
4250
|
+
* minted and handed the hook as `{{CorrelationId}}`, whatever the response carries. A
|
|
4251
|
+
* partner that pushes under that id leaves this unset; only a partner that pushes
|
|
4252
|
+
* under an id of its own declares where the response carries it. A declared id that
|
|
4253
|
+
* is absent from the response falls back to the minted one; one that is not a valid
|
|
4254
|
+
* correlation id (at most 255 letters, digits, `-` and `_`) is not waited on, and
|
|
4255
|
+
* the portal polls entity search instead.
|
|
4256
|
+
*
|
|
4257
|
+
*/
|
|
4258
|
+
result_correlation_id?: string;
|
|
4167
4259
|
};
|
|
4168
4260
|
resolved?: {
|
|
4169
4261
|
/**
|
|
4170
4262
|
* 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`.
|
|
4171
4263
|
*/
|
|
4172
4264
|
result?: string;
|
|
4265
|
+
/**
|
|
4266
|
+
* Correlation id to wait for inbound ERP events under, resolved from the third-party
|
|
4267
|
+
* response, e.g. `{{CallResponse.data.acknowledgeId}}`. Supersedes
|
|
4268
|
+
* `call.result_correlation_id`. No default; see `call.result_correlation_id`.
|
|
4269
|
+
*
|
|
4270
|
+
*/
|
|
4271
|
+
result_correlation_id?: string;
|
|
4173
4272
|
/**
|
|
4174
4273
|
* Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
|
|
4175
4274
|
* If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
|
|
@@ -4619,12 +4718,35 @@ declare namespace Components {
|
|
|
4619
4718
|
* 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.
|
|
4620
4719
|
*/
|
|
4621
4720
|
result?: string;
|
|
4721
|
+
/**
|
|
4722
|
+
* Correlation id to wait for inbound ERP events under, resolved from the third-party
|
|
4723
|
+
* response, e.g. `{{CallResponse.data.acknowledgeId}}`. Only read when the portal is
|
|
4724
|
+
* configured to wait on the Integration Toolkit
|
|
4725
|
+
* (`extension_hooks.<hook>.wait_for_toolkit`).
|
|
4726
|
+
*
|
|
4727
|
+
* There is no default: unless a hook declares this, the portal waits on the id it
|
|
4728
|
+
* minted and handed the hook as `{{CorrelationId}}`, whatever the response carries. A
|
|
4729
|
+
* partner that pushes under that id leaves this unset; only a partner that pushes
|
|
4730
|
+
* under an id of its own declares where the response carries it. A declared id that
|
|
4731
|
+
* is absent from the response falls back to the minted one; one that is not a valid
|
|
4732
|
+
* correlation id (at most 255 letters, digits, `-` and `_`) is not waited on, and
|
|
4733
|
+
* the portal polls entity search instead.
|
|
4734
|
+
*
|
|
4735
|
+
*/
|
|
4736
|
+
result_correlation_id?: string;
|
|
4622
4737
|
};
|
|
4623
4738
|
resolved?: {
|
|
4624
4739
|
/**
|
|
4625
4740
|
* 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`.
|
|
4626
4741
|
*/
|
|
4627
4742
|
result?: string;
|
|
4743
|
+
/**
|
|
4744
|
+
* Correlation id to wait for inbound ERP events under, resolved from the third-party
|
|
4745
|
+
* response, e.g. `{{CallResponse.data.acknowledgeId}}`. Supersedes
|
|
4746
|
+
* `call.result_correlation_id`. No default; see `call.result_correlation_id`.
|
|
4747
|
+
*
|
|
4748
|
+
*/
|
|
4749
|
+
result_correlation_id?: string;
|
|
4628
4750
|
/**
|
|
4629
4751
|
* Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
|
|
4630
4752
|
* If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
|
|
@@ -4655,6 +4777,137 @@ declare namespace Components {
|
|
|
4655
4777
|
* The ID of the selected hook.
|
|
4656
4778
|
*/
|
|
4657
4779
|
hook_id: string;
|
|
4780
|
+
/**
|
|
4781
|
+
* Opt in to waiting on the Integration Toolkit instead of polling entity search for the
|
|
4782
|
+
* data the ERP pushes after the hook returns. When true, the portal hands the hook a
|
|
4783
|
+
* correlation id (`{{CorrelationId}}`) and then asks the toolkit whether the entities it
|
|
4784
|
+
* needs have landed under that correlation. Off by default: a portal that does not set it
|
|
4785
|
+
* keeps polling entity search exactly as before.
|
|
4786
|
+
*
|
|
4787
|
+
* Only effective for hooks whose partner pushes through the Integration Toolkit and
|
|
4788
|
+
* echoes the correlation id. A hook that answers with an epilot contact id is fetched
|
|
4789
|
+
* directly, as today, whatever this flag says.
|
|
4790
|
+
*
|
|
4791
|
+
*/
|
|
4792
|
+
wait_for_toolkit?: boolean;
|
|
4793
|
+
/**
|
|
4794
|
+
* The entities the portal waits for, keyed by entity slug. Configured explicitly per
|
|
4795
|
+
* hook: nothing is derived from the hook type or from the portal's identifier
|
|
4796
|
+
* configuration, and a hook that configures no requirement for the entity the portal
|
|
4797
|
+
* links does not wait at all - it keeps polling entity search exactly as before.
|
|
4798
|
+
*
|
|
4799
|
+
* A selector may only name an attribute that is literally a member of that entity
|
|
4800
|
+
* target's configured `unique_ids` in the inbound use case, because the toolkit reports
|
|
4801
|
+
* exactly those and nothing else. A selector on any other attribute can never match. A
|
|
4802
|
+
* toolkit that validates selectors rejects such a wait (400) with the slug, the key and
|
|
4803
|
+
* the keys it accepts; the portal logs that at error level with the hook it came from
|
|
4804
|
+
* and polls entity search for the request, so the customer is unaffected and never told.
|
|
4805
|
+
*
|
|
4806
|
+
* The slug the portal resolves its link target from is fixed by the hook, and a
|
|
4807
|
+
* requirement for it must be configured for the wait to happen at all:
|
|
4808
|
+
* `registrationIdentifiersCheck` resolves the contact, every `contractIdentification`
|
|
4809
|
+
* assignment mode resolves the contract (in the contact modes the linked contact is the
|
|
4810
|
+
* delivered contract's `customer`). Every other configured slug is evidence that the push
|
|
4811
|
+
* carried what it promised, and is never linked.
|
|
4812
|
+
*
|
|
4813
|
+
* Ignored unless `wait_for_toolkit` is true.
|
|
4814
|
+
*
|
|
4815
|
+
* Worked examples, verified against the live integration configuration. Each block is the
|
|
4816
|
+
* `wait_for_entities` of one hook selection, and each names the slug that hook links.
|
|
4817
|
+
*
|
|
4818
|
+
* Ratingen / Wilken add-contract hook (`contractIdentification`, `contact_to_portal_user`).
|
|
4819
|
+
* No value the user types is a unique id anywhere in the org - every one is a Wilken
|
|
4820
|
+
* surrogate `external_id` - so the contact cannot be selected by attribute at all. Wait on
|
|
4821
|
+
* the contract and link its `customer`; the identity-keyed contact is evidence that the
|
|
4822
|
+
* business partner landed, and is never linked.
|
|
4823
|
+
*
|
|
4824
|
+
* ```yaml
|
|
4825
|
+
* contract: {}
|
|
4826
|
+
* contact:
|
|
4827
|
+
* key: external_id # the PROFILE contact's unique id is external_id
|
|
4828
|
+
* from_caller_contact: external_id
|
|
4829
|
+
* ```
|
|
4830
|
+
*
|
|
4831
|
+
* WEMAG registration hook (`registrationIdentifiersCheck`). The contact's unique ids are
|
|
4832
|
+
* `customer_pin` and `reenumber`; `meter.external_id` and `meter.meter_number` are both
|
|
4833
|
+
* the `ZNR` the user types.
|
|
4834
|
+
*
|
|
4835
|
+
* ```yaml
|
|
4836
|
+
* contact:
|
|
4837
|
+
* key: reenumber
|
|
4838
|
+
* from_identifier: contact.complete_customer_number
|
|
4839
|
+
* split_on: "-" # "0002-<customer_pin>-<reenumber>"
|
|
4840
|
+
* part: 2
|
|
4841
|
+
* meter:
|
|
4842
|
+
* key: external_id
|
|
4843
|
+
* from_identifier: meter.meter_number
|
|
4844
|
+
* ```
|
|
4845
|
+
*
|
|
4846
|
+
* WEMAG add-contract hook (`contractIdentification`, `contact_to_portal_user`). The
|
|
4847
|
+
* contract's unique ids are `billing_account_number` (the `reenumber`, the same third
|
|
4848
|
+
* part of `complete_customer_number`) and `customer_number` (the PIN). Wait on the
|
|
4849
|
+
* contract of the typed Rechnungseinheit and link its `customer`.
|
|
4850
|
+
*
|
|
4851
|
+
* ```yaml
|
|
4852
|
+
* contract:
|
|
4853
|
+
* key: billing_account_number
|
|
4854
|
+
* from_identifier: contact.complete_customer_number
|
|
4855
|
+
* split_on: "-" # "0002-<customer_pin>-<reenumber>"
|
|
4856
|
+
* part: 2
|
|
4857
|
+
* meter:
|
|
4858
|
+
* key: external_id
|
|
4859
|
+
* from_identifier: meter.meter_number
|
|
4860
|
+
* ```
|
|
4861
|
+
*
|
|
4862
|
+
* Never `complete_customer_number` or `customer_number` on a WEMAG contact - neither is a
|
|
4863
|
+
* unique id there - and never `customer_pin` alone on a contact or `customer_number` alone
|
|
4864
|
+
* on a contract, both of which are the PIN and ambiguous, because one person has one
|
|
4865
|
+
* contact and one contract per Rechnungseinheit. Never a key-less `contract` either: WEMAG's
|
|
4866
|
+
* `EKM Anlagedaten` writes contracts of its own, keyed on `contract_number`.
|
|
4867
|
+
*
|
|
4868
|
+
* example:
|
|
4869
|
+
* {
|
|
4870
|
+
* "contract": {},
|
|
4871
|
+
* "contact": {
|
|
4872
|
+
* "key": "external_id",
|
|
4873
|
+
* "from_caller_contact": "external_id"
|
|
4874
|
+
* }
|
|
4875
|
+
* }
|
|
4876
|
+
*/
|
|
4877
|
+
wait_for_entities?: {
|
|
4878
|
+
[name: string]: /**
|
|
4879
|
+
* One requirement of a hook's correlation wait, for the entity slug it is configured under.
|
|
4880
|
+
*
|
|
4881
|
+
* Without `key` the requirement is satisfied by any entity of that slug. That is safe for
|
|
4882
|
+
* evidence, and for a linked slug only where the inbound use case writes exactly one entity
|
|
4883
|
+
* of it per push - Wilken's `BusinessPartnerChanged` always writes two contacts, and WEMAG's
|
|
4884
|
+
* `DocumentChange` / `D3Metadata` write contacts under the same unique-id keys a registration
|
|
4885
|
+
* push uses - so a second match answers 409 rather than linking a guess.
|
|
4886
|
+
*
|
|
4887
|
+
* With `key`, the value comes from exactly one declared source, `from_identifier` or
|
|
4888
|
+
* `from_caller_contact`. A rule whose source has no value produces no wait at all, so the
|
|
4889
|
+
* hook keeps polling rather than waiting on a requirement that cannot be met.
|
|
4890
|
+
*
|
|
4891
|
+
*/
|
|
4892
|
+
WaitForEntityRule;
|
|
4893
|
+
};
|
|
4894
|
+
/**
|
|
4895
|
+
* Inbound use case slugs the portal additionally waits for. A requirement is met once at
|
|
4896
|
+
* least one event of that use case slug has finished processing, whether or not it
|
|
4897
|
+
* produced an entity, so it covers pushes whose entity set varies and pushes whose
|
|
4898
|
+
* outcome is a file or a relation rather than an entity.
|
|
4899
|
+
*
|
|
4900
|
+
* Entity requirements stay primary - the portal links by entity id, so it always waits
|
|
4901
|
+
* for the entity it links. Use case slugs are an additional bar: when both are
|
|
4902
|
+
* configured, both must be met. Empty by default. Ignored unless `wait_for_toolkit` is
|
|
4903
|
+
* true.
|
|
4904
|
+
*
|
|
4905
|
+
* example:
|
|
4906
|
+
* [
|
|
4907
|
+
* "wilken_contract_changed"
|
|
4908
|
+
* ]
|
|
4909
|
+
*/
|
|
4910
|
+
wait_for_use_cases?: string[];
|
|
4658
4911
|
} | null;
|
|
4659
4912
|
/**
|
|
4660
4913
|
* Hook that returns runtime metadata describing how a visualization should be rendered for a given portal context. Invoked by the portal before fetching data, with the same context the data hook receives.
|
|
@@ -5278,12 +5531,6 @@ declare namespace Components {
|
|
|
5278
5531
|
* Design of the portal, used to preload it from the served document
|
|
5279
5532
|
*/
|
|
5280
5533
|
design_id?: string;
|
|
5281
|
-
/**
|
|
5282
|
-
* The portal design as returned by design-builder parse (theme=NEW), for the served document; absent when the design could not be read
|
|
5283
|
-
*/
|
|
5284
|
-
design?: {
|
|
5285
|
-
[name: string]: any;
|
|
5286
|
-
} | null;
|
|
5287
5534
|
}
|
|
5288
5535
|
/**
|
|
5289
5536
|
* The meter entity
|
|
@@ -6758,13 +7005,6 @@ declare namespace Components {
|
|
|
6758
7005
|
* ]
|
|
6759
7006
|
*/
|
|
6760
7007
|
contract_identifiers?: ContractIdentifier[];
|
|
6761
|
-
/**
|
|
6762
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
6763
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
6764
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
6765
|
-
*
|
|
6766
|
-
*/
|
|
6767
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
6768
7008
|
/**
|
|
6769
7009
|
* Configuration for contract selector in the portal
|
|
6770
7010
|
*/
|
|
@@ -7515,13 +7755,6 @@ declare namespace Components {
|
|
|
7515
7755
|
* ]
|
|
7516
7756
|
*/
|
|
7517
7757
|
contract_identifiers?: ContractIdentifier[];
|
|
7518
|
-
/**
|
|
7519
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
7520
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
7521
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
7522
|
-
*
|
|
7523
|
-
*/
|
|
7524
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
7525
7758
|
/**
|
|
7526
7759
|
* Configuration for contract selector in the portal
|
|
7527
7760
|
*/
|
|
@@ -8490,13 +8723,6 @@ declare namespace Components {
|
|
|
8490
8723
|
* ]
|
|
8491
8724
|
*/
|
|
8492
8725
|
contract_identifiers?: ContractIdentifier[];
|
|
8493
|
-
/**
|
|
8494
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
8495
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
8496
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
8497
|
-
*
|
|
8498
|
-
*/
|
|
8499
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
8500
8726
|
/**
|
|
8501
8727
|
* Configuration for contract selector in the portal
|
|
8502
8728
|
*/
|
|
@@ -8960,28 +9186,6 @@ declare namespace Components {
|
|
|
8960
9186
|
_schema: "portal_user";
|
|
8961
9187
|
}
|
|
8962
9188
|
export type PortalUserRegistrationStatus = "Registration Pending" | "Confirmation Email Sent" | "Registered" | "Email Update In Progress";
|
|
8963
|
-
/**
|
|
8964
|
-
* A portal whose design_id is the design asked about.
|
|
8965
|
-
*/
|
|
8966
|
-
export interface PortalUsingDesign {
|
|
8967
|
-
portal_id: /**
|
|
8968
|
-
* ID of the portal
|
|
8969
|
-
* example:
|
|
8970
|
-
* 453ad7bf-86d5-46c8-8252-bcc868df5e3c
|
|
8971
|
-
*/
|
|
8972
|
-
PortalId;
|
|
8973
|
-
/**
|
|
8974
|
-
* example:
|
|
8975
|
-
* Kundenportal
|
|
8976
|
-
*/
|
|
8977
|
-
name?: string;
|
|
8978
|
-
origin?: /* Origin of the portal */ Origin;
|
|
8979
|
-
/**
|
|
8980
|
-
* example:
|
|
8981
|
-
* 9ba94f20-b872-11ed-b30a-b3e3bf2dc8ab
|
|
8982
|
-
*/
|
|
8983
|
-
design_id?: string;
|
|
8984
|
-
}
|
|
8985
9189
|
export type PortalWidget = EntityWidget | ContentWidget | ActionWidget | TeaserWidget | DocumentWidget | PaymentWidget | MeterReadingWidget | MeterChartWidget | CampaignWidget | ProductRecommendationsWidget;
|
|
8986
9190
|
/**
|
|
8987
9191
|
* A portal-facing projection of a workflow execution (V1 or V2), with the execution
|
|
@@ -10771,13 +10975,6 @@ declare namespace Components {
|
|
|
10771
10975
|
* ]
|
|
10772
10976
|
*/
|
|
10773
10977
|
contract_identifiers?: ContractIdentifier[];
|
|
10774
|
-
/**
|
|
10775
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
10776
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
10777
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
10778
|
-
*
|
|
10779
|
-
*/
|
|
10780
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
10781
10978
|
/**
|
|
10782
10979
|
* Configuration for contract selector in the portal
|
|
10783
10980
|
*/
|
|
@@ -11379,13 +11576,6 @@ declare namespace Components {
|
|
|
11379
11576
|
* ]
|
|
11380
11577
|
*/
|
|
11381
11578
|
contract_identifiers?: ContractIdentifier[];
|
|
11382
|
-
/**
|
|
11383
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
11384
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
11385
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
11386
|
-
*
|
|
11387
|
-
*/
|
|
11388
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
11389
11579
|
/**
|
|
11390
11580
|
* Configuration for contract selector in the portal
|
|
11391
11581
|
*/
|
|
@@ -11709,6 +11899,64 @@ declare namespace Components {
|
|
|
11709
11899
|
*/
|
|
11710
11900
|
precision?: number;
|
|
11711
11901
|
}
|
|
11902
|
+
/**
|
|
11903
|
+
* One requirement of a hook's correlation wait, for the entity slug it is configured under.
|
|
11904
|
+
*
|
|
11905
|
+
* Without `key` the requirement is satisfied by any entity of that slug. That is safe for
|
|
11906
|
+
* evidence, and for a linked slug only where the inbound use case writes exactly one entity
|
|
11907
|
+
* of it per push - Wilken's `BusinessPartnerChanged` always writes two contacts, and WEMAG's
|
|
11908
|
+
* `DocumentChange` / `D3Metadata` write contacts under the same unique-id keys a registration
|
|
11909
|
+
* push uses - so a second match answers 409 rather than linking a guess.
|
|
11910
|
+
*
|
|
11911
|
+
* With `key`, the value comes from exactly one declared source, `from_identifier` or
|
|
11912
|
+
* `from_caller_contact`. A rule whose source has no value produces no wait at all, so the
|
|
11913
|
+
* hook keeps polling rather than waiting on a requirement that cannot be met.
|
|
11914
|
+
*
|
|
11915
|
+
*/
|
|
11916
|
+
export interface WaitForEntityRule {
|
|
11917
|
+
/**
|
|
11918
|
+
* Unique-id attribute the selector matches on. Must be a member of that entity target's
|
|
11919
|
+
* configured `unique_ids` in the inbound use case; the toolkit reports nothing else.
|
|
11920
|
+
*
|
|
11921
|
+
* example:
|
|
11922
|
+
* reenumber
|
|
11923
|
+
*/
|
|
11924
|
+
key?: string;
|
|
11925
|
+
/**
|
|
11926
|
+
* Identifier the user submitted to take the value from, as `<schema>.<name>` - the same
|
|
11927
|
+
* schema and name the portal's `registration_identifiers` / `contract_identifiers` use.
|
|
11928
|
+
* Mutually exclusive with `from_caller_contact`.
|
|
11929
|
+
*
|
|
11930
|
+
* example:
|
|
11931
|
+
* contact.complete_customer_number
|
|
11932
|
+
*/
|
|
11933
|
+
from_identifier?: string;
|
|
11934
|
+
/**
|
|
11935
|
+
* Attribute of the calling portal user's own contact to take the value from. Only
|
|
11936
|
+
* available to hooks called by a signed-in user. Mutually exclusive with
|
|
11937
|
+
* `from_identifier`.
|
|
11938
|
+
*
|
|
11939
|
+
* example:
|
|
11940
|
+
* external_id
|
|
11941
|
+
*/
|
|
11942
|
+
from_caller_contact?: string;
|
|
11943
|
+
/**
|
|
11944
|
+
* Separator the source value is split on before `part` is taken, for identifiers that
|
|
11945
|
+
* carry a unique id inside a larger value the user types. WEMAG's
|
|
11946
|
+
* `complete_customer_number` is `"0002-<customer_pin>-<reenumber>"`, so splitting on `-`
|
|
11947
|
+
* and taking part 2 yields the contact's `reenumber` unique id.
|
|
11948
|
+
*
|
|
11949
|
+
* example:
|
|
11950
|
+
* -
|
|
11951
|
+
*/
|
|
11952
|
+
split_on?: string;
|
|
11953
|
+
/**
|
|
11954
|
+
* Zero-based index of the part to use after splitting on `split_on`.
|
|
11955
|
+
* example:
|
|
11956
|
+
* 2
|
|
11957
|
+
*/
|
|
11958
|
+
part?: number;
|
|
11959
|
+
}
|
|
11712
11960
|
export interface WidgetAction {
|
|
11713
11961
|
_id: string;
|
|
11714
11962
|
type: "link" | "journey";
|
|
@@ -11830,6 +12078,12 @@ declare namespace Components {
|
|
|
11830
12078
|
}
|
|
11831
12079
|
declare namespace Paths {
|
|
11832
12080
|
namespace AddContractByIdentifiers {
|
|
12081
|
+
namespace Parameters {
|
|
12082
|
+
export type CorrelationId = string; // ^[A-Za-z0-9_-]+$
|
|
12083
|
+
}
|
|
12084
|
+
export interface QueryParameters {
|
|
12085
|
+
correlation_id?: Parameters.CorrelationId /* ^[A-Za-z0-9_-]+$ */;
|
|
12086
|
+
}
|
|
11833
12087
|
/**
|
|
11834
12088
|
* Identifier-value pairs per schema to identify the contract
|
|
11835
12089
|
* example:
|
|
@@ -11855,6 +12109,7 @@ declare namespace Paths {
|
|
|
11855
12109
|
export type $400 = Components.Responses.InvalidRequest;
|
|
11856
12110
|
export type $401 = Components.Responses.Unauthorized;
|
|
11857
12111
|
export type $403 = Components.Responses.Forbidden;
|
|
12112
|
+
export type $404 = Components.Responses.ContractAssignmentNotFound;
|
|
11858
12113
|
export type $409 = Components.Responses.ContractAssignmentConflict;
|
|
11859
12114
|
export type $500 = Components.Responses.InternalServerError;
|
|
11860
12115
|
}
|
|
@@ -12038,9 +12293,25 @@ declare namespace Paths {
|
|
|
12038
12293
|
*
|
|
12039
12294
|
*/
|
|
12040
12295
|
reason?: "TIMEOUT" | "NOT_FOUND";
|
|
12296
|
+
/**
|
|
12297
|
+
* Correlation id of the triggered ERP sync. Present only for portals waiting on
|
|
12298
|
+
* the Integration Toolkit (`wait_for_toolkit`). Send it back with
|
|
12299
|
+
* `trigger_identifiers_check: false` to keep waiting on the same correlation.
|
|
12300
|
+
*
|
|
12301
|
+
*/
|
|
12302
|
+
correlation_id?: string; // ^[A-Za-z0-9_-]+$
|
|
12303
|
+
/**
|
|
12304
|
+
* Human-readable reason the identifiers did not resolve, when the portal knows
|
|
12305
|
+
* one. Set when the ERP finished sending for this correlation without the
|
|
12306
|
+
* entities the portal needs (e.g. "account data arrived, no contract"), so
|
|
12307
|
+
* support can tell a silent timeout from an incomplete delivery.
|
|
12308
|
+
*
|
|
12309
|
+
*/
|
|
12310
|
+
message?: string;
|
|
12041
12311
|
}
|
|
12042
12312
|
export type $400 = Components.Responses.InvalidRequest;
|
|
12043
12313
|
export type $404 = Components.Responses.NotFound;
|
|
12314
|
+
export type $409 = Components.Responses.ContactAmbiguousMatch;
|
|
12044
12315
|
export type $429 = Components.Responses.TooManyRequests;
|
|
12045
12316
|
export type $500 = Components.Responses.InternalServerError;
|
|
12046
12317
|
}
|
|
@@ -15442,13 +15713,6 @@ declare namespace Paths {
|
|
|
15442
15713
|
* ]
|
|
15443
15714
|
*/
|
|
15444
15715
|
contract_identifiers?: Components.Schemas.ContractIdentifier[];
|
|
15445
|
-
/**
|
|
15446
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
15447
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
15448
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
15449
|
-
*
|
|
15450
|
-
*/
|
|
15451
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
15452
15716
|
/**
|
|
15453
15717
|
* Configuration for contract selector in the portal
|
|
15454
15718
|
*/
|
|
@@ -16080,13 +16344,6 @@ declare namespace Paths {
|
|
|
16080
16344
|
* ]
|
|
16081
16345
|
*/
|
|
16082
16346
|
contract_identifiers?: Components.Schemas.ContractIdentifier[];
|
|
16083
|
-
/**
|
|
16084
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
16085
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
16086
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
16087
|
-
*
|
|
16088
|
-
*/
|
|
16089
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
16090
16347
|
/**
|
|
16091
16348
|
* Configuration for contract selector in the portal
|
|
16092
16349
|
*/
|
|
@@ -17272,13 +17529,6 @@ declare namespace Paths {
|
|
|
17272
17529
|
* ]
|
|
17273
17530
|
*/
|
|
17274
17531
|
contract_identifiers?: Components.Schemas.ContractIdentifier[];
|
|
17275
|
-
/**
|
|
17276
|
-
* What the built-in self-assignment (without a contractIdentification hook) assigns once the `contract_identifiers` match a Contract:
|
|
17277
|
-
* - `contracts`: the user's Contact is added as a customer of the Contract.
|
|
17278
|
-
* - `customer_to_portal_user`: the Contract's customers (Contacts and Accounts) are added to the Portal User's `represents`. The Portal User sees all their data, including Contracts, transitively. Mirrors the `contact_to_portal_user` assignment mode of the contractIdentification hook.
|
|
17279
|
-
*
|
|
17280
|
-
*/
|
|
17281
|
-
self_assignment_mode?: "contracts" | "customer_to_portal_user";
|
|
17282
17532
|
/**
|
|
17283
17533
|
* Configuration for contract selector in the portal
|
|
17284
17534
|
*/
|
|
@@ -21133,9 +21383,16 @@ export interface OperationMethods {
|
|
|
21133
21383
|
* addContractByIdentifiers - addContractByIdentifiers
|
|
21134
21384
|
*
|
|
21135
21385
|
* Self-assign contract(s) by pre-configured identifiers.
|
|
21386
|
+
*
|
|
21387
|
+
* When the portal is configured to wait on the Integration Toolkit
|
|
21388
|
+
* (`extension_hooks.contractIdentification.wait_for_toolkit`) and the ERP has not finished
|
|
21389
|
+
* sending within the request budget, the call fails with 404 and `reason: TIMEOUT`, carrying
|
|
21390
|
+
* the `correlation_id` of the triggered sync. Repeating the call with that `correlation_id`
|
|
21391
|
+
* keeps waiting on the same correlation without calling the third party again.
|
|
21392
|
+
*
|
|
21136
21393
|
*/
|
|
21137
21394
|
'addContractByIdentifiers'(
|
|
21138
|
-
parameters?: Parameters<
|
|
21395
|
+
parameters?: Parameters<Paths.AddContractByIdentifiers.QueryParameters> | null,
|
|
21139
21396
|
data?: Paths.AddContractByIdentifiers.RequestBody,
|
|
21140
21397
|
config?: AxiosRequestConfig
|
|
21141
21398
|
): OperationResponse<Paths.AddContractByIdentifiers.Responses.$200>
|
|
@@ -23234,9 +23491,16 @@ export interface PathsDictionary {
|
|
|
23234
23491
|
* addContractByIdentifiers - addContractByIdentifiers
|
|
23235
23492
|
*
|
|
23236
23493
|
* Self-assign contract(s) by pre-configured identifiers.
|
|
23494
|
+
*
|
|
23495
|
+
* When the portal is configured to wait on the Integration Toolkit
|
|
23496
|
+
* (`extension_hooks.contractIdentification.wait_for_toolkit`) and the ERP has not finished
|
|
23497
|
+
* sending within the request budget, the call fails with 404 and `reason: TIMEOUT`, carrying
|
|
23498
|
+
* the `correlation_id` of the triggered sync. Repeating the call with that `correlation_id`
|
|
23499
|
+
* keeps waiting on the same correlation without calling the third party again.
|
|
23500
|
+
*
|
|
23237
23501
|
*/
|
|
23238
23502
|
'post'(
|
|
23239
|
-
parameters?: Parameters<
|
|
23503
|
+
parameters?: Parameters<Paths.AddContractByIdentifiers.QueryParameters> | null,
|
|
23240
23504
|
data?: Paths.AddContractByIdentifiers.RequestBody,
|
|
23241
23505
|
config?: AxiosRequestConfig
|
|
23242
23506
|
): OperationResponse<Paths.AddContractByIdentifiers.Responses.$200>
|
|
@@ -24541,7 +24805,6 @@ export type PortalSurfaceEntityAccess = Components.Schemas.PortalSurfaceEntityAc
|
|
|
24541
24805
|
export type PortalTaskConfig = Components.Schemas.PortalTaskConfig;
|
|
24542
24806
|
export type PortalUser = Components.Schemas.PortalUser;
|
|
24543
24807
|
export type PortalUserRegistrationStatus = Components.Schemas.PortalUserRegistrationStatus;
|
|
24544
|
-
export type PortalUsingDesign = Components.Schemas.PortalUsingDesign;
|
|
24545
24808
|
export type PortalWidget = Components.Schemas.PortalWidget;
|
|
24546
24809
|
export type PortalWorkflow = Components.Schemas.PortalWorkflow;
|
|
24547
24810
|
export type PortalWorkflowStage = Components.Schemas.PortalWorkflowStage;
|
|
@@ -24605,6 +24868,7 @@ export type UserRequest = Components.Schemas.UserRequest;
|
|
|
24605
24868
|
export type VisualizationDataRange = Components.Schemas.VisualizationDataRange;
|
|
24606
24869
|
export type VisualizationMetadata = Components.Schemas.VisualizationMetadata;
|
|
24607
24870
|
export type VisualizationTypeOption = Components.Schemas.VisualizationTypeOption;
|
|
24871
|
+
export type WaitForEntityRule = Components.Schemas.WaitForEntityRule;
|
|
24608
24872
|
export type WidgetAction = Components.Schemas.WidgetAction;
|
|
24609
24873
|
export type WidgetBase = Components.Schemas.WidgetBase;
|
|
24610
24874
|
export type WorfklowIdentifier = Components.Schemas.WorfklowIdentifier;
|