@nocobase/server 2.1.0-beta.2 → 2.1.0-beta.20

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