jscontact 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +212 -0
- data/SECURITY.md +6 -0
- data/data/enums.yml +356 -0
- data/data/types.yml +927 -0
- data/lib/jscontact/errors.rb +27 -0
- data/lib/jscontact/localization.rb +55 -0
- data/lib/jscontact/model.rb +236 -0
- data/lib/jscontact/patch_object.rb +89 -0
- data/lib/jscontact/types.rb +261 -0
- data/lib/jscontact/validator.rb +379 -0
- data/lib/jscontact/vcard/from_jscontact.rb +367 -0
- data/lib/jscontact/vcard/structured.rb +135 -0
- data/lib/jscontact/vcard/to_jscontact.rb +510 -0
- data/lib/jscontact/vcard.rb +78 -0
- data/lib/jscontact/version.rb +5 -0
- data/lib/jscontact.rb +45 -0
- data/sig/jscontact.rbs +495 -0
- metadata +104 -0
data/sig/jscontact.rbs
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
module Jscontact
|
|
2
|
+
VERSION: String
|
|
3
|
+
DEFAULT_LIMITS: Hash[Symbol, Integer]
|
|
4
|
+
MAX_INTEGER: Integer
|
|
5
|
+
SCHEMA: Hash[String, untyped]
|
|
6
|
+
ENUMS: Hash[String, Array[String]]
|
|
7
|
+
|
|
8
|
+
def self.parse: (String source, ?strict: bool, **Integer limits) -> Card
|
|
9
|
+
def self.upgrade: (Card | Hash[String, untyped] card) -> Card
|
|
10
|
+
def self.generate_json: (untyped value, ?untyped options) -> String
|
|
11
|
+
def self.deep_copy: (untyped value, ?max_depth: Integer, ?depth: Integer, ?ancestors: Array[Integer], ?pointer: String) -> untyped
|
|
12
|
+
def self.deep_freeze: (untyped value) -> untyped
|
|
13
|
+
def self.pointer: (String parent, untyped key) -> String
|
|
14
|
+
|
|
15
|
+
class Violation
|
|
16
|
+
attr_accessor pointer: String
|
|
17
|
+
attr_accessor message: String
|
|
18
|
+
def self.new: (pointer: String, message: String) -> instance
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Error < StandardError
|
|
22
|
+
attr_reader pointer: String?
|
|
23
|
+
def initialize: (?String? message, ?pointer: String?) -> void
|
|
24
|
+
end
|
|
25
|
+
class ParseError < Error
|
|
26
|
+
end
|
|
27
|
+
class ConversionError < Error
|
|
28
|
+
end
|
|
29
|
+
class LimitError < Error
|
|
30
|
+
end
|
|
31
|
+
class ValidationError < Error
|
|
32
|
+
attr_reader errors: Array[Violation]
|
|
33
|
+
def initialize: (String | Array[Violation] errors, ?pointer: String?) -> void
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class Validator
|
|
37
|
+
def initialize: (?validate_localizations: bool, **Integer limits) -> void
|
|
38
|
+
def validate: (untyped value, ?type: String, ?root: bool) -> Array[Violation]
|
|
39
|
+
def validate_json: (untyped value, ?pointer: String) -> Array[Violation]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class Model
|
|
43
|
+
attr_reader limits: Hash[Symbol, Integer]
|
|
44
|
+
def initialize: (?Hash[untyped, untyped]? data, ?strict: bool, ?explicit_types: bool, **Integer limits) -> void
|
|
45
|
+
def self.wrap: (Hash[String, untyped] data, Hash[Symbol, Integer] limits, bool explicit_types) -> instance
|
|
46
|
+
def []: (String | Symbol name) -> untyped
|
|
47
|
+
def []=: (String | Symbol name, untyped value) -> untyped
|
|
48
|
+
def key?: (String | Symbol name) -> bool
|
|
49
|
+
def delete: (String | Symbol name) -> untyped
|
|
50
|
+
def to_h: () -> Hash[String, untyped]
|
|
51
|
+
def to_json: (?untyped options) -> String
|
|
52
|
+
def errors: () -> Array[Violation]
|
|
53
|
+
def warnings: () -> Array[Violation]
|
|
54
|
+
def valid?: () -> bool
|
|
55
|
+
def validate!: () -> self
|
|
56
|
+
def ==: (untyped other) -> bool
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class IdMap
|
|
60
|
+
include Enumerable[[String, untyped]]
|
|
61
|
+
def initialize: (?Hash[String, untyped] data, type: String, ?limits: Hash[Symbol, Integer], ?explicit_types: bool, ?validate_ids: bool) -> void
|
|
62
|
+
def []: (String | Symbol id) -> untyped
|
|
63
|
+
def []=: (String | Symbol id, untyped value) -> untyped
|
|
64
|
+
def each: () { (String, untyped) -> untyped } -> self
|
|
65
|
+
| () -> Enumerator[[String, untyped], self]
|
|
66
|
+
def keys: () -> Array[String]
|
|
67
|
+
def values: () -> Array[untyped]
|
|
68
|
+
def size: () -> Integer
|
|
69
|
+
def length: () -> Integer
|
|
70
|
+
def empty?: () -> bool
|
|
71
|
+
def key?: (String | Symbol id) -> bool
|
|
72
|
+
def delete: (String | Symbol id) -> untyped
|
|
73
|
+
def add: (untyped value, ?prefix: String) -> String
|
|
74
|
+
def to_h: () -> Hash[String, untyped]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class PatchObject
|
|
78
|
+
def initialize: (Hash[String, untyped] patches, ?max_patches: Integer, **Integer limits) -> void
|
|
79
|
+
def to_h: () -> Hash[String, untyped]
|
|
80
|
+
def apply: (Hash[String, untyped] data, ?validate: bool) -> Hash[String, untyped]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
class Card < Model
|
|
84
|
+
def self.build: (?version: String, ?explicit_types: bool, **untyped properties) ?{ (Card) -> void } -> Card
|
|
85
|
+
def add_email: (**untyped properties) -> String
|
|
86
|
+
def localized: (String language) -> Card
|
|
87
|
+
attr_accessor version: String
|
|
88
|
+
attr_accessor created: String?
|
|
89
|
+
attr_accessor kind: String
|
|
90
|
+
attr_accessor language: String?
|
|
91
|
+
attr_accessor members: Hash[String, untyped]?
|
|
92
|
+
attr_accessor prodId: String?
|
|
93
|
+
attr_accessor prod_id: String?
|
|
94
|
+
def relatedTo: () -> IdMap?
|
|
95
|
+
def relatedTo=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
96
|
+
def related_to: () -> IdMap?
|
|
97
|
+
def related_to=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
98
|
+
attr_accessor uid: String?
|
|
99
|
+
attr_accessor updated: String?
|
|
100
|
+
def name: () -> Name?
|
|
101
|
+
def name=: (Name? | Hash[untyped, untyped] value) -> untyped
|
|
102
|
+
def nicknames: () -> IdMap?
|
|
103
|
+
def nicknames=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
104
|
+
def organizations: () -> IdMap?
|
|
105
|
+
def organizations=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
106
|
+
def speakToAs: () -> SpeakToAs?
|
|
107
|
+
def speakToAs=: (SpeakToAs? | Hash[untyped, untyped] value) -> untyped
|
|
108
|
+
def speak_to_as: () -> SpeakToAs?
|
|
109
|
+
def speak_to_as=: (SpeakToAs? | Hash[untyped, untyped] value) -> untyped
|
|
110
|
+
def titles: () -> IdMap?
|
|
111
|
+
def titles=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
112
|
+
def emails: () -> IdMap?
|
|
113
|
+
def emails=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
114
|
+
def onlineServices: () -> IdMap?
|
|
115
|
+
def onlineServices=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
116
|
+
def online_services: () -> IdMap?
|
|
117
|
+
def online_services=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
118
|
+
def phones: () -> IdMap?
|
|
119
|
+
def phones=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
120
|
+
def preferredLanguages: () -> IdMap?
|
|
121
|
+
def preferredLanguages=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
122
|
+
def preferred_languages: () -> IdMap?
|
|
123
|
+
def preferred_languages=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
124
|
+
def calendars: () -> IdMap?
|
|
125
|
+
def calendars=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
126
|
+
def schedulingAddresses: () -> IdMap?
|
|
127
|
+
def schedulingAddresses=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
128
|
+
def scheduling_addresses: () -> IdMap?
|
|
129
|
+
def scheduling_addresses=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
130
|
+
def addresses: () -> IdMap?
|
|
131
|
+
def addresses=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
132
|
+
def cryptoKeys: () -> IdMap?
|
|
133
|
+
def cryptoKeys=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
134
|
+
def crypto_keys: () -> IdMap?
|
|
135
|
+
def crypto_keys=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
136
|
+
def directories: () -> IdMap?
|
|
137
|
+
def directories=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
138
|
+
def links: () -> IdMap?
|
|
139
|
+
def links=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
140
|
+
def media: () -> IdMap?
|
|
141
|
+
def media=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
142
|
+
attr_accessor localizations: Hash[String, Hash[String, untyped]]?
|
|
143
|
+
def anniversaries: () -> IdMap?
|
|
144
|
+
def anniversaries=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
145
|
+
attr_accessor keywords: Hash[String, untyped]?
|
|
146
|
+
def notes: () -> IdMap?
|
|
147
|
+
def notes=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
148
|
+
def personalInfo: () -> IdMap?
|
|
149
|
+
def personalInfo=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
150
|
+
def personal_info: () -> IdMap?
|
|
151
|
+
def personal_info=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
152
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
153
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
154
|
+
attr_accessor vCardName: String?
|
|
155
|
+
attr_accessor v_card_name: String?
|
|
156
|
+
attr_accessor vCardProps: Array[untyped]?
|
|
157
|
+
attr_accessor v_card_props: Array[untyped]?
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
class Relation < Model
|
|
161
|
+
attr_accessor relation: Hash[String, untyped]
|
|
162
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
163
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
164
|
+
attr_accessor vCardName: String?
|
|
165
|
+
attr_accessor v_card_name: String?
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
class Name < Model
|
|
169
|
+
attr_accessor components: Array[untyped]?
|
|
170
|
+
attr_accessor isOrdered: bool
|
|
171
|
+
attr_accessor is_ordered: bool
|
|
172
|
+
attr_accessor defaultSeparator: String?
|
|
173
|
+
attr_accessor default_separator: String?
|
|
174
|
+
attr_accessor full: String?
|
|
175
|
+
attr_accessor sortAs: Hash[String, untyped]?
|
|
176
|
+
attr_accessor sort_as: Hash[String, untyped]?
|
|
177
|
+
attr_accessor phoneticScript: String?
|
|
178
|
+
attr_accessor phonetic_script: String?
|
|
179
|
+
attr_accessor phoneticSystem: String?
|
|
180
|
+
attr_accessor phonetic_system: String?
|
|
181
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
182
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
183
|
+
attr_accessor vCardName: String?
|
|
184
|
+
attr_accessor v_card_name: String?
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
class NameComponent < Model
|
|
188
|
+
attr_accessor value: String
|
|
189
|
+
attr_accessor kind: String
|
|
190
|
+
attr_accessor phonetic: String?
|
|
191
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
192
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
193
|
+
attr_accessor vCardName: String?
|
|
194
|
+
attr_accessor v_card_name: String?
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
class Nickname < Model
|
|
198
|
+
attr_accessor name: String
|
|
199
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
200
|
+
attr_accessor pref: Integer?
|
|
201
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
202
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
203
|
+
attr_accessor vCardName: String?
|
|
204
|
+
attr_accessor v_card_name: String?
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
class Organization < Model
|
|
208
|
+
attr_accessor name: String?
|
|
209
|
+
attr_accessor units: Array[untyped]?
|
|
210
|
+
attr_accessor sortAs: String?
|
|
211
|
+
attr_accessor sort_as: String?
|
|
212
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
213
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
214
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
215
|
+
attr_accessor vCardName: String?
|
|
216
|
+
attr_accessor v_card_name: String?
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
class OrgUnit < Model
|
|
220
|
+
attr_accessor name: String
|
|
221
|
+
attr_accessor sortAs: String?
|
|
222
|
+
attr_accessor sort_as: String?
|
|
223
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
224
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
225
|
+
attr_accessor vCardName: String?
|
|
226
|
+
attr_accessor v_card_name: String?
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
class SpeakToAs < Model
|
|
230
|
+
attr_accessor grammaticalGender: String?
|
|
231
|
+
attr_accessor grammatical_gender: String?
|
|
232
|
+
def pronouns: () -> IdMap?
|
|
233
|
+
def pronouns=: (IdMap? | Hash[untyped, untyped] value) -> untyped
|
|
234
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
235
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
236
|
+
attr_accessor vCardName: String?
|
|
237
|
+
attr_accessor v_card_name: String?
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
class Pronouns < Model
|
|
241
|
+
attr_accessor pronouns: String
|
|
242
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
243
|
+
attr_accessor pref: Integer?
|
|
244
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
245
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
246
|
+
attr_accessor vCardName: String?
|
|
247
|
+
attr_accessor v_card_name: String?
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
class Title < Model
|
|
251
|
+
attr_accessor name: String
|
|
252
|
+
attr_accessor kind: String
|
|
253
|
+
attr_accessor organizationId: String?
|
|
254
|
+
attr_accessor organization_id: String?
|
|
255
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
256
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
257
|
+
attr_accessor vCardName: String?
|
|
258
|
+
attr_accessor v_card_name: String?
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
class EmailAddress < Model
|
|
262
|
+
attr_accessor address: String
|
|
263
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
264
|
+
attr_accessor pref: Integer?
|
|
265
|
+
attr_accessor label: String?
|
|
266
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
267
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
268
|
+
attr_accessor vCardName: String?
|
|
269
|
+
attr_accessor v_card_name: String?
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
class OnlineService < Model
|
|
273
|
+
attr_accessor service: String?
|
|
274
|
+
attr_accessor uri: String?
|
|
275
|
+
attr_accessor user: String?
|
|
276
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
277
|
+
attr_accessor pref: Integer?
|
|
278
|
+
attr_accessor label: String?
|
|
279
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
280
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
281
|
+
attr_accessor vCardName: String?
|
|
282
|
+
attr_accessor v_card_name: String?
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
class Phone < Model
|
|
286
|
+
attr_accessor number: String
|
|
287
|
+
attr_accessor features: Hash[String, untyped]?
|
|
288
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
289
|
+
attr_accessor pref: Integer?
|
|
290
|
+
attr_accessor label: String?
|
|
291
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
292
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
293
|
+
attr_accessor vCardName: String?
|
|
294
|
+
attr_accessor v_card_name: String?
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
class LanguagePref < Model
|
|
298
|
+
attr_accessor language: String
|
|
299
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
300
|
+
attr_accessor pref: Integer?
|
|
301
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
302
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
303
|
+
attr_accessor vCardName: String?
|
|
304
|
+
attr_accessor v_card_name: String?
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
class Calendar < Model
|
|
308
|
+
attr_accessor kind: String
|
|
309
|
+
attr_accessor uri: String
|
|
310
|
+
attr_accessor mediaType: String?
|
|
311
|
+
attr_accessor media_type: String?
|
|
312
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
313
|
+
attr_accessor pref: Integer?
|
|
314
|
+
attr_accessor label: String?
|
|
315
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
316
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
317
|
+
attr_accessor vCardName: String?
|
|
318
|
+
attr_accessor v_card_name: String?
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
class SchedulingAddress < Model
|
|
322
|
+
attr_accessor uri: String
|
|
323
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
324
|
+
attr_accessor pref: Integer?
|
|
325
|
+
attr_accessor label: String?
|
|
326
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
327
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
328
|
+
attr_accessor vCardName: String?
|
|
329
|
+
attr_accessor v_card_name: String?
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
class Address < Model
|
|
333
|
+
attr_accessor components: Array[untyped]?
|
|
334
|
+
attr_accessor isOrdered: bool
|
|
335
|
+
attr_accessor is_ordered: bool
|
|
336
|
+
attr_accessor countryCode: String?
|
|
337
|
+
attr_accessor country_code: String?
|
|
338
|
+
attr_accessor coordinates: String?
|
|
339
|
+
attr_accessor timeZone: String?
|
|
340
|
+
attr_accessor time_zone: String?
|
|
341
|
+
attr_accessor full: String?
|
|
342
|
+
attr_accessor defaultSeparator: String?
|
|
343
|
+
attr_accessor default_separator: String?
|
|
344
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
345
|
+
attr_accessor pref: Integer?
|
|
346
|
+
attr_accessor phoneticScript: String?
|
|
347
|
+
attr_accessor phonetic_script: String?
|
|
348
|
+
attr_accessor phoneticSystem: String?
|
|
349
|
+
attr_accessor phonetic_system: String?
|
|
350
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
351
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
352
|
+
attr_accessor vCardName: String?
|
|
353
|
+
attr_accessor v_card_name: String?
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
class AddressComponent < Model
|
|
357
|
+
attr_accessor value: String
|
|
358
|
+
attr_accessor kind: String
|
|
359
|
+
attr_accessor phonetic: String?
|
|
360
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
361
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
362
|
+
attr_accessor vCardName: String?
|
|
363
|
+
attr_accessor v_card_name: String?
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
class CryptoKey < Model
|
|
367
|
+
attr_accessor kind: String?
|
|
368
|
+
attr_accessor uri: String
|
|
369
|
+
attr_accessor mediaType: String?
|
|
370
|
+
attr_accessor media_type: String?
|
|
371
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
372
|
+
attr_accessor pref: Integer?
|
|
373
|
+
attr_accessor label: String?
|
|
374
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
375
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
376
|
+
attr_accessor vCardName: String?
|
|
377
|
+
attr_accessor v_card_name: String?
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
class Directory < Model
|
|
381
|
+
attr_accessor kind: String
|
|
382
|
+
attr_accessor uri: String
|
|
383
|
+
attr_accessor mediaType: String?
|
|
384
|
+
attr_accessor media_type: String?
|
|
385
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
386
|
+
attr_accessor pref: Integer?
|
|
387
|
+
attr_accessor label: String?
|
|
388
|
+
attr_accessor listAs: Integer?
|
|
389
|
+
attr_accessor list_as: Integer?
|
|
390
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
391
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
392
|
+
attr_accessor vCardName: String?
|
|
393
|
+
attr_accessor v_card_name: String?
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
class Link < Model
|
|
397
|
+
attr_accessor kind: String?
|
|
398
|
+
attr_accessor uri: String
|
|
399
|
+
attr_accessor mediaType: String?
|
|
400
|
+
attr_accessor media_type: String?
|
|
401
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
402
|
+
attr_accessor pref: Integer?
|
|
403
|
+
attr_accessor label: String?
|
|
404
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
405
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
406
|
+
attr_accessor vCardName: String?
|
|
407
|
+
attr_accessor v_card_name: String?
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
class Media < Model
|
|
411
|
+
attr_accessor kind: String
|
|
412
|
+
attr_accessor uri: String
|
|
413
|
+
attr_accessor mediaType: String?
|
|
414
|
+
attr_accessor media_type: String?
|
|
415
|
+
attr_accessor contexts: Hash[String, untyped]?
|
|
416
|
+
attr_accessor pref: Integer?
|
|
417
|
+
attr_accessor label: String?
|
|
418
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
419
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
420
|
+
attr_accessor vCardName: String?
|
|
421
|
+
attr_accessor v_card_name: String?
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
class Anniversary < Model
|
|
425
|
+
attr_accessor kind: String
|
|
426
|
+
def date: () -> (PartialDate | Timestamp)
|
|
427
|
+
def date=: ((PartialDate | Timestamp) | Hash[untyped, untyped] value) -> untyped
|
|
428
|
+
def place: () -> Address?
|
|
429
|
+
def place=: (Address? | Hash[untyped, untyped] value) -> untyped
|
|
430
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
431
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
432
|
+
attr_accessor vCardName: String?
|
|
433
|
+
attr_accessor v_card_name: String?
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
class PartialDate < Model
|
|
437
|
+
attr_accessor year: Integer?
|
|
438
|
+
attr_accessor month: Integer?
|
|
439
|
+
attr_accessor day: Integer?
|
|
440
|
+
attr_accessor calendarScale: String?
|
|
441
|
+
attr_accessor calendar_scale: String?
|
|
442
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
443
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
444
|
+
attr_accessor vCardName: String?
|
|
445
|
+
attr_accessor v_card_name: String?
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
class Timestamp < Model
|
|
449
|
+
attr_accessor utc: String
|
|
450
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
451
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
452
|
+
attr_accessor vCardName: String?
|
|
453
|
+
attr_accessor v_card_name: String?
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
class Note < Model
|
|
457
|
+
attr_accessor note: String
|
|
458
|
+
attr_accessor created: String?
|
|
459
|
+
def author: () -> Author?
|
|
460
|
+
def author=: (Author? | Hash[untyped, untyped] value) -> untyped
|
|
461
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
462
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
463
|
+
attr_accessor vCardName: String?
|
|
464
|
+
attr_accessor v_card_name: String?
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
class Author < Model
|
|
468
|
+
attr_accessor name: String?
|
|
469
|
+
attr_accessor uri: String?
|
|
470
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
471
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
472
|
+
attr_accessor vCardName: String?
|
|
473
|
+
attr_accessor v_card_name: String?
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
class PersonalInfo < Model
|
|
477
|
+
attr_accessor kind: String
|
|
478
|
+
attr_accessor value: String
|
|
479
|
+
attr_accessor level: String?
|
|
480
|
+
attr_accessor listAs: Integer?
|
|
481
|
+
attr_accessor list_as: Integer?
|
|
482
|
+
attr_accessor label: String?
|
|
483
|
+
attr_accessor vCardParams: Hash[String, untyped]?
|
|
484
|
+
attr_accessor v_card_params: Hash[String, untyped]?
|
|
485
|
+
attr_accessor vCardName: String?
|
|
486
|
+
attr_accessor v_card_name: String?
|
|
487
|
+
end
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
module Jscontact::VCard
|
|
491
|
+
def self.to_jscontact: (String vcard_text, ?version: String) -> Jscontact::Card
|
|
492
|
+
def self.from_jscontact: (Jscontact::Card | Hash[String, untyped] card) -> String
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
module JSContact = Jscontact
|
metadata
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: jscontact
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Yudai Takada
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: json
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 2.19.4
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '4'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: 2.19.4
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '4'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: tzinfo
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '2.0'
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '3'
|
|
42
|
+
type: :runtime
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '2.0'
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '3'
|
|
52
|
+
description: JSContact 1.0 and 2.0 models, validation, localization patches, and optional
|
|
53
|
+
vCard 4.0 conversion.
|
|
54
|
+
email:
|
|
55
|
+
- t.yudai92@gmail.com
|
|
56
|
+
executables: []
|
|
57
|
+
extensions: []
|
|
58
|
+
extra_rdoc_files: []
|
|
59
|
+
files:
|
|
60
|
+
- CHANGELOG.md
|
|
61
|
+
- LICENSE.txt
|
|
62
|
+
- README.md
|
|
63
|
+
- SECURITY.md
|
|
64
|
+
- data/enums.yml
|
|
65
|
+
- data/types.yml
|
|
66
|
+
- lib/jscontact.rb
|
|
67
|
+
- lib/jscontact/errors.rb
|
|
68
|
+
- lib/jscontact/localization.rb
|
|
69
|
+
- lib/jscontact/model.rb
|
|
70
|
+
- lib/jscontact/patch_object.rb
|
|
71
|
+
- lib/jscontact/types.rb
|
|
72
|
+
- lib/jscontact/validator.rb
|
|
73
|
+
- lib/jscontact/vcard.rb
|
|
74
|
+
- lib/jscontact/vcard/from_jscontact.rb
|
|
75
|
+
- lib/jscontact/vcard/structured.rb
|
|
76
|
+
- lib/jscontact/vcard/to_jscontact.rb
|
|
77
|
+
- lib/jscontact/version.rb
|
|
78
|
+
- sig/jscontact.rbs
|
|
79
|
+
homepage: https://github.com/ydah/jscontact
|
|
80
|
+
licenses:
|
|
81
|
+
- MIT
|
|
82
|
+
metadata:
|
|
83
|
+
allowed_push_host: https://rubygems.org
|
|
84
|
+
source_code_uri: https://github.com/ydah/jscontact
|
|
85
|
+
changelog_uri: https://github.com/ydah/jscontact/blob/main/CHANGELOG.md
|
|
86
|
+
rubygems_mfa_required: 'true'
|
|
87
|
+
rdoc_options: []
|
|
88
|
+
require_paths:
|
|
89
|
+
- lib
|
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - ">="
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: 3.3.0
|
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
|
+
requirements:
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: '0'
|
|
100
|
+
requirements: []
|
|
101
|
+
rubygems_version: 4.0.16
|
|
102
|
+
specification_version: 4
|
|
103
|
+
summary: Read, validate, and convert JSContact contact cards
|
|
104
|
+
test_files: []
|