@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/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. If the reason is "MULTIPLE", the contract is not assignable because multiple contracts were found and the business logic does not allow it.
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.
82
+ */
83
+ error: string;
84
+ reason?: "TIMEOUT" | "INCOMPLETE";
85
+ /**
86
+ * Correlation id of the ERP sync that was waited on. Present with `TIMEOUT` and `INCOMPLETE`.
30
87
  */
31
- reason: "DRAFT" | "MULTIPLE";
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;
@@ -2173,6 +2230,19 @@ declare namespace Components {
2173
2230
  *
2174
2231
  */
2175
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_-]+$
2176
2246
  }
2177
2247
  /**
2178
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`.
@@ -2211,6 +2281,19 @@ declare namespace Components {
2211
2281
  *
2212
2282
  */
2213
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_-]+$
2214
2297
  /**
2215
2298
  * Id of the portal surface (see `surfaces` on the portal config) this token is
2216
2299
  * for. The surface must exist and use `authentication: registration_identifiers`;
@@ -2294,6 +2377,13 @@ declare namespace Components {
2294
2377
  *
2295
2378
  */
2296
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_-]+$
2297
2387
  }
2298
2388
  export interface ContentWidget {
2299
2389
  id: string;
@@ -4150,12 +4240,35 @@ declare namespace Components {
4150
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.
4151
4241
  */
4152
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;
4153
4259
  };
4154
4260
  resolved?: {
4155
4261
  /**
4156
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`.
4157
4263
  */
4158
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;
4159
4272
  /**
4160
4273
  * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
4161
4274
  * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
@@ -4605,12 +4718,35 @@ declare namespace Components {
4605
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.
4606
4719
  */
4607
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;
4608
4737
  };
4609
4738
  resolved?: {
4610
4739
  /**
4611
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`.
4612
4741
  */
4613
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;
4614
4750
  /**
4615
4751
  * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
4616
4752
  * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
@@ -4641,6 +4777,137 @@ declare namespace Components {
4641
4777
  * The ID of the selected hook.
4642
4778
  */
4643
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[];
4644
4911
  } | null;
4645
4912
  /**
4646
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.
@@ -7943,13 +8210,18 @@ declare namespace Components {
7943
8210
  */
7944
8211
  created_by?: string;
7945
8212
  /**
7946
- * Set at publish time only, and only when the publish request carried one. 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.
8213
+ * 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.
7947
8214
  *
7948
8215
  * example:
7949
8216
  * FAQ page launch
7950
8217
  */
7951
8218
  name?: string;
7952
8219
  description?: string;
8220
+ source?: /**
8221
+ * 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.
8222
+ *
8223
+ */
8224
+ RevisionSource;
7953
8225
  page_count: number;
7954
8226
  /**
7955
8227
  * The last time this revision was published. NOT the same question as `is_published`: a revision that was live yesterday still carries a `published_at`.
@@ -8018,13 +8290,18 @@ declare namespace Components {
8018
8290
  */
8019
8291
  created_by?: string;
8020
8292
  /**
8021
- * Set at publish time only, and only when the publish request carried one. 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.
8293
+ * 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.
8022
8294
  *
8023
8295
  * example:
8024
8296
  * FAQ page launch
8025
8297
  */
8026
8298
  name?: string;
8027
8299
  description?: string;
8300
+ source?: /**
8301
+ * 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.
8302
+ *
8303
+ */
8304
+ RevisionSource;
8028
8305
  page_count: number;
8029
8306
  /**
8030
8307
  * The last time this revision was published. NOT the same question as `is_published`: a revision that was live yesterday still carries a `published_at`.
@@ -8658,6 +8935,11 @@ declare namespace Components {
8658
8935
  [name: string]: Block;
8659
8936
  };
8660
8937
  based_on_revision_id?: string;
8938
+ revision_source?: /**
8939
+ * 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.
8940
+ *
8941
+ */
8942
+ RevisionSource;
8661
8943
  pages: /**
8662
8944
  * A page inside a revision snapshot. `additionalProperties` is true on purpose — a page carries fields this schema does not name and they must survive into the snapshot and back onto the live page when it is published.
8663
8945
  *
@@ -8676,13 +8958,18 @@ declare namespace Components {
8676
8958
  */
8677
8959
  created_by?: string;
8678
8960
  /**
8679
- * Set at publish time only, and only when the publish request carried one. 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.
8961
+ * 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.
8680
8962
  *
8681
8963
  * example:
8682
8964
  * FAQ page launch
8683
8965
  */
8684
8966
  name?: string;
8685
8967
  description?: string;
8968
+ source?: /**
8969
+ * 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.
8970
+ *
8971
+ */
8972
+ RevisionSource;
8686
8973
  page_count: number;
8687
8974
  /**
8688
8975
  * The last time this revision was published. NOT the same question as `is_published`: a revision that was live yesterday still carries a `published_at`.
@@ -9869,6 +10156,14 @@ declare namespace Components {
9869
10156
  [name: string]: any;
9870
10157
  };
9871
10158
  }
10159
+ /**
10160
+ * 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.
10161
+ *
10162
+ */
10163
+ export interface RevisionSource {
10164
+ type: "blueprint_sync";
10165
+ blueprint_title?: string;
10166
+ }
9872
10167
  export interface Rule {
9873
10168
  entity?: string | null;
9874
10169
  attribute?: string | null;
@@ -10293,6 +10588,15 @@ declare namespace Components {
10293
10588
  */
10294
10589
  ProviderConfig[];
10295
10590
  }
10591
+ export interface UpdatePortalRevisionRequest {
10592
+ /**
10593
+ * New label for the revision. Trimmed by the server; an empty name after trimming removes the revision's name.
10594
+ *
10595
+ * example:
10596
+ * FAQ page launch
10597
+ */
10598
+ name: string;
10599
+ }
10296
10600
  export interface UpsertPortalConfig {
10297
10601
  /**
10298
10602
  * Journey actions allowed on an entity by a portal user
@@ -11595,6 +11899,64 @@ declare namespace Components {
11595
11899
  */
11596
11900
  precision?: number;
11597
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
+ }
11598
11960
  export interface WidgetAction {
11599
11961
  _id: string;
11600
11962
  type: "link" | "journey";
@@ -11716,6 +12078,12 @@ declare namespace Components {
11716
12078
  }
11717
12079
  declare namespace Paths {
11718
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
+ }
11719
12087
  /**
11720
12088
  * Identifier-value pairs per schema to identify the contract
11721
12089
  * example:
@@ -11741,6 +12109,7 @@ declare namespace Paths {
11741
12109
  export type $400 = Components.Responses.InvalidRequest;
11742
12110
  export type $401 = Components.Responses.Unauthorized;
11743
12111
  export type $403 = Components.Responses.Forbidden;
12112
+ export type $404 = Components.Responses.ContractAssignmentNotFound;
11744
12113
  export type $409 = Components.Responses.ContractAssignmentConflict;
11745
12114
  export type $500 = Components.Responses.InternalServerError;
11746
12115
  }
@@ -11924,9 +12293,25 @@ declare namespace Paths {
11924
12293
  *
11925
12294
  */
11926
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;
11927
12311
  }
11928
12312
  export type $400 = Components.Responses.InvalidRequest;
11929
12313
  export type $404 = Components.Responses.NotFound;
12314
+ export type $409 = Components.Responses.ContactAmbiguousMatch;
11930
12315
  export type $429 = Components.Responses.TooManyRequests;
11931
12316
  export type $500 = Components.Responses.InternalServerError;
11932
12317
  }
@@ -19160,7 +19545,7 @@ declare namespace Paths {
19160
19545
  */
19161
19546
  Components.Schemas.PortalId;
19162
19547
  /**
19163
- * 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.
19548
+ * 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.
19164
19549
  */
19165
19550
  items_to_swap?: /**
19166
19551
  * Optional configuration item that a portal swap can additionally include. The swap always transfers the pages and the functional experience config that keep the portal working. These items are opt-in on top of that and are OFF by default. Domain and access/security settings (domain, cognito_details, auth_settings) can never be swapped and are therefore not part of this enum.
@@ -19168,6 +19553,10 @@ declare namespace Paths {
19168
19553
  * - `portal_references`: after the swap, re-point configuration in other services from the source portal to the target portal: the portal on journey login (AuthControl) blocks and in file upload portal access, and the portal of automation flow portal triggers. One-directional: references to the target portal are left unchanged, because the target keeps its domain and users. System flows are not changed. Uses the caller's permissions; the outcome is returned in `portal_references`.
19169
19554
  */
19170
19555
  Components.Schemas.SwappableConfig[];
19556
+ /**
19557
+ * 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.
19558
+ */
19559
+ mode?: "copy";
19171
19560
  }
19172
19561
  namespace Responses {
19173
19562
  export interface $200 {
@@ -19177,6 +19566,18 @@ declare namespace Paths {
19177
19566
  */
19178
19567
  message?: string;
19179
19568
  portal_references?: /* Outcome of the `portal_references` swap option. Only present when that option was requested. The swap itself has already succeeded when this is returned, so failures here do not undo it. */ Components.Schemas.SwapPortalReferencesResult;
19569
+ /**
19570
+ * Only with `mode`. The draft revision created on the target.
19571
+ */
19572
+ revisions?: {
19573
+ portal_id?: /**
19574
+ * ID of the portal
19575
+ * example:
19576
+ * 453ad7bf-86d5-46c8-8252-bcc868df5e3c
19577
+ */
19578
+ Components.Schemas.PortalId;
19579
+ revision_id?: string;
19580
+ }[];
19180
19581
  }
19181
19582
  export type $400 = Components.Responses.InvalidRequest;
19182
19583
  export type $401 = Components.Responses.Unauthorized;
@@ -19479,6 +19880,41 @@ declare namespace Paths {
19479
19880
  export type $500 = Components.Responses.InternalServerError;
19480
19881
  }
19481
19882
  }
19883
+ namespace UpdatePortalRevision {
19884
+ namespace Parameters {
19885
+ /**
19886
+ * example:
19887
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
19888
+ */
19889
+ export type PortalId = string; // uuid
19890
+ /**
19891
+ * example:
19892
+ * 2026-08-25T14:03:11.482Z-a7f3c1d9
19893
+ */
19894
+ export type RevisionId = string;
19895
+ }
19896
+ export interface PathParameters {
19897
+ portal_id: /**
19898
+ * example:
19899
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
19900
+ */
19901
+ Parameters.PortalId /* uuid */;
19902
+ revision_id: /**
19903
+ * example:
19904
+ * 2026-08-25T14:03:11.482Z-a7f3c1d9
19905
+ */
19906
+ Parameters.RevisionId;
19907
+ }
19908
+ export type RequestBody = Components.Schemas.UpdatePortalRevisionRequest;
19909
+ namespace Responses {
19910
+ export type $200 = Components.Schemas.PortalRevisionSummary;
19911
+ export type $400 = Components.Responses.InvalidRequest;
19912
+ export type $401 = Components.Responses.Unauthorized;
19913
+ export type $403 = Components.Responses.Forbidden;
19914
+ export type $404 = Components.Responses.NotFound;
19915
+ export type $500 = Components.Responses.InternalServerError;
19916
+ }
19917
+ }
19482
19918
  namespace UpdatePortalUser {
19483
19919
  export type RequestBody = Components.Schemas.Entity;
19484
19920
  namespace Responses {
@@ -20947,9 +21383,16 @@ export interface OperationMethods {
20947
21383
  * addContractByIdentifiers - addContractByIdentifiers
20948
21384
  *
20949
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
+ *
20950
21393
  */
20951
21394
  'addContractByIdentifiers'(
20952
- parameters?: Parameters<UnknownParamsObject> | null,
21395
+ parameters?: Parameters<Paths.AddContractByIdentifiers.QueryParameters> | null,
20953
21396
  data?: Paths.AddContractByIdentifiers.RequestBody,
20954
21397
  config?: AxiosRequestConfig
20955
21398
  ): OperationResponse<Paths.AddContractByIdentifiers.Responses.$200>
@@ -21775,6 +22218,19 @@ export interface OperationMethods {
21775
22218
  data?: any,
21776
22219
  config?: AxiosRequestConfig
21777
22220
  ): OperationResponse<Paths.GetPortalRevision.Responses.$200>
22221
+ /**
22222
+ * updatePortalRevision - updatePortalRevision
22223
+ *
22224
+ * 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.
22225
+ *
22226
+ * The 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.
22227
+ *
22228
+ */
22229
+ 'updatePortalRevision'(
22230
+ parameters?: Parameters<Paths.UpdatePortalRevision.PathParameters> | null,
22231
+ data?: Paths.UpdatePortalRevision.RequestBody,
22232
+ config?: AxiosRequestConfig
22233
+ ): OperationResponse<Paths.UpdatePortalRevision.Responses.$200>
21778
22234
  /**
21779
22235
  * publishPortalRevision - publishPortalRevision
21780
22236
  *
@@ -21821,7 +22277,7 @@ export interface OperationMethods {
21821
22277
  /**
21822
22278
  * swapPortalConfig - swapPortalConfig
21823
22279
  *
21824
- * Swaps the portal configuration of two portals.
22280
+ * 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.
21825
22281
  */
21826
22282
  'swapPortalConfig'(
21827
22283
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -23035,9 +23491,16 @@ export interface PathsDictionary {
23035
23491
  * addContractByIdentifiers - addContractByIdentifiers
23036
23492
  *
23037
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
+ *
23038
23501
  */
23039
23502
  'post'(
23040
- parameters?: Parameters<UnknownParamsObject> | null,
23503
+ parameters?: Parameters<Paths.AddContractByIdentifiers.QueryParameters> | null,
23041
23504
  data?: Paths.AddContractByIdentifiers.RequestBody,
23042
23505
  config?: AxiosRequestConfig
23043
23506
  ): OperationResponse<Paths.AddContractByIdentifiers.Responses.$200>
@@ -23987,6 +24450,19 @@ export interface PathsDictionary {
23987
24450
  data?: any,
23988
24451
  config?: AxiosRequestConfig
23989
24452
  ): OperationResponse<Paths.GetPortalRevision.Responses.$200>
24453
+ /**
24454
+ * updatePortalRevision - updatePortalRevision
24455
+ *
24456
+ * 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.
24457
+ *
24458
+ * The 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.
24459
+ *
24460
+ */
24461
+ 'patch'(
24462
+ parameters?: Parameters<Paths.UpdatePortalRevision.PathParameters> | null,
24463
+ data?: Paths.UpdatePortalRevision.RequestBody,
24464
+ config?: AxiosRequestConfig
24465
+ ): OperationResponse<Paths.UpdatePortalRevision.Responses.$200>
23990
24466
  }
23991
24467
  ['/v3/portal/config/{portal_id}/publish']: {
23992
24468
  /**
@@ -24041,7 +24517,7 @@ export interface PathsDictionary {
24041
24517
  /**
24042
24518
  * swapPortalConfig - swapPortalConfig
24043
24519
  *
24044
- * Swaps the portal configuration of two portals.
24520
+ * 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.
24045
24521
  */
24046
24522
  'post'(
24047
24523
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -24360,6 +24836,7 @@ export type RegistrationIdentifier = Components.Schemas.RegistrationIdentifier;
24360
24836
  export type ReimbursementEvent = Components.Schemas.ReimbursementEvent;
24361
24837
  export type RevisionPage = Components.Schemas.RevisionPage;
24362
24838
  export type RevisionPageRequest = Components.Schemas.RevisionPageRequest;
24839
+ export type RevisionSource = Components.Schemas.RevisionSource;
24363
24840
  export type Rule = Components.Schemas.Rule;
24364
24841
  export type SAMLProviderConfig = Components.Schemas.SAMLProviderConfig;
24365
24842
  export type SSOCallbackRequest = Components.Schemas.SSOCallbackRequest;
@@ -24383,6 +24860,7 @@ export type TeaserWidget = Components.Schemas.TeaserWidget;
24383
24860
  export type TemplatesRef = Components.Schemas.TemplatesRef;
24384
24861
  export type TriggerPortalFlow = Components.Schemas.TriggerPortalFlow;
24385
24862
  export type UpdateOnlyPortalConfigAttributes = Components.Schemas.UpdateOnlyPortalConfigAttributes;
24863
+ export type UpdatePortalRevisionRequest = Components.Schemas.UpdatePortalRevisionRequest;
24386
24864
  export type UpsertPortalConfig = Components.Schemas.UpsertPortalConfig;
24387
24865
  export type UpsertPortalConfigV3 = Components.Schemas.UpsertPortalConfigV3;
24388
24866
  export type UpsertPortalWidget = Components.Schemas.UpsertPortalWidget;
@@ -24390,6 +24868,7 @@ export type UserRequest = Components.Schemas.UserRequest;
24390
24868
  export type VisualizationDataRange = Components.Schemas.VisualizationDataRange;
24391
24869
  export type VisualizationMetadata = Components.Schemas.VisualizationMetadata;
24392
24870
  export type VisualizationTypeOption = Components.Schemas.VisualizationTypeOption;
24871
+ export type WaitForEntityRule = Components.Schemas.WaitForEntityRule;
24393
24872
  export type WidgetAction = Components.Schemas.WidgetAction;
24394
24873
  export type WidgetBase = Components.Schemas.WidgetBase;
24395
24874
  export type WorfklowIdentifier = Components.Schemas.WorfklowIdentifier;