initiative-plugin-sdk 8.1.0 → 9.0.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Generated by scripts/generate-plugin-api.mjs from schemas/plugin-api.json, the plug-in API
3
- * taken from Initiative 0.76.0 (commit 4aa7e8215). Do not edit: regenerate.
3
+ * taken from Initiative 0.77.1 (commit 1a62d88cd). Do not edit: regenerate.
4
4
  */
5
5
  import type { Scope } from "./contract.js";
6
6
  /**
@@ -31,7 +31,7 @@ export interface PluginApiSchemas {
31
31
  /**
32
32
  * Things that can be archived.
33
33
  */
34
- ArchivableType: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "gallery" | "wiki" | "task" | "initiative";
34
+ ArchivableType: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "wiki" | "task" | "initiative" | "collection";
35
35
  /**
36
36
  * What archiving or unarchiving answers with.
37
37
  */
@@ -40,13 +40,15 @@ export interface PluginApiSchemas {
40
40
  entity_id: number;
41
41
  archived_at?: string | null;
42
42
  };
43
- Body_upload_gallery_image: {
44
- file: string;
45
- title?: string | null;
46
- caption?: string | null;
43
+ Body_upload_file: {
44
+ name: string;
45
+ initiative_id: number;
46
+ file?: string | null;
47
+ upload_id?: string | null;
47
48
  };
48
- Body_upload_gallery_image_version: {
49
- file: string;
49
+ Body_upload_file_version: {
50
+ file?: string | null;
51
+ upload_id?: string | null;
50
52
  };
51
53
  CalendarCreate: {
52
54
  properties?: PluginApiSchemas["PropertyValueInput"][];
@@ -209,6 +211,178 @@ export interface PluginApiSchemas {
209
211
  completed: number;
210
212
  total: number;
211
213
  };
214
+ /**
215
+ * What the caller may do to a collection (`resource_access.may_change`).
216
+ */
217
+ CollectionCan: {
218
+ edit: boolean;
219
+ unarchive: boolean;
220
+ };
221
+ /**
222
+ * The file a card shows for a collection.
223
+ */
224
+ CollectionCover: {
225
+ file_id: number;
226
+ name: string;
227
+ file_type: PluginApiSchemas["FileType"];
228
+ /**
229
+ * A stored file comes as an empty string, without its path. A URL from
230
+ * elsewhere comes as it is.
231
+ */
232
+ file_url: string | null;
233
+ file_content_type: string | null;
234
+ /**
235
+ * A stored file comes as an empty string, without its path. A URL from
236
+ * elsewhere comes as it is.
237
+ */
238
+ thumbnail_url: string | null;
239
+ width: number | null;
240
+ height: number | null;
241
+ };
242
+ /**
243
+ * A new collection, made with the files it starts with: a collection is never
244
+ * empty. It starts blank (its grid and table, and no fields of its own), as a
245
+ * ready-made `shape`, or with the fields and lists of another collection in
246
+ * the initiative (`shape_from`), none of its values.
247
+ */
248
+ CollectionCreate: {
249
+ properties?: PluginApiSchemas["PropertyValueInput"][];
250
+ file_ids: number[];
251
+ initiative_id: number;
252
+ name: string;
253
+ description?: string | null;
254
+ tag_ids?: number[] | null;
255
+ shape?: PluginApiSchemas["CollectionShapeKey"] | null;
256
+ shape_from?: number | null;
257
+ };
258
+ CollectionFileListResponse: {
259
+ total_count: number;
260
+ page: number;
261
+ page_size: number;
262
+ has_next: boolean;
263
+ has_prev: boolean;
264
+ items: PluginApiSchemas["CollectionFileSummary"][];
265
+ };
266
+ /**
267
+ * A file as its collection lists it: with when it was added there, and its
268
+ * values of the collection's own fields.
269
+ */
270
+ CollectionFileSummary: {
271
+ archived_at: string | null;
272
+ can: PluginApiSchemas["ToolCan"];
273
+ id: number;
274
+ initiative_id: number;
275
+ community_id: string;
276
+ created_by: string | null;
277
+ created_at: string;
278
+ updated_at: string;
279
+ comments_enabled: boolean;
280
+ tags: PluginApiSchemas["TagSummary"][];
281
+ properties: PluginApiSchemas["PropertySummary"][];
282
+ grants: PluginApiSchemas["ResourceGrantSchema"][];
283
+ name: string;
284
+ /**
285
+ * A stored file comes as an empty string, without its path. A URL from
286
+ * elsewhere comes as it is.
287
+ */
288
+ featured_image_url: string | null;
289
+ is_template: boolean;
290
+ initiative: PluginApiSchemas["InitiativeSummary"] | null;
291
+ owner: PluginApiSchemas["PluginPerson"] | null;
292
+ owner_plugin: PluginApiSchemas["OwnerPluginSummary"] | null;
293
+ comment_count: number;
294
+ file_type: PluginApiSchemas["FileType"];
295
+ /**
296
+ * A stored file comes as an empty string, without its path. A URL from
297
+ * elsewhere comes as it is.
298
+ */
299
+ file_url: string | null;
300
+ file_content_type: string | null;
301
+ file_size: number | null;
302
+ original_filename: string | null;
303
+ /**
304
+ * A stored file comes as an empty string, without its path. A URL from
305
+ * elsewhere comes as it is.
306
+ */
307
+ thumbnail_url: string | null;
308
+ width: number | null;
309
+ height: number | null;
310
+ smart_link_url: string | null;
311
+ added_at: string;
312
+ fields: PluginApiSchemas["PropertySummary"][];
313
+ /**
314
+ * How the file is shown, which follows from its type.
315
+ */
316
+ kind: PluginApiSchemas["FileKind"];
317
+ };
318
+ /**
319
+ * Files to put in a collection or take out of it.
320
+ */
321
+ CollectionFiles: {
322
+ file_ids: number[];
323
+ };
324
+ CollectionListResponse: {
325
+ items: PluginApiSchemas["CollectionRead"][];
326
+ };
327
+ /**
328
+ * A collection as its reader sees it: only the files they can open are
329
+ * counted, and the cover is one of those.
330
+ */
331
+ CollectionRead: {
332
+ id: number;
333
+ initiative_id: number;
334
+ community_id: string;
335
+ name: string;
336
+ description: string | null;
337
+ cover_file_id: number | null;
338
+ cover: PluginApiSchemas["CollectionCover"] | null;
339
+ file_count: number;
340
+ hidden_files: PluginApiSchemas["HiddenFiles"];
341
+ created_by: string | null;
342
+ created_at: string;
343
+ updated_at: string;
344
+ archived_at: string | null;
345
+ comments_enabled: boolean;
346
+ comments_locked_at: string | null;
347
+ comment_count: number;
348
+ tags: PluginApiSchemas["TagSummary"][];
349
+ properties: PluginApiSchemas["PropertySummary"][];
350
+ fields: PluginApiSchemas["PropertyDefinitionRead"][];
351
+ can: PluginApiSchemas["CollectionCan"];
352
+ };
353
+ CollectionShapeEntry: {
354
+ key: PluginApiSchemas["CollectionShapeKey"];
355
+ name: string;
356
+ hint: string;
357
+ lists: Array<"table" | "board" | "gantt" | "calendar" | "masonry" | "grid" | "timeline">;
358
+ fields: PluginApiSchemas["CollectionShapeField"][];
359
+ };
360
+ /**
361
+ * A field a ready-made shape brings, in the reader's language.
362
+ */
363
+ CollectionShapeField: {
364
+ name: string;
365
+ type: PluginApiSchemas["PropertyType"];
366
+ display: "number" | "stars" | "bar" | null;
367
+ currency: PluginApiSchemas["CurrencyCode"] | null;
368
+ };
369
+ CollectionShapeGroup: {
370
+ key: string;
371
+ name: string;
372
+ entries: PluginApiSchemas["CollectionShapeEntry"][];
373
+ };
374
+ /**
375
+ * A ready-made shape a collection can start as.
376
+ */
377
+ CollectionShapeKey: "gallery" | "catalog" | "log";
378
+ CollectionUpdate: {
379
+ properties?: PluginApiSchemas["PropertyValueInput"][] | null;
380
+ name?: string | null;
381
+ description?: string | null;
382
+ cover_file_id?: number | null;
383
+ tag_ids?: number[] | null;
384
+ comments_enabled?: boolean | null;
385
+ };
212
386
  /**
213
387
  * One limited column of a project's board: its limit, and how many open tasks
214
388
  * it holds.
@@ -233,6 +407,7 @@ export interface PluginApiSchemas {
233
407
  content: string;
234
408
  task_id?: number | null;
235
409
  wiki_page_id?: number | null;
410
+ collection_id?: number | null;
236
411
  project_id?: number | null;
237
412
  file_id?: number | null;
238
413
  queue_id?: number | null;
@@ -240,7 +415,6 @@ export interface PluginApiSchemas {
240
415
  calendar_id?: number | null;
241
416
  dashboard_id?: number | null;
242
417
  post_id?: number | null;
243
- gallery_id?: number | null;
244
418
  wiki_id?: number | null;
245
419
  parent_comment_id?: number | null;
246
420
  audience?: PluginApiSchemas["CommentAudience"];
@@ -269,6 +443,7 @@ export interface PluginApiSchemas {
269
443
  content: string;
270
444
  task_id: number | null;
271
445
  wiki_page_id: number | null;
446
+ collection_id: number | null;
272
447
  project_id: number | null;
273
448
  file_id: number | null;
274
449
  queue_id: number | null;
@@ -276,7 +451,6 @@ export interface PluginApiSchemas {
276
451
  calendar_id: number | null;
277
452
  dashboard_id: number | null;
278
453
  post_id: number | null;
279
- gallery_id: number | null;
280
454
  wiki_id: number | null;
281
455
  id: number;
282
456
  created_by: string | null;
@@ -435,6 +609,10 @@ export interface PluginApiSchemas {
435
609
  position?: number | string | null;
436
610
  };
437
611
  CounterViewMode: "number" | "progress_bar" | "segmented_clock";
612
+ /**
613
+ * The ISO 4217 code a money property's amounts are in.
614
+ */
615
+ CurrencyCode: "AED" | "AFN" | "ALL" | "AMD" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLE" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XCG" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW" | "ZWG";
438
616
  /**
439
617
  * What a date is grouped by: the calendar's day, week, month, quarter or year
440
618
  * it falls in. A week starts on Monday, as Postgres counts one.
@@ -447,9 +625,10 @@ export interface PluginApiSchemas {
447
625
  featured_image_url?: string | null;
448
626
  is_template?: boolean;
449
627
  content?: Record<string, unknown> | null;
450
- file_type?: "native" | "whiteboard" | "smart_link" | "spreadsheet";
628
+ file_type?: "lexical" | "excalidraw" | "url" | "sheet";
451
629
  grants?: PluginApiSchemas["ResourceGrantSchema"][];
452
630
  };
631
+ FileKind: "document" | "spreadsheet" | "presentation" | "whiteboard" | "pdf" | "image" | "video" | "audio" | "text" | "compressed" | "design" | "3d" | "font" | "raw" | "code" | "ebook" | "cad" | "link" | "other";
453
632
  FileListResponse: {
454
633
  total_count: number;
455
634
  page: number;
@@ -491,6 +670,13 @@ export interface PluginApiSchemas {
491
670
  file_content_type: string | null;
492
671
  file_size: number | null;
493
672
  original_filename: string | null;
673
+ /**
674
+ * A stored file comes as an empty string, without its path. A URL from
675
+ * elsewhere comes as it is.
676
+ */
677
+ thumbnail_url: string | null;
678
+ width: number | null;
679
+ height: number | null;
494
680
  smart_link_url: string | null;
495
681
  /**
496
682
  * A Lexical editor state. A person is mentioned by a node whose
@@ -500,7 +686,17 @@ export interface PluginApiSchemas {
500
686
  * `src` and a link's `url` are empty.
501
687
  */
502
688
  content: Record<string, unknown>;
689
+ collection_ids: number[];
503
690
  content_version: string | null;
691
+ /**
692
+ * How the file is shown, which follows from its type.
693
+ */
694
+ kind: PluginApiSchemas["FileKind"];
695
+ /**
696
+ * The editor's own type this uploaded file becomes when somebody converts
697
+ * it to edit it (`POST /files/{id}/convert`), or `None`.
698
+ */
699
+ converts_to: PluginApiSchemas["FileType"] | null;
504
700
  };
505
701
  FileSummary: {
506
702
  archived_at: string | null;
@@ -535,12 +731,20 @@ export interface PluginApiSchemas {
535
731
  file_content_type: string | null;
536
732
  file_size: number | null;
537
733
  original_filename: string | null;
734
+ /**
735
+ * A stored file comes as an empty string, without its path. A URL from
736
+ * elsewhere comes as it is.
737
+ */
738
+ thumbnail_url: string | null;
739
+ width: number | null;
740
+ height: number | null;
538
741
  smart_link_url: string | null;
742
+ /**
743
+ * How the file is shown, which follows from its type.
744
+ */
745
+ kind: PluginApiSchemas["FileKind"];
539
746
  };
540
- /**
541
- * Discriminator for file type.
542
- */
543
- FileType: "native" | "file" | "whiteboard" | "smart_link" | "spreadsheet";
747
+ FileType: "lexical" | "excalidraw" | "sheet" | "url" | "pdf" | "doc" | "docx" | "odt" | "rtf" | "md" | "xls" | "xlsx" | "ods" | "csv" | "tsv" | "ppt" | "pptx" | "odp" | "png" | "jpeg" | "gif" | "webp" | "svg" | "heic" | "tiff" | "mp4" | "webm" | "mov" | "mp3" | "m4a" | "wav" | "ogg" | "flac" | "txt" | "json" | "html" | "zip" | "tar" | "gz" | "7z" | "rar" | "ai" | "psd" | "eps" | "indd" | "xcf" | "kra" | "procreate" | "clip" | "sketch" | "fig" | "afdesign" | "afphoto" | "afpub" | "cdr" | "blend" | "fbx" | "obj" | "stl" | "glb" | "gltf" | "3mf" | "usdz" | "ttf" | "otf" | "woff" | "woff2" | "dng" | "cr2" | "cr3" | "nef" | "arw" | "raf" | "orf" | "py" | "js" | "ts" | "css" | "sql" | "yaml" | "xml" | "toml" | "c" | "cpp" | "cs" | "java" | "go" | "rs" | "rb" | "php" | "swift" | "kt" | "epub" | "mobi" | "dwg" | "dxf" | "step" | "other";
544
748
  FileUpdate: {
545
749
  name?: string | null;
546
750
  content?: Record<string, unknown> | null;
@@ -548,6 +752,20 @@ export interface PluginApiSchemas {
548
752
  featured_image_url?: string | null;
549
753
  is_template?: boolean | null;
550
754
  };
755
+ /**
756
+ * A single stored version of an uploaded file. The binary is fetched via the
757
+ * version download endpoint by id — `file_url` is intentionally not exposed.
758
+ */
759
+ FileVersionRead: {
760
+ id: number;
761
+ version_number: number;
762
+ file_content_type: string | null;
763
+ file_size: number | null;
764
+ original_filename: string | null;
765
+ created_by: number | null;
766
+ created_at: string;
767
+ is_current: boolean;
768
+ };
551
769
  /**
552
770
  * A single field comparison.
553
771
  */
@@ -569,159 +787,6 @@ export interface PluginApiSchemas {
569
787
  * Comparison operators for filter conditions.
570
788
  */
571
789
  FilterOp: "eq" | "lt" | "lte" | "gt" | "gte" | "in_" | "ilike" | "is_null";
572
- /**
573
- * What a list draws for a gallery: one picture, at whichever size it has.
574
- */
575
- GalleryCover: {
576
- image_id: number;
577
- /**
578
- * A stored file comes as an empty string, without its path. A URL from
579
- * elsewhere comes as it is.
580
- */
581
- file_url: string;
582
- /**
583
- * A stored file comes as an empty string, without its path. A URL from
584
- * elsewhere comes as it is.
585
- */
586
- thumbnail_url: string | null;
587
- width: number | null;
588
- height: number | null;
589
- };
590
- GalleryCreate: {
591
- properties?: PluginApiSchemas["PropertyValueInput"][];
592
- name: string;
593
- description?: string | null;
594
- initiative_id: number;
595
- tag_ids?: number[] | null;
596
- grants?: PluginApiSchemas["ResourceGrantSchema"][];
597
- };
598
- GalleryImageListResponse: {
599
- total_count: number;
600
- page: number;
601
- page_size: number;
602
- has_next: boolean;
603
- has_prev: boolean;
604
- items: PluginApiSchemas["GalleryImageRead"][];
605
- };
606
- GalleryImageRead: {
607
- id: number;
608
- gallery_id: number;
609
- community_id: string;
610
- title: string | null;
611
- caption: string | null;
612
- /**
613
- * A stored file comes as an empty string, without its path. A URL from
614
- * elsewhere comes as it is.
615
- */
616
- file_url: string;
617
- /**
618
- * A stored file comes as an empty string, without its path. A URL from
619
- * elsewhere comes as it is.
620
- */
621
- thumbnail_url: string | null;
622
- file_content_type: string | null;
623
- file_size: number | null;
624
- original_filename: string | null;
625
- width: number | null;
626
- height: number | null;
627
- created_by: string | null;
628
- uploader: PluginApiSchemas["PluginPerson"] | null;
629
- created_at: string;
630
- updated_at: string;
631
- version_count: number;
632
- tags: PluginApiSchemas["TagSummary"][];
633
- properties: PluginApiSchemas["PropertySummary"][];
634
- plugin_values: PluginApiSchemas["PluginValueSummary"][];
635
- };
636
- GalleryImageUpdate: {
637
- properties?: PluginApiSchemas["PropertyValueInput"][] | null;
638
- title?: string | null;
639
- caption?: string | null;
640
- tag_ids?: number[] | null;
641
- caption_base?: string | null;
642
- };
643
- /**
644
- * One stored rendition of a picture.
645
- */
646
- GalleryImageVersionRead: {
647
- id: number;
648
- version_number: number;
649
- /**
650
- * A stored file comes as an empty string, without its path. A URL from
651
- * elsewhere comes as it is.
652
- */
653
- file_url: string;
654
- /**
655
- * A stored file comes as an empty string, without its path. A URL from
656
- * elsewhere comes as it is.
657
- */
658
- thumbnail_url: string | null;
659
- file_content_type: string | null;
660
- file_size: number | null;
661
- original_filename: string | null;
662
- width: number | null;
663
- height: number | null;
664
- created_by: string | null;
665
- created_at: string;
666
- is_current: boolean;
667
- };
668
- GalleryListResponse: {
669
- total_count: number;
670
- page: number;
671
- page_size: number;
672
- has_next: boolean;
673
- has_prev: boolean;
674
- items: PluginApiSchemas["GallerySummary"][];
675
- };
676
- /**
677
- * A gallery on its own page. The same shape as its summary: the pictures are
678
- * paged separately, because a gallery is browsed rather than read.
679
- */
680
- GalleryRead: {
681
- archived_at: string | null;
682
- can: PluginApiSchemas["ToolCan"];
683
- id: number;
684
- initiative_id: number;
685
- community_id: string;
686
- created_by: string | null;
687
- created_at: string;
688
- updated_at: string;
689
- comments_enabled: boolean;
690
- tags: PluginApiSchemas["TagSummary"][];
691
- properties: PluginApiSchemas["PropertySummary"][];
692
- grants: PluginApiSchemas["ResourceGrantSchema"][];
693
- name: string;
694
- description: string | null;
695
- cover_image_id: number | null;
696
- cover: PluginApiSchemas["GalleryCover"] | null;
697
- preview: PluginApiSchemas["GalleryCover"][];
698
- comment_count: number;
699
- };
700
- GallerySummary: {
701
- archived_at: string | null;
702
- can: PluginApiSchemas["ToolCan"];
703
- id: number;
704
- initiative_id: number;
705
- community_id: string;
706
- created_by: string | null;
707
- created_at: string;
708
- updated_at: string;
709
- comments_enabled: boolean;
710
- tags: PluginApiSchemas["TagSummary"][];
711
- properties: PluginApiSchemas["PropertySummary"][];
712
- grants: PluginApiSchemas["ResourceGrantSchema"][];
713
- name: string;
714
- description: string | null;
715
- cover_image_id: number | null;
716
- cover: PluginApiSchemas["GalleryCover"] | null;
717
- preview: PluginApiSchemas["GalleryCover"][];
718
- comment_count: number;
719
- };
720
- GalleryUpdate: {
721
- name?: string | null;
722
- description?: string | null;
723
- cover_image_id?: number | null;
724
- };
725
790
  /**
726
791
  * One group of a grouped list.
727
792
  */
@@ -739,6 +804,14 @@ export interface PluginApiSchemas {
739
804
  HTTPValidationError: {
740
805
  detail?: PluginApiSchemas["ValidationError"][];
741
806
  };
807
+ /**
808
+ * The files of a collection or a wiki the reader knows are there and can't
809
+ * open, and how many of those they have asked for.
810
+ */
811
+ HiddenFiles: {
812
+ count?: number;
813
+ requested?: number;
814
+ };
742
815
  /**
743
816
  * What the caller may do in an initiative (:func:`initiative_can`).
744
817
  */
@@ -770,7 +843,6 @@ export interface PluginApiSchemas {
770
843
  calendars_enabled: boolean;
771
844
  dashboards_enabled: boolean;
772
845
  posts_enabled: boolean;
773
- galleries_enabled: boolean;
774
846
  wikis_enabled: boolean;
775
847
  name: string;
776
848
  description: string | null;
@@ -1042,7 +1114,9 @@ export interface PluginApiSchemas {
1042
1114
  position?: number;
1043
1115
  color?: string | null;
1044
1116
  options?: PluginApiSchemas["PropertyOption"][] | null;
1117
+ currency?: PluginApiSchemas["CurrencyCode"] | null;
1045
1118
  initiative_id: number;
1119
+ collection_id?: number | null;
1046
1120
  };
1047
1121
  PropertyDefinitionRead: {
1048
1122
  name: string;
@@ -1050,8 +1124,10 @@ export interface PluginApiSchemas {
1050
1124
  position: number;
1051
1125
  color: string | null;
1052
1126
  options: PluginApiSchemas["PropertyOption"][] | null;
1127
+ currency: PluginApiSchemas["CurrencyCode"] | null;
1053
1128
  id: number;
1054
1129
  initiative_id: number;
1130
+ collection_id: number | null;
1055
1131
  created_at: string;
1056
1132
  updated_at: string;
1057
1133
  };
@@ -1063,6 +1139,7 @@ export interface PluginApiSchemas {
1063
1139
  position?: number | null;
1064
1140
  color?: string | null;
1065
1141
  options?: PluginApiSchemas["PropertyOption"][] | null;
1142
+ currency?: PluginApiSchemas["CurrencyCode"] | null;
1066
1143
  };
1067
1144
  /**
1068
1145
  * Envelope for PATCH /property-definitions/{id}.
@@ -1097,6 +1174,7 @@ export interface PluginApiSchemas {
1097
1174
  name: string;
1098
1175
  type: PluginApiSchemas["PropertyType"];
1099
1176
  options: PluginApiSchemas["PropertyOption"][] | null;
1177
+ currency: PluginApiSchemas["CurrencyCode"] | null;
1100
1178
  /**
1101
1179
  * Shaped by the property's type. For user_reference, a person: id,
1102
1180
  * username, discriminator, display_name and avatar_url, or an PluginPerson
@@ -1107,11 +1185,11 @@ export interface PluginApiSchemas {
1107
1185
  /**
1108
1186
  * What can carry custom property values: every tool and sub-tool.
1109
1187
  */
1110
- PropertyTarget: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "gallery" | "wiki" | "task" | "queue_item" | "calendar_event" | "counter" | "gallery_image" | "wiki_page";
1188
+ PropertyTarget: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "wiki" | "task" | "queue_item" | "calendar_event" | "counter" | "wiki_page" | "collection";
1111
1189
  /**
1112
1190
  * Supported value types for a property definition.
1113
1191
  */
1114
- PropertyType: "text" | "number" | "checkbox" | "date" | "datetime" | "url" | "select" | "multi_select" | "user_reference";
1192
+ PropertyType: "text" | "number" | "checkbox" | "date" | "datetime" | "url" | "select" | "multi_select" | "user_reference" | "currency" | "rating";
1115
1193
  /**
1116
1194
  * A single (property_id, value) pair submitted by the client.
1117
1195
  */
@@ -1281,7 +1359,7 @@ export interface PluginApiSchemas {
1281
1359
  all_initiative_members?: boolean;
1282
1360
  plugin_install_id?: number | null;
1283
1361
  };
1284
- SearchEntityType: "calendar" | "calendar_event" | "comment" | "counter" | "counter_group" | "dashboard" | "file" | "gallery" | "gallery_image" | "post" | "project" | "queue" | "queue_item" | "tag" | "task" | "wiki" | "wiki_page";
1362
+ SearchEntityType: "calendar" | "calendar_event" | "collection" | "comment" | "counter" | "counter_group" | "dashboard" | "file" | "post" | "project" | "queue" | "queue_item" | "tag" | "task" | "wiki" | "wiki_page";
1285
1363
  /**
1286
1364
  * A jump-to target for the command palette: enough to render and route.
1287
1365
  */
@@ -1338,7 +1416,7 @@ export interface PluginApiSchemas {
1338
1416
  /**
1339
1417
  * Entity types a bulk tag edit can address.
1340
1418
  */
1341
- TagTarget: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "gallery" | "wiki" | "task" | "queue_item" | "calendar_event" | "gallery_image" | "wiki_page";
1419
+ TagTarget: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "wiki" | "task" | "queue_item" | "calendar_event" | "wiki_page" | "collection";
1342
1420
  TaskCreate: {
1343
1421
  properties?: PluginApiSchemas["PropertyValueInput"][];
1344
1422
  title: string;
@@ -1356,6 +1434,7 @@ export interface PluginApiSchemas {
1356
1434
  task_type_id?: number | null;
1357
1435
  tag_ids?: number[];
1358
1436
  checklist?: PluginApiSchemas["ChecklistItemInput"][];
1437
+ parent_task_id?: number | null;
1359
1438
  };
1360
1439
  /**
1361
1440
  * Lightweight schema for task list endpoints - excludes heavy nested data
@@ -1397,6 +1476,8 @@ export interface PluginApiSchemas {
1397
1476
  initiative_name: string | null;
1398
1477
  initiative_color: string | null;
1399
1478
  checklist_progress: PluginApiSchemas["ChecklistProgress"] | null;
1479
+ parent: PluginApiSchemas["TaskParentSummary"] | null;
1480
+ subtask_progress: PluginApiSchemas["ChecklistProgress"] | null;
1400
1481
  tags: PluginApiSchemas["TagSummary"][];
1401
1482
  properties: PluginApiSchemas["PropertySummary"][];
1402
1483
  plugin_values: PluginApiSchemas["PluginValueSummary"][];
@@ -1413,6 +1494,13 @@ export interface PluginApiSchemas {
1413
1494
  TaskMoveRequest: {
1414
1495
  target_project_id: number;
1415
1496
  };
1497
+ /**
1498
+ * The task a task is part of: the target of its `part_of` edge.
1499
+ */
1500
+ TaskParentSummary: {
1501
+ id: number;
1502
+ title: string;
1503
+ };
1416
1504
  TaskPriority: "low" | "medium" | "high" | "urgent";
1417
1505
  TaskProjectSummary: {
1418
1506
  id: number;
@@ -1458,6 +1546,8 @@ export interface PluginApiSchemas {
1458
1546
  project: PluginApiSchemas["TaskProjectSummary"] | null;
1459
1547
  checklist: PluginApiSchemas["ChecklistItem"][];
1460
1548
  checklist_progress: PluginApiSchemas["ChecklistProgress"] | null;
1549
+ parent: PluginApiSchemas["TaskParentSummary"] | null;
1550
+ subtask_progress: PluginApiSchemas["ChecklistProgress"] | null;
1461
1551
  tags: PluginApiSchemas["TagSummary"][];
1462
1552
  properties: PluginApiSchemas["PropertySummary"][];
1463
1553
  plugin_values: PluginApiSchemas["PluginValueSummary"][];
@@ -1542,6 +1632,7 @@ export interface PluginApiSchemas {
1542
1632
  recurrence_limit?: number | null;
1543
1633
  tag_ids?: number[] | null;
1544
1634
  checklist?: PluginApiSchemas["ChecklistItemInput"][] | null;
1635
+ parent_task_id?: number | null;
1545
1636
  scope?: "this" | "following" | "all" | null;
1546
1637
  };
1547
1638
  /**
@@ -1556,7 +1647,7 @@ export interface PluginApiSchemas {
1556
1647
  TimelineResponse: {
1557
1648
  buckets: PluginApiSchemas["TimelineBucket"][];
1558
1649
  };
1559
- Tool: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "gallery" | "wiki";
1650
+ Tool: "project" | "file" | "queue" | "counter_group" | "calendar" | "dashboard" | "post" | "wiki";
1560
1651
  /**
1561
1652
  * What the caller may do to one of a tool's rows
1562
1653
  * (`permissions.client_access`).
@@ -1746,9 +1837,9 @@ export interface PluginApiSchemas {
1746
1837
  tag_ids?: number[] | null;
1747
1838
  };
1748
1839
  /**
1749
- * A wiki on its own page. The same shape as its summary: the pages are
1750
- * fetched as a tree of their own, because a wiki is navigated rather than
1751
- * read end to end.
1840
+ * A wiki on its own page: its summary, and the files filed in it the reader
1841
+ * knows are there and can't open. The pages are fetched as a tree of their
1842
+ * own, because a wiki is navigated rather than read end to end.
1752
1843
  */
1753
1844
  WikiRead: {
1754
1845
  archived_at: string | null;
@@ -1774,6 +1865,7 @@ export interface PluginApiSchemas {
1774
1865
  accent_color: string | null;
1775
1866
  template_page_id: number | null;
1776
1867
  comment_count: number;
1868
+ hidden_files: PluginApiSchemas["HiddenFiles"];
1777
1869
  };
1778
1870
  /**
1779
1871
  * How wide a page's body runs.
@@ -1916,6 +2008,14 @@ export interface PluginApiOperations {
1916
2008
  * Filter by file type
1917
2009
  */
1918
2010
  file_type?: PluginApiSchemas["FileType"] | null;
2011
+ /**
2012
+ * Filter by kind of file
2013
+ */
2014
+ kind?: PluginApiSchemas["FileKind"] | null;
2015
+ /**
2016
+ * Filter to the files in one collection
2017
+ */
2018
+ collection_id?: number | null;
1919
2019
  page?: number;
1920
2020
  page_size?: number;
1921
2021
  /**
@@ -2133,12 +2233,12 @@ export interface PluginApiOperations {
2133
2233
  body: PluginApiSchemas["PostCreate"];
2134
2234
  answer: PluginApiSchemas["PostRead"];
2135
2235
  };
2136
- list_galleries: {
2236
+ list_wikis: {
2137
2237
  query: {
2138
2238
  initiative_id?: number | null;
2139
2239
  /**
2140
- * Full-text match over the gallery's name and description, through the
2141
- * same index the search page reads.
2240
+ * Full-text match over the wiki's name and description, through the same
2241
+ * index the search page reads.
2142
2242
  */
2143
2243
  search?: string | null;
2144
2244
  /**
@@ -2150,7 +2250,7 @@ export interface PluginApiOperations {
2150
2250
  */
2151
2251
  sort_dir?: string | null;
2152
2252
  /**
2153
- * Only galleries carrying any of these tags.
2253
+ * Only wikis carrying any of these tags.
2154
2254
  */
2155
2255
  tag_ids?: number[] | null;
2156
2256
  /**
@@ -2163,30 +2263,54 @@ export interface PluginApiOperations {
2163
2263
  * live list, which is what every other view shows.
2164
2264
  */
2165
2265
  archived?: boolean | null;
2166
- /**
2167
- * Also send what each row's card shows of what is inside it, read for the
2168
- * whole page at once.
2169
- */
2170
- include_preview?: boolean;
2171
2266
  page?: number;
2172
2267
  page_size?: number;
2173
2268
  };
2174
- answer: PluginApiSchemas["GalleryListResponse"];
2269
+ answer: PluginApiSchemas["WikiListResponse"];
2175
2270
  };
2176
- create_gallery: {
2177
- body: PluginApiSchemas["GalleryCreate"];
2178
- answer: PluginApiSchemas["GalleryRead"];
2271
+ create_wiki: {
2272
+ body: PluginApiSchemas["WikiCreate"];
2273
+ answer: PluginApiSchemas["WikiRead"];
2179
2274
  };
2180
- list_wikis: {
2275
+ list_collection_files: {
2276
+ path: {
2277
+ collection_id: number;
2278
+ };
2181
2279
  query: {
2182
2280
  initiative_id?: number | null;
2281
+ search?: string | null;
2183
2282
  /**
2184
- * Full-text match over the wiki's name and description, through the same
2185
- * index the search page reads.
2283
+ * Filter by tag IDs
2186
2284
  */
2187
- search?: string | null;
2285
+ tag_ids?: number[] | null;
2188
2286
  /**
2189
- * Order by one of: name, initiative, updated_at. Omit for newest first.
2287
+ * JSON-encoded list of property-value filters, e.g. `[{"property_id": 12,
2288
+ * "op": "eq", "value": "live"}]`. Maximum 5 conditions per request.
2289
+ */
2290
+ property_filters?: string | null;
2291
+ /**
2292
+ * Filter to files with no tags
2293
+ */
2294
+ untagged?: boolean | null;
2295
+ /**
2296
+ * Only templates (true) or only files that are not templates (false).
2297
+ * Omit for both.
2298
+ */
2299
+ is_template?: boolean | null;
2300
+ /**
2301
+ * Filter by file type
2302
+ */
2303
+ file_type?: PluginApiSchemas["FileType"] | null;
2304
+ /**
2305
+ * Filter by kind of file
2306
+ */
2307
+ kind?: PluginApiSchemas["FileKind"] | null;
2308
+ page?: number;
2309
+ page_size?: number;
2310
+ /**
2311
+ * Order by one of: name, initiative, updated_at, created_at, added_at
2312
+ * (when each was added to the collection). Omit for added_at, newest
2313
+ * first.
2190
2314
  */
2191
2315
  sort_by?: string | null;
2192
2316
  /**
@@ -2194,7 +2318,45 @@ export interface PluginApiOperations {
2194
2318
  */
2195
2319
  sort_dir?: string | null;
2196
2320
  /**
2197
- * Only wikis carrying any of these tags.
2321
+ * true lists what has been archived instead of what is live. Omit for the
2322
+ * live list, which is what every other view shows.
2323
+ */
2324
+ archived?: boolean | null;
2325
+ /**
2326
+ * Start the list at this instant, measured by when each file was added to
2327
+ * the collection. Newest first it is a ceiling and the page walks back
2328
+ * from it; oldest first (sort_by=added_at, sort_dir=asc) a floor and the
2329
+ * page walks forward. This is how a timeline jumps to a month: pair it
2330
+ * with the matching end of the month's bucket.
2331
+ */
2332
+ until?: string | null;
2333
+ };
2334
+ answer: PluginApiSchemas["CollectionFileListResponse"];
2335
+ };
2336
+ add_collection_files: {
2337
+ path: {
2338
+ collection_id: number;
2339
+ };
2340
+ body: PluginApiSchemas["CollectionFiles"];
2341
+ answer: PluginApiSchemas["CollectionRead"];
2342
+ };
2343
+ remove_collection_files: {
2344
+ path: {
2345
+ collection_id: number;
2346
+ };
2347
+ query: {
2348
+ file_ids: number[];
2349
+ };
2350
+ answer: void;
2351
+ };
2352
+ get_collection_files_timeline: {
2353
+ path: {
2354
+ collection_id: number;
2355
+ };
2356
+ query: {
2357
+ search?: string | null;
2358
+ /**
2359
+ * Filter by tag IDs
2198
2360
  */
2199
2361
  tag_ids?: number[] | null;
2200
2362
  /**
@@ -2202,19 +2364,35 @@ export interface PluginApiOperations {
2202
2364
  * "op": "eq", "value": "live"}]`. Maximum 5 conditions per request.
2203
2365
  */
2204
2366
  property_filters?: string | null;
2367
+ /**
2368
+ * Filter to files with no tags
2369
+ */
2370
+ untagged?: boolean | null;
2371
+ /**
2372
+ * Only templates (true) or only files that are not templates (false).
2373
+ * Omit for both.
2374
+ */
2375
+ is_template?: boolean | null;
2376
+ /**
2377
+ * Filter by file type
2378
+ */
2379
+ file_type?: PluginApiSchemas["FileType"] | null;
2380
+ /**
2381
+ * Filter by kind of file
2382
+ */
2383
+ kind?: PluginApiSchemas["FileKind"] | null;
2205
2384
  /**
2206
2385
  * true lists what has been archived instead of what is live. Omit for the
2207
2386
  * live list, which is what every other view shows.
2208
2387
  */
2209
2388
  archived?: boolean | null;
2210
- page?: number;
2211
- page_size?: number;
2389
+ /**
2390
+ * IANA zone the month boundaries are cut in, e.g. Pacific/Auckland.
2391
+ * Defaults to UTC.
2392
+ */
2393
+ tz?: string | null;
2212
2394
  };
2213
- answer: PluginApiSchemas["WikiListResponse"];
2214
- };
2215
- create_wiki: {
2216
- body: PluginApiSchemas["WikiCreate"];
2217
- answer: PluginApiSchemas["WikiRead"];
2395
+ answer: PluginApiSchemas["TimelineResponse"];
2218
2396
  };
2219
2397
  read_project: {
2220
2398
  path: {
@@ -2364,12 +2542,20 @@ export interface PluginApiOperations {
2364
2542
  body: PluginApiSchemas["ChecklistItemToggle"];
2365
2543
  answer: PluginApiSchemas["ChecklistItem"][];
2366
2544
  };
2545
+ promote_checklist_item: {
2546
+ path: {
2547
+ task_id: number;
2548
+ item_id: string;
2549
+ };
2550
+ answer: PluginApiSchemas["TaskRead"];
2551
+ };
2367
2552
  list_comments: {
2368
2553
  query: {
2369
2554
  limit?: number;
2370
2555
  cursor?: string | null;
2371
2556
  task_id?: number | null;
2372
2557
  wiki_page_id?: number | null;
2558
+ collection_id?: number | null;
2373
2559
  project_id?: number | null;
2374
2560
  file_id?: number | null;
2375
2561
  queue_id?: number | null;
@@ -2377,7 +2563,6 @@ export interface PluginApiOperations {
2377
2563
  calendar_id?: number | null;
2378
2564
  dashboard_id?: number | null;
2379
2565
  post_id?: number | null;
2380
- gallery_id?: number | null;
2381
2566
  wiki_id?: number | null;
2382
2567
  };
2383
2568
  answer: PluginApiSchemas["CommentListResponse"];
@@ -2420,6 +2605,17 @@ export interface PluginApiOperations {
2420
2605
  };
2421
2606
  answer: PluginApiSchemas["InitiativeRead"];
2422
2607
  };
2608
+ upload_file: {
2609
+ body: FormData;
2610
+ answer: PluginApiSchemas["FileRead"];
2611
+ };
2612
+ upload_file_version: {
2613
+ path: {
2614
+ file_id: number;
2615
+ };
2616
+ body: FormData;
2617
+ answer: PluginApiSchemas["FileVersionRead"];
2618
+ };
2423
2619
  read_file: {
2424
2620
  path: {
2425
2621
  file_id: number;
@@ -2441,12 +2637,64 @@ export interface PluginApiOperations {
2441
2637
  };
2442
2638
  answer: PluginApiSchemas["FileRead"];
2443
2639
  };
2444
- update_file: {
2640
+ update_file: {
2641
+ path: {
2642
+ file_id: number;
2643
+ };
2644
+ body: PluginApiSchemas["FileUpdate"];
2645
+ answer: PluginApiSchemas["FileRead"];
2646
+ };
2647
+ list_collection_shapes: {
2648
+ answer: PluginApiSchemas["CollectionShapeGroup"][];
2649
+ };
2650
+ list_collections: {
2651
+ query: {
2652
+ initiative_id: number;
2653
+ /**
2654
+ * true lists what has been archived instead of what is live. Omit for the
2655
+ * live list, which is what every other view shows.
2656
+ */
2657
+ archived?: boolean | null;
2658
+ };
2659
+ answer: PluginApiSchemas["CollectionListResponse"];
2660
+ };
2661
+ create_collection: {
2662
+ body: PluginApiSchemas["CollectionCreate"];
2663
+ answer: PluginApiSchemas["CollectionRead"];
2664
+ };
2665
+ read_collection: {
2666
+ path: {
2667
+ collection_id: number;
2668
+ };
2669
+ answer: PluginApiSchemas["CollectionRead"];
2670
+ };
2671
+ delete_collection: {
2672
+ path: {
2673
+ collection_id: number;
2674
+ };
2675
+ answer: void;
2676
+ };
2677
+ update_collection: {
2678
+ path: {
2679
+ collection_id: number;
2680
+ };
2681
+ body: PluginApiSchemas["CollectionUpdate"];
2682
+ answer: PluginApiSchemas["CollectionRead"];
2683
+ };
2684
+ get_collection_file_fields: {
2685
+ path: {
2686
+ collection_id: number;
2687
+ file_id: number;
2688
+ };
2689
+ answer: PluginApiSchemas["PropertySummary"][];
2690
+ };
2691
+ set_collection_file_fields: {
2445
2692
  path: {
2693
+ collection_id: number;
2446
2694
  file_id: number;
2447
2695
  };
2448
- body: PluginApiSchemas["FileUpdate"];
2449
- answer: PluginApiSchemas["FileRead"];
2696
+ body: PluginApiSchemas["PropertyValuesSetRequest"];
2697
+ answer: PluginApiSchemas["PropertySummary"][];
2450
2698
  };
2451
2699
  read_queue: {
2452
2700
  path: {
@@ -2691,118 +2939,6 @@ export interface PluginApiOperations {
2691
2939
  body: PluginApiSchemas["PostPinUpdate"];
2692
2940
  answer: PluginApiSchemas["PostRead"];
2693
2941
  };
2694
- read_gallery: {
2695
- path: {
2696
- gallery_id: number;
2697
- };
2698
- query: {
2699
- /**
2700
- * Also return the resource if it is in the trash. For reading a resource
2701
- * back after a deleted event — the row still exists until retention
2702
- * purges it, and access is checked exactly as for a live one.
2703
- */
2704
- include_deleted?: boolean;
2705
- };
2706
- answer: PluginApiSchemas["GalleryRead"];
2707
- };
2708
- update_gallery: {
2709
- path: {
2710
- gallery_id: number;
2711
- };
2712
- body: PluginApiSchemas["GalleryUpdate"];
2713
- answer: PluginApiSchemas["GalleryRead"];
2714
- };
2715
- list_gallery_images: {
2716
- path: {
2717
- gallery_id: number;
2718
- };
2719
- query: {
2720
- /**
2721
- * Only pictures carrying ANY of these tags.
2722
- */
2723
- tag_ids?: number[] | null;
2724
- /**
2725
- * Match on title, caption or filename.
2726
- */
2727
- search?: string | null;
2728
- /**
2729
- * Read the gallery in the order it was filled rather than newest first.
2730
- */
2731
- oldest_first?: boolean;
2732
- /**
2733
- * Start the list at this instant, inclusive, measured by upload time —
2734
- * which is what the list is ordered by. This is how a timeline jumps to a
2735
- * month without paging through everything since. It follows the list's
2736
- * own direction: newest first it is a ceiling and the page walks back
2737
- * from it, oldest first a floor and the page walks forward, so pair it
2738
- * with the matching end of the timeline bucket.
2739
- */
2740
- until?: string | null;
2741
- page?: number;
2742
- page_size?: number;
2743
- };
2744
- answer: PluginApiSchemas["GalleryImageListResponse"];
2745
- };
2746
- upload_gallery_image: {
2747
- path: {
2748
- gallery_id: number;
2749
- };
2750
- body: FormData;
2751
- answer: PluginApiSchemas["GalleryImageRead"];
2752
- };
2753
- get_gallery_image_timeline: {
2754
- path: {
2755
- gallery_id: number;
2756
- };
2757
- query: {
2758
- tag_ids?: number[] | null;
2759
- search?: string | null;
2760
- /**
2761
- * IANA zone the month boundaries are cut in, e.g. Pacific/Auckland.
2762
- * Defaults to UTC.
2763
- */
2764
- tz?: string | null;
2765
- };
2766
- answer: PluginApiSchemas["TimelineResponse"];
2767
- };
2768
- read_gallery_image: {
2769
- path: {
2770
- gallery_id: number;
2771
- image_id: number;
2772
- };
2773
- answer: PluginApiSchemas["GalleryImageRead"];
2774
- };
2775
- update_gallery_image: {
2776
- path: {
2777
- gallery_id: number;
2778
- image_id: number;
2779
- };
2780
- body: PluginApiSchemas["GalleryImageUpdate"];
2781
- answer: PluginApiSchemas["GalleryImageRead"];
2782
- };
2783
- list_gallery_image_versions: {
2784
- path: {
2785
- gallery_id: number;
2786
- image_id: number;
2787
- };
2788
- answer: PluginApiSchemas["GalleryImageVersionRead"][];
2789
- };
2790
- upload_gallery_image_version: {
2791
- path: {
2792
- gallery_id: number;
2793
- image_id: number;
2794
- };
2795
- body: FormData;
2796
- answer: PluginApiSchemas["GalleryImageVersionRead"];
2797
- };
2798
- delete_gallery_image_version: {
2799
- path: {
2800
- gallery_id: number;
2801
- image_id: number;
2802
- version_id: number;
2803
- };
2804
- answer: void;
2805
- };
2806
2942
  read_wiki: {
2807
2943
  path: {
2808
2944
  wiki_id: number;
@@ -2984,13 +3120,6 @@ export interface PluginApiOperations {
2984
3120
  body: PluginApiSchemas["ResourceGrantSchema"][];
2985
3121
  answer: PluginApiSchemas["PostRead"];
2986
3122
  };
2987
- set_gallery_grants: {
2988
- path: {
2989
- gallery_id: number;
2990
- };
2991
- body: PluginApiSchemas["ResourceGrantSchema"][];
2992
- answer: PluginApiSchemas["GalleryRead"];
2993
- };
2994
3123
  set_wiki_grants: {
2995
3124
  path: {
2996
3125
  wiki_id: number;
@@ -3040,13 +3169,6 @@ export interface PluginApiOperations {
3040
3169
  body: PluginApiSchemas["ToolDuplicateRequest"] | null;
3041
3170
  answer: PluginApiSchemas["PostRead"];
3042
3171
  };
3043
- duplicate_gallery: {
3044
- path: {
3045
- gallery_id: number;
3046
- };
3047
- body: PluginApiSchemas["ToolDuplicateRequest"] | null;
3048
- answer: PluginApiSchemas["GalleryRead"];
3049
- };
3050
3172
  duplicate_wiki: {
3051
3173
  path: {
3052
3174
  wiki_id: number;
@@ -3062,9 +3184,9 @@ export interface PluginApiOperations {
3062
3184
  search: string;
3063
3185
  /**
3064
3186
  * Restrict to these entity types. Omit for the default scope (calendar,
3065
- * calendar_event, counter, counter_group, dashboard, file, gallery,
3066
- * gallery_image, post, project, queue, queue_item, tag, task, wiki,
3067
- * wiki_page); naming a type reaches it explicitly.
3187
+ * calendar_event, collection, counter, counter_group, dashboard, file,
3188
+ * post, project, queue, queue_item, tag, task, wiki, wiki_page); naming a
3189
+ * type reaches it explicitly.
3068
3190
  */
3069
3191
  types?: PluginApiSchemas["SearchEntityType"][] | null;
3070
3192
  /**
@@ -3089,6 +3211,10 @@ export interface PluginApiOperations {
3089
3211
  list_property_definitions: {
3090
3212
  query: {
3091
3213
  initiative_id?: number | null;
3214
+ /**
3215
+ * List this collection's own fields instead of properties.
3216
+ */
3217
+ collection_id?: number | null;
3092
3218
  };
3093
3219
  answer: PluginApiSchemas["PropertyDefinitionRead"][];
3094
3220
  };
@@ -3175,7 +3301,7 @@ export declare const pluginApiOperations: {
3175
3301
  readonly path: "/webhooks/subscriptions";
3176
3302
  readonly scope: {
3177
3303
  readonly per: "event_type";
3178
- readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "galleries:read", "initiatives:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3304
+ readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3179
3305
  };
3180
3306
  };
3181
3307
  readonly delete_subscription: {
@@ -3183,7 +3309,7 @@ export declare const pluginApiOperations: {
3183
3309
  readonly path: "/webhooks/subscriptions/{subscription_id}";
3184
3310
  readonly scope: {
3185
3311
  readonly per: "event_type";
3186
- readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "galleries:read", "initiatives:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3312
+ readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "initiatives:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3187
3313
  };
3188
3314
  };
3189
3315
  readonly list_projects: {
@@ -3246,16 +3372,6 @@ export declare const pluginApiOperations: {
3246
3372
  readonly path: "/posts/";
3247
3373
  readonly scope: "posts:write";
3248
3374
  };
3249
- readonly list_galleries: {
3250
- readonly method: "GET";
3251
- readonly path: "/galleries/";
3252
- readonly scope: "galleries:read";
3253
- };
3254
- readonly create_gallery: {
3255
- readonly method: "POST";
3256
- readonly path: "/galleries/";
3257
- readonly scope: "galleries:write";
3258
- };
3259
3375
  readonly list_wikis: {
3260
3376
  readonly method: "GET";
3261
3377
  readonly path: "/wikis/";
@@ -3266,6 +3382,26 @@ export declare const pluginApiOperations: {
3266
3382
  readonly path: "/wikis/";
3267
3383
  readonly scope: "wikis:write";
3268
3384
  };
3385
+ readonly list_collection_files: {
3386
+ readonly method: "GET";
3387
+ readonly path: "/collections/{collection_id}/files";
3388
+ readonly scope: "files:read";
3389
+ };
3390
+ readonly add_collection_files: {
3391
+ readonly method: "POST";
3392
+ readonly path: "/collections/{collection_id}/files";
3393
+ readonly scope: "files:write";
3394
+ };
3395
+ readonly remove_collection_files: {
3396
+ readonly method: "DELETE";
3397
+ readonly path: "/collections/{collection_id}/files";
3398
+ readonly scope: "files:write";
3399
+ };
3400
+ readonly get_collection_files_timeline: {
3401
+ readonly method: "GET";
3402
+ readonly path: "/collections/{collection_id}/files/timeline";
3403
+ readonly scope: "files:read";
3404
+ };
3269
3405
  readonly read_project: {
3270
3406
  readonly method: "GET";
3271
3407
  readonly path: "/projects/{project_id}";
@@ -3348,6 +3484,11 @@ export declare const pluginApiOperations: {
3348
3484
  readonly path: "/tasks/{task_id}/checklist/{item_id}";
3349
3485
  readonly scope: "projects:write";
3350
3486
  };
3487
+ readonly promote_checklist_item: {
3488
+ readonly method: "POST";
3489
+ readonly path: "/tasks/{task_id}/checklist/{item_id}/promote";
3490
+ readonly scope: "projects:write";
3491
+ };
3351
3492
  readonly list_comments: {
3352
3493
  readonly method: "GET";
3353
3494
  readonly path: "/comments/";
@@ -3373,6 +3514,16 @@ export declare const pluginApiOperations: {
3373
3514
  readonly path: "/initiatives/{initiative_id}";
3374
3515
  readonly scope: "initiatives:read";
3375
3516
  };
3517
+ readonly upload_file: {
3518
+ readonly method: "POST";
3519
+ readonly path: "/files/upload";
3520
+ readonly scope: "files:write";
3521
+ };
3522
+ readonly upload_file_version: {
3523
+ readonly method: "POST";
3524
+ readonly path: "/files/{file_id}/versions";
3525
+ readonly scope: "files:write";
3526
+ };
3376
3527
  readonly read_file: {
3377
3528
  readonly method: "GET";
3378
3529
  readonly path: "/files/{file_id}";
@@ -3383,6 +3534,46 @@ export declare const pluginApiOperations: {
3383
3534
  readonly path: "/files/{file_id}";
3384
3535
  readonly scope: "files:write";
3385
3536
  };
3537
+ readonly list_collection_shapes: {
3538
+ readonly method: "GET";
3539
+ readonly path: "/collections/shapes";
3540
+ readonly scope: "files:read";
3541
+ };
3542
+ readonly list_collections: {
3543
+ readonly method: "GET";
3544
+ readonly path: "/collections/";
3545
+ readonly scope: "files:read";
3546
+ };
3547
+ readonly create_collection: {
3548
+ readonly method: "POST";
3549
+ readonly path: "/collections/";
3550
+ readonly scope: "files:write";
3551
+ };
3552
+ readonly read_collection: {
3553
+ readonly method: "GET";
3554
+ readonly path: "/collections/{collection_id}";
3555
+ readonly scope: "files:read";
3556
+ };
3557
+ readonly delete_collection: {
3558
+ readonly method: "DELETE";
3559
+ readonly path: "/collections/{collection_id}";
3560
+ readonly scope: "files:write";
3561
+ };
3562
+ readonly update_collection: {
3563
+ readonly method: "PATCH";
3564
+ readonly path: "/collections/{collection_id}";
3565
+ readonly scope: "files:write";
3566
+ };
3567
+ readonly get_collection_file_fields: {
3568
+ readonly method: "GET";
3569
+ readonly path: "/collections/{collection_id}/files/{file_id}/fields";
3570
+ readonly scope: "files:read";
3571
+ };
3572
+ readonly set_collection_file_fields: {
3573
+ readonly method: "PUT";
3574
+ readonly path: "/collections/{collection_id}/files/{file_id}/fields";
3575
+ readonly scope: "files:write";
3576
+ };
3386
3577
  readonly read_queue: {
3387
3578
  readonly method: "GET";
3388
3579
  readonly path: "/queues/{queue_id}";
@@ -3533,56 +3724,6 @@ export declare const pluginApiOperations: {
3533
3724
  readonly path: "/posts/{post_id}/pin";
3534
3725
  readonly scope: "posts:write";
3535
3726
  };
3536
- readonly read_gallery: {
3537
- readonly method: "GET";
3538
- readonly path: "/galleries/{gallery_id}";
3539
- readonly scope: "galleries:read";
3540
- };
3541
- readonly update_gallery: {
3542
- readonly method: "PATCH";
3543
- readonly path: "/galleries/{gallery_id}";
3544
- readonly scope: "galleries:write";
3545
- };
3546
- readonly list_gallery_images: {
3547
- readonly method: "GET";
3548
- readonly path: "/galleries/{gallery_id}/images";
3549
- readonly scope: "galleries:read";
3550
- };
3551
- readonly upload_gallery_image: {
3552
- readonly method: "POST";
3553
- readonly path: "/galleries/{gallery_id}/images";
3554
- readonly scope: "galleries:write";
3555
- };
3556
- readonly get_gallery_image_timeline: {
3557
- readonly method: "GET";
3558
- readonly path: "/galleries/{gallery_id}/images/timeline";
3559
- readonly scope: "galleries:read";
3560
- };
3561
- readonly read_gallery_image: {
3562
- readonly method: "GET";
3563
- readonly path: "/galleries/{gallery_id}/images/{image_id}";
3564
- readonly scope: "galleries:read";
3565
- };
3566
- readonly update_gallery_image: {
3567
- readonly method: "PATCH";
3568
- readonly path: "/galleries/{gallery_id}/images/{image_id}";
3569
- readonly scope: "galleries:write";
3570
- };
3571
- readonly list_gallery_image_versions: {
3572
- readonly method: "GET";
3573
- readonly path: "/galleries/{gallery_id}/images/{image_id}/versions";
3574
- readonly scope: "galleries:read";
3575
- };
3576
- readonly upload_gallery_image_version: {
3577
- readonly method: "POST";
3578
- readonly path: "/galleries/{gallery_id}/images/{image_id}/versions";
3579
- readonly scope: "galleries:write";
3580
- };
3581
- readonly delete_gallery_image_version: {
3582
- readonly method: "DELETE";
3583
- readonly path: "/galleries/{gallery_id}/images/{image_id}/versions/{version_id}";
3584
- readonly scope: "galleries:write";
3585
- };
3586
3727
  readonly read_wiki: {
3587
3728
  readonly method: "GET";
3588
3729
  readonly path: "/wikis/{wiki_id}";
@@ -3708,11 +3849,6 @@ export declare const pluginApiOperations: {
3708
3849
  readonly path: "/posts/{post_id}/grants";
3709
3850
  readonly scope: "sharing:write";
3710
3851
  };
3711
- readonly set_gallery_grants: {
3712
- readonly method: "PUT";
3713
- readonly path: "/galleries/{gallery_id}/grants";
3714
- readonly scope: "sharing:write";
3715
- };
3716
3852
  readonly set_wiki_grants: {
3717
3853
  readonly method: "PUT";
3718
3854
  readonly path: "/wikis/{wiki_id}/grants";
@@ -3748,11 +3884,6 @@ export declare const pluginApiOperations: {
3748
3884
  readonly path: "/posts/{post_id}/duplicate";
3749
3885
  readonly scope: "posts:write";
3750
3886
  };
3751
- readonly duplicate_gallery: {
3752
- readonly method: "POST";
3753
- readonly path: "/galleries/{gallery_id}/duplicate";
3754
- readonly scope: "galleries:write";
3755
- };
3756
3887
  readonly duplicate_wiki: {
3757
3888
  readonly method: "POST";
3758
3889
  readonly path: "/wikis/{wiki_id}/duplicate";
@@ -3763,7 +3894,7 @@ export declare const pluginApiOperations: {
3763
3894
  readonly path: "/search/suggest";
3764
3895
  readonly scope: {
3765
3896
  readonly per: "entity_type";
3766
- readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "galleries:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3897
+ readonly any_of: readonly ["calendars:read", "comments:read", "counter_groups:read", "dashboards:read", "files:read", "posts:read", "projects:read", "queues:read", "tags:read", "wikis:read"];
3767
3898
  };
3768
3899
  };
3769
3900
  readonly list_property_definitions: {
@@ -3771,23 +3902,32 @@ export declare const pluginApiOperations: {
3771
3902
  readonly path: "/property-definitions/";
3772
3903
  readonly scope: {
3773
3904
  readonly per: "tool";
3774
- readonly any_of: readonly ["calendars:read", "counter_groups:read", "dashboards:read", "files:read", "galleries:read", "posts:read", "projects:read", "properties:read", "queues:read", "wikis:read"];
3905
+ readonly any_of: readonly ["calendars:read", "counter_groups:read", "dashboards:read", "files:read", "posts:read", "projects:read", "properties:read", "queues:read", "wikis:read"];
3775
3906
  };
3776
3907
  };
3777
3908
  readonly create_property_definition: {
3778
3909
  readonly method: "POST";
3779
3910
  readonly path: "/property-definitions/";
3780
- readonly scope: "properties:write";
3911
+ readonly scope: {
3912
+ readonly per: "property_scope";
3913
+ readonly any_of: readonly ["files:write", "properties:write"];
3914
+ };
3781
3915
  };
3782
3916
  readonly delete_property_definition: {
3783
3917
  readonly method: "DELETE";
3784
3918
  readonly path: "/property-definitions/{definition_id}";
3785
- readonly scope: "properties:write";
3919
+ readonly scope: {
3920
+ readonly per: "property_scope";
3921
+ readonly any_of: readonly ["files:write", "properties:write"];
3922
+ };
3786
3923
  };
3787
3924
  readonly update_property_definition: {
3788
3925
  readonly method: "PATCH";
3789
3926
  readonly path: "/property-definitions/{definition_id}";
3790
- readonly scope: "properties:write";
3927
+ readonly scope: {
3928
+ readonly per: "property_scope";
3929
+ readonly any_of: readonly ["files:write", "properties:write"];
3930
+ };
3791
3931
  };
3792
3932
  readonly set_properties: {
3793
3933
  readonly method: "PUT";
@@ -3797,12 +3937,11 @@ export declare const pluginApiOperations: {
3797
3937
  readonly scopes: {
3798
3938
  readonly calendar: "calendars:write";
3799
3939
  readonly calendar_event: "calendars:write";
3940
+ readonly collection: "files:write";
3800
3941
  readonly counter: "counter_groups:write";
3801
3942
  readonly counter_group: "counter_groups:write";
3802
3943
  readonly dashboard: "dashboards:write";
3803
3944
  readonly file: "files:write";
3804
- readonly gallery: "galleries:write";
3805
- readonly gallery_image: "galleries:write";
3806
3945
  readonly post: "posts:write";
3807
3946
  readonly project: "projects:write";
3808
3947
  readonly queue: "queues:write";
@@ -3820,10 +3959,10 @@ export declare const pluginApiOperations: {
3820
3959
  readonly by: "entity_type";
3821
3960
  readonly scopes: {
3822
3961
  readonly calendar: "calendars:write";
3962
+ readonly collection: "files:write";
3823
3963
  readonly counter_group: "counter_groups:write";
3824
3964
  readonly dashboard: "dashboards:write";
3825
3965
  readonly file: "files:write";
3826
- readonly gallery: "galleries:write";
3827
3966
  readonly post: "posts:write";
3828
3967
  readonly project: "projects:write";
3829
3968
  readonly queue: "queues:write";
@@ -3851,7 +3990,7 @@ export declare class PluginApi {
3851
3990
  /**
3852
3991
  * Register a new webhook subscription.
3853
3992
  *
3854
- * `POST /webhooks/subscriptions`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `galleries:read`, `initiatives:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
3993
+ * `POST /webhooks/subscriptions`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
3855
3994
  */
3856
3995
  createSubscription(args: {
3857
3996
  body: PluginApiOperations["create_subscription"]["body"];
@@ -3862,7 +4001,7 @@ export declare class PluginApi {
3862
4001
  * installed plug-in reaches only the subscriptions it registered, and any
3863
4002
  * other is a 404.
3864
4003
  *
3865
- * `DELETE /webhooks/subscriptions/{subscription_id}`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `galleries:read`, `initiatives:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
4004
+ * `DELETE /webhooks/subscriptions/{subscription_id}`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `initiatives:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
3866
4005
  */
3867
4006
  deleteSubscription(args: {
3868
4007
  path: PluginApiOperations["delete_subscription"]["path"];
@@ -3964,23 +4103,6 @@ export declare class PluginApi {
3964
4103
  createPost(args: {
3965
4104
  body: PluginApiOperations["create_post"]["body"];
3966
4105
  }): Promise<PluginApiOperations["create_post"]["answer"]>;
3967
- /**
3968
- * List galleries visible to the current user (guild admins see all).
3969
- *
3970
- * `GET /galleries/`, needs `galleries:read`.
3971
- */
3972
- listGalleries(args?: {
3973
- query?: PluginApiOperations["list_galleries"]["query"];
3974
- }): Promise<PluginApiOperations["list_galleries"]["answer"]>;
3975
- /**
3976
- * Create a gallery. Requires create_galleries permission on the initiative
3977
- * (or guild admin); the creator gets the owner grant.
3978
- *
3979
- * `POST /galleries/`, needs `galleries:write`.
3980
- */
3981
- createGallery(args: {
3982
- body: PluginApiOperations["create_gallery"]["body"];
3983
- }): Promise<PluginApiOperations["create_gallery"]["answer"]>;
3984
4106
  /**
3985
4107
  * List wikis visible to the current user (guild admins see all).
3986
4108
  *
@@ -3998,6 +4120,49 @@ export declare class PluginApi {
3998
4120
  createWiki(args: {
3999
4121
  body: PluginApiOperations["create_wiki"]["body"];
4000
4122
  }): Promise<PluginApiOperations["create_wiki"]["answer"]>;
4123
+ /**
4124
+ * The files in one collection the reader can open: the Files list, with its
4125
+ * parameters, narrowed to the collection, each with when it was added to it.
4126
+ * A collection out of reach is a 404.
4127
+ *
4128
+ * `GET /collections/{collection_id}/files`, needs `files:read`.
4129
+ */
4130
+ listCollectionFiles(args: {
4131
+ path: PluginApiOperations["list_collection_files"]["path"];
4132
+ query?: PluginApiOperations["list_collection_files"]["query"];
4133
+ }): Promise<PluginApiOperations["list_collection_files"]["answer"]>;
4134
+ /**
4135
+ * Put files in a collection: each a file of its initiative the reader can
4136
+ * open. One already in it stays as it is.
4137
+ *
4138
+ * `POST /collections/{collection_id}/files`, needs `files:write`.
4139
+ */
4140
+ addCollectionFiles(args: {
4141
+ path: PluginApiOperations["add_collection_files"]["path"];
4142
+ body: PluginApiOperations["add_collection_files"]["body"];
4143
+ }): Promise<PluginApiOperations["add_collection_files"]["answer"]>;
4144
+ /**
4145
+ * Take files out of a collection. The files stay where they are. A collection
4146
+ * left with no file goes to the trash.
4147
+ *
4148
+ * `DELETE /collections/{collection_id}/files`, needs `files:write`.
4149
+ */
4150
+ removeCollectionFiles(args: {
4151
+ path: PluginApiOperations["remove_collection_files"]["path"];
4152
+ query: PluginApiOperations["remove_collection_files"]["query"];
4153
+ }): Promise<PluginApiOperations["remove_collection_files"]["answer"]>;
4154
+ /**
4155
+ * The months files were added to this collection in, newest first, each with
4156
+ * how many of them the reader can open and the instants to jump to: what the
4157
+ * timeline rail is drawn from. Takes the same filters the list does, so the
4158
+ * rail is a picture of the list as it stands.
4159
+ *
4160
+ * `GET /collections/{collection_id}/files/timeline`, needs `files:read`.
4161
+ */
4162
+ getCollectionFilesTimeline(args: {
4163
+ path: PluginApiOperations["get_collection_files_timeline"]["path"];
4164
+ query?: PluginApiOperations["get_collection_files_timeline"]["query"];
4165
+ }): Promise<PluginApiOperations["get_collection_files_timeline"]["answer"]>;
4001
4166
  /**
4002
4167
  * Read Project
4003
4168
  *
@@ -4138,6 +4303,14 @@ export declare class PluginApi {
4138
4303
  path: PluginApiOperations["toggle_checklist_item"]["path"];
4139
4304
  body: PluginApiOperations["toggle_checklist_item"]["body"];
4140
4305
  }): Promise<PluginApiOperations["toggle_checklist_item"]["answer"]>;
4306
+ /**
4307
+ * Make one checklist item a task of its own, part of this one.
4308
+ *
4309
+ * `POST /tasks/{task_id}/checklist/{item_id}/promote`, needs `projects:write`.
4310
+ */
4311
+ promoteChecklistItem(args: {
4312
+ path: PluginApiOperations["promote_checklist_item"]["path"];
4313
+ }): Promise<PluginApiOperations["promote_checklist_item"]["answer"]>;
4141
4314
  /**
4142
4315
  * One page of a thread: `limit` conversations, newest first, each with every
4143
4316
  * reply under it. Follow `next_cursor` for older conversations.
@@ -4182,6 +4355,25 @@ export declare class PluginApi {
4182
4355
  path: PluginApiOperations["get_initiative"]["path"];
4183
4356
  query?: PluginApiOperations["get_initiative"]["query"];
4184
4357
  }): Promise<PluginApiOperations["get_initiative"]["answer"]>;
4358
+ /**
4359
+ * Upload a file: sent with the request as `file`, or sent in pieces before it
4360
+ * as a resumable upload, named by `upload_id`.
4361
+ *
4362
+ * `POST /files/upload`, needs `files:write`.
4363
+ */
4364
+ uploadFile(args: {
4365
+ body: PluginApiOperations["upload_file"]["body"];
4366
+ }): Promise<PluginApiOperations["upload_file"]["answer"]>;
4367
+ /**
4368
+ * Upload a new version of an uploaded file, sent as `file` or as a resumable
4369
+ * upload named by `upload_id`. Requires write access.
4370
+ *
4371
+ * `POST /files/{file_id}/versions`, needs `files:write`.
4372
+ */
4373
+ uploadFileVersion(args: {
4374
+ path: PluginApiOperations["upload_file_version"]["path"];
4375
+ body?: PluginApiOperations["upload_file_version"]["body"];
4376
+ }): Promise<PluginApiOperations["upload_file_version"]["answer"]>;
4185
4377
  /**
4186
4378
  * Read File
4187
4379
  *
@@ -4200,6 +4392,83 @@ export declare class PluginApi {
4200
4392
  path: PluginApiOperations["update_file"]["path"];
4201
4393
  body: PluginApiOperations["update_file"]["body"];
4202
4394
  }): Promise<PluginApiOperations["update_file"]["answer"]>;
4395
+ /**
4396
+ * The ready-made shapes a new collection can start as, grouped, in the
4397
+ * reader's language: the lists each shows and opens on, and its fields.
4398
+ *
4399
+ * `GET /collections/shapes`, needs `files:read`.
4400
+ */
4401
+ listCollectionShapes(): Promise<PluginApiOperations["list_collection_shapes"]["answer"]>;
4402
+ /**
4403
+ * The initiative's collections the reader can see — those holding a file they
4404
+ * can open — most recently changed first, each with how many of its files
4405
+ * they can see and a cover they can open.
4406
+ *
4407
+ * `GET /collections/`, needs `files:read`.
4408
+ */
4409
+ listCollections(args: {
4410
+ query: PluginApiOperations["list_collections"]["query"];
4411
+ }): Promise<PluginApiOperations["list_collections"]["answer"]>;
4412
+ /**
4413
+ * Make a collection of files. It starts with the files named, each one a file
4414
+ * of the initiative the reader can open. Takes the initiative role's right to
4415
+ * create files. It starts blank, as a ready-made `shape` with its words in
4416
+ * the maker's language, or with the fields and lists of `shape_from`, a
4417
+ * collection of the same initiative the maker sees.
4418
+ *
4419
+ * `POST /collections/`, needs `files:write`.
4420
+ */
4421
+ createCollection(args: {
4422
+ body: PluginApiOperations["create_collection"]["body"];
4423
+ }): Promise<PluginApiOperations["create_collection"]["answer"]>;
4424
+ /**
4425
+ * Read Collection
4426
+ *
4427
+ * `GET /collections/{collection_id}`, needs `files:read`.
4428
+ */
4429
+ readCollection(args: {
4430
+ path: PluginApiOperations["read_collection"]["path"];
4431
+ }): Promise<PluginApiOperations["read_collection"]["answer"]>;
4432
+ /**
4433
+ * Send a collection to the trash. Its files stay where they are.
4434
+ *
4435
+ * `DELETE /collections/{collection_id}`, needs `files:write`.
4436
+ */
4437
+ deleteCollection(args: {
4438
+ path: PluginApiOperations["delete_collection"]["path"];
4439
+ }): Promise<PluginApiOperations["delete_collection"]["answer"]>;
4440
+ /**
4441
+ * Rename, describe, tag, set the cover of, or switch the comments of a
4442
+ * collection.
4443
+ *
4444
+ * `PATCH /collections/{collection_id}`, needs `files:write`.
4445
+ */
4446
+ updateCollection(args: {
4447
+ path: PluginApiOperations["update_collection"]["path"];
4448
+ body: PluginApiOperations["update_collection"]["body"];
4449
+ }): Promise<PluginApiOperations["update_collection"]["answer"]>;
4450
+ /**
4451
+ * One file's values of the collection's own fields, for a file in the
4452
+ * collection the reader can open.
4453
+ *
4454
+ * `GET /collections/{collection_id}/files/{file_id}/fields`, needs `files:read`.
4455
+ */
4456
+ getCollectionFileFields(args: {
4457
+ path: PluginApiOperations["get_collection_file_fields"]["path"];
4458
+ }): Promise<PluginApiOperations["get_collection_file_fields"]["answer"]>;
4459
+ /**
4460
+ * Replace one file's values of the collection's own fields, or with `merge`
4461
+ * write only the ones named, as `PUT /properties` does for a property. The
4462
+ * file is one in the collection the reader can open, and the values are the
4463
+ * collection's: they take the right to change the collection, not to edit the
4464
+ * file. An empty list clears them all.
4465
+ *
4466
+ * `PUT /collections/{collection_id}/files/{file_id}/fields`, needs `files:write`.
4467
+ */
4468
+ setCollectionFileFields(args: {
4469
+ path: PluginApiOperations["set_collection_file_fields"]["path"];
4470
+ body: PluginApiOperations["set_collection_file_fields"]["body"];
4471
+ }): Promise<PluginApiOperations["set_collection_file_fields"]["answer"]>;
4203
4472
  /**
4204
4473
  * Read Queue
4205
4474
  *
@@ -4465,99 +4734,6 @@ export declare class PluginApi {
4465
4734
  path: PluginApiOperations["set_post_pin"]["path"];
4466
4735
  body: PluginApiOperations["set_post_pin"]["body"];
4467
4736
  }): Promise<PluginApiOperations["set_post_pin"]["answer"]>;
4468
- /**
4469
- * Read Gallery
4470
- *
4471
- * `GET /galleries/{gallery_id}`, needs `galleries:read`.
4472
- */
4473
- readGallery(args: {
4474
- path: PluginApiOperations["read_gallery"]["path"];
4475
- query?: PluginApiOperations["read_gallery"]["query"];
4476
- }): Promise<PluginApiOperations["read_gallery"]["answer"]>;
4477
- /**
4478
- * Rename, describe, or choose the cover. Requires write access.
4479
- *
4480
- * `PATCH /galleries/{gallery_id}`, needs `galleries:write`.
4481
- */
4482
- updateGallery(args: {
4483
- path: PluginApiOperations["update_gallery"]["path"];
4484
- body: PluginApiOperations["update_gallery"]["body"];
4485
- }): Promise<PluginApiOperations["update_gallery"]["answer"]>;
4486
- /**
4487
- * One page of a gallery's pictures, newest first.
4488
- *
4489
- * `GET /galleries/{gallery_id}/images`, needs `galleries:read`.
4490
- */
4491
- listGalleryImages(args: {
4492
- path: PluginApiOperations["list_gallery_images"]["path"];
4493
- query?: PluginApiOperations["list_gallery_images"]["query"];
4494
- }): Promise<PluginApiOperations["list_gallery_images"]["answer"]>;
4495
- /**
4496
- * Add one picture to a gallery. Requires write access.
4497
- *
4498
- * `POST /galleries/{gallery_id}/images`, needs `galleries:write`.
4499
- */
4500
- uploadGalleryImage(args: {
4501
- path: PluginApiOperations["upload_gallery_image"]["path"];
4502
- body: PluginApiOperations["upload_gallery_image"]["body"];
4503
- }): Promise<PluginApiOperations["upload_gallery_image"]["answer"]>;
4504
- /**
4505
- * The months this gallery has pictures in, newest first — what the timeline
4506
- * rail is drawn from. Takes the same filters the list does, so the rail is a
4507
- * picture of the list as it currently stands.
4508
- *
4509
- * `GET /galleries/{gallery_id}/images/timeline`, needs `galleries:read`.
4510
- */
4511
- getGalleryImageTimeline(args: {
4512
- path: PluginApiOperations["get_gallery_image_timeline"]["path"];
4513
- query?: PluginApiOperations["get_gallery_image_timeline"]["query"];
4514
- }): Promise<PluginApiOperations["get_gallery_image_timeline"]["answer"]>;
4515
- /**
4516
- * Read Gallery Image
4517
- *
4518
- * `GET /galleries/{gallery_id}/images/{image_id}`, needs `galleries:read`.
4519
- */
4520
- readGalleryImage(args: {
4521
- path: PluginApiOperations["read_gallery_image"]["path"];
4522
- }): Promise<PluginApiOperations["read_gallery_image"]["answer"]>;
4523
- /**
4524
- * Retitle, caption, retag or set the properties of a picture. Requires write
4525
- * access on the gallery.
4526
- *
4527
- * `PATCH /galleries/{gallery_id}/images/{image_id}`, needs `galleries:write`.
4528
- */
4529
- updateGalleryImage(args: {
4530
- path: PluginApiOperations["update_gallery_image"]["path"];
4531
- body: PluginApiOperations["update_gallery_image"]["body"];
4532
- }): Promise<PluginApiOperations["update_gallery_image"]["answer"]>;
4533
- /**
4534
- * Every stored rendition of a picture, newest first.
4535
- *
4536
- * `GET /galleries/{gallery_id}/images/{image_id}/versions`, needs `galleries:read`.
4537
- */
4538
- listGalleryImageVersions(args: {
4539
- path: PluginApiOperations["list_gallery_image_versions"]["path"];
4540
- }): Promise<PluginApiOperations["list_gallery_image_versions"]["answer"]>;
4541
- /**
4542
- * Replace a picture with a new rendition, keeping the old one as history.
4543
- * Requires write access on the gallery.
4544
- *
4545
- * `POST /galleries/{gallery_id}/images/{image_id}/versions`, needs `galleries:write`.
4546
- */
4547
- uploadGalleryImageVersion(args: {
4548
- path: PluginApiOperations["upload_gallery_image_version"]["path"];
4549
- body: PluginApiOperations["upload_gallery_image_version"]["body"];
4550
- }): Promise<PluginApiOperations["upload_gallery_image_version"]["answer"]>;
4551
- /**
4552
- * Delete one rendition of a picture. Owner only. Deleting the current one
4553
- * promotes the previous; deleting the last is refused — remove the picture
4554
- * instead.
4555
- *
4556
- * `DELETE /galleries/{gallery_id}/images/{image_id}/versions/{version_id}`, needs `galleries:write`.
4557
- */
4558
- deleteGalleryImageVersion(args: {
4559
- path: PluginApiOperations["delete_gallery_image_version"]["path"];
4560
- }): Promise<PluginApiOperations["delete_gallery_image_version"]["answer"]>;
4561
4737
  /**
4562
4738
  * Read Wiki
4563
4739
  *
@@ -4798,17 +4974,6 @@ export declare class PluginApi {
4798
4974
  path: PluginApiOperations["set_post_grants"]["path"];
4799
4975
  body: PluginApiOperations["set_post_grants"]["body"];
4800
4976
  }): Promise<PluginApiOperations["set_post_grants"]["answer"]>;
4801
- /**
4802
- * Replace the gallery's entire sharing state in one call — the body is the
4803
- * full list of grants (all-initiative-members / per-user / per-role). Every
4804
- * non-owner grant is rebuilt from it; the owner is always preserved.
4805
- *
4806
- * `PUT /galleries/{gallery_id}/grants`, needs `sharing:write`.
4807
- */
4808
- setGalleryGrants(args: {
4809
- path: PluginApiOperations["set_gallery_grants"]["path"];
4810
- body: PluginApiOperations["set_gallery_grants"]["body"];
4811
- }): Promise<PluginApiOperations["set_gallery_grants"]["answer"]>;
4812
4977
  /**
4813
4978
  * Replace the wiki's entire sharing state in one call — the body is the full
4814
4979
  * list of grants (all-initiative-members / per-user / per-role). Every
@@ -4898,19 +5063,6 @@ export declare class PluginApi {
4898
5063
  path: PluginApiOperations["duplicate_post"]["path"];
4899
5064
  body?: PluginApiOperations["duplicate_post"]["body"];
4900
5065
  }): Promise<PluginApiOperations["duplicate_post"]["answer"]>;
4901
- /**
4902
- * Copy it, with everything inside it, into an initiative: its own unless the
4903
- * body names another. Read is enough to copy a template; anything else needs
4904
- * write. The copy is shared as its source is while it stays in the same
4905
- * initiative, and carries the tags its maker may set: an installed plug-in's
4906
- * copy carries them only when it holds the scope to tag.
4907
- *
4908
- * `POST /galleries/{gallery_id}/duplicate`, needs `galleries:write`.
4909
- */
4910
- duplicateGallery(args: {
4911
- path: PluginApiOperations["duplicate_gallery"]["path"];
4912
- body?: PluginApiOperations["duplicate_gallery"]["body"];
4913
- }): Promise<PluginApiOperations["duplicate_gallery"]["answer"]>;
4914
5066
  /**
4915
5067
  * Copy it, with everything inside it, into an initiative: its own unless the
4916
5068
  * body names another. Read is enough to copy a template; anything else needs
@@ -4927,7 +5079,7 @@ export declare class PluginApi {
4927
5079
  /**
4928
5080
  * Titles for the command palette — a way to reach one thing quickly.
4929
5081
  *
4930
- * `GET /search/suggest`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `galleries:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
5082
+ * `GET /search/suggest`, needs one of `calendars:read`, `comments:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `queues:read`, `tags:read`, `wikis:read`.
4931
5083
  */
4932
5084
  suggestCommunity(args: {
4933
5085
  query: PluginApiOperations["suggest_community"]["query"];
@@ -4935,23 +5087,25 @@ export declare class PluginApi {
4935
5087
  /**
4936
5088
  * List property definitions.
4937
5089
  *
4938
- * `GET /property-definitions/`, needs one of `calendars:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `galleries:read`, `posts:read`, `projects:read`, `properties:read`, `queues:read`, `wikis:read`.
5090
+ * `GET /property-definitions/`, needs one of `calendars:read`, `counter_groups:read`, `dashboards:read`, `files:read`, `posts:read`, `projects:read`, `properties:read`, `queues:read`, `wikis:read`.
4939
5091
  */
4940
5092
  listPropertyDefinitions(args?: {
4941
5093
  query?: PluginApiOperations["list_property_definitions"]["query"];
4942
5094
  }): Promise<PluginApiOperations["list_property_definitions"]["answer"]>;
4943
5095
  /**
4944
- * Create a new property definition on an initiative.
5096
+ * Create a new property definition on an initiative, or with `collection_id`
5097
+ * a field of that collection's own.
4945
5098
  *
4946
- * `POST /property-definitions/`, needs `properties:write`.
5099
+ * `POST /property-definitions/`, needs one of `files:write`, `properties:write`.
4947
5100
  */
4948
5101
  createPropertyDefinition(args: {
4949
5102
  body: PluginApiOperations["create_property_definition"]["body"];
4950
5103
  }): Promise<PluginApiOperations["create_property_definition"]["answer"]>;
4951
5104
  /**
4952
- * Delete a property definition. Cascades to remove all attached values.
5105
+ * Delete a property definition. Cascades to remove all attached values. A
5106
+ * collection's field is removed by whoever may change the collection.
4953
5107
  *
4954
- * `DELETE /property-definitions/{definition_id}`, needs `properties:write`.
5108
+ * `DELETE /property-definitions/{definition_id}`, needs one of `files:write`, `properties:write`.
4955
5109
  */
4956
5110
  deletePropertyDefinition(args: {
4957
5111
  path: PluginApiOperations["delete_property_definition"]["path"];
@@ -4959,7 +5113,7 @@ export declare class PluginApi {
4959
5113
  /**
4960
5114
  * Update a property definition.
4961
5115
  *
4962
- * `PATCH /property-definitions/{definition_id}`, needs `properties:write`.
5116
+ * `PATCH /property-definitions/{definition_id}`, needs one of `files:write`, `properties:write`.
4963
5117
  */
4964
5118
  updatePropertyDefinition(args: {
4965
5119
  path: PluginApiOperations["update_property_definition"]["path"];