@govflanders/vl-widget-global-header-types 1.0.37 → 1.0.39
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/README.md +11 -15
- package/dist/access-menu.d.ts +82 -4
- package/dist/branding.d.ts +32 -3
- package/dist/client.d.ts +3 -3
- package/dist/config.d.ts +6 -0
- package/dist/contact.d.ts +275 -2
- package/dist/idp.d.ts +98 -1
- package/dist/image.d.ts +14 -0
- package/dist/link.d.ts +23 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/index.html +12 -13
- package/docs/interfaces/AlertConfig.html +4 -4
- package/docs/interfaces/Application.html +13 -2
- package/docs/interfaces/ApplicationMenuLink.html +17 -0
- package/docs/interfaces/BrandingConfigColors.html +5 -3
- package/docs/interfaces/BrandingConfigHost.html +16 -2
- package/docs/interfaces/BrandingConfigUmbrella.html +15 -3
- package/docs/interfaces/Channel.html +13 -2
- package/docs/interfaces/ContactOption.html +18 -2
- package/docs/interfaces/ContactOptionRef.html +6 -2
- package/docs/interfaces/EnrichedServicePoints.html +7 -2
- package/docs/interfaces/GlobalHeaderClient.html +15 -15
- package/docs/interfaces/IDPData.html +5 -2
- package/docs/interfaces/Image.html +8 -2
- package/docs/interfaces/Link.html +5 -2
- package/docs/interfaces/LinkWithTarget.html +15 -2
- package/docs/interfaces/MainLink.html +16 -2
- package/docs/interfaces/ProfileConfig.html +7 -7
- package/docs/interfaces/ServicePoints.html +7 -2
- package/docs/interfaces/Session.html +7 -2
- package/docs/modules.html +2 -10
- package/docs/types/AlertModifier.html +1 -1
- package/docs/types/BrandingConfigLevel.html +9 -2
- package/docs/types/CapacityCode.html +8 -1
- package/docs/types/ChannelIcon.html +2 -1
- package/docs/types/ChannelType.html +2 -1
- package/docs/types/CobrowseChannel.html +7 -1
- package/docs/types/ContactOptionSocialPlatform.html +2 -1
- package/docs/types/ContactServiceEndpoints.html +8 -1
- package/docs/types/EnrichedServicePoint.html +1 -1
- package/docs/types/ServicePoint.html +2 -1
- package/package.json +1 -1
- package/docs/interfaces/AccessMenuConfig.html +0 -6
- package/docs/interfaces/ApplicationLink.html +0 -5
- package/docs/interfaces/BrandingConfig.html +0 -7
- package/docs/interfaces/CobrowseConfig.html +0 -5
- package/docs/interfaces/CobrowseConsentConfig.html +0 -3
- package/docs/interfaces/Config.html +0 -5
- package/docs/interfaces/ContactConfig.html +0 -5
- package/docs/types/ApplicationMenuLink.html +0 -1
- package/docs/types/PluginTypeId.html +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ By using the types defined in this package, developers can ensure type-safe inte
|
|
|
6
6
|
|
|
7
7
|
You can integrate the **Flanders Global Header** into your website using one of two methods: the **entry script** or the **embed script**. Each serves a different purpose:
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Using the Entry Script
|
|
10
10
|
|
|
11
11
|
The entry script should be placed in the `<head>` section of your HTML, preferably at the top. This is essential because the `globalHeaderClient` object is only available after this script has loaded. With the entry script, the header does not render automatically, so you'll need to call the `mount` method to display it.
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ Example of using the entry script:
|
|
|
30
30
|
</html>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
###
|
|
33
|
+
### Using the Embed Script
|
|
34
34
|
|
|
35
35
|
The embed script is meant to be placed directly inside the DOM where you want the header to appear. It automatically renders the header at the script's location in the HTML.
|
|
36
36
|
|
|
@@ -71,7 +71,7 @@ yarn add -D @govflanders/vl-widget-global-header-types
|
|
|
71
71
|
**Note:** It’s recommended to use the caret (^) symbol in your package.json to stay updated with the latest minor and patch versions.
|
|
72
72
|
|
|
73
73
|
## Usage
|
|
74
|
-
This package provides all the types required for working with the Global Header Widget. The widget is available on the global window object as window.globalHeaderClient
|
|
74
|
+
This package provides all the types required for working with the Global Header Widget. The widget is available on the global window object as `window.globalHeaderClient`. You can import the types from global-header-types to use them in your project.
|
|
75
75
|
|
|
76
76
|
Example of using the types to interact with the widget:
|
|
77
77
|
```typescript
|
|
@@ -97,24 +97,20 @@ client.setMainLinks([
|
|
|
97
97
|
]);
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
The `window.globalHeaderClient` object offers several methods for interacting with the widget. Each method is typed and returns promises, making asynchronous operations easier to handle. Below is a detailed breakdown of each method, its parameters, and the expected return values.
|
|
103
|
-
|
|
104
|
-
Checkout the [GlobalHeaderClient](./interfaces/GlobalHeaderClient.html) here to see how to use it.
|
|
100
|
+
Checkout the [GlobalHeaderClient](./interfaces/GlobalHeaderClient.html) here to see all the available methods.
|
|
105
101
|
|
|
106
102
|
## Migration guide: Upgrading from v4 to v5
|
|
107
103
|
|
|
108
104
|
If you’re currently using version 4 of the Global Header Widget, please follow this guide to upgrade to version 5. This guide highlights the key changes and steps you need to take to ensure a smooth transition.
|
|
109
105
|
|
|
110
|
-
###
|
|
106
|
+
### Remove client library script links
|
|
111
107
|
|
|
112
108
|
No more client library or polyfill scripts: In version 5, you no longer need to include any additional client library or polyfill script links in your HTML. Access to the `window.globalHeaderClient` object is automatically provided when you include either the entry script or the embed script.
|
|
113
109
|
Action Required:
|
|
114
110
|
- Remove any `<script>` tags that reference client libraries or polyfill libraries for the widget.
|
|
115
111
|
- Ensure that either the entry script or the embed script is included in your HTML.
|
|
116
112
|
|
|
117
|
-
###
|
|
113
|
+
### Eliminate installable packages
|
|
118
114
|
|
|
119
115
|
Script-based integration only: Version 5 removes the need for installable packages via npm or yarn. All functionalities are now accessible by including script tags directly in your HTML’s `<head>` or `<body>` section.
|
|
120
116
|
|
|
@@ -122,11 +118,11 @@ Action Required:
|
|
|
122
118
|
- Uninstall any npm or yarn packages related to the widget
|
|
123
119
|
- Delete any import or require statements in your JavaScript code that reference the widget.
|
|
124
120
|
|
|
125
|
-
###
|
|
121
|
+
### Update Embed script links
|
|
126
122
|
|
|
127
123
|
Version Update in Embed Links: If you’re using the embed script method to include the widget, you need to update the version number in your script’s src URL from 'v1' to 'v2'. [Example here](#adding-a-flanders-global-header-to-your-website).
|
|
128
124
|
|
|
129
|
-
###
|
|
125
|
+
### Update API usage
|
|
130
126
|
|
|
131
127
|
API Changes: The globalHeaderClient API has been updated in version 5. Methods, their signatures, and usage patterns may have changed. Refer to the [API](#api) section for detailed information on the new methods and their parameters.
|
|
132
128
|
|
|
@@ -151,15 +147,15 @@ Example:
|
|
|
151
147
|
+ globalHeaderClient.contact.resetServicePoints();
|
|
152
148
|
```
|
|
153
149
|
|
|
154
|
-
###
|
|
150
|
+
### Accessing `window.globalHeaderClient`
|
|
155
151
|
|
|
156
152
|
Unified Access via Scripts: In version 5, you can access the `window.globalHeaderClient` object regardless of whether you use the entry script or the embed script.
|
|
157
153
|
|
|
158
154
|
Action Required:
|
|
159
155
|
- Ensure that you include either the entry script or the embed script in your HTML.
|
|
160
|
-
- Remove any additional scripts previously used to access window.globalHeaderClient
|
|
156
|
+
- Remove any additional scripts previously used to access `window.globalHeaderClient`.
|
|
161
157
|
|
|
162
|
-
###
|
|
158
|
+
### Verify Styling and Rendering
|
|
163
159
|
After integrating version 5 of the widget into your website, it’s important to thoroughly review its appearance and functionality to ensure everything works as expected. Some styling adjustments might be necessary due to changes in the widget’s design or your site’s CSS.
|
|
164
160
|
|
|
165
161
|
Action Required:
|
package/dist/access-menu.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { Translatable } from './i18n';
|
|
2
1
|
import { IDPData } from './idp';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the capacity code for main e-desks.
|
|
4
|
+
* Possible values are:
|
|
5
|
+
* - `'BUR'`: Burgerprofiel
|
|
6
|
+
* - `'EA'`: eLoket Ondernemers
|
|
7
|
+
* - `'VER'`: Verenigingsloket
|
|
8
|
+
*/
|
|
3
9
|
export type CapacityCode = 'BUR' | 'EA' | 'VER';
|
|
4
10
|
/**
|
|
5
11
|
* Represents the configuration for user profile and authentication settings.
|
|
@@ -31,33 +37,105 @@ export interface ProfileConfig {
|
|
|
31
37
|
*/
|
|
32
38
|
idpData: IDPData;
|
|
33
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents the session information for the application.
|
|
42
|
+
*/
|
|
34
43
|
export interface Session {
|
|
44
|
+
/**
|
|
45
|
+
* Application-specific session details.
|
|
46
|
+
*/
|
|
35
47
|
application: {
|
|
48
|
+
/**
|
|
49
|
+
* Indicates whether the application supports session management.
|
|
50
|
+
* If `true`, a version of the header will be shown which allows the user to
|
|
51
|
+
* log in, log out, switch capacity, and more.
|
|
52
|
+
*/
|
|
36
53
|
sessionSupport: boolean;
|
|
37
54
|
};
|
|
38
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Holds application-specific settings.
|
|
58
|
+
*/
|
|
39
59
|
export interface Application {
|
|
60
|
+
/**
|
|
61
|
+
* Indicates whether the application is a main capacity application.
|
|
62
|
+
* This means the application is one of the following:
|
|
63
|
+
* - Burgerprofiel (`BUR`)
|
|
64
|
+
* - eLoket Ondernemers (`EA`)
|
|
65
|
+
* - Verenigingsloket (`VER`)
|
|
66
|
+
*/
|
|
40
67
|
isMainCapacity: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The main capacity code setting, which changes certain UI elements
|
|
70
|
+
* like the eLoket icon.
|
|
71
|
+
*/
|
|
41
72
|
mainCapacityCode: CapacityCode;
|
|
73
|
+
/**
|
|
74
|
+
* The application name shown at the top of the access menu.
|
|
75
|
+
*/
|
|
42
76
|
name: string;
|
|
43
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* @ignore
|
|
80
|
+
*/
|
|
44
81
|
export interface AccessMenuConfig {
|
|
45
82
|
pluginTypeId: 'citizen_profile';
|
|
46
83
|
session: Session;
|
|
47
84
|
application: Application;
|
|
48
|
-
applicationMenu?:
|
|
85
|
+
applicationMenu?: ApplicationMenuLink[];
|
|
49
86
|
mainLinks?: MainLink[];
|
|
50
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Represents a main link in the Access Menu.
|
|
90
|
+
* These are the links shown in the top section of the menu.
|
|
91
|
+
*/
|
|
51
92
|
export interface MainLink {
|
|
93
|
+
/**
|
|
94
|
+
* The text that will be shown.
|
|
95
|
+
*/
|
|
52
96
|
label: string;
|
|
97
|
+
/**
|
|
98
|
+
* The URL it links to.
|
|
99
|
+
*/
|
|
53
100
|
href: string;
|
|
101
|
+
/**
|
|
102
|
+
* If `true`, an 'external' icon will be shown next to the link
|
|
103
|
+
* to indicate it leads to an external site.
|
|
104
|
+
*/
|
|
54
105
|
isExternal?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Specifies where to open the linked document.
|
|
108
|
+
* Possible values are:
|
|
109
|
+
* - `'_blank'`: Opens the link in a new window or tab.
|
|
110
|
+
* - `'_self'`: Opens the link in the same frame as it was clicked (default).
|
|
111
|
+
* - `'_parent'`: Opens the link in the parent frame.
|
|
112
|
+
* - `'_top'`: Opens the link in the full body of the window.
|
|
113
|
+
*/
|
|
55
114
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
56
115
|
}
|
|
57
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Represents an application link displayed in the second section of the menu, under the main links.
|
|
118
|
+
*/
|
|
119
|
+
export interface ApplicationMenuLink {
|
|
120
|
+
/**
|
|
121
|
+
* The text that will be shown for the link.
|
|
122
|
+
*/
|
|
58
123
|
label: string;
|
|
124
|
+
/**
|
|
125
|
+
* The URL the link navigates to when clicked.
|
|
126
|
+
*/
|
|
59
127
|
href: string;
|
|
128
|
+
/**
|
|
129
|
+
* Specifies where to open the linked document, similar to the HTML `target` attribute.
|
|
130
|
+
* For example, `"_blank"` opens the link in a new tab.
|
|
131
|
+
*/
|
|
60
132
|
target?: string;
|
|
133
|
+
/**
|
|
134
|
+
* The icon to display next to the link.
|
|
135
|
+
* Possible values are:
|
|
136
|
+
* - `'e-desk'`: Displays the e-desk icon.
|
|
137
|
+
* - `'e-desk-lock'`: Displays the e-desk icon with a lock symbol on top.
|
|
138
|
+
* - `undefined` (not provided): No icon will be displayed.
|
|
139
|
+
*/
|
|
61
140
|
icon?: 'e-desk' | 'e-desk-lock';
|
|
62
141
|
}
|
|
63
|
-
export type ApplicationMenuLink = ApplicationLink | Translatable<ApplicationLink>;
|
package/dist/branding.d.ts
CHANGED
|
@@ -1,19 +1,48 @@
|
|
|
1
1
|
import { I18n } from './i18n';
|
|
2
2
|
import { Image } from './image';
|
|
3
3
|
import { LinkWithTarget } from './link';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Represents the link shown on the top left in the header.
|
|
6
|
+
* Only required for branding levels lower than 4.
|
|
7
|
+
*/
|
|
5
8
|
export interface BrandingConfigUmbrella extends LinkWithTarget {
|
|
6
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Represents the host configuration shown to the right of the umbrella in the header (if an umbrella is available).
|
|
12
|
+
*/
|
|
7
13
|
export interface BrandingConfigHost extends LinkWithTarget {
|
|
14
|
+
/**
|
|
15
|
+
* The logo image to display at the right of the host.
|
|
16
|
+
* Can be an `Image` object or `null` if no logo is to be displayed.
|
|
17
|
+
*/
|
|
8
18
|
logo: Image | null;
|
|
9
19
|
}
|
|
10
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Configures the branding colors, only used for branding levels lower than 1.
|
|
22
|
+
*/
|
|
11
23
|
export interface BrandingConfigColors {
|
|
24
|
+
/**
|
|
25
|
+
* The primary color used for the background of the 'contact' plugin (located on the top right of the header).
|
|
26
|
+
*/
|
|
12
27
|
primary: string;
|
|
28
|
+
/**
|
|
29
|
+
* The functional color used for elements like buttons and links.
|
|
30
|
+
*/
|
|
13
31
|
functional: string;
|
|
14
32
|
}
|
|
15
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Configures the branding level.
|
|
35
|
+
*
|
|
36
|
+
* Branding levels are defined as:
|
|
37
|
+
* - `1`: Horizontale
|
|
38
|
+
* - `2`: Vertical
|
|
39
|
+
* - `3`: Verzelfstandigde agentschappen (Autonomous agencies)
|
|
40
|
+
* - `4`: Lokale besturen (Local governments)
|
|
41
|
+
*/
|
|
16
42
|
export type BrandingConfigLevel = 1 | 2 | 3 | 4;
|
|
43
|
+
/**
|
|
44
|
+
* @ignore
|
|
45
|
+
*/
|
|
17
46
|
export interface BrandingConfig {
|
|
18
47
|
allowOverride?: boolean;
|
|
19
48
|
level?: BrandingConfigLevel;
|
package/dist/client.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ export type Handlers = {
|
|
|
14
14
|
setProfile: Handler<Partial<ProfileConfig>, boolean>;
|
|
15
15
|
getProfile: Handler<undefined, Partial<ProfileConfig>>;
|
|
16
16
|
setMainLinks: Handler<Translatable<MainLink>[], boolean>;
|
|
17
|
-
addApplicationMenuLink: Handler<ApplicationMenuLink
|
|
18
|
-
addApplicationMenuLinks: Handler<ApplicationMenuLink[], ApplicationMenuLink[]>;
|
|
19
|
-
setApplicationMenuLinks: Handler<ApplicationMenuLink[], ApplicationMenuLink[]>;
|
|
17
|
+
addApplicationMenuLink: Handler<Translatable<ApplicationMenuLink>, Translatable<ApplicationMenuLink>[]>;
|
|
18
|
+
addApplicationMenuLinks: Handler<Translatable<ApplicationMenuLink>[], Translatable<ApplicationMenuLink>[]>;
|
|
19
|
+
setApplicationMenuLinks: Handler<Translatable<ApplicationMenuLink>[], Translatable<ApplicationMenuLink>[]>;
|
|
20
20
|
setNavigationEnabled: Handler<boolean, boolean>;
|
|
21
21
|
getBrandingLevel: Handler<undefined, number>;
|
|
22
22
|
setBrandingLevel: Handler<number, boolean>;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { I18n } from './i18n';
|
|
2
2
|
import { AlertConfig } from './alert';
|
|
3
3
|
import { BrandingConfig } from './branding';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
4
7
|
export type PluginTypeId = 'contact' | 'citizen_profile';
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
5
11
|
export interface Config {
|
|
6
12
|
branding: BrandingConfig;
|
|
7
13
|
alert: AlertConfig;
|
package/dist/contact.d.ts
CHANGED
|
@@ -1,93 +1,330 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the channel through which cobrowsing is initiated.
|
|
3
|
+
*
|
|
4
|
+
* Possible values are:
|
|
5
|
+
* - `'link-mobile'`: Cobrowse is shown next to a telephone link.
|
|
6
|
+
* - `'chat'`: Cobrowse is shown in the chat interface.
|
|
7
|
+
*/
|
|
1
8
|
export type CobrowseChannel = 'link-mobile' | 'chat';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for the cobrowse functionality.
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
2
13
|
export interface CobrowseConfig {
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, cobrowse functionality will be enabled. If `false`, it will be hidden.
|
|
16
|
+
*/
|
|
3
17
|
isEnabled: boolean;
|
|
4
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The cobrowse license key.
|
|
20
|
+
* For more information, refer to the documentation:
|
|
21
|
+
* {@link https://docs.cobrowse.io/sdk-installation/web#add-your-license-key Cobrowse SDK Installation}.
|
|
22
|
+
*/
|
|
23
|
+
licenseKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* An array of channels where cobrowse functionality is shown.
|
|
26
|
+
* Possible values are:
|
|
27
|
+
* - `'link-mobile'`: Shown next to a telephone link.
|
|
28
|
+
* - `'chat'`: Shown in the chat interface.
|
|
29
|
+
*/
|
|
5
30
|
channels: CobrowseChannel[];
|
|
31
|
+
/**
|
|
32
|
+
* An optional HTML string containing a custom consent text.
|
|
33
|
+
*/
|
|
6
34
|
consent: CobrowseConsentConfig;
|
|
7
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Configuration for cobrowse consent.
|
|
38
|
+
* @ignore
|
|
39
|
+
*/
|
|
8
40
|
export interface CobrowseConsentConfig {
|
|
41
|
+
/**
|
|
42
|
+
* The title of the consent form.
|
|
43
|
+
*/
|
|
9
44
|
title: string;
|
|
45
|
+
/**
|
|
46
|
+
* The HTML content of the consent form.
|
|
47
|
+
*/
|
|
10
48
|
htmlContent: string;
|
|
11
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Endpoints for the contact service.
|
|
52
|
+
*/
|
|
12
53
|
export type ContactServiceEndpoints = Partial<{
|
|
54
|
+
/**
|
|
55
|
+
* Endpoint for contact channels.
|
|
56
|
+
*/
|
|
13
57
|
channels: string;
|
|
58
|
+
/**
|
|
59
|
+
* Endpoint for chat satisfaction rating.
|
|
60
|
+
*/
|
|
14
61
|
chatCsat: string;
|
|
62
|
+
/**
|
|
63
|
+
* Endpoint to send an email.
|
|
64
|
+
*/
|
|
15
65
|
sendEmail: string;
|
|
66
|
+
/**
|
|
67
|
+
* WebSocket URL for chat.
|
|
68
|
+
*/
|
|
16
69
|
chatSocket: string;
|
|
70
|
+
/**
|
|
71
|
+
* Endpoint to request a callback.
|
|
72
|
+
*/
|
|
17
73
|
requestCallMe: string;
|
|
74
|
+
/**
|
|
75
|
+
* Endpoint to send mail form data.
|
|
76
|
+
*/
|
|
18
77
|
sendMailFormDataMessage: string;
|
|
19
78
|
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Configuration for the contact plugin.
|
|
81
|
+
* @ignore
|
|
82
|
+
*/
|
|
20
83
|
export interface ContactConfig {
|
|
84
|
+
/**
|
|
85
|
+
* The type of plugin. Should always be `'contact'` for this configuration.
|
|
86
|
+
*/
|
|
21
87
|
pluginTypeId: 'contact';
|
|
88
|
+
/**
|
|
89
|
+
* Cobrowse configuration.
|
|
90
|
+
*/
|
|
22
91
|
cobrowse: CobrowseConfig;
|
|
92
|
+
/**
|
|
93
|
+
* The default context for the contact plugin.
|
|
94
|
+
*/
|
|
23
95
|
defaultContext: string;
|
|
96
|
+
/**
|
|
97
|
+
* The endpoints for the contact service.
|
|
98
|
+
*/
|
|
24
99
|
serviceEndpoints: ContactServiceEndpoints;
|
|
25
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Represents a base option for contact or link types.
|
|
103
|
+
*/
|
|
26
104
|
type ContactOptionType = 'contactOption';
|
|
27
105
|
type LinkType = 'link';
|
|
28
106
|
interface BaseOption {
|
|
107
|
+
/**
|
|
108
|
+
* The type of the option, either a contact option or a link.
|
|
109
|
+
*/
|
|
29
110
|
type: ContactOptionType | LinkType;
|
|
111
|
+
/**
|
|
112
|
+
* The label for the option.
|
|
113
|
+
*/
|
|
30
114
|
label?: string;
|
|
31
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Represents a reference to a contact option.
|
|
118
|
+
*/
|
|
32
119
|
export interface ContactOptionRef extends BaseOption {
|
|
120
|
+
/**
|
|
121
|
+
* Specifies that the option is a contact option.
|
|
122
|
+
*/
|
|
33
123
|
type: ContactOptionType;
|
|
124
|
+
/**
|
|
125
|
+
* The ID of the contact group associated with this option.
|
|
126
|
+
*/
|
|
34
127
|
contactGroupId: string;
|
|
35
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Represents a link option.
|
|
131
|
+
*/
|
|
36
132
|
interface Link extends BaseOption {
|
|
133
|
+
/**
|
|
134
|
+
* Specifies that the option is a link.
|
|
135
|
+
*/
|
|
37
136
|
type: LinkType;
|
|
137
|
+
/**
|
|
138
|
+
* The URL the link points to.
|
|
139
|
+
*/
|
|
38
140
|
href: string;
|
|
141
|
+
/**
|
|
142
|
+
* The name of the link.
|
|
143
|
+
*/
|
|
39
144
|
name?: string;
|
|
40
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Possible display modes for service points.
|
|
148
|
+
*/
|
|
41
149
|
type DisplayMode = 'grouped';
|
|
42
|
-
export type ServicePoint = ContactOption | ContactOptionRef | Link;
|
|
43
150
|
export type EnrichedServicePoint = ContactOption | Link;
|
|
151
|
+
/**
|
|
152
|
+
* Represents a service point, either enriched or a contact option reference.
|
|
153
|
+
*/
|
|
154
|
+
export type ServicePoint = EnrichedServicePoint | ContactOptionRef;
|
|
155
|
+
/**
|
|
156
|
+
* Configuration for service points.
|
|
157
|
+
*/
|
|
44
158
|
export interface ServicePoints {
|
|
159
|
+
/**
|
|
160
|
+
* The display mode for the service points.
|
|
161
|
+
*/
|
|
45
162
|
displayMode?: DisplayMode;
|
|
163
|
+
/**
|
|
164
|
+
* The label for the group of service points.
|
|
165
|
+
*/
|
|
46
166
|
groupLabel?: string;
|
|
167
|
+
/**
|
|
168
|
+
* The contextual service points.
|
|
169
|
+
*/
|
|
47
170
|
contextual?: ServicePoint[] | null;
|
|
171
|
+
/**
|
|
172
|
+
* The default service points.
|
|
173
|
+
*/
|
|
48
174
|
defaults?: ServicePoint[] | null;
|
|
49
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Enriched version of the service points, ensuring that both `contextual` and `defaults` are non-null.
|
|
178
|
+
*/
|
|
50
179
|
export interface EnrichedServicePoints extends ServicePoints {
|
|
180
|
+
/**
|
|
181
|
+
* The contextual service points.
|
|
182
|
+
*/
|
|
51
183
|
contextual: EnrichedServicePoint[];
|
|
184
|
+
/**
|
|
185
|
+
* The default service points.
|
|
186
|
+
*/
|
|
52
187
|
defaults: EnrichedServicePoint[];
|
|
53
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Social media platforms for contact options.
|
|
191
|
+
*/
|
|
54
192
|
export type ContactOptionSocialPlatform = 'facebook' | 'twitter' | 'instagram' | 'linkedin' | 'youtube' | 'x';
|
|
193
|
+
/**
|
|
194
|
+
* Represents a contact option.
|
|
195
|
+
*/
|
|
55
196
|
export interface ContactOption extends Record<string, unknown> {
|
|
197
|
+
/**
|
|
198
|
+
* The label for the contact option.
|
|
199
|
+
*/
|
|
56
200
|
label: string;
|
|
201
|
+
/**
|
|
202
|
+
* The key associated with the contact option.
|
|
203
|
+
*/
|
|
57
204
|
key: string;
|
|
205
|
+
/**
|
|
206
|
+
* The name of the contact option.
|
|
207
|
+
*/
|
|
58
208
|
name: string;
|
|
209
|
+
/**
|
|
210
|
+
* Optional description or information about the contact option.
|
|
211
|
+
*/
|
|
59
212
|
about?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Optional ID for API purposes.
|
|
215
|
+
*/
|
|
60
216
|
ouapi_id?: string;
|
|
217
|
+
/**
|
|
218
|
+
* The category for this configuration.
|
|
219
|
+
*/
|
|
61
220
|
configCategory?: 'CONTACTOPTIES';
|
|
221
|
+
/**
|
|
222
|
+
* Timestamp of when the contact option was created.
|
|
223
|
+
*/
|
|
62
224
|
createdAt?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Timestamp of when the contact option was last modified.
|
|
227
|
+
*/
|
|
63
228
|
lastModifiedAt?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Channels associated with the contact option.
|
|
231
|
+
*/
|
|
64
232
|
channels?: Channel[];
|
|
233
|
+
/**
|
|
234
|
+
* Social media links related to this contact option.
|
|
235
|
+
*/
|
|
65
236
|
social?: {
|
|
237
|
+
/**
|
|
238
|
+
* Optional description of the social media section.
|
|
239
|
+
*/
|
|
66
240
|
description?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Array of social media links.
|
|
243
|
+
*/
|
|
67
244
|
media?: {
|
|
245
|
+
/**
|
|
246
|
+
* The social media platform.
|
|
247
|
+
*/
|
|
68
248
|
icon: ContactOptionSocialPlatform;
|
|
249
|
+
/**
|
|
250
|
+
* Optional text to describe the link.
|
|
251
|
+
*/
|
|
69
252
|
text?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Optional description of the social media link.
|
|
255
|
+
*/
|
|
70
256
|
description?: string;
|
|
257
|
+
/**
|
|
258
|
+
* The URL of the social media link.
|
|
259
|
+
*/
|
|
71
260
|
url: string;
|
|
72
261
|
}[];
|
|
73
262
|
};
|
|
263
|
+
/**
|
|
264
|
+
* Subject of the contact option.
|
|
265
|
+
*/
|
|
74
266
|
subject?: string;
|
|
267
|
+
/**
|
|
268
|
+
* Person or entity requesting the contact option.
|
|
269
|
+
*/
|
|
75
270
|
requestedBy?: string;
|
|
271
|
+
/**
|
|
272
|
+
* Privacy settings related to the contact option.
|
|
273
|
+
*/
|
|
76
274
|
privacy?: ContactPrivacy;
|
|
77
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Represents privacy settings for contact options.
|
|
278
|
+
*/
|
|
78
279
|
interface ContactPrivacy {
|
|
280
|
+
/**
|
|
281
|
+
* GDPR-related privacy information.
|
|
282
|
+
*/
|
|
79
283
|
gdpr: string;
|
|
80
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Represents the icon types for channels.
|
|
287
|
+
*/
|
|
81
288
|
export type ChannelIcon = 'call' | 'mail' | 'chat' | 'screen' | 'location';
|
|
289
|
+
/**
|
|
290
|
+
* Represents the type of a channel.
|
|
291
|
+
*/
|
|
82
292
|
export type ChannelType = 'link-mobile' | 'form' | 'chat' | 'link' | 'location';
|
|
293
|
+
/**
|
|
294
|
+
* Represents a channel for communication.
|
|
295
|
+
*/
|
|
83
296
|
export interface Channel {
|
|
297
|
+
/**
|
|
298
|
+
* Optional ID of the channel.
|
|
299
|
+
*/
|
|
84
300
|
id?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Name of the channel.
|
|
303
|
+
*/
|
|
85
304
|
name: string;
|
|
305
|
+
/**
|
|
306
|
+
* Optional icon representing the channel.
|
|
307
|
+
*/
|
|
86
308
|
icon?: ChannelIcon;
|
|
309
|
+
/**
|
|
310
|
+
* The type of channel.
|
|
311
|
+
*/
|
|
87
312
|
type: ChannelType;
|
|
313
|
+
/**
|
|
314
|
+
* Optional URL for the channel.
|
|
315
|
+
*/
|
|
88
316
|
url?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Optional additional information about the channel.
|
|
319
|
+
*/
|
|
89
320
|
information?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Optional contact line ID.
|
|
323
|
+
*/
|
|
90
324
|
ouapi_contactline_id?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Optional structured information for forms or additional data.
|
|
327
|
+
*/
|
|
91
328
|
value?: null | {
|
|
92
329
|
name: string;
|
|
93
330
|
address: string;
|
|
@@ -107,6 +344,9 @@ export interface Channel {
|
|
|
107
344
|
};
|
|
108
345
|
}[];
|
|
109
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* Availability details for the channel.
|
|
349
|
+
*/
|
|
110
350
|
availability?: {
|
|
111
351
|
openInformation?: string;
|
|
112
352
|
closedInformation?: string;
|
|
@@ -115,10 +355,16 @@ export interface Channel {
|
|
|
115
355
|
exceptions?: ContactOptionAvailabilityException[];
|
|
116
356
|
remark: string;
|
|
117
357
|
};
|
|
358
|
+
/**
|
|
359
|
+
* Opening hours status for the channel.
|
|
360
|
+
*/
|
|
118
361
|
opening_hours?: {
|
|
119
362
|
is_open: boolean;
|
|
120
363
|
};
|
|
121
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* Remarks for contact option time slots.
|
|
367
|
+
*/
|
|
122
368
|
declare enum ContactOptionTimeSlotRemark {
|
|
123
369
|
OPEN = "OPEN",
|
|
124
370
|
APPOINTMENT = "APPOINTMENT",
|
|
@@ -126,15 +372,42 @@ declare enum ContactOptionTimeSlotRemark {
|
|
|
126
372
|
DIGITAL = "DIGITAL",
|
|
127
373
|
OTHER = "OTHER"
|
|
128
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* Represents a time slot for contact availability.
|
|
377
|
+
*/
|
|
129
378
|
interface ContactOptionTimeSlot {
|
|
379
|
+
/**
|
|
380
|
+
* Start time of the slot.
|
|
381
|
+
*/
|
|
130
382
|
from: string;
|
|
383
|
+
/**
|
|
384
|
+
* End time of the slot.
|
|
385
|
+
*/
|
|
131
386
|
to: string;
|
|
387
|
+
/**
|
|
388
|
+
* Optional remark associated with the time slot.
|
|
389
|
+
*/
|
|
132
390
|
remark?: ContactOptionTimeSlotRemark;
|
|
391
|
+
/**
|
|
392
|
+
* Optional custom remark for the time slot.
|
|
393
|
+
*/
|
|
133
394
|
customRemark?: string;
|
|
134
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Represents an exception for contact option availability.
|
|
398
|
+
*/
|
|
135
399
|
interface ContactOptionAvailabilityException {
|
|
400
|
+
/**
|
|
401
|
+
* Date of the exception.
|
|
402
|
+
*/
|
|
136
403
|
date?: string;
|
|
404
|
+
/**
|
|
405
|
+
* Information related to the exception.
|
|
406
|
+
*/
|
|
137
407
|
information?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Time slots for the exception.
|
|
410
|
+
*/
|
|
138
411
|
hours?: ContactOptionTimeSlot[];
|
|
139
412
|
}
|
|
140
413
|
export {};
|