onlyoffice-docs_integration_sdk 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.
Files changed (31) hide show
  1. checksums.yaml +7 -0
  2. data/lib/onlyoffice/docs_integration_sdk/document_editor/config.rb +1479 -0
  3. data/lib/onlyoffice/docs_integration_sdk/document_editor/config_test.rb +1713 -0
  4. data/lib/onlyoffice/docs_integration_sdk/document_editor.rb +29 -0
  5. data/lib/onlyoffice/docs_integration_sdk/document_server/client/command.rb +417 -0
  6. data/lib/onlyoffice/docs_integration_sdk/document_server/client/command_test.rb +672 -0
  7. data/lib/onlyoffice/docs_integration_sdk/document_server/client/conversion.rb +477 -0
  8. data/lib/onlyoffice/docs_integration_sdk/document_server/client/conversion_test.rb +682 -0
  9. data/lib/onlyoffice/docs_integration_sdk/document_server/client/healthcheck.rb +101 -0
  10. data/lib/onlyoffice/docs_integration_sdk/document_server/client/healthcheck_test.rb +209 -0
  11. data/lib/onlyoffice/docs_integration_sdk/document_server/client/jwt.rb +116 -0
  12. data/lib/onlyoffice/docs_integration_sdk/document_server/client/jwt_test.rb +70 -0
  13. data/lib/onlyoffice/docs_integration_sdk/document_server/client/response.rb +73 -0
  14. data/lib/onlyoffice/docs_integration_sdk/document_server/client/response_test.rb +49 -0
  15. data/lib/onlyoffice/docs_integration_sdk/document_server/client/service.rb +44 -0
  16. data/lib/onlyoffice/docs_integration_sdk/document_server/client/ua.rb +31 -0
  17. data/lib/onlyoffice/docs_integration_sdk/document_server/client/ua_test.rb +35 -0
  18. data/lib/onlyoffice/docs_integration_sdk/document_server/client.rb +321 -0
  19. data/lib/onlyoffice/docs_integration_sdk/document_server/client_test.rb +1259 -0
  20. data/lib/onlyoffice/docs_integration_sdk/document_server.rb +29 -0
  21. data/lib/onlyoffice/docs_integration_sdk/document_storage/callback.rb +276 -0
  22. data/lib/onlyoffice/docs_integration_sdk/document_storage/callback_test.rb +291 -0
  23. data/lib/onlyoffice/docs_integration_sdk/document_storage.rb +29 -0
  24. data/lib/onlyoffice/docs_integration_sdk/jwt.rb +448 -0
  25. data/lib/onlyoffice/docs_integration_sdk/jwt_test.rb +598 -0
  26. data/lib/onlyoffice/docs_integration_sdk/test_test.rb +113 -0
  27. data/lib/onlyoffice/docs_integration_sdk/version.rb +26 -0
  28. data/lib/onlyoffice/docs_integration_sdk/version_test.rb +33 -0
  29. data/lib/onlyoffice/docs_integration_sdk.rb +31 -0
  30. data/lib/onlyoffice.rb +21 -0
  31. metadata +283 -0
@@ -0,0 +1,1479 @@
1
+ #
2
+ # (c) Copyright Ascensio System SIA 2025
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ # typed: strict
18
+ # frozen_string_literal: true
19
+
20
+ require "sorbet-runtime"
21
+
22
+ module Onlyoffice
23
+ module DocsIntegrationSdk
24
+ module DocumentEditor
25
+ # @since 0.1.0
26
+ class Config < T::Struct
27
+ extend T::Sig
28
+
29
+ # @since 0.1.0
30
+ class DocumentType < T::Enum
31
+ enums do
32
+ # @since 0.1.0
33
+ Word = new("word")
34
+
35
+ # @since 0.1.0
36
+ Cell = new("cell")
37
+
38
+ # @since 0.1.0
39
+ Slide = new("slide")
40
+
41
+ # @since 0.1.0
42
+ Pdf = new("pdf")
43
+
44
+ # @deprecated Use {Word} instead. This property is deprecated since Document Server version 6.1.
45
+ # @since 0.1.0
46
+ Text = new("text")
47
+
48
+ # @deprecated Use {Cell} instead. This property is deprecated since Document Server version 6.1.
49
+ # @since 0.1.0
50
+ Spreadsheet = new("spreadsheet")
51
+
52
+ # @deprecated Use {Slide} instead. This property is deprecated since Document Server version 6.1.
53
+ # @since 0.1.0
54
+ Presentation = new("presentation")
55
+ end
56
+ end
57
+
58
+ # @since 0.1.0
59
+ class Type < T::Enum
60
+ enums do
61
+ # @since 0.1.0
62
+ Desktop = new("desktop")
63
+
64
+ # @since 0.1.0
65
+ Mobile = new("mobile")
66
+
67
+ # @since 0.1.0
68
+ Embedded = new("embedded")
69
+ end
70
+ end
71
+
72
+ # @since 0.1.0
73
+ class Document < T::Struct
74
+ extend T::Sig
75
+
76
+ # @since 0.1.0
77
+ class ReferenceData < T::Struct
78
+ extend T::Sig
79
+
80
+ # @since 0.1.0
81
+ prop :file_key, T.nilable(String), name: "fileKey"
82
+
83
+ # @since 0.1.0
84
+ prop :instance_id, T.nilable(String), name: "instanceId"
85
+
86
+ # @since 0.1.0
87
+ prop :key, T.nilable(String), name: "key"
88
+
89
+ # @since 0.1.0
90
+ sig {params(hash: T.untyped, strict: T.untyped).returns(ReferenceData)}
91
+ def self.from_hash(hash, strict = nil)
92
+ super(hash, strict)
93
+ end
94
+ end
95
+
96
+ # @since 0.1.0
97
+ class Info < T::Struct
98
+ extend T::Sig
99
+
100
+ # @since 0.1.0
101
+ class SharingSettings < T::Struct
102
+ extend T::Sig
103
+
104
+ # @since 0.1.0
105
+ class Permissions < T::Enum
106
+ enums do
107
+ # @since 0.1.0
108
+ FullAccess = new("Full Access")
109
+
110
+ # @since 0.1.0
111
+ ReadOnly = new("Read Only")
112
+
113
+ # @since 0.1.0
114
+ DenyAccess = new("Deny Access")
115
+ end
116
+ end
117
+
118
+ # @since 0.1.0
119
+ prop :is_link, T.nilable(T::Boolean), name: "isLink"
120
+
121
+ # @since 0.1.0
122
+ prop :permissions, T.nilable(Permissions), name: "permissions"
123
+
124
+ # @since 0.1.0
125
+ prop :user, T.nilable(String), name: "user"
126
+
127
+ # @since 0.1.0
128
+ sig {params(hash: T.untyped, strict: T.untyped).returns(SharingSettings)}
129
+ def self.from_hash(hash, strict = nil)
130
+ super(hash, strict)
131
+ end
132
+ end
133
+
134
+ # @deprecated Use {owner} instead. This property is deprecated since Document Server version 5.4.
135
+ # @since 0.1.0
136
+ prop :author, T.nilable(String), name: "author"
137
+
138
+ # @deprecated Use {uploaded} instead. This property is deprecated since Document Server version 5.4.
139
+ # @since 0.1.0
140
+ prop :created, T.nilable(String), name: "created"
141
+
142
+ # @since 0.1.0
143
+ prop :favorite, T.nilable(T::Boolean), name: "favorite"
144
+
145
+ # @since 0.1.0
146
+ prop :folder, T.nilable(String), name: "folder"
147
+
148
+ # @since 0.1.0
149
+ prop :owner, T.nilable(String), name: "owner"
150
+
151
+ # @since 0.1.0
152
+ prop :sharing_settings, T.nilable(T::Array[SharingSettings]), name: "sharingSettings"
153
+
154
+ # @since 0.1.0
155
+ prop :uploaded, T.nilable(String), name: "uploaded"
156
+
157
+ # @since 0.1.0
158
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Info)}
159
+ def self.from_hash(hash, strict = nil)
160
+ super(hash, strict)
161
+ end
162
+ end
163
+
164
+ # @since 0.1.0
165
+ class Permissions < T::Struct
166
+ extend T::Sig
167
+
168
+ # @since 0.1.0
169
+ class CommentGroup < T::Struct
170
+ extend T::Sig
171
+
172
+ # @since 0.1.0
173
+ prop :edit, T.nilable(T::Array[String]), name: "edit"
174
+
175
+ # @since 0.1.0
176
+ prop :remove, T.nilable(T::Array[String]), name: "remove"
177
+
178
+ # @since 0.1.0
179
+ prop :view, T.nilable(T::Array[String]), name: "view"
180
+
181
+ # @since 0.1.0
182
+ sig {params(hash: T.untyped, strict: T.untyped).returns(CommentGroup)}
183
+ def self.from_hash(hash, strict = nil)
184
+ super(hash, strict)
185
+ end
186
+ end
187
+
188
+ # @deprecated Use events.onRequestRestore instead. This property is deprecated since Document Server version 5.5.
189
+ # @since 0.1.0
190
+ prop :change_history, T.nilable(T::Boolean), name: "changeHistory"
191
+
192
+ # @since 0.1.0
193
+ prop :chat, T.nilable(T::Boolean), name: "chat"
194
+
195
+ # @since 0.1.0
196
+ prop :comment, T.nilable(T::Boolean), name: "comment"
197
+
198
+ # @since 0.1.0
199
+ prop :comment_groups, T.nilable(T::Array[CommentGroup]), name: "commentGroups"
200
+
201
+ # @since 0.1.0
202
+ prop :copy, T.nilable(T::Boolean), name: "copy"
203
+
204
+ # @since 0.1.0
205
+ prop :delete_comment_author_only, T.nilable(T::Boolean), name: "deleteCommentAuthorOnly"
206
+
207
+ # @since 0.1.0
208
+ prop :download, T.nilable(T::Boolean), name: "download"
209
+
210
+ # @since 0.1.0
211
+ prop :edit, T.nilable(T::Boolean), name: "edit"
212
+
213
+ # @since 0.1.0
214
+ prop :edit_comment_author_only, T.nilable(T::Boolean), name: "editCommentAuthorOnly"
215
+
216
+ # @since 0.1.0
217
+ prop :fill_forms, T.nilable(T::Boolean), name: "fillForms"
218
+
219
+ # @since 0.1.0
220
+ prop :modify_content_control, T.nilable(T::Boolean), name: "modifyContentControl"
221
+
222
+ # @since 0.1.0
223
+ prop :modify_filter, T.nilable(T::Boolean), name: "modifyFilter"
224
+
225
+ # @since 0.1.0
226
+ prop :print, T.nilable(T::Boolean), name: "print"
227
+
228
+ # @since 0.1.0
229
+ prop :protect, T.nilable(T::Boolean), name: "protect"
230
+
231
+ # @deprecated Use events.onRequestRename instead. This property is deprecated since Document Server version 6.0.
232
+ # @since 0.1.0
233
+ prop :rename, T.nilable(T::Boolean), name: "rename"
234
+
235
+ # @since 0.1.0
236
+ prop :review, T.nilable(T::Boolean), name: "review"
237
+
238
+ # @since 0.1.0
239
+ prop :review_groups, T.nilable(T::Array[String]), name: "reviewGroups"
240
+
241
+ # @since 0.1.0
242
+ prop :user_info_groups, T.nilable(T::Array[String]), name: "userInfoGroups"
243
+
244
+ # @since 0.1.0
245
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Permissions)}
246
+ def self.from_hash(hash, strict = nil)
247
+ super(hash, strict)
248
+ end
249
+ end
250
+
251
+ # @since 0.1.0
252
+ prop :file_type, T.nilable(String), name: "fileType"
253
+
254
+ # @since 0.1.0
255
+ prop :key, T.nilable(String), name: "key"
256
+
257
+ # @since 0.1.0
258
+ prop :reference_data, T.nilable(ReferenceData), name: "referenceData"
259
+
260
+ # @since 0.1.0
261
+ prop :title, T.nilable(String), name: "title"
262
+
263
+ # @since 0.1.0
264
+ prop :url, T.nilable(String), name: "url"
265
+
266
+ # @since 0.1.0
267
+ prop :info, T.nilable(Info), name: "info"
268
+
269
+ # @since 0.1.0
270
+ prop :permissions, T.nilable(Permissions), name: "permissions"
271
+
272
+ # @since 0.1.0
273
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Document)}
274
+ def self.from_hash(hash, strict = nil)
275
+ super(hash, strict)
276
+ end
277
+ end
278
+
279
+ # @since 0.1.0
280
+ class EditorConfig < T::Struct
281
+ extend T::Sig
282
+
283
+ # @since 0.1.0
284
+ class CoEditing < T::Struct
285
+ extend T::Sig
286
+
287
+ # @since 0.1.0
288
+ class Mode < T::Enum
289
+ enums do
290
+ # @since 0.1.0
291
+ Fast = new("fast")
292
+
293
+ # @since 0.1.0
294
+ Strict = new("strict")
295
+ end
296
+ end
297
+
298
+ # @since 0.1.0
299
+ prop :mode, T.nilable(Mode), name: "mode"
300
+
301
+ # @since 0.1.0
302
+ prop :change, T.nilable(T::Boolean), name: "change"
303
+
304
+ # @since 0.1.0
305
+ sig {params(hash: T.untyped, strict: T.untyped).returns(CoEditing)}
306
+ def self.from_hash(hash, strict = nil)
307
+ super(hash, strict)
308
+ end
309
+ end
310
+
311
+ # @since 0.1.0
312
+ class Mode < T::Enum
313
+ enums do
314
+ # @since 0.1.0
315
+ View = new("view")
316
+
317
+ # @since 0.1.0
318
+ Edit = new("edit")
319
+ end
320
+ end
321
+
322
+ # @since 0.1.0
323
+ class Recent < T::Struct
324
+ extend T::Sig
325
+
326
+ # @since 0.1.0
327
+ prop :folder, T.nilable(String), name: "folder"
328
+
329
+ # @since 0.1.0
330
+ prop :title, T.nilable(String), name: "title"
331
+
332
+ # @since 0.1.0
333
+ prop :url, T.nilable(String), name: "url"
334
+
335
+ # @since 0.1.0
336
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Recent)}
337
+ def self.from_hash(hash, strict = nil)
338
+ super(hash, strict)
339
+ end
340
+ end
341
+
342
+ # @since 0.1.0
343
+ class Template < T::Struct
344
+ extend T::Sig
345
+
346
+ # @since 0.1.0
347
+ prop :image, T.nilable(String), name: "image"
348
+
349
+ # @since 0.1.0
350
+ prop :title, T.nilable(String), name: "title"
351
+
352
+ # @since 0.1.0
353
+ prop :url, T.nilable(String), name: "url"
354
+
355
+ # @since 0.1.0
356
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Template)}
357
+ def self.from_hash(hash, strict = nil)
358
+ super(hash, strict)
359
+ end
360
+ end
361
+
362
+ # @since 0.1.0
363
+ class User < T::Struct
364
+ extend T::Sig
365
+
366
+ # @deprecated Use {name} instead. This property is deprecated since Document Server version 4.2.
367
+ # @since 0.1.0
368
+ prop :firstname, T.nilable(String), name: "firstname"
369
+
370
+ # @since 0.1.0
371
+ prop :group, T.nilable(String), name: "group"
372
+
373
+ # @since 0.1.0
374
+ prop :id, T.nilable(String), name: "id"
375
+
376
+ # @since 0.1.0
377
+ prop :image, T.nilable(String), name: "image"
378
+
379
+ # @deprecated Use {name} instead. This property is deprecated since Document Server version 4.2.
380
+ # @since 0.1.0
381
+ prop :lastname, T.nilable(String), name: "lastname"
382
+
383
+ # @since 0.1.0
384
+ prop :name, T.nilable(String), name: "name"
385
+
386
+ # @since 0.1.0
387
+ sig {params(hash: T.untyped, strict: T.untyped).returns(User)}
388
+ def self.from_hash(hash, strict = nil)
389
+ super(hash, strict)
390
+ end
391
+ end
392
+
393
+ # @since 0.1.0
394
+ class Customization < T::Struct
395
+ extend T::Sig
396
+
397
+ # @since 0.1.0
398
+ class Anonymous < T::Struct
399
+ extend T::Sig
400
+
401
+ # @since 0.1.0
402
+ prop :request, T.nilable(T::Boolean), name: "request"
403
+
404
+ # @since 0.1.0
405
+ prop :label, T.nilable(String), name: "label"
406
+
407
+ # @since 0.1.0
408
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Anonymous)}
409
+ def self.from_hash(hash, strict = nil)
410
+ super(hash, strict)
411
+ end
412
+ end
413
+
414
+ # @since 0.1.0
415
+ class Close < T::Struct
416
+ extend T::Sig
417
+
418
+ # @since 0.1.0
419
+ prop :visible, T.nilable(T::Boolean), name: "visible"
420
+
421
+ # @since 0.1.0
422
+ prop :text, T.nilable(String), name: "text"
423
+
424
+ # @since 0.1.0
425
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Close)}
426
+ def self.from_hash(hash, strict = nil)
427
+ super(hash, strict)
428
+ end
429
+ end
430
+
431
+ # @since 0.1.0
432
+ class Customer < T::Struct
433
+ extend T::Sig
434
+
435
+ # @since 0.1.0
436
+ prop :address, T.nilable(String), name: "address"
437
+
438
+ # @since 0.1.0
439
+ prop :info, T.nilable(String), name: "info"
440
+
441
+ # @since 0.1.0
442
+ prop :logo, T.nilable(String), name: "logo"
443
+
444
+ # @since 0.1.0
445
+ prop :logo_dark, T.nilable(String), name: "logoDark"
446
+
447
+ # @since 0.1.0
448
+ prop :mail, T.nilable(String), name: "mail"
449
+
450
+ # @since 0.1.0
451
+ prop :name, T.nilable(String), name: "name"
452
+
453
+ # @since 0.1.0
454
+ prop :phone, T.nilable(String), name: "phone"
455
+
456
+ # @since 0.1.0
457
+ prop :www, T.nilable(String), name: "www"
458
+
459
+ # @since 0.1.0
460
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Customer)}
461
+ def self.from_hash(hash, strict = nil)
462
+ super(hash, strict)
463
+ end
464
+ end
465
+
466
+ # @since 0.1.0
467
+ class Features < T::Struct
468
+ extend T::Sig
469
+
470
+ # @since 0.1.0
471
+ class Spellcheck < T::Struct
472
+ extend T::Sig
473
+
474
+ # @since 0.1.0
475
+ prop :mode, T.nilable(T::Boolean), name: "mode"
476
+
477
+ # @since 0.1.0
478
+ prop :change, T.nilable(T::Boolean), name: "change"
479
+
480
+ # @since 0.1.0
481
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Spellcheck)}
482
+ def self.from_hash(hash, strict = nil)
483
+ super(hash, strict)
484
+ end
485
+ end
486
+
487
+ # @since 0.1.0
488
+ class TabBackground < T::Struct
489
+ extend T::Sig
490
+
491
+ # @since 0.1.0
492
+ class Mode < T::Enum
493
+ enums do
494
+ # @since 0.1.0
495
+ Header = new("header")
496
+
497
+ # @since 0.1.0
498
+ Toolbar = new("toolbar")
499
+ end
500
+ end
501
+
502
+ # @since 0.1.0
503
+ prop :mode, T.nilable(Mode), name: "mode"
504
+
505
+ # @since 0.1.0
506
+ prop :change, T.nilable(T::Boolean), name: "change"
507
+
508
+ # @since 0.1.0
509
+ sig {params(hash: T.untyped, strict: T.untyped).returns(TabBackground)}
510
+ def self.from_hash(hash, strict = nil)
511
+ super(hash, strict)
512
+ end
513
+ end
514
+
515
+ # @since 0.1.0
516
+ class TabStyle < T::Struct
517
+ extend T::Sig
518
+
519
+ # @since 0.1.0
520
+ class Mode < T::Enum
521
+ enums do
522
+ # @since 0.1.0
523
+ Fill = new("fill")
524
+
525
+ # @since 0.1.0
526
+ Line = new("line")
527
+ end
528
+ end
529
+
530
+ # @since 0.1.0
531
+ prop :mode, T.nilable(Mode), name: "mode"
532
+
533
+ # @since 0.1.0
534
+ prop :change, T.nilable(T::Boolean), name: "change"
535
+
536
+ # @since 0.1.0
537
+ sig {params(hash: T.untyped, strict: T.untyped).returns(TabStyle)}
538
+ def self.from_hash(hash, strict = nil)
539
+ super(hash, strict)
540
+ end
541
+ end
542
+
543
+ # @since 0.1.0
544
+ prop :roles, T.nilable(T::Boolean), name: "roles"
545
+
546
+ # @since 0.1.0
547
+ prop :spellcheck, T.nilable(T.any(Spellcheck, T::Boolean)), name: "spellcheck"
548
+
549
+ # @since 0.1.0
550
+ prop :tab_background, T.nilable(T.any(TabBackground, TabBackground::Mode)), name: "tabBackground"
551
+
552
+ # @since 0.1.0
553
+ prop :tab_style, T.nilable(T.any(TabStyle, TabStyle::Mode)), name: "tabStyle"
554
+
555
+ # @since 0.1.0
556
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Features)}
557
+ def self.from_hash(hash, strict = nil)
558
+ s = T.cast(super(hash, strict), Features)
559
+
560
+ spellcheck_v = s.spellcheck
561
+ if !spellcheck_v.nil? && !spellcheck_v.is_a?(TrueClass) && !spellcheck_v.is_a?(FalseClass)
562
+ s.spellcheck = Spellcheck.from_hash(spellcheck_v, strict)
563
+ end
564
+
565
+ tab_background_v = T.cast(s.tab_background, T.nilable(T.any(T::Hash[T.untyped, T.untyped], String)))
566
+ if !tab_background_v.nil? && tab_background_v.is_a?(String)
567
+ s.tab_background = TabBackground::Mode.from_serialized(tab_background_v)
568
+ elsif !tab_background_v.nil? && tab_background_v.is_a?(Hash)
569
+ s.tab_background = TabBackground.from_hash(tab_background_v, strict)
570
+ end
571
+
572
+ tab_style_v = T.cast(s.tab_style, T.nilable(T.any(T::Hash[T.untyped, T.untyped], String)))
573
+ if !tab_style_v.nil? && tab_style_v.is_a?(String)
574
+ s.tab_style = TabStyle::Mode.from_serialized(tab_style_v)
575
+ elsif !tab_style_v.nil? && tab_style_v.is_a?(Hash)
576
+ s.tab_style = TabStyle.from_hash(tab_style_v, strict)
577
+ end
578
+
579
+ s
580
+ end
581
+
582
+ # @since 0.1.0
583
+ sig {params(strict: T.untyped).returns(T.untyped)}
584
+ def serialize(strict = nil)
585
+ h = T.cast(super(strict), T::Hash[T.untyped, T.untyped])
586
+
587
+ spellcheck_v = spellcheck
588
+ if !spellcheck_v.nil? && !spellcheck_v.is_a?(TrueClass) && !spellcheck_v.is_a?(FalseClass)
589
+ h[Features.props[:spellcheck][:name] || "spellcheck"] = spellcheck_v.serialize(strict)
590
+ end
591
+
592
+ tab_background_v = tab_background
593
+ if !tab_background_v.nil? && tab_background_v.is_a?(TabBackground::Mode)
594
+ h[Features.props[:tab_background][:name] || "tab_background"] = tab_background_v.serialize
595
+ elsif !tab_background_v.nil? && tab_background_v.is_a?(TabBackground)
596
+ h[Features.props[:tab_background][:name] || "tab_background"] = tab_background_v.serialize(strict)
597
+ end
598
+
599
+ tab_style_v = tab_style
600
+ if !tab_style_v.nil? && tab_style_v.is_a?(TabStyle::Mode)
601
+ h[Features.props[:tab_style][:name] || "tab_style"] = tab_style_v.serialize
602
+ elsif !tab_style_v.nil? && tab_style_v.is_a?(TabStyle)
603
+ h[Features.props[:tab_style][:name] || "tab_style"] = tab_style_v.serialize(strict)
604
+ end
605
+
606
+ h
607
+ end
608
+ end
609
+
610
+ # @since 0.1.0
611
+ class Feedback < T::Struct
612
+ extend T::Sig
613
+
614
+ # @since 0.1.0
615
+ prop :url, T.nilable(String), name: "url"
616
+
617
+ # @since 0.1.0
618
+ prop :visible, T.nilable(T::Boolean), name: "visible"
619
+
620
+ # @since 0.1.0
621
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Feedback)}
622
+ def self.from_hash(hash, strict = nil)
623
+ super(hash, strict)
624
+ end
625
+ end
626
+
627
+ # @since 0.1.0
628
+ class Font < T::Struct
629
+ extend T::Sig
630
+
631
+ # @since 0.1.0
632
+ prop :name, T.nilable(String), name: "name"
633
+
634
+ # @since 0.1.0
635
+ prop :size, T.nilable(String), name: "size"
636
+
637
+ # @since 0.1.0
638
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Font)}
639
+ def self.from_hash(hash, strict = nil)
640
+ super(hash, strict)
641
+ end
642
+ end
643
+
644
+ # @since 0.1.0
645
+ class GoBack < T::Struct
646
+ extend T::Sig
647
+
648
+ # @since 0.1.0
649
+ prop :blank, T.nilable(T::Boolean), name: "blank"
650
+
651
+ # @deprecated Use onRequestClose instead. This property is deprecated since Document Server version 8.1.
652
+ # @since 0.1.0
653
+ prop :request_close, T.nilable(T::Boolean), name: "requestClose"
654
+
655
+ # @since 0.1.0
656
+ prop :text, T.nilable(String), name: "text"
657
+
658
+ # @since 0.1.0
659
+ prop :url, T.nilable(String), name: "url"
660
+
661
+ # @since 0.1.0
662
+ sig {params(hash: T.untyped, strict: T.untyped).returns(GoBack)}
663
+ def self.from_hash(hash, strict = nil)
664
+ super(hash, strict)
665
+ end
666
+ end
667
+
668
+ # @since 0.1.0
669
+ class IntegrationMode < T::Enum
670
+ enums do
671
+ # @since 0.1.0
672
+ Embed = new("embed")
673
+ end
674
+ end
675
+
676
+ # @since 0.1.0
677
+ class Layout < T::Struct
678
+ extend T::Sig
679
+
680
+ # @since 0.1.0
681
+ class Header < T::Struct
682
+ extend T::Sig
683
+
684
+ # @since 0.1.0
685
+ prop :edit_mode, T.nilable(T::Boolean), name: "editMode"
686
+
687
+ # @since 0.1.0
688
+ prop :save, T.nilable(T::Boolean), name: "save"
689
+
690
+ # @since 0.1.0
691
+ prop :users, T.nilable(T::Boolean), name: "users"
692
+
693
+ # @since 0.1.0
694
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Header)}
695
+ def self.from_hash(hash, strict = nil)
696
+ super(hash, strict)
697
+ end
698
+ end
699
+
700
+ # @since 0.1.0
701
+ class LeftMenu < T::Struct
702
+ extend T::Sig
703
+
704
+ # @since 0.1.0
705
+ prop :menu, T.nilable(T::Boolean), name: "menu"
706
+
707
+ # @since 0.1.0
708
+ prop :navigation, T.nilable(T::Boolean), name: "navigation"
709
+
710
+ # @since 0.1.0
711
+ prop :spellcheck, T.nilable(T::Boolean), name: "spellcheck"
712
+
713
+ # @since 0.1.0
714
+ sig {params(hash: T.untyped, strict: T.untyped).returns(LeftMenu)}
715
+ def self.from_hash(hash, strict = nil)
716
+ super(hash, strict)
717
+ end
718
+ end
719
+
720
+ # @since 0.1.0
721
+ class RightMenu < T::Struct
722
+ extend T::Sig
723
+
724
+ # @since 0.1.0
725
+ prop :mode, T.nilable(T::Boolean), name: "mode"
726
+
727
+ # @since 0.1.0
728
+ sig {params(hash: T.untyped, strict: T.untyped).returns(RightMenu)}
729
+ def self.from_hash(hash, strict = nil)
730
+ super(hash, strict)
731
+ end
732
+ end
733
+
734
+ # @since 0.1.0
735
+ class StatusBar < T::Struct
736
+ extend T::Sig
737
+
738
+ # @since 0.1.0
739
+ prop :action_status, T.nilable(T::Boolean), name: "actionStatus"
740
+
741
+ # @since 0.1.0
742
+ prop :doc_lang, T.nilable(T::Boolean), name: "docLang"
743
+
744
+ # @since 0.1.0
745
+ prop :text_lang, T.nilable(T::Boolean), name: "textLang"
746
+
747
+ # @since 0.1.0
748
+ sig {params(hash: T.untyped, strict: T.untyped).returns(StatusBar)}
749
+ def self.from_hash(hash, strict = nil)
750
+ super(hash, strict)
751
+ end
752
+ end
753
+
754
+ # @since 0.1.0
755
+ class Toolbar < T::Struct
756
+ extend T::Sig
757
+
758
+ # @since 0.1.0
759
+ class Collaboration < T::Struct
760
+ extend T::Sig
761
+
762
+ # @since 0.1.0
763
+ prop :mailmerge, T.nilable(T::Boolean), name: "mailmerge"
764
+
765
+ # @since 0.1.0
766
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Collaboration)}
767
+ def self.from_hash(hash, strict = nil)
768
+ super(hash, strict)
769
+ end
770
+ end
771
+
772
+ # @since 0.1.0
773
+ class File < T::Struct
774
+ extend T::Sig
775
+
776
+ # @since 0.1.0
777
+ prop :close, T.nilable(T::Boolean), name: "close"
778
+
779
+ # @since 0.1.0
780
+ prop :info, T.nilable(T::Boolean), name: "info"
781
+
782
+ # @since 0.1.0
783
+ prop :save, T.nilable(T::Boolean), name: "save"
784
+
785
+ # @since 0.1.0
786
+ prop :settings, T.nilable(T::Boolean), name: "settings"
787
+
788
+ # @since 0.1.0
789
+ sig {params(hash: T.untyped, strict: T.untyped).returns(File)}
790
+ def self.from_hash(hash, strict = nil)
791
+ super(hash, strict)
792
+ end
793
+ end
794
+
795
+ # @since 0.1.0
796
+ class Home < T::Struct
797
+ extend T::Sig
798
+
799
+ # @since 0.1.0
800
+ prop :mailmerge, T.nilable(T::Boolean), name: "mailmerge"
801
+
802
+ # @since 0.1.0
803
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Home)}
804
+ def self.from_hash(hash, strict = nil)
805
+ super(hash, strict)
806
+ end
807
+ end
808
+
809
+ # @since 0.1.0
810
+ class View < T::Struct
811
+ extend T::Sig
812
+
813
+ # @since 0.1.0
814
+ prop :navigation, T.nilable(T::Boolean), name: "navigation"
815
+
816
+ # @since 0.1.0
817
+ sig {params(hash: T.untyped, strict: T.untyped).returns(View)}
818
+ def self.from_hash(hash, strict = nil)
819
+ super(hash, strict)
820
+ end
821
+ end
822
+
823
+ # @since 0.1.0
824
+ prop :collaboration, T.nilable(T.any(Collaboration, T::Boolean)), name: "collaboration"
825
+
826
+ # @since 0.1.0
827
+ prop :draw, T.nilable(T::Boolean), name: "draw"
828
+
829
+ # @since 0.1.0
830
+ prop :file, T.nilable(T.any(File, T::Boolean)), name: "file"
831
+
832
+ # @deprecated Use {Collaboration.mailmerge} instead.
833
+ # @since 0.1.0
834
+ prop :home, T.nilable(Home), name: "home"
835
+
836
+ # @since 0.1.0
837
+ prop :layout, T.nilable(T::Boolean), name: "layout"
838
+
839
+ # @since 0.1.0
840
+ prop :plugins, T.nilable(T::Boolean), name: "plugins"
841
+
842
+ # @since 0.1.0
843
+ prop :protect, T.nilable(T::Boolean), name: "protect"
844
+
845
+ # @since 0.1.0
846
+ prop :references, T.nilable(T::Boolean), name: "references"
847
+
848
+ # @since 0.1.0
849
+ prop :save, T.nilable(T::Boolean), name: "save"
850
+
851
+ # @since 0.1.0
852
+ prop :view, T.nilable(T.any(View, T::Boolean)), name: "view"
853
+
854
+ # @since 0.1.0
855
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Toolbar)}
856
+ def self.from_hash(hash, strict = nil)
857
+ s = T.cast(super(hash, strict), Toolbar)
858
+
859
+ collaboration_v = s.collaboration
860
+ if !collaboration_v.nil? && !collaboration_v.is_a?(TrueClass) && !collaboration_v.is_a?(FalseClass)
861
+ s.collaboration = Collaboration.from_hash(collaboration_v, strict)
862
+ end
863
+
864
+ file_v = s.file
865
+ if !file_v.nil? && !file_v.is_a?(TrueClass) && !file_v.is_a?(FalseClass)
866
+ s.file = File.from_hash(file_v, strict)
867
+ end
868
+
869
+ view_v = s.view
870
+ if !view_v.nil? && !view_v.is_a?(TrueClass) && !view_v.is_a?(FalseClass)
871
+ s.view = View.from_hash(view_v, strict)
872
+ end
873
+
874
+ s
875
+ end
876
+
877
+ # @since 0.1.0
878
+ sig {params(strict: T.untyped).returns(T.untyped)}
879
+ def serialize(strict = nil)
880
+ h = T.cast(super(strict), T::Hash[T.untyped, T.untyped])
881
+
882
+ collaboration_v = collaboration
883
+ if !collaboration_v.nil? && !collaboration_v.is_a?(TrueClass) && !collaboration_v.is_a?(FalseClass)
884
+ h[Toolbar.props[:collaboration][:name] || "collaboration"] = collaboration_v.serialize(strict)
885
+ end
886
+
887
+ file_v = file
888
+ if !file_v.nil? && !file_v.is_a?(TrueClass) && !file_v.is_a?(FalseClass)
889
+ h[Toolbar.props[:file][:name] || "file"] = file_v.serialize(strict)
890
+ end
891
+
892
+ view_v = view
893
+ if !view_v.nil? && !view_v.is_a?(TrueClass) && !view_v.is_a?(FalseClass)
894
+ h[Toolbar.props[:view][:name] || "view"] = view_v.serialize(strict)
895
+ end
896
+
897
+ h
898
+ end
899
+ end
900
+
901
+ # @since 0.1.0
902
+ prop :header, T.nilable(Header), name: "header"
903
+
904
+ # @since 0.1.0
905
+ prop :left_menu, T.nilable(T.any(LeftMenu, T::Boolean)), name: "leftMenu"
906
+
907
+ # @since 0.1.0
908
+ prop :right_menu, T.nilable(T.any(RightMenu, T::Boolean)), name: "rightMenu"
909
+
910
+ # @since 0.1.0
911
+ prop :status_bar, T.nilable(T.any(StatusBar, T::Boolean)), name: "statusBar"
912
+
913
+ # @since 0.1.0
914
+ prop :toolbar, T.nilable(T.any(Toolbar, T::Boolean)), name: "toolbar"
915
+
916
+ # @since 0.1.0
917
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Layout)}
918
+ def self.from_hash(hash, strict = nil)
919
+ s = T.cast(super(hash, strict), Layout)
920
+
921
+ left_menu_v = s.left_menu
922
+ if !left_menu_v.nil? && !left_menu_v.is_a?(TrueClass) && !left_menu_v.is_a?(FalseClass)
923
+ s.left_menu = LeftMenu.from_hash(left_menu_v, strict)
924
+ end
925
+
926
+ right_menu_v = s.right_menu
927
+ if !right_menu_v.nil? && !right_menu_v.is_a?(TrueClass) && !right_menu_v.is_a?(FalseClass)
928
+ s.right_menu = RightMenu.from_hash(right_menu_v, strict)
929
+ end
930
+
931
+ status_bar_v = s.status_bar
932
+ if !status_bar_v.nil? && !status_bar_v.is_a?(TrueClass) && !status_bar_v.is_a?(FalseClass)
933
+ s.status_bar = StatusBar.from_hash(status_bar_v, strict)
934
+ end
935
+
936
+ toolbar_v = s.toolbar
937
+ if !toolbar_v.nil? && !toolbar_v.is_a?(TrueClass) && !toolbar_v.is_a?(FalseClass)
938
+ s.toolbar = Toolbar.from_hash(toolbar_v, strict)
939
+ end
940
+
941
+ s
942
+ end
943
+
944
+ # @since 0.1.0
945
+ sig {params(strict: T.untyped).returns(T.untyped)}
946
+ def serialize(strict = nil)
947
+ h = T.cast(super(strict), T::Hash[T.untyped, T.untyped])
948
+
949
+ left_menu_v = left_menu
950
+ if !left_menu_v.nil? && !left_menu_v.is_a?(TrueClass) && !left_menu_v.is_a?(FalseClass)
951
+ h[Layout.props[:left_menu][:name] || "left_menu"] = left_menu_v.serialize(strict)
952
+ end
953
+
954
+ right_menu_v = right_menu
955
+ if !right_menu_v.nil? && !right_menu_v.is_a?(TrueClass) && !right_menu_v.is_a?(FalseClass)
956
+ h[Layout.props[:right_menu][:name] || "right_menu"] = right_menu_v.serialize(strict)
957
+ end
958
+
959
+ status_bar_v = status_bar
960
+ if !status_bar_v.nil? && !status_bar_v.is_a?(TrueClass) && !status_bar_v.is_a?(FalseClass)
961
+ h[Layout.props[:status_bar][:name] || "status_bar"] = status_bar_v.serialize(strict)
962
+ end
963
+
964
+ toolbar_v = toolbar
965
+ if !toolbar_v.nil? && !toolbar_v.is_a?(TrueClass) && !toolbar_v.is_a?(FalseClass)
966
+ h[Layout.props[:toolbar][:name] || "toolbar"] = toolbar_v.serialize(strict)
967
+ end
968
+
969
+ h
970
+ end
971
+ end
972
+
973
+ # @since 0.1.0
974
+ class Logo < T::Struct
975
+ extend T::Sig
976
+
977
+ # @since 0.1.0
978
+ prop :image, T.nilable(String), name: "image"
979
+
980
+ # @since 0.1.0
981
+ prop :image_dark, T.nilable(String), name: "imageDark"
982
+
983
+ # @since 0.1.0
984
+ prop :image_light, T.nilable(String), name: "imageLight"
985
+
986
+ # @since 0.1.0
987
+ prop :image_embedded, T.nilable(String), name: "imageEmbedded"
988
+
989
+ # @since 0.1.0
990
+ prop :url, T.nilable(String), name: "url"
991
+
992
+ # @since 0.1.0
993
+ prop :visible, T.nilable(T::Boolean), name: "visible"
994
+
995
+ # @since 0.1.0
996
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Logo)}
997
+ def self.from_hash(hash, strict = nil)
998
+ super(hash, strict)
999
+ end
1000
+ end
1001
+
1002
+ # @since 0.1.0
1003
+ class MacrosMode < T::Enum
1004
+ enums do
1005
+ # @since 0.1.0
1006
+ Disable = new("disable")
1007
+
1008
+ # @since 0.1.0
1009
+ Enable = new("enable")
1010
+
1011
+ # @since 0.1.0
1012
+ Warn = new("warn")
1013
+ end
1014
+ end
1015
+
1016
+ # @since 0.1.0
1017
+ class Mobile < T::Struct
1018
+ extend T::Sig
1019
+
1020
+ # @since 0.1.0
1021
+ prop :force_view, T.nilable(T::Boolean), name: "forceView"
1022
+
1023
+ # @since 0.1.0
1024
+ prop :info, T.nilable(T::Boolean), name: "info"
1025
+
1026
+ # @since 0.1.0
1027
+ prop :standard_view, T.nilable(T::Boolean), name: "standardView"
1028
+
1029
+ # @since 0.1.0
1030
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Mobile)}
1031
+ def self.from_hash(hash, strict = nil)
1032
+ super(hash, strict)
1033
+ end
1034
+ end
1035
+
1036
+ # @since 0.1.0
1037
+ class PointerMode < T::Enum
1038
+ enums do
1039
+ # @since 0.1.0
1040
+ Hand = new("hand")
1041
+
1042
+ # @since 0.1.0
1043
+ Select = new("select")
1044
+ end
1045
+ end
1046
+
1047
+ # @since 0.1.0
1048
+ class Review < T::Struct
1049
+ extend T::Sig
1050
+
1051
+ # @since 0.1.0
1052
+ class ReviewDisplay < T::Enum
1053
+ enums do
1054
+ # @since 0.1.0
1055
+ Markup = new("markup")
1056
+
1057
+ # @since 0.1.0
1058
+ Simple = new("simple")
1059
+
1060
+ # @since 0.1.0
1061
+ Final = new("final")
1062
+
1063
+ # @since 0.1.0
1064
+ Original = new("original")
1065
+ end
1066
+ end
1067
+
1068
+ # @since 0.1.0
1069
+ prop :hide_review_display, T.nilable(T::Boolean), name: "hideReviewDisplay"
1070
+
1071
+ # @since 0.1.0
1072
+ prop :hover_mode, T.nilable(T::Boolean), name: "hoverMode"
1073
+
1074
+ # @since 0.1.0
1075
+ prop :review_display, T.nilable(ReviewDisplay), name: "reviewDisplay"
1076
+
1077
+ # @since 0.1.0
1078
+ prop :show_review_changes, T.nilable(T::Boolean), name: "showReviewChanges"
1079
+
1080
+ # @since 0.1.0
1081
+ prop :track_changes, T.nilable(T::Boolean), name: "trackChanges"
1082
+
1083
+ # @since 0.1.0
1084
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Review)}
1085
+ def self.from_hash(hash, strict = nil)
1086
+ super(hash, strict)
1087
+ end
1088
+ end
1089
+
1090
+ # @since 0.1.0
1091
+ class SubmitForm < T::Struct
1092
+ extend T::Sig
1093
+
1094
+ # @since 0.1.0
1095
+ prop :visible, T.nilable(T::Boolean), name: "visible"
1096
+
1097
+ # @since 0.1.0
1098
+ prop :result_message, T.nilable(String), name: "resultMessage"
1099
+
1100
+ # @since 0.1.0
1101
+ sig {params(hash: T.untyped, strict: T.untyped).returns(SubmitForm)}
1102
+ def self.from_hash(hash, strict = nil)
1103
+ super(hash, strict)
1104
+ end
1105
+ end
1106
+
1107
+ # @since 0.1.0
1108
+ class UiTheme < T::Enum
1109
+ enums do
1110
+ # @since 0.1.0
1111
+ Light = new("theme-light")
1112
+
1113
+ # @since 0.1.0
1114
+ ClassicLight = new("theme-classic-light")
1115
+
1116
+ # @since 0.1.0
1117
+ Dark = new("theme-dark")
1118
+
1119
+ # @since 0.1.0
1120
+ ContrastDark = new("theme-contrast-dark")
1121
+
1122
+ # @since 0.1.0
1123
+ DefaultDark = new("default-dark")
1124
+
1125
+ # @since 0.1.0
1126
+ DefaultLight = new("default-light")
1127
+ end
1128
+ end
1129
+
1130
+ # @since 0.1.0
1131
+ class Unit < T::Enum
1132
+ enums do
1133
+ # @since 0.1.0
1134
+ Cm = new("cm")
1135
+
1136
+ # @since 0.1.0
1137
+ Pt = new("pt")
1138
+
1139
+ # @since 0.1.0
1140
+ Inch = new("inch")
1141
+ end
1142
+ end
1143
+
1144
+ # @since 0.1.0
1145
+ prop :about, T.nilable(T::Boolean), name: "about"
1146
+
1147
+ # @since 0.1.0
1148
+ prop :anonymous, T.nilable(Anonymous), name: "anonymous"
1149
+
1150
+ # @since 0.1.0
1151
+ prop :autosave, T.nilable(T::Boolean), name: "autosave"
1152
+
1153
+ # @deprecated Use {::Onlyoffice::DocsIntegrationSdk::DocumentEditor::Config::Document::Permissions.chat} instead. This property is deprecated since Document Server version 7.1.
1154
+ # @since 0.1.0
1155
+ prop :chat, T.nilable(T::Boolean), name: "chat"
1156
+
1157
+ # @since 0.1.0
1158
+ prop :close, T.nilable(Close), name: "close"
1159
+
1160
+ # @deprecated Use {::Onlyoffice::DocsIntegrationSdk::DocumentEditor::Config::Document::Permissions.edit_comment_author_only} and {::Onlyoffice::DocsIntegrationSdk::DocumentEditor::Config::Document::Permissions.delete_comment_author_only} instead. This property is deprecated since Document Server version 6.3.
1161
+ # @since 0.1.0
1162
+ prop :comment_author_only, T.nilable(T::Boolean), name: "commentAuthorOnly"
1163
+
1164
+ # @since 0.1.0
1165
+ prop :comments, T.nilable(T::Boolean), name: "comments"
1166
+
1167
+ # @since 0.1.0
1168
+ prop :compact_header, T.nilable(T::Boolean), name: "compactHeader"
1169
+
1170
+ # @since 0.1.0
1171
+ prop :compact_toolbar, T.nilable(T::Boolean), name: "compactToolbar"
1172
+
1173
+ # @since 0.1.0
1174
+ prop :compatible_features, T.nilable(T::Boolean), name: "compatibleFeatures"
1175
+
1176
+ # @since 0.1.0
1177
+ prop :customer, T.nilable(Customer), name: "customer"
1178
+
1179
+ # @since 0.1.0
1180
+ prop :features, T.nilable(Features), name: "features"
1181
+
1182
+ # @since 0.1.0
1183
+ prop :feedback, T.nilable(T.any(Feedback, T::Boolean)), name: "feedback"
1184
+
1185
+ # @since 0.1.0
1186
+ prop :font, T.nilable(Font), name: "font"
1187
+
1188
+ # @since 0.1.0
1189
+ prop :forcesave, T.nilable(T::Boolean), name: "forcesave"
1190
+
1191
+ # @since 0.1.0
1192
+ prop :goback, T.nilable(GoBack), name: "goback"
1193
+
1194
+ # @since 0.1.0
1195
+ prop :help, T.nilable(T::Boolean), name: "help"
1196
+
1197
+ # @since 0.1.0
1198
+ prop :hide_notes, T.nilable(T::Boolean), name: "hideNotes"
1199
+
1200
+ # @since 0.1.0
1201
+ prop :hide_right_menu, T.nilable(T::Boolean), name: "hideRightMenu"
1202
+
1203
+ # @since 0.1.0
1204
+ prop :hide_rulers, T.nilable(T::Boolean), name: "hideRulers"
1205
+
1206
+ # @since 0.1.0
1207
+ prop :integration_mode, T.nilable(IntegrationMode), name: "integrationMode"
1208
+
1209
+ # @since 0.1.0
1210
+ prop :layout, T.nilable(Layout), name: "layout"
1211
+
1212
+ # @deprecated Use {Layout.left_menu} instead. This property is deprecated since Document Server version 7.1.
1213
+ # @since 0.1.0
1214
+ prop :left_menu, T.nilable(T::Boolean), name: "leftMenu"
1215
+
1216
+ # @since 0.1.0
1217
+ prop :loader_logo, T.nilable(String), name: "loaderLogo"
1218
+
1219
+ # @since 0.1.0
1220
+ prop :loader_name, T.nilable(String), name: "loaderName"
1221
+
1222
+ # @since 0.1.0
1223
+ prop :logo, T.nilable(Logo), name: "logo"
1224
+
1225
+ # @since 0.1.0
1226
+ prop :macros, T.nilable(T::Boolean), name: "macros"
1227
+
1228
+ # @since 0.1.0
1229
+ prop :macros_mode, T.nilable(MacrosMode), name: "macrosMode"
1230
+
1231
+ # @since 0.1.0
1232
+ prop :mention_share, T.nilable(T::Boolean), name: "mentionShare"
1233
+
1234
+ # @since 0.1.0
1235
+ prop :mobile, T.nilable(Mobile), name: "mobile"
1236
+
1237
+ # @deprecated Use {mobile} instead. This property is deprecated since Document Server version 8.2.
1238
+ # @since 0.1.0
1239
+ prop :mobile_force_view, T.nilable(T::Boolean), name: "mobileForceView"
1240
+
1241
+ # @since 0.1.0
1242
+ prop :plugins, T.nilable(T::Boolean), name: "plugins"
1243
+
1244
+ # @since 0.1.0
1245
+ prop :pointer_mode, T.nilable(PointerMode), name: "pointerMode"
1246
+
1247
+ # @since 0.1.0
1248
+ prop :review, T.nilable(Review), name: "review"
1249
+
1250
+ # @deprecated Use {Review.review_display} instead. This property is deprecated since Document Server version 7.0.
1251
+ # @since 0.1.0
1252
+ prop :review_display, T.nilable(Review::ReviewDisplay), name: "reviewDisplay"
1253
+
1254
+ # @deprecated Use {Layout.right_menu} instead. This property is deprecated since Document Server version 7.1.
1255
+ # @since 0.1.0
1256
+ prop :right_menu, T.nilable(T::Boolean), name: "rightMenu"
1257
+
1258
+ # @deprecated Use {Review.show_review_changes} instead. This property is deprecated since Document Server version 7.0.
1259
+ # @since 0.1.0
1260
+ prop :show_review_changes, T.nilable(T::Boolean), name: "showReviewChanges"
1261
+
1262
+ # @since 0.1.0
1263
+ prop :slide_player_background, T.nilable(String), name: "slidePlayerBackground"
1264
+
1265
+ # @deprecated Use {Features.spellcheck} instead. This property is deprecated since Document Server version 7.1.
1266
+ # @since 0.1.0
1267
+ prop :spellcheck, T.nilable(T::Boolean), name: "spellcheck"
1268
+
1269
+ # @deprecated Use {Layout.status_bar} instead. This property is deprecated since Document Server version 7.1.
1270
+ # @since 0.1.0
1271
+ prop :status_bar, T.nilable(T::Boolean), name: "statusBar"
1272
+
1273
+ # @since 0.1.0
1274
+ prop :submit_form, T.nilable(T.any(SubmitForm, T::Boolean)), name: "submitForm"
1275
+
1276
+ # @deprecated Use {Layout.toolbar} instead. This property is deprecated since Document Server version 7.1.
1277
+ # @since 0.1.0
1278
+ prop :toolbar, T.nilable(T::Boolean), name: "toolbar"
1279
+
1280
+ # @since 0.1.0
1281
+ prop :toolbar_hide_file_name, T.nilable(T::Boolean), name: "toolbarHideFileName"
1282
+
1283
+ # @deprecated Use {Features.tab_style} and {Features.tab_background} instead. This property is deprecated since Document Server version 8.2.
1284
+ # @since 0.1.0
1285
+ prop :toolbar_no_tabs, T.nilable(T::Boolean), name: "toolbarNoTabs"
1286
+
1287
+ # @deprecated Use {Review.track_changes} instead. This property is deprecated since Document Server version 7.0.
1288
+ # @since 0.1.0
1289
+ prop :track_changes, T.nilable(T::Boolean), name: "trackChanges"
1290
+
1291
+ # @since 0.1.0
1292
+ prop :ui_theme, T.nilable(UiTheme), name: "uiTheme"
1293
+
1294
+ # @since 0.1.0
1295
+ prop :unit, T.nilable(Unit), name: "unit"
1296
+
1297
+ # @since 0.1.0
1298
+ prop :word_headings_color, T.nilable(String), name: "wordHeadingsColor"
1299
+
1300
+ # @since 0.1.0
1301
+ prop :zoom, T.nilable(Integer), name: "zoom"
1302
+
1303
+ # @since 0.1.0
1304
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Customization)}
1305
+ def self.from_hash(hash, strict = nil)
1306
+ s = T.cast(super(hash, strict), Customization)
1307
+
1308
+ feedback_v = s.feedback
1309
+ if !feedback_v.nil? && !feedback_v.is_a?(TrueClass) && !feedback_v.is_a?(FalseClass)
1310
+ s.feedback = Feedback.from_hash(feedback_v, strict)
1311
+ end
1312
+
1313
+ submit_form_v = s.submit_form
1314
+ if !submit_form_v.nil? && !submit_form_v.is_a?(TrueClass) && !submit_form_v.is_a?(FalseClass)
1315
+ s.submit_form = SubmitForm.from_hash(submit_form_v, strict)
1316
+ end
1317
+
1318
+ s
1319
+ end
1320
+
1321
+ # @since 0.1.0
1322
+ sig {params(strict: T.untyped).returns(T.untyped)}
1323
+ def serialize(strict = nil)
1324
+ h = T.cast(super(strict), T::Hash[T.untyped, T.untyped])
1325
+
1326
+ feedback_v = feedback
1327
+ if !feedback_v.nil? && !feedback_v.is_a?(TrueClass) && !feedback_v.is_a?(FalseClass)
1328
+ h[Customization.props[:feedback][:name] || "feedback"] = feedback_v.serialize(strict)
1329
+ end
1330
+
1331
+ submit_form_v = submit_form
1332
+ if !submit_form_v.nil? && !submit_form_v.is_a?(TrueClass) && !submit_form_v.is_a?(FalseClass)
1333
+ h[Customization.props[:submit_form][:name] || "submitForm"] = submit_form_v.serialize(strict)
1334
+ end
1335
+
1336
+ h
1337
+ end
1338
+ end
1339
+
1340
+ # @since 0.1.0
1341
+ class Embedded < T::Struct
1342
+ extend T::Sig
1343
+
1344
+ # @since 0.1.0
1345
+ class ToolbarDocked < T::Enum
1346
+ enums do
1347
+ # @since 0.1.0
1348
+ Top = new("top")
1349
+
1350
+ # @since 0.1.0
1351
+ Bottom = new("bottom")
1352
+ end
1353
+ end
1354
+
1355
+ # @since 0.1.0
1356
+ prop :embed_url, T.nilable(String), name: "embedUrl"
1357
+
1358
+ # @since 0.1.0
1359
+ prop :fullscreen_url, T.nilable(String), name: "fullscreenUrl"
1360
+
1361
+ # @since 0.1.0
1362
+ prop :save_url, T.nilable(String), name: "saveUrl"
1363
+
1364
+ # @since 0.1.0
1365
+ prop :share_url, T.nilable(String), name: "shareUrl"
1366
+
1367
+ # @since 0.1.0
1368
+ prop :toolbar_docked, T.nilable(ToolbarDocked), name: "toolbarDocked"
1369
+
1370
+ # @since 0.1.0
1371
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Embedded)}
1372
+ def self.from_hash(hash, strict = nil)
1373
+ super(hash, strict)
1374
+ end
1375
+ end
1376
+
1377
+ # @since 0.1.0
1378
+ class Plugins < T::Struct
1379
+ extend T::Sig
1380
+
1381
+ # @since 0.1.0
1382
+ prop :autostart, T.nilable(T::Array[String]), name: "autostart"
1383
+
1384
+ # @since 0.1.0
1385
+ prop :options, T.nilable(T::Hash[T.untyped, T.untyped]), name: "options"
1386
+
1387
+ # @since 0.1.0
1388
+ prop :plugins_data, T.nilable(T::Array[String]), name: "pluginsData"
1389
+
1390
+ # @since 0.1.0
1391
+ prop :url, T.nilable(String), name: "url"
1392
+
1393
+ # @since 0.1.0
1394
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Plugins)}
1395
+ def self.from_hash(hash, strict = nil)
1396
+ super(hash, strict)
1397
+ end
1398
+ end
1399
+
1400
+ # @since 0.1.0
1401
+ prop :action_link, T.nilable(T::Hash[T.untyped, T.untyped]), name: "actionLink"
1402
+
1403
+ # @since 0.1.0
1404
+ prop :callback_url, T.nilable(String), name: "callbackUrl"
1405
+
1406
+ # @since 0.1.0
1407
+ prop :co_editing, T.nilable(CoEditing), name: "coEditing"
1408
+
1409
+ # @since 0.1.0
1410
+ prop :create_url, T.nilable(String), name: "createUrl"
1411
+
1412
+ # @since 0.1.0
1413
+ prop :lang, T.nilable(String), name: "lang"
1414
+
1415
+ # @deprecated Use {region} instead. This property is deprecated since Document Server version 8.2.
1416
+ # @since 0.1.0
1417
+ prop :location, T.nilable(String), name: "location"
1418
+
1419
+ # @since 0.1.0
1420
+ prop :mode, T.nilable(Mode), name: "mode"
1421
+
1422
+ # @since 0.1.0
1423
+ prop :recent, T.nilable(T::Array[Recent]), name: "recent"
1424
+
1425
+ # @since 0.1.0
1426
+ prop :region, T.nilable(String), name: "region"
1427
+
1428
+ # @since 0.1.0
1429
+ prop :templates, T.nilable(T::Array[Template]), name: "templates"
1430
+
1431
+ # @since 0.1.0
1432
+ prop :user, T.nilable(User), name: "user"
1433
+
1434
+ # @since 0.1.0
1435
+ prop :customization, T.nilable(Customization), name: "customization"
1436
+
1437
+ # @since 0.1.0
1438
+ prop :embedded, T.nilable(Embedded), name: "embedded"
1439
+
1440
+ # @since 0.1.0
1441
+ prop :plugins, T.nilable(Plugins), name: "plugins"
1442
+
1443
+ # @since 0.1.0
1444
+ sig {params(hash: T.untyped, strict: T.untyped).returns(EditorConfig)}
1445
+ def self.from_hash(hash, strict = nil)
1446
+ super(hash, strict)
1447
+ end
1448
+ end
1449
+
1450
+ # @since 0.1.0
1451
+ prop :document_type, T.nilable(DocumentType), name: "documentType"
1452
+
1453
+ # @since 0.1.0
1454
+ prop :height, T.nilable(String), name: "height"
1455
+
1456
+ # @since 0.1.0
1457
+ prop :token, T.nilable(String), name: "token"
1458
+
1459
+ # @since 0.1.0
1460
+ prop :type, T.nilable(Type), name: "type"
1461
+
1462
+ # @since 0.1.0
1463
+ prop :width, T.nilable(String), name: "width"
1464
+
1465
+ # @since 0.1.0
1466
+ prop :document, T.nilable(Document), name: "document"
1467
+
1468
+ # @since 0.1.0
1469
+ prop :editor_config, T.nilable(EditorConfig), name: "editorConfig"
1470
+
1471
+ # @since 0.1.0
1472
+ sig {params(hash: T.untyped, strict: T.untyped).returns(Config)}
1473
+ def self.from_hash(hash, strict = nil)
1474
+ super(hash, strict)
1475
+ end
1476
+ end
1477
+ end
1478
+ end
1479
+ end