-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWifiAccessibility.ts
More file actions
128 lines (124 loc) · 3.12 KB
/
Copy pathWifiAccessibility.ts
File metadata and controls
128 lines (124 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import { SchemaDefinition } from '@sozialhelden/simpl-schema';
import { AccessType, AccessTypes } from './AccessType.js';
import { CurrencyValue } from './CurrencyValue.js';
import { getLocalizedStringSchemaDefinition, LocalizedString } from './LocalizedString.js';
export const WifiInteractions = [
'login',
'register',
'getPassword',
'getGuestPass',
'getTerms',
'acceptTerms',
] as const;
export type WifiInteraction = typeof WifiInteractions[number];
export const WifiInteractionsSet = new Set(WifiInteractions);
/**
* Describes the presence of staff and their qualifications and/or provided services.
*/
export interface WifiAccessibility {
/**
* `true` if the wifi is open to everyone, `false` if it is explicitly not.
*/
isOpenToEveryone?: boolean;
/**
* `true` if the wifi is open to explicit place visitors, `false` if explicitly not.
*/
isOpenToVisitors?: boolean;
/**
* `true` if the wifi is open to explicit place staff, `false` if explicitly not.
*/
isOpenToStaff?: boolean;
/**
* `true` if the wifi has a fixed password. Knowing this password must be enough to enter and use
* the wifi.
*/
hasFixedPassword?: boolean;
/**
* A string with the Wifi name (SSID). Only use this attribute if security allows to publish this
* info online publicly.
*/
ssid?: string;
/**
* A string with the Wifi password. Only use this attribute if security allows to publish this
* info online publicly.
*/
password?: string;
/**
* `true` if you need a personalized guest pass / code / password to use the wifi, `false` if not.
*/
needsGuestPass?: boolean;
/**
* Describes where you get the login data / guest pass.
*/
descriptionWhereToGetLoginData?: LocalizedString;
/**
* `true` if the wifi has a captive portal website.
*/
hasCaptivePortal?: boolean;
/**
* `true` if the wifi captive portal is accessible (WAI/ARIA).
*/
isCaptivePortalAccessible?: boolean;
/**
* Describes if you need to pay a usage fee to use the wifi, or if no fee is needed.
*/
usageFee?: CurrencyValue[];
/**
* Describes who can access the wifi.
*/
access?: AccessType[];
}
export const getWifiAccessibilitySchemaDefinition: () => SchemaDefinition = () => ({
isOpenToEveryone: {
type: Boolean,
optional: true,
},
isOpenToVisitors: {
type: Boolean,
optional: true,
},
isOpenToStaff: {
type: Boolean,
optional: true,
},
hasFixedPassword: {
type: Boolean,
optional: true,
},
needsGuestPass: {
type: Boolean,
optional: true,
},
hasCaptivePortal: {
type: Boolean,
optional: true,
},
isCaptivePortalAccessible: {
type: Boolean,
optional: true,
},
ssid: {
type: String,
optional: true,
},
password: {
type: String,
optional: true,
},
...getLocalizedStringSchemaDefinition('descriptionWhereToGetLoginData', {
}),
usageFee: {
type: Array,
optional: true,
},
access: {
type: Array,
optional: true,
},
'access.$': {
type: String,
allowedValues: (AccessTypes as any) as any[],
},
...getLocalizedStringSchemaDefinition('usageFee.$', {
}),
});