iamcal 2.1.2 → 3.0.1
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/lib/component.d.ts +25 -4
- package/lib/component.d.ts.map +1 -1
- package/lib/component.js +60 -51
- package/lib/components/Calendar.d.ts +0 -20
- package/lib/components/Calendar.d.ts.map +1 -1
- package/lib/components/Calendar.js +2 -24
- package/lib/components/CalendarEvent.d.ts +1 -25
- package/lib/components/CalendarEvent.d.ts.map +1 -1
- package/lib/components/CalendarEvent.js +4 -29
- package/lib/components/TimeZone.d.ts +0 -38
- package/lib/components/TimeZone.d.ts.map +1 -1
- package/lib/components/TimeZone.js +1 -40
- package/lib/components/TimeZoneOffset.d.ts +0 -28
- package/lib/components/TimeZoneOffset.d.ts.map +1 -1
- package/lib/components/TimeZoneOffset.js +1 -30
- package/lib/date.d.ts +2 -10
- package/lib/date.d.ts.map +1 -1
- package/lib/date.js +15 -20
- package/lib/parse.d.ts +9 -16
- package/lib/parse.d.ts.map +1 -1
- package/lib/parse.js +188 -35
- package/lib/patterns.d.ts +28 -0
- package/lib/patterns.d.ts.map +1 -1
- package/lib/patterns.js +56 -2
- package/lib/property/Property.d.ts +344 -0
- package/lib/property/Property.d.ts.map +1 -0
- package/lib/property/Property.js +508 -0
- package/lib/property/escape.d.ts +46 -0
- package/lib/property/escape.d.ts.map +1 -0
- package/lib/property/escape.js +129 -0
- package/lib/property/index.d.ts +7 -0
- package/lib/property/index.d.ts.map +1 -0
- package/lib/property/index.js +23 -0
- package/lib/property/names.d.ts +11 -0
- package/lib/property/names.d.ts.map +1 -0
- package/lib/property/names.js +62 -0
- package/lib/property/parameter.d.ts +10 -0
- package/lib/property/parameter.d.ts.map +1 -0
- package/lib/property/parameter.js +3 -0
- package/lib/{property.d.ts → property/validate.d.ts} +9 -35
- package/lib/property/validate.d.ts.map +1 -0
- package/lib/property/validate.js +317 -0
- package/lib/property/valueType.d.ts +18 -0
- package/lib/property/valueType.d.ts.map +1 -0
- package/lib/property/valueType.js +82 -0
- package/package.json +3 -1
- package/src/component.ts +58 -52
- package/src/components/Calendar.ts +6 -30
- package/src/components/CalendarEvent.ts +7 -33
- package/src/components/TimeZone.ts +3 -51
- package/src/components/TimeZoneOffset.ts +5 -40
- package/src/date.ts +14 -30
- package/src/parse.ts +212 -40
- package/src/patterns.ts +64 -0
- package/src/property/Property.ts +609 -0
- package/src/property/escape.ts +132 -0
- package/src/property/index.ts +6 -0
- package/src/property/names.ts +65 -0
- package/src/property/parameter.ts +33 -0
- package/src/{property.ts → property/validate.ts} +23 -204
- package/src/property/valueType.ts +87 -0
- package/lib/property.d.ts.map +0 -1
- package/lib/property.js +0 -450
package/lib/patterns.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable no-control-regex */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.valueTypeUtcOffset = exports.valueTypeTime = exports.valueTypeText = exports.valueTypePeriod = exports.valueTypeInteger = exports.valueTypeFloat = exports.valueTypeDuration = exports.valueTypeDateTime = exports.valueTypeDate = exports.valueTypeBoolean = exports.valueTypeBinary = exports.TSAFE_CHAR = exports.contentline = exports.name = exports.param = exports.paramName = exports.ianaToken = exports.xName = exports.vendorId = exports.paramValue = exports.paramtext = exports.value = exports.quotedString = exports.QSAFE_CHAR = exports.SAFE_CHAR = exports.VALUE_CHAR = exports.NON_US_ASCII = exports.CONTROL = void 0;
|
|
4
|
+
exports.contentType = exports.regName = exports.valueTypeUtcOffset = exports.valueTypeTime = exports.valueTypeText = exports.valueTypePeriod = exports.valueTypeInteger = exports.valueTypeFloat = exports.valueTypeDuration = exports.valueTypeDateTime = exports.valueTypeDate = exports.valueTypeBoolean = exports.valueTypeBinary = exports.TSAFE_CHAR = exports.contentline = exports.name = exports.param = exports.paramName = exports.ianaToken = exports.xName = exports.vendorId = exports.paramValue = exports.paramtext = exports.value = exports.quotedString = exports.QSAFE_CHAR = exports.SAFE_CHAR = exports.VALUE_CHAR = exports.NON_US_ASCII = exports.CONTROL = void 0;
|
|
5
5
|
exports.matchesWholeString = matchesWholeString;
|
|
6
|
+
exports.ord = ord;
|
|
7
|
+
exports.isNameChar = isNameChar;
|
|
8
|
+
exports.isPropertyValueChar = isPropertyValueChar;
|
|
9
|
+
exports.isParameterValueChar = isParameterValueChar;
|
|
6
10
|
// ABNF patterns from RFC5545
|
|
7
11
|
exports.CONTROL = /[\x00-\x08\x0A-\x1F\x7F]/g;
|
|
8
12
|
exports.NON_US_ASCII = /[^\x00-\x7F]/g;
|
|
@@ -37,6 +41,9 @@ exports.valueTypePeriod = new RegExp(`${exports.valueTypeDateTime.source}/(${exp
|
|
|
37
41
|
exports.valueTypeText = new RegExp('((' + exports.TSAFE_CHAR.source + String.raw `)|:|"|\\[\\;,Nn])*`);
|
|
38
42
|
exports.valueTypeTime = /[0-9]{6}Z?/;
|
|
39
43
|
exports.valueTypeUtcOffset = /[+-]([0-9]{2}){2,3}/;
|
|
44
|
+
// Content type as defined by RFC 4288 4.2
|
|
45
|
+
exports.regName = /[a-zA-Z0-9!#$&.+^_-]{1,127}/;
|
|
46
|
+
exports.contentType = new RegExp('(' + exports.regName.source + ')/(' + exports.regName.source + ')');
|
|
40
47
|
/**
|
|
41
48
|
* Check if a string matches a pattern for the whole string.
|
|
42
49
|
* @param pattern The RegExp pattern to match against.
|
|
@@ -47,4 +54,51 @@ function matchesWholeString(pattern, text) {
|
|
|
47
54
|
const match = text.match(pattern);
|
|
48
55
|
return match !== null && match[0] === text;
|
|
49
56
|
}
|
|
50
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Get the ordinal (character code) of a character.
|
|
59
|
+
* @param char The character to get the ordinal value of.
|
|
60
|
+
* @returns The ordinal as a number.
|
|
61
|
+
* @throws If the input string is empty.
|
|
62
|
+
*/
|
|
63
|
+
function ord(char) {
|
|
64
|
+
if (char.length === 0)
|
|
65
|
+
throw new Error('Expected a character, got empty string');
|
|
66
|
+
return char.charCodeAt(0);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a character is allowed in a property or parameter name.
|
|
70
|
+
* @param char The character to check.
|
|
71
|
+
* @returns Whether or not the character is allowed.
|
|
72
|
+
*/
|
|
73
|
+
function isNameChar(char) {
|
|
74
|
+
return ((ord(char) >= ord('A') && ord(char) <= ord('Z')) ||
|
|
75
|
+
(ord(char) >= ord('a') && ord(char) <= ord('z')) ||
|
|
76
|
+
(ord(char) >= ord('0') && ord(char) <= ord('9')) ||
|
|
77
|
+
char === '-');
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a character is allowwed in a property value.
|
|
81
|
+
* @param char The character to check.
|
|
82
|
+
* @returns Whether or not the character is allowed.
|
|
83
|
+
*/
|
|
84
|
+
function isPropertyValueChar(char) {
|
|
85
|
+
return ord(char) === 9 || ord(char) >= 32;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Check if a character is allowwed in a parameter value.
|
|
89
|
+
* @param char The character to check.
|
|
90
|
+
* @param quoted Whether or not the parameter value is quoted, this allows ';', ':' and ','.
|
|
91
|
+
* @returns Whether or not the character is allowed.
|
|
92
|
+
*/
|
|
93
|
+
function isParameterValueChar(char, quoted = false) {
|
|
94
|
+
return (
|
|
95
|
+
// Allow HTAB
|
|
96
|
+
ord(char) === 9 ||
|
|
97
|
+
// Do not allow DQUOTE
|
|
98
|
+
(char !== '"' &&
|
|
99
|
+
// Allow non-control characters
|
|
100
|
+
ord(char) >= 32 &&
|
|
101
|
+
// These characters are only allowed if quoted
|
|
102
|
+
(quoted || !(char === ';' || char === ':' || char === ','))));
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0dGVybnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW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ixvQkFBb0IsQ0FDaEMsSUFBWSxFQUNaLFNBQWtCLEtBQUs7SUFFdkIsT0FBTztJQUNILGFBQWE7SUFDYixHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztRQUNmLHNCQUFzQjtRQUN0QixDQUFDLElBQUksS0FBSyxHQUFHO1lBQ1QsK0JBQStCO1lBQy9CLEdBQUcsQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFO1lBQ2YsOENBQThDO1lBQzlDLENBQUMsTUFBTSxJQUFJLENBQUMsQ0FBQyxJQUFJLEtBQUssR0FBRyxJQUFJLElBQUksS0FBSyxHQUFHLElBQUksSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FDbkUsQ0FBQTtBQUNMLENBQUMifQ==
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { CalendarDateOrTime } from 'src/date';
|
|
2
|
+
import { AlarmTriggerRelationship, CalendarUserType, Encoding, FreeBusyTimeType, ParticipationRole, ParticipationStatus, RecurrenceIdentifierRange, RelationshipType, RsvpExpectation } from './parameter';
|
|
3
|
+
import { AllowedValueType } from './valueType';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a property of a calendar component as described by RFC 5545 in
|
|
6
|
+
* Section 3.5.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Property {
|
|
9
|
+
private _name;
|
|
10
|
+
get name(): string;
|
|
11
|
+
set name(value: string);
|
|
12
|
+
value: string;
|
|
13
|
+
private _parameters;
|
|
14
|
+
get parameters(): Map<string, string[]>;
|
|
15
|
+
constructor(name: string, value: string, params?: {
|
|
16
|
+
[k: string]: string | string[];
|
|
17
|
+
});
|
|
18
|
+
static fromDate(name: string, value: CalendarDateOrTime): Property;
|
|
19
|
+
setParameter(name: string, value: string | string[]): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the values of a parameter on this property.
|
|
22
|
+
* @param name The name of the parameter to get the values of.
|
|
23
|
+
* @returns The values of the parameter, or undefined if the parameter is unset.
|
|
24
|
+
*/
|
|
25
|
+
getParameter(name: string): string[] | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Get the first value of a parameter.
|
|
28
|
+
* @param name The name of the parameter to get the value of.
|
|
29
|
+
* @returns The first value of the parameter if the parameter is set, else undefined.
|
|
30
|
+
*/
|
|
31
|
+
getFirstParameter(name: string): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Remove all values of a parameter.
|
|
34
|
+
* @param name The name of the parameter to remove.
|
|
35
|
+
*/
|
|
36
|
+
removeParameter(name: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Check whether this property has a parameter.
|
|
39
|
+
* @param name The parameter name to check.
|
|
40
|
+
* @returns Whether the parameter is present.
|
|
41
|
+
*/
|
|
42
|
+
hasParameter(name: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Serialize this property into a contennt line.
|
|
45
|
+
* @returns The serialized content line.
|
|
46
|
+
*/
|
|
47
|
+
serialize(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Set the value type of this property.
|
|
50
|
+
* @param valueType The new value of the VALUE parameter.
|
|
51
|
+
*/
|
|
52
|
+
setValueType(valueType: AllowedValueType): void;
|
|
53
|
+
/**
|
|
54
|
+
* Remove the explicit value type of this property.
|
|
55
|
+
*
|
|
56
|
+
* Note that this will not remove the inferred value type of this property.
|
|
57
|
+
*/
|
|
58
|
+
removeValueType(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the value type of this property. If the `VALUE` parameter is unset
|
|
61
|
+
* the type will be inferred based on {@link name} or default to 'TEXT' if
|
|
62
|
+
* the property is unknown.
|
|
63
|
+
* @returns The value type of this property.
|
|
64
|
+
*/
|
|
65
|
+
getValueType(): AllowedValueType;
|
|
66
|
+
/**
|
|
67
|
+
* Check whether this property has an explicit value type set.
|
|
68
|
+
* @returns Whether this property has the VALUE parameter.
|
|
69
|
+
*/
|
|
70
|
+
hasValueType(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Set the `ALTREP` parameter for this property.
|
|
73
|
+
* @param uri A URI that points to an alternate representation for a textual property value.
|
|
74
|
+
*/
|
|
75
|
+
setAlternateTextRepresentation(uri: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Get the `ALTREP` parameter for this property.
|
|
78
|
+
* @returns The value of the `ALTREP` parameter, or undefined if unset.
|
|
79
|
+
*/
|
|
80
|
+
getAlternateTextRepresentation(): string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Remove the `ALTREP` parameter for this property.
|
|
83
|
+
*/
|
|
84
|
+
removeAlternateTextRepresentation(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Set the `CN` parameter for this property.
|
|
87
|
+
* @param commonName The common name to be associated with the calendar user specified by this property.
|
|
88
|
+
*/
|
|
89
|
+
setCommonName(commonName: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Get the `CN` parameter for this property.
|
|
92
|
+
* @returns The value of the `CN` parameter, or undefined if unset.
|
|
93
|
+
*/
|
|
94
|
+
getCommonName(): string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Remove the `CN` parameter for this property.
|
|
97
|
+
*/
|
|
98
|
+
removeCommonName(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Set the `CUTYPE` parameter for this property.
|
|
101
|
+
* @param userType The type of calendar user specified by the property.
|
|
102
|
+
*/
|
|
103
|
+
setCalendarUserType(userType: CalendarUserType): void;
|
|
104
|
+
/**
|
|
105
|
+
* Get the `CUTYPE` parameter for this property.
|
|
106
|
+
* @returns The value of the `CUTYPE` parameter, or undefined if unset.
|
|
107
|
+
*/
|
|
108
|
+
getCalendarUserType(): CalendarUserType | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Remove the `CUTYPE` parameter for this property.
|
|
111
|
+
*/
|
|
112
|
+
removeCalendarUserType(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Set the `DELEGATED-FROM` parameter for this property.
|
|
115
|
+
* @param delegators Calendar users whom have been delegated participation in a group-scheduled event or to-do by the calendar user specified by the property.
|
|
116
|
+
*/
|
|
117
|
+
setDelegators(...delegators: string[]): void;
|
|
118
|
+
/**
|
|
119
|
+
* Get the `DELEGATED-FROM` parameter for this property.
|
|
120
|
+
* @returns The value of the `DELEGATED-FROM` parameter, or undefined if unset.
|
|
121
|
+
*/
|
|
122
|
+
getDelegators(): string[] | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Remove the `DELEGATED-FROM` parameter for this property.
|
|
125
|
+
*/
|
|
126
|
+
removeDelegators(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set the `DIR` parameter for this property.
|
|
129
|
+
* @param uri A directory entry associated with the calendar user specified by this property.
|
|
130
|
+
*/
|
|
131
|
+
setDirectoryEntryReference(uri: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Get the `DIR` parameter for this property.
|
|
134
|
+
* @returns The value of the `DIR` parameter, or undefined if unset.
|
|
135
|
+
*/
|
|
136
|
+
getDirectoryEntryReference(): string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Remove the `DIR` parameter for this property.
|
|
139
|
+
*/
|
|
140
|
+
removeDirectoryEntryReference(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Set the `ENCODING` parameter for this property.
|
|
143
|
+
* @param encoding An alternate inline encoding for this property value.
|
|
144
|
+
*/
|
|
145
|
+
setEncoding(encoding: Encoding): void;
|
|
146
|
+
/**
|
|
147
|
+
* Get the `ENCODING` parameter for this property.
|
|
148
|
+
* @returns The value of the `ENCODING` parameter, or undefined if unset.
|
|
149
|
+
*/
|
|
150
|
+
getEncoding(): Encoding | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Remove the `ENCODING` parameter for this property.
|
|
153
|
+
*/
|
|
154
|
+
removeEncoding(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Set the `FMTTYPE` parameter for this property.
|
|
157
|
+
* @param contentType The content type of a referenced object as "type/subtype".
|
|
158
|
+
* @example
|
|
159
|
+
* property.setFormatType('application/msword')
|
|
160
|
+
*/
|
|
161
|
+
setFormatType(contentType: string): void;
|
|
162
|
+
/**
|
|
163
|
+
* Get the `FMTTYPE` parameter for this property.
|
|
164
|
+
* @returns The value of the `FMTTYPE` parameter, or undefined if unset.
|
|
165
|
+
*/
|
|
166
|
+
getFormatType(): string | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Remove the `FMTTYPE` parameter for this property.
|
|
169
|
+
*/
|
|
170
|
+
removeFormatType(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Set the `FBTYPE` parameter for this property.
|
|
173
|
+
* @param freeBusy The free or busy time type.
|
|
174
|
+
*/
|
|
175
|
+
setFreeBusyTimeType(freeBusy: FreeBusyTimeType): void;
|
|
176
|
+
/**
|
|
177
|
+
* Get the `FBTYPE` parameter for this property.
|
|
178
|
+
* @returns The value of the `FBTYPE` parameter, or undefined if unset.
|
|
179
|
+
*/
|
|
180
|
+
getFreeBusyTimeType(): FreeBusyTimeType | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Remove the `FBTYPE` parameter for this property.
|
|
183
|
+
*/
|
|
184
|
+
removeFreeBusyTimeType(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Set the `LANGUAGE` parameter for this property.
|
|
187
|
+
* @param language The language tag identifying the language of text values on this property.
|
|
188
|
+
*/
|
|
189
|
+
setLanguage(language: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Get the `LANGUAGE` parameter for this property.
|
|
192
|
+
* @returns The value of the `LANGUAGE` parameter, or undefined if unset.
|
|
193
|
+
*/
|
|
194
|
+
getLanguage(): string | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* Remove the `LANGUAGE` parameter for this property.
|
|
197
|
+
*/
|
|
198
|
+
removeLanguage(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Set the `MEMBER` parameter for this property.
|
|
201
|
+
* @param groups The group or list memberships of the calendar user specified by this property.
|
|
202
|
+
* @example
|
|
203
|
+
* const property = new ComponentProperty('ATTENDEE', 'mailto:user@example.org')
|
|
204
|
+
* property.setMembership('mailto:group@example.org')
|
|
205
|
+
*/
|
|
206
|
+
setMembership(...groups: string[]): void;
|
|
207
|
+
/**
|
|
208
|
+
* Get the `MEMBER` parameter for this property.
|
|
209
|
+
* @returns The value of the `MEMBER` parameter, or undefined if unset.
|
|
210
|
+
*/
|
|
211
|
+
getMembership(): string[] | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* Remove the `MEMBER` parameter for this property.
|
|
214
|
+
*/
|
|
215
|
+
removeMembership(): void;
|
|
216
|
+
/**
|
|
217
|
+
* Set the `PARTSTAT` parameter for this property.
|
|
218
|
+
* @param status The participation status for the calendar user specified by this property.
|
|
219
|
+
*/
|
|
220
|
+
setParticipationStatus(status: ParticipationStatus): void;
|
|
221
|
+
/**
|
|
222
|
+
* Get the `PARTSTAT` parameter for this property.
|
|
223
|
+
* @returns The value of the `PARTSTAT` parameter, or undefined if unset.
|
|
224
|
+
*/
|
|
225
|
+
getParticipationStatus(): ParticipationStatus | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* Remove the `PARTSTAT` parameter for this property.
|
|
228
|
+
*/
|
|
229
|
+
removeParticipationStatus(): void;
|
|
230
|
+
/**
|
|
231
|
+
* Set the `RANGE` parameter for this property.
|
|
232
|
+
* @param range The effective range of recurrence instances from the instance specified by the recurrence identifier specified by this property.
|
|
233
|
+
*/
|
|
234
|
+
setRecurrenceIdentifierRange(range: RecurrenceIdentifierRange): void;
|
|
235
|
+
/**
|
|
236
|
+
* Get the `RANGE` parameter for this property.
|
|
237
|
+
* @returns The value of the `RANGE` parameter, or undefined if unset.
|
|
238
|
+
*/
|
|
239
|
+
getRecurrenceIdentifierRange(): RecurrenceIdentifierRange | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* Remove the `RANGE` parameter for this property.
|
|
242
|
+
*/
|
|
243
|
+
removeRecurrenceIdentifierRange(): void;
|
|
244
|
+
/**
|
|
245
|
+
* Set the `RELATED` parameter for this property.
|
|
246
|
+
* @param relationship The relationship of the alarm trigger with respect to the start or end of the calendar component.
|
|
247
|
+
*/
|
|
248
|
+
setAlarmTriggerRelationship(relationship: AlarmTriggerRelationship): void;
|
|
249
|
+
/**
|
|
250
|
+
* Get the `RELATED` parameter for this property.
|
|
251
|
+
* @returns The value of the `RELATED` parameter, or undefined if unset.
|
|
252
|
+
*/
|
|
253
|
+
getAlarmTriggerRelationship(): AlarmTriggerRelationship | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* Remove the `RELATED` parameter for this property.
|
|
256
|
+
*/
|
|
257
|
+
removeAlarmTriggerRelationship(): void;
|
|
258
|
+
/**
|
|
259
|
+
* Set the `RELTYPE` parameter for this property.
|
|
260
|
+
* @param relationship The type of hierarchical relationship associated with the calendar component specified by the property.
|
|
261
|
+
* @example
|
|
262
|
+
* const property = new ComponentProperty('RELATED-TO', 'vevent-uid')
|
|
263
|
+
* property.setRelationshipType('SIBLING')
|
|
264
|
+
*/
|
|
265
|
+
setRelationshipType(relationship: RelationshipType): void;
|
|
266
|
+
/**
|
|
267
|
+
* Get the `RELTYPE` parameter for this property.
|
|
268
|
+
* @returns The value of the `RELTYPE` parameter, or undefined if unset.
|
|
269
|
+
*/
|
|
270
|
+
getRelationshipType(): RelationshipType | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Remove the `RELTYPE` parameter for this property.
|
|
273
|
+
*/
|
|
274
|
+
removeRelationshipType(): void;
|
|
275
|
+
/**
|
|
276
|
+
* Set the `ROLE` parameter for this property.
|
|
277
|
+
* @param role The participation role for the calendar user specified by this property.
|
|
278
|
+
* @example
|
|
279
|
+
* const property = new ComponentProperty('ATTENDEE', 'mailto:chair@example.org')
|
|
280
|
+
* property.setParticipationRole('CHAIR')
|
|
281
|
+
*/
|
|
282
|
+
setParticipationRole(role: ParticipationRole): void;
|
|
283
|
+
/**
|
|
284
|
+
* Get the `ROLE` parameter for this property.
|
|
285
|
+
* @returns The value of the `ROLE` parameter, or undefined if unset.
|
|
286
|
+
*/
|
|
287
|
+
getParticipationRole(): ParticipationRole | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* Remove the `ROLE` parameter for this property.
|
|
290
|
+
*/
|
|
291
|
+
removeParticipationRole(): void;
|
|
292
|
+
/**
|
|
293
|
+
* Set the `RSVP` parameter for this property.
|
|
294
|
+
* @param rsvp Whether there is an expectation of a favor of a reply from the calendar user specified by this property value.
|
|
295
|
+
* @example
|
|
296
|
+
* const property = new ComponentProperty('ATTENDEE', 'mailto:user@example.org')
|
|
297
|
+
* property.setRsvpExpectation('TRUE')
|
|
298
|
+
*/
|
|
299
|
+
setRsvpExpectation(rsvp: RsvpExpectation): void;
|
|
300
|
+
/**
|
|
301
|
+
* Get the `RSVP` parameter for this property.
|
|
302
|
+
* @returns The value of the `RSVP` parameter, or undefined if unset.
|
|
303
|
+
*/
|
|
304
|
+
getRsvpExpectation(): RsvpExpectation | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Remove the `RSVP` parameter for this property.
|
|
307
|
+
*/
|
|
308
|
+
removeRsvpExpectation(): void;
|
|
309
|
+
/**
|
|
310
|
+
* Set the `SENT-BY` parameter for this property.
|
|
311
|
+
* @param sentBy The calendar user that is acting on behalf of the calendar user specified by the property.
|
|
312
|
+
* @example
|
|
313
|
+
* const property = new ComponentProperty('ORGANIZER', 'malto:jsmith@example.com')
|
|
314
|
+
* property.setSentBy('mailto:sray@example.com')
|
|
315
|
+
*/
|
|
316
|
+
setSentBy(sentBy: string): void;
|
|
317
|
+
/**
|
|
318
|
+
* Get the `SENT-BY` parameter for this property.
|
|
319
|
+
* @returns The value of the `SENT-BY` parameter, or undefined if unset.
|
|
320
|
+
*/
|
|
321
|
+
getSentBy(): string | undefined;
|
|
322
|
+
/**
|
|
323
|
+
* Remove the `SENT-BY` parameter for this property.
|
|
324
|
+
*/
|
|
325
|
+
removeSentBy(): void;
|
|
326
|
+
/**
|
|
327
|
+
* Set the `TZID` parameter for this property.
|
|
328
|
+
* @param sentBy The identifier for the time zone definition for a time component in this property value.
|
|
329
|
+
* @example
|
|
330
|
+
* const property = new ComponentProperty('DTSTART', '20250101T120000')
|
|
331
|
+
* property.setTimeZone('Europe/Stockholm')
|
|
332
|
+
*/
|
|
333
|
+
setTimeZone(sentBy: string): void;
|
|
334
|
+
/**
|
|
335
|
+
* Get the `TZID` parameter for this property.
|
|
336
|
+
* @returns The value of the `TZID` parameter, or undefined if unset.
|
|
337
|
+
*/
|
|
338
|
+
getTimeZone(): string | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Remove the `TZID` parameter for this property.
|
|
341
|
+
*/
|
|
342
|
+
removeTimeZone(): void;
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../src/property/Property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAM7C,OAAO,EACH,wBAAwB,EACxB,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EAClB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,gBAAgB,EAAuB,MAAM,aAAa,CAAA;AAEnE;;;GAGG;AACH,qBAAa,QAAQ;IACjB,OAAO,CAAC,KAAK,CAAQ;IACrB,IAAW,IAAI,IAAI,MAAM,CAExB;IACD,IAAW,IAAI,CAAC,KAAK,EAAE,MAAM,EAE5B;IAED,KAAK,EAAE,MAAM,CAAA;IAEb,OAAO,CAAC,WAAW,CAAuB;IAC1C,IAAW,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAE7C;gBAGG,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,GAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAO;IAanD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE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