@spottoai/types-package 1.0.2-beta.423 → 1.0.2-beta.425
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/azure/governance.d.ts +5 -0
- package/dist/azure/governance.d.ts.map +1 -1
- package/dist/azure/reportEvidence.d.ts +19 -3
- package/dist/azure/reportEvidence.d.ts.map +1 -1
- package/dist/azure/reportEvidence.js.map +1 -1
- package/dist/azure/reportEvidenceValidation.d.ts.map +1 -1
- package/dist/azure/reportEvidenceValidation.js +14 -0
- package/dist/azure/reportEvidenceValidation.js.map +1 -1
- package/dist/esm/azure/reportEvidenceValidation.js +14 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/scheduler/bastionSchedule.js +1 -0
- package/dist/esm/scheduler/bastionScheduleProfile.js +206 -0
- package/dist/esm/scheduler/bastionScheduleValidation.js +399 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/scheduler/bastionSchedule.d.ts +113 -0
- package/dist/scheduler/bastionSchedule.d.ts.map +1 -0
- package/dist/scheduler/bastionSchedule.js +3 -0
- package/dist/scheduler/bastionSchedule.js.map +1 -0
- package/dist/scheduler/bastionScheduleProfile.d.ts +24 -0
- package/dist/scheduler/bastionScheduleProfile.d.ts.map +1 -0
- package/dist/scheduler/bastionScheduleProfile.js +210 -0
- package/dist/scheduler/bastionScheduleProfile.js.map +1 -0
- package/dist/scheduler/bastionScheduleValidation.d.ts +10 -0
- package/dist/scheduler/bastionScheduleValidation.d.ts.map +1 -0
- package/dist/scheduler/bastionScheduleValidation.js +410 -0
- package/dist/scheduler/bastionScheduleValidation.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +159 -6
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
const MAX_IDENTIFIER_LENGTH = 2048;
|
|
2
|
+
const MAX_ETAG_LENGTH = 4096;
|
|
3
|
+
const MAX_LOCATION_LENGTH = 128;
|
|
4
|
+
const MAX_IP_CONFIGURATION_NAME_LENGTH = 80;
|
|
5
|
+
const MAX_TAG_COUNT = 50;
|
|
6
|
+
const MAX_TAG_NAME_LENGTH = 512;
|
|
7
|
+
const MAX_TAG_VALUE_LENGTH = 256;
|
|
8
|
+
function isPlainRecord(value) {
|
|
9
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
10
|
+
return false;
|
|
11
|
+
const prototype = Reflect.getPrototypeOf(value);
|
|
12
|
+
return prototype === Object.prototype || prototype === null;
|
|
13
|
+
}
|
|
14
|
+
function hasOnlyFields(value, fields) {
|
|
15
|
+
const allowed = new Set(fields);
|
|
16
|
+
return Object.keys(value).every(field => allowed.has(field));
|
|
17
|
+
}
|
|
18
|
+
function readString(value, maximumLength) {
|
|
19
|
+
if (typeof value !== 'string' || value.trim().length === 0 || value.length > maximumLength)
|
|
20
|
+
return undefined;
|
|
21
|
+
return value.trim();
|
|
22
|
+
}
|
|
23
|
+
function normalizeResourceId(value) {
|
|
24
|
+
const resourceId = readString(value, MAX_IDENTIFIER_LENGTH);
|
|
25
|
+
if (!resourceId || resourceId.includes('\\') || resourceId.includes('//') || resourceId.endsWith('/'))
|
|
26
|
+
return undefined;
|
|
27
|
+
return resourceId.toLowerCase();
|
|
28
|
+
}
|
|
29
|
+
function readBastionSubscriptionId(resourceId) {
|
|
30
|
+
return /^\/subscriptions\/([a-z0-9-]+)\/resourcegroups\/[a-z0-9._()-]+\/providers\/microsoft\.network\/bastionhosts\/[a-z0-9._()-]+$/.exec(resourceId)?.[1];
|
|
31
|
+
}
|
|
32
|
+
function readBoolean(value) {
|
|
33
|
+
return value === undefined ? false : typeof value === 'boolean' ? value : undefined;
|
|
34
|
+
}
|
|
35
|
+
function readTags(value) {
|
|
36
|
+
if (value === undefined)
|
|
37
|
+
return {};
|
|
38
|
+
if (!isPlainRecord(value) || Object.keys(value).length > MAX_TAG_COUNT)
|
|
39
|
+
return undefined;
|
|
40
|
+
const entries = [];
|
|
41
|
+
for (const key of Object.keys(value).sort()) {
|
|
42
|
+
const tagValue = value[key];
|
|
43
|
+
if (key.length === 0 || key.length > MAX_TAG_NAME_LENGTH || typeof tagValue !== 'string' || tagValue.length > MAX_TAG_VALUE_LENGTH) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
entries.push([key, tagValue]);
|
|
47
|
+
}
|
|
48
|
+
return Object.fromEntries(entries);
|
|
49
|
+
}
|
|
50
|
+
function readZones(value) {
|
|
51
|
+
if (value === undefined)
|
|
52
|
+
return undefined;
|
|
53
|
+
if (!Array.isArray(value) ||
|
|
54
|
+
value.length < 1 ||
|
|
55
|
+
value.length > 3 ||
|
|
56
|
+
!value.every(zone => typeof zone === 'string' && /^[1-3]$/.test(zone)) ||
|
|
57
|
+
new Set(value).size !== value.length) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return [...value].sort();
|
|
61
|
+
}
|
|
62
|
+
function readSku(value) {
|
|
63
|
+
if (!isPlainRecord(value) || !hasOnlyFields(value, ['name']))
|
|
64
|
+
return undefined;
|
|
65
|
+
const name = value['name'];
|
|
66
|
+
return name === 'Basic' || name === 'Standard' || name === 'Premium' ? name : undefined;
|
|
67
|
+
}
|
|
68
|
+
/** Normalizes an eligible public dedicated Azure Bastion profile for schedule readiness and recovery. */
|
|
69
|
+
export function readSupportedBastionScheduleProfileV1(value, expectedResourceId) {
|
|
70
|
+
try {
|
|
71
|
+
if (!isPlainRecord(value) ||
|
|
72
|
+
!hasOnlyFields(value, ['name', 'id', 'etag', 'type', 'location', 'tags', 'sku', 'properties', 'systemData', 'zones'])) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
const normalizedExpectedResourceId = normalizeResourceId(expectedResourceId);
|
|
76
|
+
const normalizedSourceResourceId = normalizeResourceId(value['id']);
|
|
77
|
+
const bastionSubscriptionId = normalizedSourceResourceId ? readBastionSubscriptionId(normalizedSourceResourceId) : undefined;
|
|
78
|
+
const resourceType = readString(value['type'], MAX_IDENTIFIER_LENGTH)?.toLowerCase();
|
|
79
|
+
const sourceEtag = readString(value['etag'], MAX_ETAG_LENGTH);
|
|
80
|
+
const location = readString(value['location'], MAX_LOCATION_LENGTH)?.toLowerCase();
|
|
81
|
+
const tags = readTags(value['tags']);
|
|
82
|
+
const skuName = readSku(value['sku']);
|
|
83
|
+
const zones = readZones(value['zones']);
|
|
84
|
+
if (!normalizedExpectedResourceId ||
|
|
85
|
+
normalizedSourceResourceId !== normalizedExpectedResourceId ||
|
|
86
|
+
!bastionSubscriptionId ||
|
|
87
|
+
resourceType !== 'microsoft.network/bastionhosts' ||
|
|
88
|
+
!sourceEtag ||
|
|
89
|
+
!location ||
|
|
90
|
+
!tags ||
|
|
91
|
+
!skuName ||
|
|
92
|
+
zones === false) {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
if (!isPlainRecord(value['properties']) ||
|
|
96
|
+
!hasOnlyFields(value['properties'], [
|
|
97
|
+
'provisioningState',
|
|
98
|
+
'dnsName',
|
|
99
|
+
'publicUri',
|
|
100
|
+
'scaleUnits',
|
|
101
|
+
'disableCopyPaste',
|
|
102
|
+
'enableFileCopy',
|
|
103
|
+
'enableIpConnect',
|
|
104
|
+
'enableShareableLink',
|
|
105
|
+
'enableTunneling',
|
|
106
|
+
'enableKerberos',
|
|
107
|
+
'enableSessionRecording',
|
|
108
|
+
'enablePrivateOnlyBastion',
|
|
109
|
+
'ipConfigurations',
|
|
110
|
+
'networkAcls',
|
|
111
|
+
'virtualNetwork',
|
|
112
|
+
]) ||
|
|
113
|
+
value['properties']['provisioningState'] !== 'Succeeded' ||
|
|
114
|
+
value['properties']['networkAcls'] !== undefined ||
|
|
115
|
+
value['properties']['virtualNetwork'] !== undefined) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
const properties = value['properties'];
|
|
119
|
+
const scaleUnits = properties['scaleUnits'];
|
|
120
|
+
if (typeof scaleUnits !== 'number' ||
|
|
121
|
+
!Number.isInteger(scaleUnits) ||
|
|
122
|
+
(skuName === 'Basic' ? scaleUnits !== 2 : scaleUnits < 2 || scaleUnits > 50)) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const disableCopyPaste = readBoolean(properties['disableCopyPaste']);
|
|
126
|
+
const enableFileCopy = readBoolean(properties['enableFileCopy']);
|
|
127
|
+
const enableIpConnect = readBoolean(properties['enableIpConnect']);
|
|
128
|
+
const enableShareableLink = readBoolean(properties['enableShareableLink']);
|
|
129
|
+
const enableTunneling = readBoolean(properties['enableTunneling']);
|
|
130
|
+
const enableKerberos = readBoolean(properties['enableKerberos']);
|
|
131
|
+
const enableSessionRecording = readBoolean(properties['enableSessionRecording']);
|
|
132
|
+
const enablePrivateOnlyBastion = readBoolean(properties['enablePrivateOnlyBastion']);
|
|
133
|
+
if (disableCopyPaste === undefined ||
|
|
134
|
+
enableFileCopy === undefined ||
|
|
135
|
+
enableIpConnect === undefined ||
|
|
136
|
+
enableShareableLink === undefined ||
|
|
137
|
+
enableTunneling === undefined ||
|
|
138
|
+
enableKerberos === undefined ||
|
|
139
|
+
enableSessionRecording !== false ||
|
|
140
|
+
enablePrivateOnlyBastion !== false ||
|
|
141
|
+
(skuName === 'Basic' && (enableFileCopy || enableIpConnect || enableShareableLink || enableTunneling || enableKerberos))) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
const configurations = properties['ipConfigurations'];
|
|
145
|
+
if (!Array.isArray(configurations) || configurations.length !== 1)
|
|
146
|
+
return undefined;
|
|
147
|
+
const configuration = configurations[0];
|
|
148
|
+
if (!isPlainRecord(configuration) ||
|
|
149
|
+
!hasOnlyFields(configuration, ['name', 'id', 'etag', 'type', 'properties']) ||
|
|
150
|
+
!isPlainRecord(configuration['properties']) ||
|
|
151
|
+
!hasOnlyFields(configuration['properties'], ['provisioningState', 'privateIPAllocationMethod', 'publicIPAddress', 'subnet']) ||
|
|
152
|
+
(configuration['properties']['provisioningState'] !== undefined && configuration['properties']['provisioningState'] !== 'Succeeded') ||
|
|
153
|
+
configuration['properties']['privateIPAllocationMethod'] !== 'Dynamic') {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
const ipConfigurationName = readString(configuration['name'], MAX_IP_CONFIGURATION_NAME_LENGTH);
|
|
157
|
+
const publicIp = configuration['properties']['publicIPAddress'];
|
|
158
|
+
const subnet = configuration['properties']['subnet'];
|
|
159
|
+
if (!ipConfigurationName ||
|
|
160
|
+
!isPlainRecord(publicIp) ||
|
|
161
|
+
!hasOnlyFields(publicIp, ['id']) ||
|
|
162
|
+
!isPlainRecord(subnet) ||
|
|
163
|
+
!hasOnlyFields(subnet, ['id'])) {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
const publicIpId = normalizeResourceId(publicIp['id']);
|
|
167
|
+
const subnetId = normalizeResourceId(subnet['id']);
|
|
168
|
+
const publicIpMatch = publicIpId
|
|
169
|
+
? /^\/subscriptions\/([a-z0-9-]+)\/resourcegroups\/[a-z0-9._()-]+\/providers\/microsoft\.network\/publicipaddresses\/[a-z0-9._()-]+$/.exec(publicIpId)
|
|
170
|
+
: undefined;
|
|
171
|
+
const subnetMatch = subnetId
|
|
172
|
+
? /^\/subscriptions\/([a-z0-9-]+)\/resourcegroups\/[a-z0-9._()-]+\/providers\/microsoft\.network\/virtualnetworks\/[a-z0-9._()-]+\/subnets\/azurebastionsubnet$/.exec(subnetId)
|
|
173
|
+
: undefined;
|
|
174
|
+
if (!publicIpId ||
|
|
175
|
+
!publicIpMatch ||
|
|
176
|
+
publicIpMatch[1] !== bastionSubscriptionId ||
|
|
177
|
+
!subnetId ||
|
|
178
|
+
!subnetMatch ||
|
|
179
|
+
subnetMatch[1] !== bastionSubscriptionId) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
skuName,
|
|
184
|
+
location,
|
|
185
|
+
...(zones ? { zones } : {}),
|
|
186
|
+
scaleUnits,
|
|
187
|
+
disableCopyPaste,
|
|
188
|
+
enableFileCopy,
|
|
189
|
+
enableIpConnect,
|
|
190
|
+
enableShareableLink,
|
|
191
|
+
enableTunneling,
|
|
192
|
+
enableKerberos,
|
|
193
|
+
enableSessionRecording: false,
|
|
194
|
+
enablePrivateOnlyBastion: false,
|
|
195
|
+
tags,
|
|
196
|
+
ipConfigurationName,
|
|
197
|
+
publicIpId,
|
|
198
|
+
subnetId,
|
|
199
|
+
virtualNetworkId: subnetId.slice(0, subnetId.lastIndexOf('/subnets/')),
|
|
200
|
+
sourceEtag,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
const MAX_ID_LENGTH = 2048;
|
|
2
|
+
const MAX_NAME_LENGTH = 120;
|
|
3
|
+
const MAX_NOTES_LENGTH = 1000;
|
|
4
|
+
const MAX_ACTION_COUNT = 64;
|
|
5
|
+
const MAX_WINDOWS = 14;
|
|
6
|
+
const MAX_WRITE_REQUEST_BYTES = 32 * 1024;
|
|
7
|
+
const MAX_PUBLIC_DTO_BYTES = 16 * 1024;
|
|
8
|
+
const MINUTES_PER_WEEK = 7 * 24 * 60;
|
|
9
|
+
const readinessStatuses = new Set(['confirmed', 'missing', 'unknown', 'unsupported']);
|
|
10
|
+
const readinessReasonCodes = new Set([
|
|
11
|
+
'feature-disabled',
|
|
12
|
+
'resource-not-found',
|
|
13
|
+
'unsupported-profile',
|
|
14
|
+
'unsupported-region',
|
|
15
|
+
'missing-permission',
|
|
16
|
+
'permission-unknown',
|
|
17
|
+
'management-lock',
|
|
18
|
+
]);
|
|
19
|
+
const availabilityPhases = new Set(['available', 'removing', 'absent', 'restoring']);
|
|
20
|
+
const availabilityResults = new Set(['succeeded', 'skipped', 'blocked', 'failed', 'pending']);
|
|
21
|
+
const availabilityReasonCodes = new Set([
|
|
22
|
+
...readinessReasonCodes,
|
|
23
|
+
'active-sessions',
|
|
24
|
+
'session-state-unknown',
|
|
25
|
+
'snapshot-failed',
|
|
26
|
+
'active-snapshot-missing',
|
|
27
|
+
'source-drift',
|
|
28
|
+
'dependency-missing',
|
|
29
|
+
'dependency-drift',
|
|
30
|
+
'stale-run',
|
|
31
|
+
'continuation-overdue',
|
|
32
|
+
'azure-operation-failed',
|
|
33
|
+
'restore-timeout',
|
|
34
|
+
]);
|
|
35
|
+
function isPlainRecord(value) {
|
|
36
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const prototype = Object.getPrototypeOf(value);
|
|
41
|
+
return prototype === Object.prototype || prototype === null;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function hasExactFields(value, requiredFields, optionalFields = []) {
|
|
48
|
+
if (!isPlainRecord(value)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
const allowedFields = new Set([...requiredFields, ...optionalFields]);
|
|
53
|
+
const keys = Object.keys(value);
|
|
54
|
+
return requiredFields.every(field => Object.prototype.hasOwnProperty.call(value, field)) && keys.every(field => allowedFields.has(field));
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function utf8ByteLength(value) {
|
|
61
|
+
let bytes = 0;
|
|
62
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
63
|
+
const code = value.charCodeAt(index);
|
|
64
|
+
if (code <= 0x7f) {
|
|
65
|
+
bytes += 1;
|
|
66
|
+
}
|
|
67
|
+
else if (code <= 0x7ff) {
|
|
68
|
+
bytes += 2;
|
|
69
|
+
}
|
|
70
|
+
else if (code >= 0xd800 &&
|
|
71
|
+
code <= 0xdbff &&
|
|
72
|
+
index + 1 < value.length &&
|
|
73
|
+
value.charCodeAt(index + 1) >= 0xdc00 &&
|
|
74
|
+
value.charCodeAt(index + 1) <= 0xdfff) {
|
|
75
|
+
bytes += 4;
|
|
76
|
+
index += 1;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
bytes += 3;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return bytes;
|
|
83
|
+
}
|
|
84
|
+
function isWithinJsonSize(value, maximumBytes) {
|
|
85
|
+
try {
|
|
86
|
+
const json = JSON.stringify(value);
|
|
87
|
+
return typeof json === 'string' && utf8ByteLength(json) <= maximumBytes;
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function isBoundedString(value, maximumLength, allowEmpty = false) {
|
|
94
|
+
return typeof value === 'string' && value.length <= maximumLength && (allowEmpty || value.trim().length > 0);
|
|
95
|
+
}
|
|
96
|
+
function isPositiveSafeInteger(value) {
|
|
97
|
+
return Number.isSafeInteger(value) && typeof value === 'number' && value > 0;
|
|
98
|
+
}
|
|
99
|
+
function isIsoUtcTimestamp(value) {
|
|
100
|
+
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/.test(value)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const parsed = new Date(value);
|
|
104
|
+
if (!Number.isFinite(parsed.getTime())) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const normalizedInput = value.includes('.')
|
|
108
|
+
? value.replace(/\.(\d{1,3})Z$/, (_, fraction) => `.${fraction.padEnd(3, '0')}Z`)
|
|
109
|
+
: value.replace('Z', '.000Z');
|
|
110
|
+
return parsed.toISOString() === normalizedInput;
|
|
111
|
+
}
|
|
112
|
+
function localTimeToMinutes(value) {
|
|
113
|
+
if (typeof value !== 'string' || !/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(value)) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
const [hours, minutes] = value.split(':');
|
|
117
|
+
return Number(hours) * 60 + Number(minutes);
|
|
118
|
+
}
|
|
119
|
+
function isUniqueBoundedStringArray(value, minimumLength, maximumLength) {
|
|
120
|
+
if (!Array.isArray(value) ||
|
|
121
|
+
value.length < minimumLength ||
|
|
122
|
+
value.length > maximumLength ||
|
|
123
|
+
!value.every(item => isBoundedString(item, MAX_ID_LENGTH))) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
return new Set(value).size === value.length;
|
|
127
|
+
}
|
|
128
|
+
function isAvailabilityConfiguration(value) {
|
|
129
|
+
if (!hasExactFields(value, ['accessWindows'])) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const windows = value.accessWindows;
|
|
133
|
+
if (!Array.isArray(windows) || windows.length < 1 || windows.length > MAX_WINDOWS) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
const windowIds = new Set();
|
|
137
|
+
const intervals = [];
|
|
138
|
+
for (const window of windows) {
|
|
139
|
+
if (!hasExactFields(window, ['windowId', 'daysOfWeek', 'accessStartTimeLocal', 'accessEndTimeLocal']) ||
|
|
140
|
+
!isBoundedString(window.windowId, MAX_ID_LENGTH) ||
|
|
141
|
+
windowIds.has(window.windowId)) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
windowIds.add(window.windowId);
|
|
145
|
+
if (!Array.isArray(window.daysOfWeek) ||
|
|
146
|
+
window.daysOfWeek.length < 1 ||
|
|
147
|
+
window.daysOfWeek.length > 7 ||
|
|
148
|
+
!window.daysOfWeek.every(day => Number.isInteger(day) && typeof day === 'number' && day >= 0 && day <= 6) ||
|
|
149
|
+
new Set(window.daysOfWeek).size !== window.daysOfWeek.length) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
const startTime = localTimeToMinutes(window.accessStartTimeLocal);
|
|
153
|
+
const endTime = localTimeToMinutes(window.accessEndTimeLocal);
|
|
154
|
+
if (startTime === undefined || endTime === undefined || startTime === endTime) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
for (const day of window.daysOfWeek) {
|
|
158
|
+
const start = day * 24 * 60 + startTime;
|
|
159
|
+
const end = day * 24 * 60 + endTime + (endTime <= startTime ? 24 * 60 : 0);
|
|
160
|
+
intervals.push({ start, end });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return !intervals.some((left, leftIndex) => intervals.some((right, rightIndex) => {
|
|
164
|
+
if (rightIndex <= leftIndex) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
return [-MINUTES_PER_WEEK, 0, MINUTES_PER_WEEK].some(offset => {
|
|
168
|
+
const shiftedStart = right.start + offset;
|
|
169
|
+
const shiftedEnd = right.end + offset;
|
|
170
|
+
return left.start < shiftedEnd && shiftedStart < left.end;
|
|
171
|
+
});
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
export function isBastionAvailabilityWeeklyScheduleWriteRequest(value) {
|
|
175
|
+
if (!isWithinJsonSize(value, MAX_WRITE_REQUEST_BYTES) ||
|
|
176
|
+
!hasExactFields(value, [
|
|
177
|
+
'definitionType',
|
|
178
|
+
'name',
|
|
179
|
+
'providerName',
|
|
180
|
+
'providerScopeId',
|
|
181
|
+
'cloudAccountId',
|
|
182
|
+
'resourceId',
|
|
183
|
+
'timezone',
|
|
184
|
+
'acknowledgementVersion',
|
|
185
|
+
'configuration',
|
|
186
|
+
], ['targetResourceType', 'notes'])) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
return (value.definitionType === 'bastion-availability-weekly' &&
|
|
190
|
+
isBoundedString(value.name, MAX_NAME_LENGTH) &&
|
|
191
|
+
isBoundedString(value.providerName, MAX_ID_LENGTH) &&
|
|
192
|
+
isBoundedString(value.providerScopeId, MAX_ID_LENGTH) &&
|
|
193
|
+
isBoundedString(value.cloudAccountId, MAX_ID_LENGTH) &&
|
|
194
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
195
|
+
isBoundedString(value.timezone, MAX_ID_LENGTH) &&
|
|
196
|
+
(value.targetResourceType === undefined || value.targetResourceType === 'Microsoft.Network/bastionHosts') &&
|
|
197
|
+
(value.notes === undefined || isBoundedString(value.notes, MAX_NOTES_LENGTH, true)) &&
|
|
198
|
+
value.acknowledgementVersion === 'bastion-delete-recreate-v1' &&
|
|
199
|
+
isAvailabilityConfiguration(value.configuration));
|
|
200
|
+
}
|
|
201
|
+
export function isBastionAvailabilityWeeklyScheduleDefinition(value) {
|
|
202
|
+
if (!isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) ||
|
|
203
|
+
!hasExactFields(value, [
|
|
204
|
+
'definitionId',
|
|
205
|
+
'definitionClass',
|
|
206
|
+
'definitionType',
|
|
207
|
+
'companyId',
|
|
208
|
+
'providerName',
|
|
209
|
+
'providerScopeId',
|
|
210
|
+
'cloudAccountId',
|
|
211
|
+
'resourceId',
|
|
212
|
+
'targetResourceType',
|
|
213
|
+
'name',
|
|
214
|
+
'timezone',
|
|
215
|
+
'status',
|
|
216
|
+
'definitionRevision',
|
|
217
|
+
'acknowledgementVersion',
|
|
218
|
+
'configuration',
|
|
219
|
+
'createdAtUtc',
|
|
220
|
+
'updatedAtUtc',
|
|
221
|
+
], ['notes', 'compiledScheduleIds', 'nextRunUtc', 'lastRunAtUtc', 'lastSuccessfulRunAtUtc', 'lastRunStatus', 'createdByUserId', 'updatedByUserId'])) {
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
return (value.definitionId !== undefined &&
|
|
225
|
+
isBoundedString(value.definitionId, MAX_ID_LENGTH) &&
|
|
226
|
+
value.definitionClass === 'composite' &&
|
|
227
|
+
value.definitionType === 'bastion-availability-weekly' &&
|
|
228
|
+
isBoundedString(value.companyId, MAX_ID_LENGTH) &&
|
|
229
|
+
isBoundedString(value.providerName, MAX_ID_LENGTH) &&
|
|
230
|
+
isBoundedString(value.providerScopeId, MAX_ID_LENGTH) &&
|
|
231
|
+
isBoundedString(value.cloudAccountId, MAX_ID_LENGTH) &&
|
|
232
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
233
|
+
value.targetResourceType === 'Microsoft.Network/bastionHosts' &&
|
|
234
|
+
isBoundedString(value.name, MAX_NAME_LENGTH) &&
|
|
235
|
+
isBoundedString(value.timezone, MAX_ID_LENGTH) &&
|
|
236
|
+
(value.status === 'active' || value.status === 'paused') &&
|
|
237
|
+
isPositiveSafeInteger(value.definitionRevision) &&
|
|
238
|
+
value.acknowledgementVersion === 'bastion-delete-recreate-v1' &&
|
|
239
|
+
isAvailabilityConfiguration(value.configuration) &&
|
|
240
|
+
(value.notes === undefined || isBoundedString(value.notes, MAX_NOTES_LENGTH, true)) &&
|
|
241
|
+
(value.compiledScheduleIds === undefined || isUniqueBoundedStringArray(value.compiledScheduleIds, 0, 28)) &&
|
|
242
|
+
(value.nextRunUtc === undefined || isIsoUtcTimestamp(value.nextRunUtc)) &&
|
|
243
|
+
(value.lastRunAtUtc === undefined || isIsoUtcTimestamp(value.lastRunAtUtc)) &&
|
|
244
|
+
(value.lastSuccessfulRunAtUtc === undefined || isIsoUtcTimestamp(value.lastSuccessfulRunAtUtc)) &&
|
|
245
|
+
(value.lastRunStatus === undefined ||
|
|
246
|
+
value.lastRunStatus === 'success' ||
|
|
247
|
+
value.lastRunStatus === 'dispatch-failed' ||
|
|
248
|
+
value.lastRunStatus === 'dispatching') &&
|
|
249
|
+
isIsoUtcTimestamp(value.createdAtUtc) &&
|
|
250
|
+
isIsoUtcTimestamp(value.updatedAtUtc) &&
|
|
251
|
+
(value.createdByUserId === undefined || isBoundedString(value.createdByUserId, MAX_ID_LENGTH)) &&
|
|
252
|
+
(value.updatedByUserId === undefined || isBoundedString(value.updatedByUserId, MAX_ID_LENGTH)));
|
|
253
|
+
}
|
|
254
|
+
export function isBastionScheduleRun(value) {
|
|
255
|
+
if (!isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) ||
|
|
256
|
+
!isPlainRecord(value) ||
|
|
257
|
+
(value['compiledOperation'] !== 'remove' && value['compiledOperation'] !== 'restore')) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
const commonRequiredFields = [
|
|
261
|
+
'scheduleId',
|
|
262
|
+
'scheduleRunId',
|
|
263
|
+
'targetType',
|
|
264
|
+
'selectorType',
|
|
265
|
+
'scheduleType',
|
|
266
|
+
'providerScopeId',
|
|
267
|
+
'cloudAccountId',
|
|
268
|
+
'resourceId',
|
|
269
|
+
'definitionId',
|
|
270
|
+
'definitionClass',
|
|
271
|
+
'definitionType',
|
|
272
|
+
'compiledRuleId',
|
|
273
|
+
'compiledOperation',
|
|
274
|
+
'definitionRevision',
|
|
275
|
+
'scheduledForUtc',
|
|
276
|
+
];
|
|
277
|
+
const requiredFields = value['compiledOperation'] === 'remove' ? [...commonRequiredFields, 'controlGeneration'] : commonRequiredFields;
|
|
278
|
+
if (!hasExactFields(value, requiredFields, [
|
|
279
|
+
'scheduleName',
|
|
280
|
+
'scheduleGroupId',
|
|
281
|
+
'scheduleGroupType',
|
|
282
|
+
'targetCount',
|
|
283
|
+
'createdByUserId',
|
|
284
|
+
'updatedByUserId',
|
|
285
|
+
])) {
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
return (isBoundedString(value.scheduleId, MAX_ID_LENGTH) &&
|
|
289
|
+
isBoundedString(value.scheduleRunId, MAX_ID_LENGTH) &&
|
|
290
|
+
(value.scheduleName === undefined || isBoundedString(value.scheduleName, MAX_NAME_LENGTH)) &&
|
|
291
|
+
value.targetType === 'resource-operation' &&
|
|
292
|
+
value.selectorType === 'single-resource' &&
|
|
293
|
+
value.scheduleType === 'recurring' &&
|
|
294
|
+
isBoundedString(value.providerScopeId, MAX_ID_LENGTH) &&
|
|
295
|
+
isBoundedString(value.cloudAccountId, MAX_ID_LENGTH) &&
|
|
296
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
297
|
+
isBoundedString(value.definitionId, MAX_ID_LENGTH) &&
|
|
298
|
+
value.definitionClass === 'composite' &&
|
|
299
|
+
value.definitionType === 'bastion-availability-weekly' &&
|
|
300
|
+
isBoundedString(value.compiledRuleId, MAX_ID_LENGTH) &&
|
|
301
|
+
isPositiveSafeInteger(value.definitionRevision) &&
|
|
302
|
+
isIsoUtcTimestamp(value.scheduledForUtc) &&
|
|
303
|
+
(value.scheduleGroupId === undefined || isBoundedString(value.scheduleGroupId, MAX_ID_LENGTH)) &&
|
|
304
|
+
(value.scheduleGroupType === undefined || value.scheduleGroupType === 'resource-schedule-definition') &&
|
|
305
|
+
(value.targetCount === undefined || value.targetCount === 1) &&
|
|
306
|
+
(value.createdByUserId === undefined || isBoundedString(value.createdByUserId, MAX_ID_LENGTH)) &&
|
|
307
|
+
(value.updatedByUserId === undefined || isBoundedString(value.updatedByUserId, MAX_ID_LENGTH)) &&
|
|
308
|
+
(value.compiledOperation === 'restore' || isPositiveSafeInteger(value.controlGeneration)));
|
|
309
|
+
}
|
|
310
|
+
export function isBastionScheduleControlV1(value) {
|
|
311
|
+
return (isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) &&
|
|
312
|
+
hasExactFields(value, [
|
|
313
|
+
'schemaVersion',
|
|
314
|
+
'companyId',
|
|
315
|
+
'resourceId',
|
|
316
|
+
'definitionId',
|
|
317
|
+
'definitionRevision',
|
|
318
|
+
'controlGeneration',
|
|
319
|
+
'desiredStatus',
|
|
320
|
+
'updatedAtUtc',
|
|
321
|
+
]) &&
|
|
322
|
+
value.schemaVersion === 1 &&
|
|
323
|
+
isBoundedString(value.companyId, MAX_ID_LENGTH) &&
|
|
324
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
325
|
+
isBoundedString(value.definitionId, MAX_ID_LENGTH) &&
|
|
326
|
+
isPositiveSafeInteger(value.definitionRevision) &&
|
|
327
|
+
isPositiveSafeInteger(value.controlGeneration) &&
|
|
328
|
+
(value.desiredStatus === 'active' || value.desiredStatus === 'paused') &&
|
|
329
|
+
isIsoUtcTimestamp(value.updatedAtUtc));
|
|
330
|
+
}
|
|
331
|
+
export function isBastionScheduleReadinessV1(value) {
|
|
332
|
+
if (!isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) ||
|
|
333
|
+
!hasExactFields(value, ['schemaVersion', 'status', 'companyId', 'cloudAccountId', 'subscriptionId', 'resourceId', 'requiredActions', 'missingActions', 'checkedAtUtc'], ['reasonCode'])) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
const requiredActions = value.requiredActions;
|
|
337
|
+
const missingActions = value.missingActions;
|
|
338
|
+
if (value.schemaVersion !== 1 ||
|
|
339
|
+
typeof value.status !== 'string' ||
|
|
340
|
+
!readinessStatuses.has(value.status) ||
|
|
341
|
+
!isBoundedString(value.companyId, MAX_ID_LENGTH) ||
|
|
342
|
+
!isBoundedString(value.cloudAccountId, MAX_ID_LENGTH) ||
|
|
343
|
+
!isBoundedString(value.subscriptionId, MAX_ID_LENGTH) ||
|
|
344
|
+
!isBoundedString(value.resourceId, MAX_ID_LENGTH) ||
|
|
345
|
+
!isUniqueBoundedStringArray(requiredActions, 1, MAX_ACTION_COUNT) ||
|
|
346
|
+
!isUniqueBoundedStringArray(missingActions, 0, MAX_ACTION_COUNT) ||
|
|
347
|
+
!missingActions.every(action => requiredActions.includes(action)) ||
|
|
348
|
+
(value.status === 'confirmed' && missingActions.length !== 0) ||
|
|
349
|
+
(value.status === 'missing' && missingActions.length === 0) ||
|
|
350
|
+
!isIsoUtcTimestamp(value.checkedAtUtc)) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
return value.reasonCode === undefined || (typeof value.reasonCode === 'string' && readinessReasonCodes.has(value.reasonCode));
|
|
354
|
+
}
|
|
355
|
+
export function isBastionAvailabilityStatusV1(value) {
|
|
356
|
+
return (isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) &&
|
|
357
|
+
hasExactFields(value, [
|
|
358
|
+
'schemaVersion',
|
|
359
|
+
'companyId',
|
|
360
|
+
'resourceId',
|
|
361
|
+
'definitionId',
|
|
362
|
+
'definitionRevision',
|
|
363
|
+
'phase',
|
|
364
|
+
'lastOperation',
|
|
365
|
+
'lastResult',
|
|
366
|
+
'restoreAvailable',
|
|
367
|
+
'updatedAtUtc',
|
|
368
|
+
], ['reasonCode', 'snapshotCapturedAtUtc']) &&
|
|
369
|
+
value.schemaVersion === 1 &&
|
|
370
|
+
isBoundedString(value.companyId, MAX_ID_LENGTH) &&
|
|
371
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
372
|
+
isBoundedString(value.definitionId, MAX_ID_LENGTH) &&
|
|
373
|
+
isPositiveSafeInteger(value.definitionRevision) &&
|
|
374
|
+
typeof value.phase === 'string' &&
|
|
375
|
+
availabilityPhases.has(value.phase) &&
|
|
376
|
+
(value.lastOperation === 'remove' || value.lastOperation === 'restore') &&
|
|
377
|
+
typeof value.lastResult === 'string' &&
|
|
378
|
+
availabilityResults.has(value.lastResult) &&
|
|
379
|
+
(value.reasonCode === undefined || (typeof value.reasonCode === 'string' && availabilityReasonCodes.has(value.reasonCode))) &&
|
|
380
|
+
(value.snapshotCapturedAtUtc === undefined || isIsoUtcTimestamp(value.snapshotCapturedAtUtc)) &&
|
|
381
|
+
typeof value.restoreAvailable === 'boolean' &&
|
|
382
|
+
isIsoUtcTimestamp(value.updatedAtUtc));
|
|
383
|
+
}
|
|
384
|
+
export function isBastionPauseResponse(value) {
|
|
385
|
+
return (isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) &&
|
|
386
|
+
hasExactFields(value, ['status', 'resourceId', 'controlGeneration', 'requestedAtUtc']) &&
|
|
387
|
+
(value.status === 'paused' || value.status === 'pause-pending') &&
|
|
388
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
389
|
+
isPositiveSafeInteger(value.controlGeneration) &&
|
|
390
|
+
isIsoUtcTimestamp(value.requestedAtUtc));
|
|
391
|
+
}
|
|
392
|
+
export function isBastionRestoreNowResponse(value) {
|
|
393
|
+
return (isWithinJsonSize(value, MAX_PUBLIC_DTO_BYTES) &&
|
|
394
|
+
hasExactFields(value, ['accepted', 'scheduleRunId', 'resourceId', 'requestedAtUtc']) &&
|
|
395
|
+
typeof value.accepted === 'boolean' &&
|
|
396
|
+
isBoundedString(value.scheduleRunId, MAX_ID_LENGTH) &&
|
|
397
|
+
isBoundedString(value.resourceId, MAX_ID_LENGTH) &&
|
|
398
|
+
isIsoUtcTimestamp(value.requestedAtUtc));
|
|
399
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,9 @@ export * from './common/artifactEvidence';
|
|
|
63
63
|
export * from './company';
|
|
64
64
|
export * from './customProperties';
|
|
65
65
|
export * from './scheduler';
|
|
66
|
+
export * from './scheduler/bastionSchedule';
|
|
67
|
+
export * from './scheduler/bastionScheduleProfile';
|
|
68
|
+
export * from './scheduler/bastionScheduleValidation';
|
|
66
69
|
export * from './ai';
|
|
67
70
|
export * from './environment';
|
|
68
71
|
export * from './events';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB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BAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -85,6 +85,9 @@ __exportStar(require("./common/artifactEvidence"), exports);
|
|
|
85
85
|
__exportStar(require("./company"), exports);
|
|
86
86
|
__exportStar(require("./customProperties"), exports);
|
|
87
87
|
__exportStar(require("./scheduler"), exports);
|
|
88
|
+
__exportStar(require("./scheduler/bastionSchedule"), exports);
|
|
89
|
+
__exportStar(require("./scheduler/bastionScheduleProfile"), exports);
|
|
90
|
+
__exportStar(require("./scheduler/bastionScheduleValidation"), exports);
|
|
88
91
|
__exportStar(require("./ai"), exports);
|
|
89
92
|
__exportStar(require("./environment"), exports);
|
|
90
93
|
__exportStar(require("./events"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iEAAiE;AACjE,iDAA+B;AAC/B,0DAAwC;AACxC,gEAA8C;AAC9C,uDAAqC;AACrC,8DAA4C;AAC5C,wEAAsD;AACtD,kDAAgC;AAChC,4DAA0C;AAC1C,oEAAkD;AAClD,gEAA8C;AAC9C,0EAAwD;AACxD,+DAA6C;AAC7C,uDAAqC;AACrC,mDAAiC;AACjC,8DAA4C;AAC5C,oDAAkC;AAClC,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,0DAAwC;AACxC,yDAAuC;AACvC,iDAA+B;AAC/B,wDAAsC;AACtC,0DAAwC;AACxC,+DAA6C;AAC7C,8DAA4C;AAC5C,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,oDAAkC;AAClC,kDAAgC;AAChC,yDAAuC;AACvC,mEAAiD;AACjD,2DAAyC;AACzC,qEAAmD;AACnD,sDAAoC;AACpC,uEAAoH;AAA3G,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