@nocobase/server 2.1.0-alpha.2 → 2.1.0-alpha.21

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 (51) hide show
  1. package/LICENSE +201 -661
  2. package/README.md +79 -10
  3. package/lib/acl/available-action.js +1 -1
  4. package/lib/aes-encryptor.js +3 -2
  5. package/lib/ai/create-docs-index.js +2 -1
  6. package/lib/app-supervisor/app-options-factory.d.ts +1 -0
  7. package/lib/app-supervisor/index.js +15 -1
  8. package/lib/app-supervisor/main-only-adapter.d.ts +1 -1
  9. package/lib/app-supervisor/main-only-adapter.js +17 -12
  10. package/lib/application.d.ts +1 -2
  11. package/lib/application.js +3 -24
  12. package/lib/commands/create-migration.js +1 -1
  13. package/lib/commands/install.js +3 -1
  14. package/lib/commands/pm.js +7 -0
  15. package/lib/commands/start.js +2 -2
  16. package/lib/commands/upgrade.js +3 -1
  17. package/lib/event-queue.js +1 -1
  18. package/lib/gateway/index.d.ts +13 -3
  19. package/lib/gateway/index.js +137 -15
  20. package/lib/gateway/utils.d.ts +17 -0
  21. package/lib/gateway/utils.js +115 -0
  22. package/lib/helper.js +33 -1
  23. package/lib/index.d.ts +1 -0
  24. package/lib/index.js +2 -0
  25. package/lib/main-data-source.js +1 -1
  26. package/lib/plugin-manager/deps.js +2 -1
  27. package/lib/plugin-manager/options/resource.d.ts +11 -1
  28. package/lib/plugin-manager/options/resource.js +153 -53
  29. package/lib/plugin-manager/plugin-manager.d.ts +7 -2
  30. package/lib/plugin-manager/plugin-manager.js +56 -43
  31. package/lib/plugin-manager/utils.d.ts +7 -1
  32. package/lib/plugin-manager/utils.js +33 -9
  33. package/lib/plugin.js +47 -2
  34. package/lib/pub-sub-manager/handler-manager.d.ts +1 -0
  35. package/lib/pub-sub-manager/handler-manager.js +11 -0
  36. package/lib/pub-sub-manager/pub-sub-manager.js +2 -1
  37. package/lib/swagger/app.d.ts +102 -0
  38. package/lib/swagger/app.js +124 -0
  39. package/lib/swagger/base.d.ts +244 -0
  40. package/lib/swagger/base.js +292 -0
  41. package/lib/swagger/collections.d.ts +996 -0
  42. package/lib/swagger/collections.js +1264 -0
  43. package/lib/swagger/index.d.ts +1774 -0
  44. package/lib/swagger/index.js +70 -0
  45. package/lib/swagger/pm.d.ts +462 -0
  46. package/lib/swagger/pm.js +422 -0
  47. package/lib/sync-message-manager.js +8 -1
  48. package/lib/worker-mode.d.ts +19 -0
  49. package/lib/worker-mode.js +67 -0
  50. package/package.json +18 -18
  51. package/lib/swagger/index.json +0 -1569
@@ -0,0 +1,1774 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ tags: ({
11
+ readonly name: "$collection";
12
+ readonly description: "Data table";
13
+ } | {
14
+ readonly name: "$collection.$oneToOneAssociation";
15
+ readonly description: "One to one relationship";
16
+ } | {
17
+ readonly name: "$collection.$manyToOneAssociation";
18
+ readonly description: "Many to one relationship";
19
+ } | {
20
+ readonly name: "$collection.$oneToManyAssociation";
21
+ readonly description: "One to many relationship";
22
+ } | {
23
+ readonly name: "$collection.$manyToManyAssociation";
24
+ readonly description: "Many to many relationship";
25
+ } | {
26
+ readonly name: "app";
27
+ readonly description: "app";
28
+ } | {
29
+ readonly name: "pm";
30
+ readonly description: "pm";
31
+ } | {
32
+ name: string;
33
+ description: string;
34
+ })[];
35
+ components: {
36
+ schemas: {
37
+ PMPluginListSummaryItem: {
38
+ readonly type: "object";
39
+ readonly description: "Compact plugin row returned when listing with `mode=summary`.";
40
+ readonly properties: {
41
+ readonly displayName: {
42
+ readonly type: "string";
43
+ };
44
+ readonly packageName: {
45
+ readonly type: "string";
46
+ };
47
+ readonly enabled: {
48
+ readonly type: "boolean";
49
+ };
50
+ readonly description: {
51
+ readonly type: "string";
52
+ };
53
+ };
54
+ readonly additionalProperties: true;
55
+ };
56
+ PMPlugin: {
57
+ readonly type: "object";
58
+ readonly properties: {
59
+ readonly id: {
60
+ readonly type: "integer";
61
+ };
62
+ readonly name: {
63
+ readonly type: "string";
64
+ readonly description: "Plugin short name.";
65
+ };
66
+ readonly packageName: {
67
+ readonly type: "string";
68
+ readonly description: "Plugin package name.";
69
+ };
70
+ readonly version: {
71
+ readonly type: "string";
72
+ };
73
+ readonly enabled: {
74
+ readonly type: "boolean";
75
+ };
76
+ readonly installed: {
77
+ readonly type: "boolean";
78
+ };
79
+ readonly builtIn: {
80
+ readonly type: "boolean";
81
+ };
82
+ readonly options: {
83
+ readonly type: "object";
84
+ readonly additionalProperties: true;
85
+ };
86
+ };
87
+ readonly additionalProperties: true;
88
+ };
89
+ PMEnabledPlugin: {
90
+ readonly type: "object";
91
+ readonly properties: {
92
+ readonly name: {
93
+ readonly type: "string";
94
+ };
95
+ readonly packageName: {
96
+ readonly type: "string";
97
+ };
98
+ readonly options: {
99
+ readonly type: "object";
100
+ readonly additionalProperties: true;
101
+ };
102
+ readonly url: {
103
+ readonly type: "string";
104
+ readonly description: "Resolved client bundle URL.";
105
+ };
106
+ };
107
+ readonly additionalProperties: true;
108
+ };
109
+ PMPluginActionResult: {
110
+ readonly type: "string";
111
+ readonly description: "Queued successfully.";
112
+ readonly example: "ok";
113
+ };
114
+ PMInstallOrUpdatePayload: {
115
+ readonly type: "object";
116
+ readonly description: "JSON payload for installing or updating a plugin from npm or a compressed package URL.";
117
+ readonly properties: {
118
+ readonly packageName: {
119
+ readonly type: "string";
120
+ readonly description: "Plugin package name.";
121
+ };
122
+ readonly version: {
123
+ readonly type: "string";
124
+ readonly description: "Target plugin version.";
125
+ };
126
+ readonly registry: {
127
+ readonly type: "string";
128
+ readonly description: "Custom npm registry URL.";
129
+ };
130
+ readonly authToken: {
131
+ readonly type: "string";
132
+ readonly description: "Authentication token used when accessing a private registry.";
133
+ };
134
+ readonly compressedFileUrl: {
135
+ readonly type: "string";
136
+ readonly description: "Remote compressed package URL.";
137
+ };
138
+ };
139
+ readonly additionalProperties: true;
140
+ };
141
+ PMUploadPayload: {
142
+ readonly type: "object";
143
+ readonly description: "Multipart payload for uploading a plugin package file.";
144
+ readonly properties: {
145
+ readonly packageName: {
146
+ readonly type: "string";
147
+ readonly description: "Plugin package name. Required when updating from an uploaded file.";
148
+ };
149
+ readonly version: {
150
+ readonly type: "string";
151
+ };
152
+ readonly registry: {
153
+ readonly type: "string";
154
+ };
155
+ readonly authToken: {
156
+ readonly type: "string";
157
+ };
158
+ readonly file: {
159
+ readonly type: "string";
160
+ readonly format: "binary";
161
+ readonly description: "Compressed plugin package file.";
162
+ };
163
+ };
164
+ readonly additionalProperties: true;
165
+ };
166
+ };
167
+ parameters: {
168
+ readonly collectionName: {
169
+ readonly required: true;
170
+ readonly name: "collectionName";
171
+ readonly in: "path";
172
+ readonly description: "Collection name";
173
+ readonly schema: {
174
+ readonly type: "string";
175
+ };
176
+ };
177
+ readonly collectionIndex: {
178
+ readonly required: true;
179
+ readonly name: "collectionIndex";
180
+ readonly in: "path";
181
+ readonly description: "Collection index";
182
+ readonly schema: {
183
+ readonly type: "integer";
184
+ readonly format: "int64";
185
+ };
186
+ };
187
+ readonly oneToOneAssociation: {
188
+ readonly required: true;
189
+ readonly name: "oneToOneAssociation";
190
+ readonly in: "path";
191
+ readonly description: "Association name";
192
+ readonly schema: {
193
+ readonly type: "string";
194
+ };
195
+ };
196
+ readonly manyToOneAssociation: {
197
+ readonly required: true;
198
+ readonly name: "manyToOneAssociation";
199
+ readonly in: "path";
200
+ readonly description: "Association name";
201
+ readonly schema: {
202
+ readonly type: "string";
203
+ };
204
+ };
205
+ readonly oneToManyAssociation: {
206
+ readonly required: true;
207
+ readonly name: "oneToManyAssociation";
208
+ readonly in: "path";
209
+ readonly description: "Association name";
210
+ readonly schema: {
211
+ readonly type: "string";
212
+ };
213
+ };
214
+ readonly manyToManyAssociation: {
215
+ readonly required: true;
216
+ readonly name: "manyToManyAssociation";
217
+ readonly in: "path";
218
+ readonly description: "Association name";
219
+ readonly schema: {
220
+ readonly type: "string";
221
+ };
222
+ };
223
+ readonly page: {
224
+ readonly name: "page";
225
+ readonly in: "query";
226
+ readonly description: "page number";
227
+ readonly required: false;
228
+ readonly schema: {
229
+ readonly type: "integer";
230
+ };
231
+ };
232
+ readonly pageSize: {
233
+ readonly name: "pageSize";
234
+ readonly in: "query";
235
+ readonly description: "page size";
236
+ readonly required: false;
237
+ readonly schema: {
238
+ readonly type: "integer";
239
+ };
240
+ };
241
+ readonly filterByTk: {
242
+ readonly name: "filterByTk";
243
+ readonly in: "query";
244
+ readonly description: "filter by TK(default by ID)";
245
+ readonly schema: {
246
+ readonly type: "string";
247
+ };
248
+ };
249
+ readonly filterByTks: {
250
+ readonly name: "filterByTks";
251
+ readonly in: "query";
252
+ readonly description: "filter by TKs(default by ID), example: `1,2,3`";
253
+ readonly schema: {
254
+ readonly type: "string";
255
+ };
256
+ };
257
+ readonly filter: {
258
+ readonly name: "filter";
259
+ readonly in: "query";
260
+ readonly description: "filter items";
261
+ readonly content: {
262
+ readonly 'application/json': {
263
+ readonly schema: {
264
+ readonly type: "object";
265
+ };
266
+ };
267
+ };
268
+ };
269
+ readonly sort: {
270
+ readonly name: "sort";
271
+ readonly in: "query";
272
+ readonly description: "sort items by fields, example: `-field1,-field2,field3`";
273
+ readonly schema: {
274
+ readonly oneOf: readonly [{
275
+ readonly type: "array";
276
+ readonly items: {
277
+ readonly type: "string";
278
+ };
279
+ readonly example: readonly ["-id", "createdAt"];
280
+ }, {
281
+ readonly type: "string";
282
+ readonly example: "-id,createdAt";
283
+ }];
284
+ };
285
+ };
286
+ readonly fields: {
287
+ readonly name: "fields";
288
+ readonly in: "query";
289
+ readonly description: "select fields, example: `field1,field2`";
290
+ readonly schema: {
291
+ readonly oneOf: readonly [{
292
+ readonly type: "array";
293
+ readonly items: {
294
+ readonly type: "string";
295
+ };
296
+ readonly example: readonly ["id", "createdAt"];
297
+ }, {
298
+ readonly type: "string";
299
+ readonly example: "id,createdAt";
300
+ }];
301
+ };
302
+ };
303
+ readonly except: {
304
+ readonly name: "except";
305
+ readonly in: "query";
306
+ readonly description: "except fields in results, example: `field1,field2`";
307
+ readonly schema: {
308
+ readonly oneOf: readonly [{
309
+ readonly type: "array";
310
+ readonly items: {
311
+ readonly type: "string";
312
+ };
313
+ readonly example: readonly ["id", "createdAt"];
314
+ }, {
315
+ readonly type: "string";
316
+ readonly example: "id,createdAt";
317
+ }];
318
+ };
319
+ };
320
+ readonly appends: {
321
+ readonly name: "appends";
322
+ readonly in: "query";
323
+ readonly description: "append associations in results, example: `assoc1,assoc2`";
324
+ readonly schema: {
325
+ readonly oneOf: readonly [{
326
+ readonly type: "array";
327
+ readonly items: {
328
+ readonly type: "string";
329
+ };
330
+ readonly example: readonly ["id", "createdAt"];
331
+ }, {
332
+ readonly type: "string";
333
+ readonly example: "id,createdAt";
334
+ }];
335
+ };
336
+ };
337
+ readonly whitelist: {
338
+ readonly name: "whitelist";
339
+ readonly in: "query";
340
+ readonly description: "whitelist for fields changes, example: `field1,field2`";
341
+ readonly schema: {
342
+ readonly oneOf: readonly [{
343
+ readonly type: "array";
344
+ readonly items: {
345
+ readonly type: "string";
346
+ };
347
+ readonly example: readonly ["id", "createdAt"];
348
+ }, {
349
+ readonly type: "string";
350
+ readonly example: "id,createdAt";
351
+ }];
352
+ };
353
+ };
354
+ readonly blacklist: {
355
+ readonly name: "blacklist";
356
+ readonly in: "query";
357
+ readonly description: "blacklist for fields changes, example: `field1,field2`";
358
+ readonly schema: {
359
+ readonly oneOf: readonly [{
360
+ readonly type: "array";
361
+ readonly items: {
362
+ readonly type: "string";
363
+ };
364
+ readonly example: readonly ["id", "createdAt"];
365
+ }, {
366
+ readonly type: "string";
367
+ readonly example: "id,createdAt";
368
+ }];
369
+ };
370
+ };
371
+ };
372
+ };
373
+ paths: {
374
+ '/pm:list': {
375
+ readonly get: {
376
+ readonly tags: readonly ["pm"];
377
+ readonly summary: "List available plugins";
378
+ readonly description: "Return plugin metadata from the plugin manager. Pass `mode=summary` for a lightweight list built from discovered packages; omit `mode` for full records (locale-aware via the nocobase plugin).";
379
+ readonly parameters: readonly [{
380
+ name: string;
381
+ in: string;
382
+ required: boolean;
383
+ description: string;
384
+ schema: {
385
+ type: string;
386
+ enum: string[];
387
+ };
388
+ }];
389
+ readonly responses: {
390
+ readonly 200: {
391
+ description: string;
392
+ content: {
393
+ 'application/json': {
394
+ schema: {
395
+ oneOf: {
396
+ type: string;
397
+ items: {
398
+ $ref: string;
399
+ };
400
+ }[];
401
+ };
402
+ };
403
+ };
404
+ };
405
+ };
406
+ };
407
+ };
408
+ '/pm:get': {
409
+ readonly get: {
410
+ readonly tags: readonly ["pm"];
411
+ readonly summary: "Get plugin details";
412
+ readonly description: "Return metadata for a single plugin.";
413
+ readonly parameters: readonly [{
414
+ name: string;
415
+ in: string;
416
+ description: string;
417
+ required: boolean;
418
+ schema: {
419
+ type: string;
420
+ };
421
+ }];
422
+ readonly responses: {
423
+ readonly 200: {
424
+ readonly description: "OK";
425
+ readonly content: {
426
+ readonly 'application/json': {
427
+ readonly schema: {
428
+ readonly $ref: "#/components/schemas/PMPlugin";
429
+ };
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ };
436
+ '/pm:listEnabled': {
437
+ readonly get: {
438
+ readonly tags: readonly ["pm"];
439
+ readonly summary: "List enabled client plugins";
440
+ readonly description: "Return enabled plugins that expose a `dist/client/index.js` entry.";
441
+ readonly parameters: readonly [];
442
+ readonly responses: {
443
+ readonly 200: {
444
+ description: string;
445
+ content: {
446
+ 'application/json': {
447
+ schema: {
448
+ type: string;
449
+ items: {
450
+ $ref: string;
451
+ };
452
+ };
453
+ };
454
+ };
455
+ };
456
+ };
457
+ };
458
+ };
459
+ '/pm:listEnabledV2': {
460
+ readonly get: {
461
+ readonly tags: readonly ["pm"];
462
+ readonly summary: "List enabled client-v2 plugins";
463
+ readonly description: "Return enabled plugins that expose a `dist/client-v2/index.js` entry.";
464
+ readonly parameters: readonly [];
465
+ readonly responses: {
466
+ readonly 200: {
467
+ description: string;
468
+ content: {
469
+ 'application/json': {
470
+ schema: {
471
+ type: string;
472
+ items: {
473
+ $ref: string;
474
+ };
475
+ };
476
+ };
477
+ };
478
+ };
479
+ };
480
+ };
481
+ };
482
+ '/pm:add': {
483
+ readonly post: {
484
+ readonly tags: readonly ["pm"];
485
+ readonly summary: "Install a plugin";
486
+ readonly description: "Queue a plugin installation from npm, a remote compressed package URL, or an uploaded package file.";
487
+ readonly requestBody: {
488
+ readonly required: true;
489
+ readonly content: {
490
+ readonly 'application/json': {
491
+ readonly schema: {
492
+ readonly $ref: "#/components/schemas/PMInstallOrUpdatePayload";
493
+ };
494
+ };
495
+ readonly 'multipart/form-data': {
496
+ readonly schema: {
497
+ readonly $ref: "#/components/schemas/PMUploadPayload";
498
+ };
499
+ };
500
+ };
501
+ };
502
+ readonly responses: {
503
+ readonly 200: {
504
+ description: string;
505
+ content: {
506
+ 'application/json': {
507
+ schema: {
508
+ oneOf: ({
509
+ type: string;
510
+ example: string;
511
+ $ref?: undefined;
512
+ } | {
513
+ $ref: string;
514
+ type?: undefined;
515
+ example?: undefined;
516
+ })[];
517
+ };
518
+ };
519
+ };
520
+ };
521
+ };
522
+ };
523
+ };
524
+ '/pm:update': {
525
+ readonly post: {
526
+ readonly tags: readonly ["pm"];
527
+ readonly summary: "Update a plugin";
528
+ readonly description: "Queue a plugin update from npm, a remote compressed package URL, or an uploaded package file.";
529
+ readonly requestBody: {
530
+ readonly required: true;
531
+ readonly content: {
532
+ readonly 'application/json': {
533
+ readonly schema: {
534
+ readonly $ref: "#/components/schemas/PMInstallOrUpdatePayload";
535
+ };
536
+ };
537
+ readonly 'multipart/form-data': {
538
+ readonly schema: {
539
+ readonly $ref: "#/components/schemas/PMUploadPayload";
540
+ };
541
+ };
542
+ };
543
+ };
544
+ readonly responses: {
545
+ readonly 200: {
546
+ description: string;
547
+ content: {
548
+ 'application/json': {
549
+ schema: {
550
+ oneOf: ({
551
+ type: string;
552
+ example: string;
553
+ $ref?: undefined;
554
+ } | {
555
+ $ref: string;
556
+ type?: undefined;
557
+ example?: undefined;
558
+ })[];
559
+ };
560
+ };
561
+ };
562
+ };
563
+ };
564
+ };
565
+ };
566
+ '/pm:enable': {
567
+ readonly post: {
568
+ readonly tags: readonly ["pm"];
569
+ readonly summary: "Enable a plugin";
570
+ readonly description: "Run plugin enable via the plugin manager. Use `awaitResponse=true` to wait for completion. Multiple plugins can be passed in `filterByTk` as a comma-separated list.";
571
+ readonly parameters: readonly [{
572
+ name: string;
573
+ in: string;
574
+ required: boolean;
575
+ description: string;
576
+ schema: {
577
+ type: string;
578
+ };
579
+ }, {
580
+ name: string;
581
+ in: string;
582
+ required: boolean;
583
+ description: string;
584
+ schema: {
585
+ type: string;
586
+ default: boolean;
587
+ };
588
+ }];
589
+ readonly responses: {
590
+ readonly 200: {
591
+ description: string;
592
+ content: {
593
+ 'application/json': {
594
+ schema: {
595
+ oneOf: ({
596
+ type: string;
597
+ example: string;
598
+ $ref?: undefined;
599
+ } | {
600
+ $ref: string;
601
+ type?: undefined;
602
+ example?: undefined;
603
+ })[];
604
+ };
605
+ };
606
+ };
607
+ };
608
+ };
609
+ };
610
+ };
611
+ '/pm:disable': {
612
+ readonly post: {
613
+ readonly tags: readonly ["pm"];
614
+ readonly summary: "Disable a plugin";
615
+ readonly description: "Run plugin disable via the plugin manager. Use `awaitResponse=true` to wait for completion. Multiple plugins can be passed in `filterByTk` as a comma-separated list.";
616
+ readonly parameters: readonly [{
617
+ name: string;
618
+ in: string;
619
+ required: boolean;
620
+ description: string;
621
+ schema: {
622
+ type: string;
623
+ };
624
+ }, {
625
+ name: string;
626
+ in: string;
627
+ required: boolean;
628
+ description: string;
629
+ schema: {
630
+ type: string;
631
+ default: boolean;
632
+ };
633
+ }];
634
+ readonly responses: {
635
+ readonly 200: {
636
+ description: string;
637
+ content: {
638
+ 'application/json': {
639
+ schema: {
640
+ oneOf: ({
641
+ type: string;
642
+ example: string;
643
+ $ref?: undefined;
644
+ } | {
645
+ $ref: string;
646
+ type?: undefined;
647
+ example?: undefined;
648
+ })[];
649
+ };
650
+ };
651
+ };
652
+ };
653
+ };
654
+ };
655
+ };
656
+ '/pm:remove': {
657
+ readonly post: {
658
+ readonly tags: readonly ["pm"];
659
+ readonly summary: "Remove a plugin";
660
+ readonly description: "Queue a removal operation for a plugin.";
661
+ readonly parameters: readonly [{
662
+ name: string;
663
+ in: string;
664
+ description: string;
665
+ required: boolean;
666
+ schema: {
667
+ type: string;
668
+ };
669
+ }];
670
+ readonly responses: {
671
+ readonly 200: {
672
+ description: string;
673
+ content: {
674
+ 'application/json': {
675
+ schema: {
676
+ oneOf: ({
677
+ type: string;
678
+ example: string;
679
+ $ref?: undefined;
680
+ } | {
681
+ $ref: string;
682
+ type?: undefined;
683
+ example?: undefined;
684
+ })[];
685
+ };
686
+ };
687
+ };
688
+ };
689
+ };
690
+ };
691
+ };
692
+ '/app:getLang': {
693
+ readonly get: {
694
+ readonly tags: readonly ["app"];
695
+ readonly summary: "Get the current application language";
696
+ readonly description: "Return the current locale used by the server.";
697
+ readonly parameters: readonly [];
698
+ readonly responses: {
699
+ readonly 200: {
700
+ readonly description: "OK";
701
+ readonly content: {
702
+ readonly 'application/json': {
703
+ readonly schema: {
704
+ readonly type: "string";
705
+ };
706
+ };
707
+ };
708
+ };
709
+ };
710
+ };
711
+ };
712
+ '/app:getInfo': {
713
+ readonly get: {
714
+ readonly tags: readonly ["app"];
715
+ readonly summary: "Get application metadata";
716
+ readonly description: "Return basic application information, including version and environment-related metadata.";
717
+ readonly parameters: readonly [];
718
+ readonly responses: {
719
+ readonly 200: {
720
+ readonly description: "OK";
721
+ readonly content: {
722
+ readonly 'application/json': {
723
+ readonly schema: {
724
+ readonly type: "object";
725
+ readonly additionalProperties: true;
726
+ };
727
+ };
728
+ };
729
+ };
730
+ };
731
+ };
732
+ };
733
+ '/app:getPlugins': {
734
+ readonly get: {
735
+ readonly tags: readonly ["app"];
736
+ readonly summary: "List loaded plugins";
737
+ readonly description: "Return plugin metadata for the current application runtime.";
738
+ readonly parameters: readonly [];
739
+ readonly responses: {
740
+ readonly 200: {
741
+ readonly description: "OK";
742
+ readonly content: {
743
+ readonly 'application/json': {
744
+ readonly schema: {
745
+ readonly type: "array";
746
+ readonly items: {
747
+ readonly type: "object";
748
+ readonly additionalProperties: true;
749
+ };
750
+ };
751
+ };
752
+ };
753
+ };
754
+ };
755
+ };
756
+ };
757
+ '/app:restart': {
758
+ readonly post: {
759
+ readonly tags: readonly ["app"];
760
+ readonly summary: "Restart the application";
761
+ readonly description: "Trigger an application restart asynchronously.";
762
+ readonly parameters: readonly [];
763
+ readonly responses: {
764
+ readonly 200: {
765
+ readonly description: "OK";
766
+ };
767
+ };
768
+ };
769
+ };
770
+ '/app:clearCache': {
771
+ readonly post: {
772
+ readonly tags: readonly ["app"];
773
+ readonly summary: "Clear application cache";
774
+ readonly description: "Clear server-side caches used by the current application instance.";
775
+ readonly parameters: readonly [];
776
+ readonly responses: {
777
+ readonly 200: {
778
+ readonly description: "OK";
779
+ };
780
+ };
781
+ };
782
+ };
783
+ '/{collectionName}:list': {
784
+ readonly get: {
785
+ readonly tags: readonly ["$collection"];
786
+ readonly summary: "Returns a list of the collection";
787
+ readonly description: "A list of the collection";
788
+ readonly parameters: readonly [{
789
+ readonly $ref: "#/components/parameters/collectionName";
790
+ }, {
791
+ readonly $ref: "#/components/parameters/filter";
792
+ }, {
793
+ readonly $ref: "#/components/parameters/fields";
794
+ }, {
795
+ readonly $ref: "#/components/parameters/appends";
796
+ }, {
797
+ readonly $ref: "#/components/parameters/except";
798
+ }, {
799
+ readonly $ref: "#/components/parameters/page";
800
+ }, {
801
+ readonly $ref: "#/components/parameters/pageSize";
802
+ }, {
803
+ readonly $ref: "#/components/parameters/sort";
804
+ }];
805
+ readonly responses: {
806
+ readonly '200': {
807
+ readonly description: "OK";
808
+ };
809
+ };
810
+ };
811
+ };
812
+ '/{collectionName}:get': {
813
+ readonly get: {
814
+ readonly tags: readonly ["$collection"];
815
+ readonly summary: "Returns a record";
816
+ readonly parameters: readonly [{
817
+ readonly $ref: "#/components/parameters/collectionName";
818
+ }, {
819
+ readonly $ref: "#/components/parameters/filterByTk";
820
+ }, {
821
+ readonly $ref: "#/components/parameters/filter";
822
+ }, {
823
+ readonly $ref: "#/components/parameters/sort";
824
+ }, {
825
+ readonly $ref: "#/components/parameters/fields";
826
+ }, {
827
+ readonly $ref: "#/components/parameters/appends";
828
+ }, {
829
+ readonly $ref: "#/components/parameters/except";
830
+ }];
831
+ readonly responses: {
832
+ readonly '200': {
833
+ readonly description: "OK";
834
+ };
835
+ };
836
+ };
837
+ };
838
+ '/{collectionName}:create': {
839
+ readonly post: {
840
+ readonly tags: readonly ["$collection"];
841
+ readonly summary: "Create record";
842
+ readonly parameters: readonly [{
843
+ readonly $ref: "#/components/parameters/collectionName";
844
+ }, {
845
+ readonly $ref: "#/components/parameters/whitelist";
846
+ }, {
847
+ readonly $ref: "#/components/parameters/blacklist";
848
+ }];
849
+ readonly requestBody: {
850
+ readonly content: {
851
+ readonly 'application/json': {
852
+ readonly schema: {
853
+ readonly type: "object";
854
+ };
855
+ };
856
+ };
857
+ };
858
+ readonly responses: {
859
+ readonly '200': {
860
+ readonly description: "OK";
861
+ };
862
+ };
863
+ };
864
+ };
865
+ '/{collectionName}:update': {
866
+ readonly post: {
867
+ readonly tags: readonly ["$collection"];
868
+ readonly summary: "Update record";
869
+ readonly parameters: readonly [{
870
+ readonly $ref: "#/components/parameters/collectionName";
871
+ }, {
872
+ readonly $ref: "#/components/parameters/filterByTk";
873
+ }, {
874
+ readonly $ref: "#/components/parameters/filter";
875
+ }, {
876
+ readonly $ref: "#/components/parameters/whitelist";
877
+ }, {
878
+ readonly $ref: "#/components/parameters/blacklist";
879
+ }];
880
+ readonly requestBody: {
881
+ readonly content: {
882
+ readonly 'application/json': {
883
+ readonly schema: {
884
+ readonly type: "object";
885
+ };
886
+ };
887
+ };
888
+ };
889
+ readonly responses: {
890
+ readonly '200': {
891
+ readonly description: "OK";
892
+ };
893
+ };
894
+ };
895
+ };
896
+ '/{collectionName}:destroy': {
897
+ readonly post: {
898
+ readonly tags: readonly ["$collection"];
899
+ readonly summary: "Delete record";
900
+ readonly parameters: readonly [{
901
+ readonly $ref: "#/components/parameters/collectionName";
902
+ }, {
903
+ readonly $ref: "#/components/parameters/filterByTk";
904
+ }, {
905
+ readonly $ref: "#/components/parameters/filter";
906
+ }];
907
+ readonly responses: {
908
+ readonly '200': {
909
+ readonly description: "OK";
910
+ };
911
+ };
912
+ };
913
+ };
914
+ '/{collectionName}:move': {
915
+ readonly post: {
916
+ readonly tags: readonly ["$collection"];
917
+ readonly summary: "Move record";
918
+ readonly parameters: readonly [{
919
+ readonly $ref: "#/components/parameters/collectionName";
920
+ }, {
921
+ readonly name: "sourceId";
922
+ readonly in: "query";
923
+ readonly description: "source id";
924
+ readonly schema: {
925
+ readonly type: "string";
926
+ };
927
+ }, {
928
+ readonly name: "targetId";
929
+ readonly in: "query";
930
+ readonly description: "move target id";
931
+ readonly schema: {
932
+ readonly type: "string";
933
+ };
934
+ }, {
935
+ readonly name: "method";
936
+ readonly in: "query";
937
+ readonly description: "move method, insertAfter or insertBefore";
938
+ readonly schema: {
939
+ readonly type: "string";
940
+ };
941
+ }, {
942
+ readonly name: "sortField";
943
+ readonly in: "query";
944
+ readonly description: "sort field name, default is sort";
945
+ readonly schema: {
946
+ readonly type: "string";
947
+ };
948
+ }, {
949
+ readonly name: "targetScope";
950
+ readonly in: "query";
951
+ readonly description: "move target scope";
952
+ readonly schema: {
953
+ readonly type: "string";
954
+ };
955
+ }, {
956
+ readonly name: "sticky";
957
+ readonly in: "query";
958
+ readonly description: "sticky to top";
959
+ readonly schema: {
960
+ readonly type: "boolean";
961
+ };
962
+ }];
963
+ readonly responses: {
964
+ readonly '200': {
965
+ readonly description: "OK";
966
+ };
967
+ };
968
+ };
969
+ };
970
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:get': {
971
+ readonly get: {
972
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
973
+ readonly summary: "Returns the relationship record";
974
+ readonly parameters: readonly [{
975
+ readonly $ref: "#/components/parameters/collectionName";
976
+ }, {
977
+ readonly $ref: "#/components/parameters/collectionIndex";
978
+ }, {
979
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
980
+ }, {
981
+ readonly $ref: "#/components/parameters/fields";
982
+ }, {
983
+ readonly $ref: "#/components/parameters/appends";
984
+ }, {
985
+ readonly $ref: "#/components/parameters/except";
986
+ }];
987
+ readonly responses: {
988
+ readonly '200': {
989
+ readonly description: "OK";
990
+ };
991
+ };
992
+ };
993
+ };
994
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:create': {
995
+ readonly post: {
996
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
997
+ readonly summary: "Create and associate a record";
998
+ readonly parameters: readonly [{
999
+ readonly $ref: "#/components/parameters/collectionName";
1000
+ }, {
1001
+ readonly $ref: "#/components/parameters/collectionIndex";
1002
+ }, {
1003
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
1004
+ }, {
1005
+ readonly $ref: "#/components/parameters/whitelist";
1006
+ }, {
1007
+ readonly $ref: "#/components/parameters/blacklist";
1008
+ }];
1009
+ readonly responses: {
1010
+ readonly '200': {
1011
+ readonly description: "OK";
1012
+ };
1013
+ };
1014
+ };
1015
+ };
1016
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:update': {
1017
+ readonly post: {
1018
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
1019
+ readonly summary: "Update the relationship record";
1020
+ readonly parameters: readonly [{
1021
+ readonly $ref: "#/components/parameters/collectionName";
1022
+ }, {
1023
+ readonly $ref: "#/components/parameters/collectionIndex";
1024
+ }, {
1025
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
1026
+ }, {
1027
+ readonly $ref: "#/components/parameters/whitelist";
1028
+ }, {
1029
+ readonly $ref: "#/components/parameters/blacklist";
1030
+ }];
1031
+ readonly responses: {
1032
+ readonly '200': {
1033
+ readonly description: "OK";
1034
+ };
1035
+ };
1036
+ };
1037
+ };
1038
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:destroy': {
1039
+ readonly post: {
1040
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
1041
+ readonly summary: "Delete and disassociate the relationship record";
1042
+ readonly parameters: readonly [{
1043
+ readonly $ref: "#/components/parameters/collectionName";
1044
+ }, {
1045
+ readonly $ref: "#/components/parameters/collectionIndex";
1046
+ }, {
1047
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
1048
+ }];
1049
+ readonly responses: {
1050
+ readonly '200': {
1051
+ readonly description: "OK";
1052
+ };
1053
+ };
1054
+ };
1055
+ };
1056
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:set': {
1057
+ readonly post: {
1058
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
1059
+ readonly summary: "Associate a record";
1060
+ readonly parameters: readonly [{
1061
+ readonly $ref: "#/components/parameters/collectionName";
1062
+ }, {
1063
+ readonly $ref: "#/components/parameters/collectionIndex";
1064
+ }, {
1065
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
1066
+ }, {
1067
+ readonly name: "filterByTk";
1068
+ readonly in: "query";
1069
+ readonly required: true;
1070
+ readonly description: "filter by tk";
1071
+ readonly schema: {
1072
+ readonly type: "integer";
1073
+ readonly format: "int64";
1074
+ };
1075
+ }];
1076
+ readonly responses: {
1077
+ readonly '200': {
1078
+ readonly description: "OK";
1079
+ };
1080
+ };
1081
+ };
1082
+ };
1083
+ '/{collectionName}/{collectionIndex}/{oneToOneAssociation}:remove': {
1084
+ readonly post: {
1085
+ readonly tags: readonly ["$collection.$oneToOneAssociation"];
1086
+ readonly summary: "Disassociate the relationship record";
1087
+ readonly parameters: readonly [{
1088
+ readonly $ref: "#/components/parameters/collectionName";
1089
+ }, {
1090
+ readonly $ref: "#/components/parameters/collectionIndex";
1091
+ }, {
1092
+ readonly $ref: "#/components/parameters/oneToOneAssociation";
1093
+ }];
1094
+ readonly responses: {
1095
+ readonly '200': {
1096
+ readonly description: "OK";
1097
+ };
1098
+ };
1099
+ };
1100
+ };
1101
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:get': {
1102
+ readonly get: {
1103
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1104
+ readonly summary: "Returns the relationship record";
1105
+ readonly parameters: readonly [{
1106
+ readonly $ref: "#/components/parameters/collectionName";
1107
+ }, {
1108
+ readonly $ref: "#/components/parameters/collectionIndex";
1109
+ }, {
1110
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1111
+ }, {
1112
+ readonly $ref: "#/components/parameters/fields";
1113
+ }, {
1114
+ readonly $ref: "#/components/parameters/appends";
1115
+ }, {
1116
+ readonly $ref: "#/components/parameters/except";
1117
+ }];
1118
+ readonly responses: {
1119
+ readonly '200': {
1120
+ readonly description: "OK";
1121
+ };
1122
+ };
1123
+ };
1124
+ };
1125
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:create': {
1126
+ readonly post: {
1127
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1128
+ readonly summary: "Create and associate a record";
1129
+ readonly parameters: readonly [{
1130
+ readonly $ref: "#/components/parameters/collectionName";
1131
+ }, {
1132
+ readonly $ref: "#/components/parameters/collectionIndex";
1133
+ }, {
1134
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1135
+ }, {
1136
+ readonly $ref: "#/components/parameters/whitelist";
1137
+ }, {
1138
+ readonly $ref: "#/components/parameters/blacklist";
1139
+ }];
1140
+ readonly responses: {
1141
+ readonly '200': {
1142
+ readonly description: "OK";
1143
+ };
1144
+ };
1145
+ };
1146
+ };
1147
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:update': {
1148
+ readonly post: {
1149
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1150
+ readonly summary: "Update the relationship record";
1151
+ readonly parameters: readonly [{
1152
+ readonly $ref: "#/components/parameters/collectionName";
1153
+ }, {
1154
+ readonly $ref: "#/components/parameters/collectionIndex";
1155
+ }, {
1156
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1157
+ }, {
1158
+ readonly $ref: "#/components/parameters/whitelist";
1159
+ }, {
1160
+ readonly $ref: "#/components/parameters/blacklist";
1161
+ }];
1162
+ readonly responses: {
1163
+ readonly '200': {
1164
+ readonly description: "OK";
1165
+ };
1166
+ };
1167
+ };
1168
+ };
1169
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:destroy': {
1170
+ readonly post: {
1171
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1172
+ readonly summary: "Delete and disassociate the relationship record";
1173
+ readonly parameters: readonly [{
1174
+ readonly $ref: "#/components/parameters/collectionName";
1175
+ }, {
1176
+ readonly $ref: "#/components/parameters/collectionIndex";
1177
+ }, {
1178
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1179
+ }];
1180
+ readonly responses: {
1181
+ readonly '200': {
1182
+ readonly description: "OK";
1183
+ };
1184
+ };
1185
+ };
1186
+ };
1187
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:set': {
1188
+ readonly post: {
1189
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1190
+ readonly summary: "Associate a record";
1191
+ readonly parameters: readonly [{
1192
+ readonly $ref: "#/components/parameters/collectionName";
1193
+ }, {
1194
+ readonly $ref: "#/components/parameters/collectionIndex";
1195
+ }, {
1196
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1197
+ }, {
1198
+ readonly name: "filterByTk";
1199
+ readonly in: "query";
1200
+ readonly required: true;
1201
+ readonly description: "filter by tk";
1202
+ readonly schema: {
1203
+ readonly type: "integer";
1204
+ readonly format: "int64";
1205
+ };
1206
+ }];
1207
+ readonly responses: {
1208
+ readonly '200': {
1209
+ readonly description: "OK";
1210
+ };
1211
+ };
1212
+ };
1213
+ };
1214
+ '/{collectionName}/{collectionIndex}/{manyToOneAssociation}:remove': {
1215
+ readonly post: {
1216
+ readonly tags: readonly ["$collection.$manyToOneAssociation"];
1217
+ readonly summary: "Disassociate the relationship record";
1218
+ readonly parameters: readonly [{
1219
+ readonly $ref: "#/components/parameters/collectionName";
1220
+ }, {
1221
+ readonly $ref: "#/components/parameters/collectionIndex";
1222
+ }, {
1223
+ readonly $ref: "#/components/parameters/manyToOneAssociation";
1224
+ }];
1225
+ readonly responses: {
1226
+ readonly '200': {
1227
+ readonly description: "OK";
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:list': {
1233
+ readonly get: {
1234
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1235
+ readonly summary: "Returns a list of the one-to-many relationship";
1236
+ readonly parameters: readonly [{
1237
+ readonly $ref: "#/components/parameters/collectionName";
1238
+ }, {
1239
+ readonly $ref: "#/components/parameters/collectionIndex";
1240
+ }, {
1241
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1242
+ }, {
1243
+ readonly $ref: "#/components/parameters/filter";
1244
+ }, {
1245
+ readonly $ref: "#/components/parameters/fields";
1246
+ }, {
1247
+ readonly $ref: "#/components/parameters/appends";
1248
+ }, {
1249
+ readonly $ref: "#/components/parameters/except";
1250
+ }, {
1251
+ readonly $ref: "#/components/parameters/page";
1252
+ }, {
1253
+ readonly $ref: "#/components/parameters/pageSize";
1254
+ }, {
1255
+ readonly $ref: "#/components/parameters/sort";
1256
+ }];
1257
+ readonly responses: {
1258
+ readonly '200': {
1259
+ readonly description: "OK";
1260
+ };
1261
+ };
1262
+ };
1263
+ };
1264
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:get': {
1265
+ readonly get: {
1266
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1267
+ readonly summary: "Returns a record of the one-to-many relationship";
1268
+ readonly parameters: readonly [{
1269
+ readonly $ref: "#/components/parameters/collectionName";
1270
+ }, {
1271
+ readonly $ref: "#/components/parameters/collectionIndex";
1272
+ }, {
1273
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1274
+ }, {
1275
+ readonly $ref: "#/components/parameters/filterByTk";
1276
+ }, {
1277
+ readonly $ref: "#/components/parameters/filter";
1278
+ }, {
1279
+ readonly $ref: "#/components/parameters/fields";
1280
+ }, {
1281
+ readonly $ref: "#/components/parameters/appends";
1282
+ }, {
1283
+ readonly $ref: "#/components/parameters/except";
1284
+ }, {
1285
+ readonly $ref: "#/components/parameters/sort";
1286
+ }];
1287
+ readonly responses: {
1288
+ readonly '200': {
1289
+ readonly description: "OK";
1290
+ };
1291
+ };
1292
+ };
1293
+ };
1294
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:create': {
1295
+ readonly post: {
1296
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1297
+ readonly summary: "Create and attach record of the one-to-many relationship";
1298
+ readonly parameters: readonly [{
1299
+ readonly $ref: "#/components/parameters/collectionName";
1300
+ }, {
1301
+ readonly $ref: "#/components/parameters/collectionIndex";
1302
+ }, {
1303
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1304
+ }, {
1305
+ readonly $ref: "#/components/parameters/whitelist";
1306
+ }, {
1307
+ readonly $ref: "#/components/parameters/blacklist";
1308
+ }];
1309
+ readonly responses: {
1310
+ readonly '200': {
1311
+ readonly description: "OK";
1312
+ };
1313
+ };
1314
+ };
1315
+ };
1316
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:update': {
1317
+ readonly post: {
1318
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1319
+ readonly summary: "Update record of the one-to-many relationship";
1320
+ readonly parameters: readonly [{
1321
+ readonly $ref: "#/components/parameters/collectionName";
1322
+ }, {
1323
+ readonly $ref: "#/components/parameters/collectionIndex";
1324
+ }, {
1325
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1326
+ }, {
1327
+ readonly $ref: "#/components/parameters/filterByTk";
1328
+ }, {
1329
+ readonly $ref: "#/components/parameters/filter";
1330
+ }, {
1331
+ readonly $ref: "#/components/parameters/whitelist";
1332
+ }, {
1333
+ readonly $ref: "#/components/parameters/blacklist";
1334
+ }];
1335
+ readonly responses: {
1336
+ readonly '200': {
1337
+ readonly description: "OK";
1338
+ };
1339
+ };
1340
+ };
1341
+ };
1342
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:destroy': {
1343
+ readonly post: {
1344
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1345
+ readonly summary: "Delete and detach record of the one-to-many relationship";
1346
+ readonly parameters: readonly [{
1347
+ readonly $ref: "#/components/parameters/collectionName";
1348
+ }, {
1349
+ readonly $ref: "#/components/parameters/collectionIndex";
1350
+ }, {
1351
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1352
+ }, {
1353
+ readonly $ref: "#/components/parameters/filterByTk";
1354
+ }, {
1355
+ readonly $ref: "#/components/parameters/filter";
1356
+ }];
1357
+ readonly responses: {
1358
+ readonly '200': {
1359
+ readonly description: "OK";
1360
+ };
1361
+ };
1362
+ };
1363
+ };
1364
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:move': {
1365
+ readonly post: {
1366
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1367
+ readonly summary: "Move record of the one-to-many relationship";
1368
+ readonly parameters: readonly [{
1369
+ readonly $ref: "#/components/parameters/collectionName";
1370
+ }, {
1371
+ readonly $ref: "#/components/parameters/collectionIndex";
1372
+ }, {
1373
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1374
+ }, {
1375
+ readonly name: "sourceId";
1376
+ readonly in: "query";
1377
+ readonly description: "source id";
1378
+ readonly schema: {
1379
+ readonly type: "string";
1380
+ };
1381
+ }, {
1382
+ readonly name: "targetId";
1383
+ readonly in: "query";
1384
+ readonly description: "move target id";
1385
+ readonly schema: {
1386
+ readonly type: "string";
1387
+ };
1388
+ }, {
1389
+ readonly name: "method";
1390
+ readonly in: "query";
1391
+ readonly description: "move method, insertAfter or insertBefore";
1392
+ readonly schema: {
1393
+ readonly type: "string";
1394
+ };
1395
+ }, {
1396
+ readonly name: "sortField";
1397
+ readonly in: "query";
1398
+ readonly description: "sort field name, default is sort";
1399
+ readonly schema: {
1400
+ readonly type: "string";
1401
+ };
1402
+ }, {
1403
+ readonly name: "targetScope";
1404
+ readonly in: "query";
1405
+ readonly description: "move target scope";
1406
+ readonly schema: {
1407
+ readonly type: "string";
1408
+ };
1409
+ }, {
1410
+ readonly name: "sticky";
1411
+ readonly in: "query";
1412
+ readonly description: "sticky to top";
1413
+ readonly schema: {
1414
+ readonly type: "boolean";
1415
+ };
1416
+ }];
1417
+ readonly responses: {
1418
+ readonly '200': {
1419
+ readonly description: "OK";
1420
+ };
1421
+ };
1422
+ };
1423
+ };
1424
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:set': {
1425
+ readonly post: {
1426
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1427
+ readonly summary: "Set or reset associations";
1428
+ readonly parameters: readonly [{
1429
+ readonly $ref: "#/components/parameters/collectionName";
1430
+ }, {
1431
+ readonly $ref: "#/components/parameters/collectionIndex";
1432
+ }, {
1433
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1434
+ }, {
1435
+ readonly $ref: "#/components/parameters/filterByTk";
1436
+ }, {
1437
+ readonly $ref: "#/components/parameters/filterByTks";
1438
+ }];
1439
+ readonly responses: {
1440
+ readonly '200': {
1441
+ readonly description: "OK";
1442
+ };
1443
+ };
1444
+ };
1445
+ };
1446
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:add': {
1447
+ readonly post: {
1448
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1449
+ readonly summary: "Attach record";
1450
+ readonly parameters: readonly [{
1451
+ readonly $ref: "#/components/parameters/collectionName";
1452
+ }, {
1453
+ readonly $ref: "#/components/parameters/collectionIndex";
1454
+ }, {
1455
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1456
+ }, {
1457
+ readonly $ref: "#/components/parameters/filterByTk";
1458
+ }, {
1459
+ readonly $ref: "#/components/parameters/filterByTks";
1460
+ }];
1461
+ readonly responses: {
1462
+ readonly '200': {
1463
+ readonly description: "OK";
1464
+ };
1465
+ };
1466
+ };
1467
+ };
1468
+ '/{collectionName}/{collectionIndex}/{oneToManyAssociation}:remove': {
1469
+ readonly post: {
1470
+ readonly tags: readonly ["$collection.$oneToManyAssociation"];
1471
+ readonly summary: "Detach record";
1472
+ readonly parameters: readonly [{
1473
+ readonly $ref: "#/components/parameters/collectionName";
1474
+ }, {
1475
+ readonly $ref: "#/components/parameters/collectionIndex";
1476
+ }, {
1477
+ readonly $ref: "#/components/parameters/oneToManyAssociation";
1478
+ }, {
1479
+ readonly $ref: "#/components/parameters/filterByTk";
1480
+ }, {
1481
+ readonly $ref: "#/components/parameters/filterByTks";
1482
+ }];
1483
+ readonly responses: {
1484
+ readonly '200': {
1485
+ readonly description: "OK";
1486
+ };
1487
+ };
1488
+ };
1489
+ };
1490
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:list': {
1491
+ readonly get: {
1492
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1493
+ readonly summary: "Returns a list of the many-to-many relationship";
1494
+ readonly parameters: readonly [{
1495
+ readonly $ref: "#/components/parameters/collectionName";
1496
+ }, {
1497
+ readonly $ref: "#/components/parameters/collectionIndex";
1498
+ }, {
1499
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1500
+ }, {
1501
+ readonly $ref: "#/components/parameters/filter";
1502
+ }, {
1503
+ readonly $ref: "#/components/parameters/fields";
1504
+ }, {
1505
+ readonly $ref: "#/components/parameters/appends";
1506
+ }, {
1507
+ readonly $ref: "#/components/parameters/except";
1508
+ }, {
1509
+ readonly $ref: "#/components/parameters/page";
1510
+ }, {
1511
+ readonly $ref: "#/components/parameters/pageSize";
1512
+ }, {
1513
+ readonly $ref: "#/components/parameters/sort";
1514
+ }];
1515
+ readonly responses: {
1516
+ readonly '200': {
1517
+ readonly description: "OK";
1518
+ };
1519
+ };
1520
+ };
1521
+ };
1522
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:get': {
1523
+ readonly get: {
1524
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1525
+ readonly summary: "Returns a record of the many-to-many relationship";
1526
+ readonly parameters: readonly [{
1527
+ readonly $ref: "#/components/parameters/collectionName";
1528
+ }, {
1529
+ readonly $ref: "#/components/parameters/collectionIndex";
1530
+ }, {
1531
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1532
+ }, {
1533
+ readonly $ref: "#/components/parameters/filterByTk";
1534
+ }, {
1535
+ readonly $ref: "#/components/parameters/filter";
1536
+ }, {
1537
+ readonly $ref: "#/components/parameters/fields";
1538
+ }, {
1539
+ readonly $ref: "#/components/parameters/appends";
1540
+ }, {
1541
+ readonly $ref: "#/components/parameters/except";
1542
+ }, {
1543
+ readonly $ref: "#/components/parameters/sort";
1544
+ }];
1545
+ readonly responses: {
1546
+ readonly '200': {
1547
+ readonly description: "OK";
1548
+ };
1549
+ };
1550
+ };
1551
+ };
1552
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:create': {
1553
+ readonly post: {
1554
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1555
+ readonly summary: "Create and attach record of the many-to-many relationship";
1556
+ readonly parameters: readonly [{
1557
+ readonly $ref: "#/components/parameters/collectionName";
1558
+ }, {
1559
+ readonly $ref: "#/components/parameters/collectionIndex";
1560
+ }, {
1561
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1562
+ }, {
1563
+ readonly $ref: "#/components/parameters/whitelist";
1564
+ }, {
1565
+ readonly $ref: "#/components/parameters/blacklist";
1566
+ }];
1567
+ readonly responses: {
1568
+ readonly '200': {
1569
+ readonly description: "OK";
1570
+ };
1571
+ };
1572
+ };
1573
+ };
1574
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:update': {
1575
+ readonly post: {
1576
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1577
+ readonly summary: "Update record of the many-to-many relationship";
1578
+ readonly parameters: readonly [{
1579
+ readonly $ref: "#/components/parameters/collectionName";
1580
+ }, {
1581
+ readonly $ref: "#/components/parameters/collectionIndex";
1582
+ }, {
1583
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1584
+ }, {
1585
+ readonly $ref: "#/components/parameters/filterByTk";
1586
+ }, {
1587
+ readonly $ref: "#/components/parameters/filter";
1588
+ }, {
1589
+ readonly $ref: "#/components/parameters/whitelist";
1590
+ }, {
1591
+ readonly $ref: "#/components/parameters/blacklist";
1592
+ }];
1593
+ readonly responses: {
1594
+ readonly '200': {
1595
+ readonly description: "OK";
1596
+ };
1597
+ };
1598
+ };
1599
+ };
1600
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:destroy': {
1601
+ readonly post: {
1602
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1603
+ readonly summary: "Delete and detach record of the one-to-many relationship";
1604
+ readonly parameters: readonly [{
1605
+ readonly $ref: "#/components/parameters/collectionName";
1606
+ }, {
1607
+ readonly $ref: "#/components/parameters/collectionIndex";
1608
+ }, {
1609
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1610
+ }, {
1611
+ readonly $ref: "#/components/parameters/filterByTk";
1612
+ }, {
1613
+ readonly $ref: "#/components/parameters/filter";
1614
+ }];
1615
+ readonly responses: {
1616
+ readonly '200': {
1617
+ readonly description: "OK";
1618
+ };
1619
+ };
1620
+ };
1621
+ };
1622
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:move': {
1623
+ readonly post: {
1624
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1625
+ readonly summary: "Move record of the one-to-many relationship";
1626
+ readonly parameters: readonly [{
1627
+ readonly $ref: "#/components/parameters/collectionName";
1628
+ }, {
1629
+ readonly $ref: "#/components/parameters/collectionIndex";
1630
+ }, {
1631
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1632
+ }, {
1633
+ readonly name: "sourceId";
1634
+ readonly in: "query";
1635
+ readonly description: "source id";
1636
+ readonly schema: {
1637
+ readonly type: "string";
1638
+ };
1639
+ }, {
1640
+ readonly name: "targetId";
1641
+ readonly in: "query";
1642
+ readonly description: "move target id";
1643
+ readonly schema: {
1644
+ readonly type: "string";
1645
+ };
1646
+ }, {
1647
+ readonly name: "method";
1648
+ readonly in: "query";
1649
+ readonly description: "move method, insertAfter or insertBefore";
1650
+ readonly schema: {
1651
+ readonly type: "string";
1652
+ };
1653
+ }, {
1654
+ readonly name: "sortField";
1655
+ readonly in: "query";
1656
+ readonly description: "sort field name, default is sort";
1657
+ readonly schema: {
1658
+ readonly type: "string";
1659
+ };
1660
+ }, {
1661
+ readonly name: "targetScope";
1662
+ readonly in: "query";
1663
+ readonly description: "move target scope";
1664
+ readonly schema: {
1665
+ readonly type: "string";
1666
+ };
1667
+ }, {
1668
+ readonly name: "sticky";
1669
+ readonly in: "query";
1670
+ readonly description: "sticky to top";
1671
+ readonly schema: {
1672
+ readonly type: "boolean";
1673
+ };
1674
+ }];
1675
+ readonly responses: {
1676
+ readonly '200': {
1677
+ readonly description: "OK";
1678
+ };
1679
+ };
1680
+ };
1681
+ };
1682
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:set': {
1683
+ readonly post: {
1684
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1685
+ readonly summary: "Set or reset associations";
1686
+ readonly parameters: readonly [{
1687
+ readonly $ref: "#/components/parameters/collectionName";
1688
+ }, {
1689
+ readonly $ref: "#/components/parameters/collectionIndex";
1690
+ }, {
1691
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1692
+ }, {
1693
+ readonly $ref: "#/components/parameters/filterByTk";
1694
+ }, {
1695
+ readonly $ref: "#/components/parameters/filterByTks";
1696
+ }];
1697
+ readonly responses: {
1698
+ readonly '200': {
1699
+ readonly description: "OK";
1700
+ };
1701
+ };
1702
+ };
1703
+ };
1704
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:add': {
1705
+ readonly post: {
1706
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1707
+ readonly summary: "Attach record";
1708
+ readonly parameters: readonly [{
1709
+ readonly $ref: "#/components/parameters/collectionName";
1710
+ }, {
1711
+ readonly $ref: "#/components/parameters/collectionIndex";
1712
+ }, {
1713
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1714
+ }, {
1715
+ readonly $ref: "#/components/parameters/filterByTk";
1716
+ }, {
1717
+ readonly $ref: "#/components/parameters/filterByTks";
1718
+ }];
1719
+ readonly responses: {
1720
+ readonly '200': {
1721
+ readonly description: "OK";
1722
+ };
1723
+ };
1724
+ };
1725
+ };
1726
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:remove': {
1727
+ readonly post: {
1728
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1729
+ readonly summary: "Detach record";
1730
+ readonly parameters: readonly [{
1731
+ readonly $ref: "#/components/parameters/collectionName";
1732
+ }, {
1733
+ readonly $ref: "#/components/parameters/collectionIndex";
1734
+ }, {
1735
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1736
+ }, {
1737
+ readonly $ref: "#/components/parameters/filterByTk";
1738
+ }, {
1739
+ readonly $ref: "#/components/parameters/filterByTks";
1740
+ }];
1741
+ readonly responses: {
1742
+ readonly '200': {
1743
+ readonly description: "OK";
1744
+ };
1745
+ };
1746
+ };
1747
+ };
1748
+ '/{collectionName}/{collectionIndex}/{manyToManyAssociation}:toggle': {
1749
+ readonly post: {
1750
+ readonly tags: readonly ["$collection.$manyToManyAssociation"];
1751
+ readonly summary: "Attach or detach record";
1752
+ readonly parameters: readonly [{
1753
+ readonly $ref: "#/components/parameters/collectionName";
1754
+ }, {
1755
+ readonly $ref: "#/components/parameters/collectionIndex";
1756
+ }, {
1757
+ readonly $ref: "#/components/parameters/manyToManyAssociation";
1758
+ }, {
1759
+ readonly $ref: "#/components/parameters/filterByTk";
1760
+ }];
1761
+ readonly responses: {
1762
+ readonly '200': {
1763
+ readonly description: "OK";
1764
+ };
1765
+ };
1766
+ };
1767
+ };
1768
+ };
1769
+ openapi: "3.0.2";
1770
+ info: {
1771
+ readonly title: "NocoBase API - Core";
1772
+ };
1773
+ };
1774
+ export default _default;