data-primals-engine 1.0.2-s → 1.0.3

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.
package/swagger-en.yml ADDED
@@ -0,0 +1,1417 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: data.primals.net API
4
+ description: API for managing custom data, including account verification and generic CRUD operations.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://data.primals.net
8
+ description: Production server
9
+ security:
10
+ - BearerAuth: []
11
+ tags:
12
+ - name: Model Management
13
+ description: Operations related to data models.
14
+ - name: Data Management
15
+ description: Generic CRUD operations for all defined data models.
16
+ paths:
17
+
18
+ /api/model:
19
+ post:
20
+ tags:
21
+ - Model Management
22
+ summary: "Create a new model"
23
+ description: "Creates a new data model structure. User must have required permissions."
24
+ security:
25
+ - BearerAuth: [ ]
26
+ parameters:
27
+ - name: _user
28
+ in: query
29
+ required: true
30
+ description: "Your username for authentication."
31
+ schema:
32
+ type: string
33
+ requestBody:
34
+ required: true
35
+ description: "The model definition object to create. The structure must be valid."
36
+ content:
37
+ application/json:
38
+ schema:
39
+ type: object
40
+ description: "The complete model definition."
41
+ example:
42
+ name: "newModel"
43
+ description: "Description of my new model."
44
+ fields:
45
+ - name: "title"
46
+ type: "string"
47
+ required: true
48
+ - name: "price"
49
+ type: "number"
50
+ unit: "€"
51
+ - name: "category"
52
+ type: "relation"
53
+ relation: "taxonomy"
54
+ responses:
55
+ '201':
56
+ description: "Model successfully created."
57
+ content:
58
+ application/json:
59
+ schema:
60
+ type: object
61
+ properties:
62
+ success:
63
+ type: boolean
64
+ example: true
65
+ insertedId:
66
+ type: string
67
+ description: "The ID of the newly created model."
68
+ example: "60d0fe4f5311236168a109ca"
69
+ '400':
70
+ description: "Invalid model definition or name already in use."
71
+ content:
72
+ application/json:
73
+ schema:
74
+ $ref: '#/components/schemas/ErrorResponse'
75
+ '401':
76
+ description: "Unauthorized (missing or invalid token)."
77
+ content:
78
+ application/json:
79
+ schema:
80
+ $ref: '#/components/schemas/ErrorResponse'
81
+ '403':
82
+ description: "Permission denied to create a model."
83
+ content:
84
+ application/json:
85
+ schema:
86
+ $ref: '#/components/schemas/ErrorResponse'
87
+ delete:
88
+ tags:
89
+ - Model Management
90
+ summary: "Delete a model"
91
+ description: "Deletes a data model and all associated data. This action is irreversible."
92
+ security:
93
+ - BearerAuth: [ ]
94
+ parameters:
95
+ - name: _user
96
+ in: query
97
+ required: true
98
+ description: "Your username for authentication."
99
+ schema:
100
+ type: string
101
+ - name: name
102
+ in: query
103
+ required: true
104
+ description: "The name of the model to delete."
105
+ schema:
106
+ type: string
107
+ responses:
108
+ '200':
109
+ description: "Model and associated data successfully deleted."
110
+ content:
111
+ application/json:
112
+ schema:
113
+ type: object
114
+ properties:
115
+ success:
116
+ type: boolean
117
+ example: true
118
+ '400':
119
+ description: "Invalid request (e.g., missing 'name' parameter)."
120
+ content:
121
+ application/json:
122
+ schema:
123
+ $ref: '#/components/schemas/ErrorResponse'
124
+ '401':
125
+ description: "Unauthorized (missing or invalid token)."
126
+ content:
127
+ application/json:
128
+ schema:
129
+ $ref: '#/components/schemas/ErrorResponse'
130
+ '403':
131
+ description: "Permission denied to delete this model."
132
+ content:
133
+ application/json:
134
+ schema:
135
+ $ref: '#/components/schemas/ErrorResponse'
136
+ '404':
137
+ description: "Model not found."
138
+ content:
139
+ application/json:
140
+ schema:
141
+ $ref: '#/components/schemas/ErrorResponse'
142
+
143
+ /api/model/{id}:
144
+ put:
145
+ tags:
146
+ - Model Management
147
+ summary: "Update an existing model"
148
+ description: "Updates the structure of an existing data model using its ID."
149
+ security:
150
+ - BearerAuth: [ ]
151
+ parameters:
152
+ - name: _user
153
+ in: query
154
+ required: true
155
+ description: "Your username for authentication."
156
+ schema:
157
+ type: string
158
+ - name: id
159
+ in: path
160
+ required: true
161
+ description: "The unique identifier (_id) of the model to update."
162
+ schema:
163
+ type: string
164
+ requestBody:
165
+ required: true
166
+ description: "The complete updated model definition object."
167
+ content:
168
+ application/json:
169
+ schema:
170
+ type: object
171
+ description: "The complete model definition."
172
+ example:
173
+ name: "updatedNewModel"
174
+ description: "Updated description."
175
+ fields:
176
+ - name: "title"
177
+ type: "string"
178
+ required: true
179
+ - name: "price"
180
+ type: "number"
181
+ unit: "€"
182
+ - name: "status"
183
+ type: "enum"
184
+ items: [ "active", "inactive" ]
185
+ responses:
186
+ '200':
187
+ description: "Model successfully updated."
188
+ content:
189
+ application/json:
190
+ schema:
191
+ type: object
192
+ properties:
193
+ success:
194
+ type: boolean
195
+ example: true
196
+ data:
197
+ type: object
198
+ description: "The updated model document."
199
+ '400':
200
+ description: "Invalid request or model definition."
201
+ '401':
202
+ description: "Unauthorized (missing or invalid token)."
203
+ '403':
204
+ description: "Permission denied to modify this model."
205
+ '404':
206
+ description: "Model not found."
207
+ # --- Generic CRUD Endpoints ---
208
+ /api/data/search:
209
+ post:
210
+ tags:
211
+ - Data Management
212
+ consumes:
213
+ - application/json
214
+ summary: "Search through data"
215
+ description: "Searches across all data of the specified model."
216
+ security:
217
+ - BearerAuth: []
218
+ parameters:
219
+ - name: _user
220
+ in: query
221
+ required: true
222
+ description: "Your username for authentication."
223
+ schema:
224
+ type: string
225
+ - in: body
226
+ name: model
227
+ required: true
228
+ description: "The name of the data model (e.g., 'user', 'product')."
229
+ schema:
230
+ type: string
231
+ - name: filter
232
+ in: body
233
+ description: "MongoDB filter JSON object for the search."
234
+ schema:
235
+ type: object
236
+ example:
237
+ { "$and": [ { "lang": { "$find": { "$eq": [ "$$this.code", "fr" ] } }}, { "user": { "$exists": true } } ] }
238
+ - name: sort
239
+ in: query
240
+ description: "Field sorting parameter."
241
+ schema:
242
+ type: string
243
+ example: fieldName:ASC;fieldName2:DESC
244
+ - name: limit
245
+ in: query
246
+ description: "Maximum number of documents to return."
247
+ schema:
248
+ type: integer
249
+ default: 1000
250
+ - name: offset
251
+ in: query
252
+ description: "Number of documents to skip (for pagination)."
253
+ schema:
254
+ type: integer
255
+ default: 0
256
+ - name: depth
257
+ in: query
258
+ description: "Population depth for 'relation' type fields."
259
+ schema:
260
+ type: integer
261
+ default: 1
262
+ - name: lang
263
+ in: query
264
+ description: "Language used for error messages."
265
+ schema:
266
+ type: string
267
+ default: 'en'
268
+ requestBody:
269
+ required: true
270
+ content:
271
+ application/json:
272
+ schema:
273
+ type: array
274
+ description: "The returned data. Returned fields correspond to the model definition."
275
+ example:
276
+ [{ _id: "68624b95e59ff3523e72cfff", _hash: "6537742658626211", name: "New Product", price: 99.99}]
277
+ /api/data/{id}:
278
+ put:
279
+ tags:
280
+ - Data Management
281
+ summary: "Update a document"
282
+ description: "Updates an existing document using its ID."
283
+ security:
284
+ - BearerAuth: []
285
+ parameters:
286
+ - name: _user
287
+ in: query
288
+ required: true
289
+ description: "Your username for authentication."
290
+ schema:
291
+ type: string
292
+ - name: id
293
+ in: path
294
+ required: true
295
+ description: "The unique identifier (_id) of the document to update."
296
+ schema:
297
+ type: string
298
+ - name: lang
299
+ in: query
300
+ description: "Language used for error messages."
301
+ schema:
302
+ type: string
303
+ default: 'en'
304
+ - in: body
305
+ name: model
306
+ required: true
307
+ description: "The name of the data model (e.g., 'user', 'product')."
308
+ schema:
309
+ type: string
310
+ - name: data
311
+ in: body
312
+ required: true
313
+ description: "The data to edit. Using the $find operator is recommended to copy relational data by reference."
314
+ schema:
315
+ type: object
316
+ example: {}
317
+ responses:
318
+ '200':
319
+ description: "Document successfully updated."
320
+ '400':
321
+ description: "Invalid data."
322
+ '401':
323
+ description: "Unauthorized."
324
+ '404':
325
+ description: "Document not found."
326
+ /api/data:
327
+ post:
328
+ tags:
329
+ - Data Management
330
+ summary: "Create one or more documents"
331
+ description: "Creates one or more new documents in a specified model."
332
+ security:
333
+ - BearerAuth: [ ]
334
+ parameters:
335
+ - name: _user
336
+ in: query
337
+ required: true
338
+ description: "Your username for authentication."
339
+ schema:
340
+ type: string
341
+ - name: model
342
+ in: body
343
+ required: true
344
+ description: "The name of the model in which to create the documents."
345
+ schema:
346
+ type: string
347
+ - name: data
348
+ in: body
349
+ required: true
350
+ description: "The data to insert. Using the $find operator is recommended for relational data."
351
+ schema:
352
+ type: object
353
+ example: {}
354
+ - name: lang
355
+ in: query
356
+ description: "Language used for error messages."
357
+ schema:
358
+ type: string
359
+ default: 'en'
360
+ responses:
361
+ '201':
362
+ description: "Document(s) successfully created."
363
+ '400':
364
+ description: "Invalid data."
365
+ '401':
366
+ description: "Unauthorized."
367
+ put:
368
+ tags:
369
+ - Data Management
370
+ summary: "Bulk update documents"
371
+ description: "Updates an existing document using its ID."
372
+ security:
373
+ - BearerAuth: []
374
+ parameters:
375
+ - name: _user
376
+ in: query
377
+ required: true
378
+ description: "Your username for authentication."
379
+ schema:
380
+ type: string
381
+ - in: body
382
+ name: model
383
+ required: true
384
+ description: "The name of the data model (e.g., 'user', 'product')."
385
+ schema:
386
+ type: string
387
+ - name: data
388
+ in: body
389
+ required: true
390
+ description: "The data to edit. Using the $find operator is recommended to copy relational data by reference."
391
+ schema:
392
+ type: object
393
+ example: {}
394
+ - name: lang
395
+ in: query
396
+ description: "Language used for error messages."
397
+ schema:
398
+ type: string
399
+ default: 'en'
400
+ responses:
401
+ '200':
402
+ description: "Document successfully updated."
403
+ '400':
404
+ description: "Invalid data."
405
+ '401':
406
+ description: "Unauthorized."
407
+ '404':
408
+ description: "Document not found."
409
+ delete:
410
+ tags:
411
+ - Data Management
412
+ summary: "Delete one or more document(s)"
413
+ description: "Permanently deletes a document using its ID."
414
+ security:
415
+ - BearerAuth: []
416
+ parameters:
417
+ - name: _user
418
+ in: query
419
+ required: true
420
+ description: "Your username for authentication."
421
+ schema:
422
+ type: string
423
+ - name: ids
424
+ in: body
425
+ description: "The identifiers of the documents to delete."
426
+ schema:
427
+ type: string
428
+ - name: filter
429
+ in: body
430
+ description: "The MongoDB JSON filter to apply for bulk deletion."
431
+ schema:
432
+ type: object
433
+ example:
434
+ { "$and": [ { "lang": { "$find": { "$eq": [ "$$this.code", "fr" ] } }}, { "user": { "$exists": true } } ] }
435
+ - name: lang
436
+ in: query
437
+ description: "Language used for error messages."
438
+ schema:
439
+ type: string
440
+ default: 'en'
441
+ responses:
442
+ '200':
443
+ description: "Document successfully deleted."
444
+ '401':
445
+ description: "Unauthorized."
446
+ '404':
447
+ description: "Document not found."
448
+ components:
449
+ securitySchemes:
450
+ BearerAuth:
451
+ type: http
452
+ scheme: bearer
453
+ bearerFormat: JWT # Assuming JWT tokens are used
454
+ schemas:
455
+ # --- Common Responses ---
456
+ ErrorResponse:
457
+ type: object
458
+ properties:
459
+ success:
460
+ type: boolean
461
+ example: false
462
+ message:
463
+ type: string
464
+ example: "An internal error occurred."
465
+ SuccessResponse:
466
+ type: object
467
+ properties:
468
+ success:
469
+ type: boolean
470
+ example: true
471
+ message:
472
+ type: string
473
+ example: "Operation successful."
474
+ # --- Model Schemas (dynamically generated) ---
475
+ permission:
476
+ type: object
477
+ properties:
478
+ _id:
479
+ type: string
480
+ description: Unique document identifier (MongoDB ObjectId)
481
+ readOnly: true
482
+ _user:
483
+ type: string
484
+ description: Identifier of the user owning this document
485
+ readOnly: true
486
+ _model:
487
+ type: string
488
+ description: Name of the model this document belongs to
489
+ readOnly: true
490
+ default: permission
491
+ _hash:
492
+ type: number
493
+ description: Document hash for integrity verification
494
+ readOnly: true
495
+ _pack:
496
+ type: string
497
+ description: Name of the pack this document belongs to (if applicable)
498
+ readOnly: true
499
+ name:
500
+ type: string
501
+ description: ""
502
+ description:
503
+ type: string
504
+ description: ""
505
+ required:
506
+ - name
507
+ role:
508
+ type: object
509
+ properties:
510
+ _id:
511
+ type: string
512
+ description: Unique document identifier (MongoDB ObjectId)
513
+ readOnly: true
514
+ _user:
515
+ type: string
516
+ description: Identifier of the user owning this document
517
+ readOnly: true
518
+ _model:
519
+ type: string
520
+ description: Name of the model this document belongs to
521
+ readOnly: true
522
+ default: role
523
+ _hash:
524
+ type: number
525
+ description: Document hash for integrity verification
526
+ readOnly: true
527
+ _pack:
528
+ type: string
529
+ description: Name of the pack this document belongs to (if applicable)
530
+ readOnly: true
531
+ name:
532
+ type: string
533
+ description: ""
534
+ permissions:
535
+ type: array
536
+ items:
537
+ type: string
538
+ description: ID of a permission document
539
+ required:
540
+ - name
541
+ user:
542
+ type: object
543
+ properties:
544
+ _id:
545
+ type: string
546
+ description: Unique document identifier (MongoDB ObjectId)
547
+ readOnly: true
548
+ _user:
549
+ type: string
550
+ description: Identifier of the user owning this document
551
+ readOnly: true
552
+ _model:
553
+ type: string
554
+ description: Name of the model this document belongs to
555
+ readOnly: true
556
+ default: user
557
+ _hash:
558
+ type: number
559
+ description: Document hash for integrity verification
560
+ readOnly: true
561
+ _pack:
562
+ type: string
563
+ description: Name of the pack this document belongs to (if applicable)
564
+ readOnly: true
565
+ username:
566
+ type: string
567
+ description: ""
568
+ password:
569
+ type: string
570
+ format: password
571
+ description: ""
572
+ gender:
573
+ type: string
574
+ enum:
575
+ - male
576
+ - female
577
+ - other
578
+ - prefer_not_to_say
579
+ description: ""
580
+ contact:
581
+ type: string
582
+ description: ID of a contact document
583
+ roles:
584
+ type: array
585
+ items:
586
+ type: string
587
+ description: ID of a role document
588
+ lang:
589
+ type: string
590
+ description: ID of a lang document
591
+ profilePicture:
592
+ type: string
593
+ format: uuid
594
+ description: "Mime types: image/jpeg, image/png."
595
+ tokens:
596
+ type: array
597
+ items:
598
+ type: string
599
+ description: ID of a token document
600
+ required:
601
+ - username
602
+ token:
603
+ type: object
604
+ properties:
605
+ _id:
606
+ type: string
607
+ description: Unique document identifier (MongoDB ObjectId)
608
+ readOnly: true
609
+ _user:
610
+ type: string
611
+ description: Identifier of the user owning this document
612
+ readOnly: true
613
+ _model:
614
+ type: string
615
+ description: Name of the model this document belongs to
616
+ readOnly: true
617
+ default: token
618
+ _hash:
619
+ type: number
620
+ description: Document hash for integrity verification
621
+ readOnly: true
622
+ _pack:
623
+ type: string
624
+ description: Name of the pack this document belongs to (if applicable)
625
+ readOnly: true
626
+ name:
627
+ type: string
628
+ description: ""
629
+ value:
630
+ type: string
631
+ format: password
632
+ description: ""
633
+ lastRefresh:
634
+ type: string
635
+ format: date-time
636
+ description: ""
637
+ translation:
638
+ type: object
639
+ properties:
640
+ _id:
641
+ type: string
642
+ description: Unique document identifier (MongoDB ObjectId)
643
+ readOnly: true
644
+ _user:
645
+ type: string
646
+ description: Identifier of the user owning this document
647
+ readOnly: true
648
+ _model:
649
+ type: string
650
+ description: Name of the model this document belongs to
651
+ readOnly: true
652
+ default: translation
653
+ _hash:
654
+ type: number
655
+ description: Document hash for integrity verification
656
+ readOnly: true
657
+ _pack:
658
+ type: string
659
+ description: Name of the pack this document belongs to (if applicable)
660
+ readOnly: true
661
+ lang:
662
+ type: string
663
+ description: ID of a lang document
664
+ key:
665
+ type: string
666
+ maxLength: 200
667
+ description: ""
668
+ value:
669
+ type: string
670
+ description: ""
671
+ required:
672
+ - lang
673
+ - key
674
+ lang:
675
+ type: object
676
+ properties:
677
+ _id:
678
+ type: string
679
+ description: Unique document identifier (MongoDB ObjectId)
680
+ readOnly: true
681
+ _user:
682
+ type: string
683
+ description: Identifier of the user owning this document
684
+ readOnly: true
685
+ _model:
686
+ type: string
687
+ description: Name of the model this document belongs to
688
+ readOnly: true
689
+ default: lang
690
+ _hash:
691
+ type: number
692
+ description: Document hash for integrity verification
693
+ readOnly: true
694
+ _pack:
695
+ type: string
696
+ description: Name of the pack this document belongs to (if applicable)
697
+ readOnly: true
698
+ name:
699
+ type: string
700
+ maxLength: 200
701
+ description: ""
702
+ code:
703
+ type: string
704
+ maxLength: 5
705
+ description: ""
706
+ currency:
707
+ type: object
708
+ properties:
709
+ _id:
710
+ type: string
711
+ description: Unique document identifier (MongoDB ObjectId)
712
+ readOnly: true
713
+ _user:
714
+ type: string
715
+ description: Identifier of the user owning this document
716
+ readOnly: true
717
+ _model:
718
+ type: string
719
+ description: Name of the model this document belongs to
720
+ readOnly: true
721
+ default: currency
722
+ _hash:
723
+ type: number
724
+ description: Document hash for integrity verification
725
+ readOnly: true
726
+ _pack:
727
+ type: string
728
+ description: Name of the pack this document belongs to (if applicable)
729
+ readOnly: true
730
+ symbol:
731
+ type: string
732
+ maxLength: 5
733
+ description: ""
734
+ code:
735
+ type: string
736
+ maxLength: 3
737
+ description: ""
738
+ name:
739
+ type: string
740
+ description: ""
741
+ exchangeRate:
742
+ type: number
743
+ description: ""
744
+ default:
745
+ type: boolean
746
+ default: false
747
+ description: ""
748
+ required:
749
+ - symbol
750
+ - code
751
+ - name
752
+ channel:
753
+ type: object
754
+ properties:
755
+ _id:
756
+ type: string
757
+ description: Unique document identifier (MongoDB ObjectId)
758
+ readOnly: true
759
+ _user:
760
+ type: string
761
+ description: Identifier of the user owning this document
762
+ readOnly: true
763
+ _model:
764
+ type: string
765
+ description: Name of the model this document belongs to
766
+ readOnly: true
767
+ default: channel
768
+ _hash:
769
+ type: number
770
+ description: Document hash for integrity verification
771
+ readOnly: true
772
+ _pack:
773
+ type: string
774
+ description: Name of the pack this document belongs to (if applicable)
775
+ readOnly: true
776
+ name:
777
+ type: string
778
+ description: ""
779
+ description:
780
+ type: string
781
+ description: ""
782
+ type:
783
+ type: string
784
+ enum:
785
+ - email
786
+ - SMS
787
+ - forum
788
+ - messaging
789
+ - push
790
+ - in-app
791
+ description: ""
792
+ required:
793
+ - name
794
+ - type
795
+ message:
796
+ type: object
797
+ properties:
798
+ _id:
799
+ type: string
800
+ description: Unique document identifier (MongoDB ObjectId)
801
+ readOnly: true
802
+ _user:
803
+ type: string
804
+ description: Identifier of the user owning this document
805
+ readOnly: true
806
+ _model:
807
+ type: string
808
+ description: Name of the model this document belongs to
809
+ readOnly: true
810
+ default: message
811
+ _hash:
812
+ type: number
813
+ description: Document hash for integrity verification
814
+ readOnly: true
815
+ _pack:
816
+ type: string
817
+ description: Name of the pack this document belongs to (if applicable)
818
+ readOnly: true
819
+ sender:
820
+ type: string
821
+ description: ID of a user document
822
+ recipient:
823
+ type: string
824
+ description: ID of a user document
825
+ lang:
826
+ type: string
827
+ description: ID of a lang document
828
+ subject:
829
+ type: string
830
+ description: ""
831
+ content:
832
+ type: string
833
+ description: ""
834
+ channels:
835
+ type: array
836
+ items:
837
+ type: string
838
+ description: ID of a channel document
839
+ status:
840
+ type: string
841
+ enum:
842
+ - pending
843
+ - sent
844
+ - read
845
+ - failed
846
+ description: ""
847
+ sentAt:
848
+ type: string
849
+ format: date-time
850
+ description: ""
851
+ readAt:
852
+ type: string
853
+ format: date-time
854
+ description: ""
855
+ type:
856
+ type: string
857
+ description: ""
858
+ priority:
859
+ type: string
860
+ enum:
861
+ - low
862
+ - medium
863
+ - high
864
+ description: ""
865
+ required:
866
+ - content
867
+ webpage:
868
+ type: object
869
+ properties:
870
+ _id:
871
+ type: string
872
+ description: Unique document identifier (MongoDB ObjectId)
873
+ readOnly: true
874
+ _user:
875
+ type: string
876
+ description: Identifier of the user owning this document
877
+ readOnly: true
878
+ _model:
879
+ type: string
880
+ description: Name of the model this document belongs to
881
+ readOnly: true
882
+ default: webpage
883
+ _hash:
884
+ type: number
885
+ description: Document hash for integrity verification
886
+ readOnly: true
887
+ _pack:
888
+ type: string
889
+ description: Name of the pack this document belongs to (if applicable)
890
+ readOnly: true
891
+ title:
892
+ type: string
893
+ description: ""
894
+ path:
895
+ type: string
896
+ description: ""
897
+ html:
898
+ type: string
899
+ description: ""
900
+ published:
901
+ type: boolean
902
+ default: false
903
+ description: ""
904
+ inSitemap:
905
+ type: boolean
906
+ default: true
907
+ description: ""
908
+ description:
909
+ type: string
910
+ description: ""
911
+ keywords:
912
+ type: array
913
+ items:
914
+ type: string
915
+ description: ID of a taxonomy document
916
+ image:
917
+ type: string
918
+ format: uri
919
+ description: ""
920
+ category:
921
+ type: string
922
+ description: ID of a taxonomy document
923
+ required:
924
+ - title
925
+ - path
926
+ content:
927
+ type: object
928
+ properties:
929
+ _id:
930
+ type: string
931
+ description: Unique document identifier (MongoDB ObjectId)
932
+ readOnly: true
933
+ _user:
934
+ type: string
935
+ description: Identifier of the user owning this document
936
+ readOnly: true
937
+ _model:
938
+ type: string
939
+ description: Name of the model this document belongs to
940
+ readOnly: true
941
+ default: content
942
+ _hash:
943
+ type: number
944
+ description: Document hash for integrity verification
945
+ readOnly: true
946
+ _pack:
947
+ type: string
948
+ description: Name of the pack this document belongs to (if applicable)
949
+ readOnly: true
950
+ lang:
951
+ type: string
952
+ description: ID of a lang document
953
+ title:
954
+ type: string
955
+ description: ""
956
+ slug:
957
+ type: string
958
+ description: ""
959
+ html:
960
+ type: string
961
+ description: ""
962
+ image:
963
+ type: string
964
+ format: uuid
965
+ description: "Mime types: image/jpeg, image/png, image/gif, image/webp."
966
+ published:
967
+ type: boolean
968
+ description: ""
969
+ publishedAt:
970
+ type: string
971
+ format: date-time
972
+ description: ""
973
+ author:
974
+ type: string
975
+ description: ID of a user document
976
+ category:
977
+ type: string
978
+ description: ID of a taxonomy document
979
+ keywords:
980
+ type: array
981
+ items:
982
+ type: string
983
+ description: ID of a taxonomy document
984
+ order:
985
+ type: number
986
+ default: 0
987
+ description: ""
988
+ required:
989
+ - title
990
+ resource:
991
+ type: object
992
+ properties:
993
+ _id:
994
+ type: string
995
+ description: Unique document identifier (MongoDB ObjectId)
996
+ readOnly: true
997
+ _user:
998
+ type: string
999
+ description: Identifier of the user owning this document
1000
+ readOnly: true
1001
+ _model:
1002
+ type: string
1003
+ description: Name of the model this document belongs to
1004
+ readOnly: true
1005
+ default: resource
1006
+ _hash:
1007
+ type: number
1008
+ description: Document hash for integrity verification
1009
+ readOnly: true
1010
+ _pack:
1011
+ type: string
1012
+ description: Name of the pack this document belongs to (if applicable)
1013
+ readOnly: true
1014
+ source:
1015
+ type: string
1016
+ format: uri
1017
+ description: ""
1018
+ file:
1019
+ type: string
1020
+ format: uuid
1021
+ description: ""
1022
+ taxonomy:
1023
+ type: object
1024
+ properties:
1025
+ _id:
1026
+ type: string
1027
+ description: Unique document identifier (MongoDB ObjectId)
1028
+ readOnly: true
1029
+ _user:
1030
+ type: string
1031
+ description: Identifier of the user owning this document
1032
+ readOnly: true
1033
+ _model:
1034
+ type: string
1035
+ description: Name of the model this document belongs to
1036
+ readOnly: true
1037
+ default: taxonomy
1038
+ _hash:
1039
+ type: number
1040
+ description: Document hash for integrity verification
1041
+ readOnly: true
1042
+ _pack:
1043
+ type: string
1044
+ description: Name of the pack this document belongs to (if applicable)
1045
+ readOnly: true
1046
+ name:
1047
+ type: string
1048
+ description: ""
1049
+ parent:
1050
+ type: string
1051
+ description: ID of a taxonomy document
1052
+ type:
1053
+ type: string
1054
+ enum:
1055
+ - keyword
1056
+ - category
1057
+ description: ""
1058
+ identifier:
1059
+ type: string
1060
+ description: ""
1061
+ order:
1062
+ type: number
1063
+ default: 0
1064
+ description: ""
1065
+ description:
1066
+ type: string
1067
+ description: ""
1068
+ required:
1069
+ - name
1070
+ contact:
1071
+ type: object
1072
+ properties:
1073
+ _id:
1074
+ type: string
1075
+ description: Unique document identifier (MongoDB ObjectId)
1076
+ readOnly: true
1077
+ _user:
1078
+ type: string
1079
+ description: Identifier of the user owning this document
1080
+ readOnly: true
1081
+ _model:
1082
+ type: string
1083
+ description: Name of the model this document belongs to
1084
+ readOnly: true
1085
+ default: contact
1086
+ _hash:
1087
+ type: number
1088
+ description: Document hash for integrity verification
1089
+ readOnly: true
1090
+ _pack:
1091
+ type: string
1092
+ description: Name of the pack this document belongs to (if applicable)
1093
+ readOnly: true
1094
+ legalName:
1095
+ type: string
1096
+ description: ""
1097
+ firstName:
1098
+ type: string
1099
+ description: ""
1100
+ lastName:
1101
+ type: string
1102
+ description: ""
1103
+ email:
1104
+ type: string
1105
+ format: email
1106
+ description: ""
1107
+ phone:
1108
+ type: string
1109
+ description: ""
1110
+ location:
1111
+ type: string
1112
+ description: ID of a location document
1113
+ location:
1114
+ type: object
1115
+ properties:
1116
+ _id:
1117
+ type: string
1118
+ description: Unique document identifier (MongoDB ObjectId)
1119
+ readOnly: true
1120
+ _user:
1121
+ type: string
1122
+ description: Identifier of the user owning this document
1123
+ readOnly: true
1124
+ _model:
1125
+ type: string
1126
+ description: Name of the model this document belongs to
1127
+ readOnly: true
1128
+ default: location
1129
+ _hash:
1130
+ type: number
1131
+ description: Document hash for integrity verification
1132
+ readOnly: true
1133
+ _pack:
1134
+ type: string
1135
+ description: Name of the pack this document belongs to (if applicable)
1136
+ readOnly: true
1137
+ address_1:
1138
+ type: string
1139
+ description: ""
1140
+ address_2:
1141
+ type: string
1142
+ description: ""
1143
+ address_3:
1144
+ type: string
1145
+ description: ""
1146
+ address_4:
1147
+ type: string
1148
+ description: ""
1149
+ city:
1150
+ type: string
1151
+ description: ""
1152
+ postalCode:
1153
+ type: string
1154
+ description: ""
1155
+ region:
1156
+ type: string
1157
+ description: ""
1158
+ country:
1159
+ type: string
1160
+ description: ""
1161
+ latitude:
1162
+ type: number
1163
+ description: "Unit: °"
1164
+ longitude:
1165
+ type: number
1166
+ description: "Unit: °"
1167
+ brand:
1168
+ type: object
1169
+ properties:
1170
+ _id:
1171
+ type: string
1172
+ description: Unique document identifier (MongoDB ObjectId)
1173
+ readOnly: true
1174
+ _user:
1175
+ type: string
1176
+ description: Identifier of the user owning this document
1177
+ readOnly: true
1178
+ _model:
1179
+ type: string
1180
+ description: Name of the model this document belongs to
1181
+ readOnly: true
1182
+ default: brand
1183
+ _hash:
1184
+ type: number
1185
+ description: Document hash for integrity verification
1186
+ readOnly: true
1187
+ _pack:
1188
+ type: string
1189
+ description: Name of the pack this document belongs to (if applicable)
1190
+ readOnly: true
1191
+ name:
1192
+ type: string
1193
+ description: ""
1194
+ logo:
1195
+ type: string
1196
+ format: uuid
1197
+ description: ""
1198
+ company:
1199
+ type: string
1200
+ description: ID of a contact document
1201
+ required:
1202
+ - name
1203
+ product:
1204
+ type: object
1205
+ properties:
1206
+ _id:
1207
+ type: string
1208
+ description: Unique document identifier (MongoDB ObjectId)
1209
+ readOnly: true
1210
+ _user:
1211
+ type: string
1212
+ description: Identifier of the user owning this document
1213
+ readOnly: true
1214
+ _model:
1215
+ type: string
1216
+ description: Name of the model this document belongs to
1217
+ readOnly: true
1218
+ default: product
1219
+ _hash:
1220
+ type: number
1221
+ description: Document hash for integrity verification
1222
+ readOnly: true
1223
+ _pack:
1224
+ type: string
1225
+ description: Name of the pack this document belongs to (if applicable)
1226
+ readOnly: true
1227
+ name:
1228
+ type: string
1229
+ description: ""
1230
+ description:
1231
+ type: string
1232
+ description: ""
1233
+ image:
1234
+ type: array
1235
+ items:
1236
+ type: string
1237
+ format: uuid
1238
+ description: "Mime types: image/jpeg, image/png, image/gif, image/webp."
1239
+ price:
1240
+ type: number
1241
+ description: ""
1242
+ currency:
1243
+ type: string
1244
+ description: ID of a currency document
1245
+ billingFrequency:
1246
+ type: string
1247
+ enum:
1248
+ - none
1249
+ - monthly
1250
+ - yearly
1251
+ description: ""
1252
+ brand:
1253
+ type: string
1254
+ description: ID of a brand document
1255
+ category:
1256
+ type: string
1257
+ description: ID of a taxonomy document
1258
+ required:
1259
+ - name
1260
+ - price
1261
+ - currency
1262
+ productVariant:
1263
+ type: object
1264
+ properties:
1265
+ _id:
1266
+ type: string
1267
+ description: Unique document identifier (MongoDB ObjectId)
1268
+ readOnly: true
1269
+ _user:
1270
+ type: string
1271
+ description: Identifier of the user owning this document
1272
+ readOnly: true
1273
+ _model:
1274
+ type: string
1275
+ description: Name of the model this document belongs to
1276
+ readOnly: true
1277
+ default: productVariant
1278
+ _hash:
1279
+ type: number
1280
+ description: Document hash for integrity verification
1281
+ readOnly: true
1282
+ _pack:
1283
+ type: string
1284
+ description: Name of the pack this document belongs to (if applicable)
1285
+ readOnly: true
1286
+ product:
1287
+ type: string
1288
+ description: ID of a product document
1289
+ size:
1290
+ type: string
1291
+ description: ""
1292
+ color:
1293
+ type: string
1294
+ description: ""
1295
+ sku:
1296
+ type: string
1297
+ description: ""
1298
+ price:
1299
+ type: number
1300
+ description: ""
1301
+ currency:
1302
+ type: string
1303
+ description: ID of a currency document
1304
+ stock:
1305
+ type: number
1306
+ default: 0
1307
+ description: ""
1308
+ description:
1309
+ type: string
1310
+ description: ""
1311
+ image:
1312
+ type: string
1313
+ format: uri
1314
+ description: ""
1315
+ required:
1316
+ - product
1317
+ - price
1318
+ - currency
1319
+ cart:
1320
+ type: object
1321
+ properties:
1322
+ _id:
1323
+ type: string
1324
+ description: Unique document identifier (MongoDB ObjectId)
1325
+ readOnly: true
1326
+ _user:
1327
+ type: string
1328
+ description: Identifier of the user owning this document
1329
+ readOnly: true
1330
+ _model:
1331
+ type: string
1332
+ description: Name of the model this document belongs to
1333
+ readOnly: true
1334
+ default: cart
1335
+ _hash:
1336
+ type: number
1337
+ description: Document hash for integrity verification
1338
+ readOnly: true
1339
+ _pack:
1340
+ type: string
1341
+ description: Name of the pack this document belongs to (if applicable)
1342
+ readOnly: true
1343
+ user:
1344
+ type: string
1345
+ description: ID of a user document
1346
+ items:
1347
+ type: array
1348
+ items:
1349
+ type: string
1350
+ description: ID of a cartItem document
1351
+ creationDate:
1352
+ type: string
1353
+ format: date-time
1354
+ description: ""
1355
+ lastUpdate:
1356
+ type: string
1357
+ format: date-time
1358
+ description: ""
1359
+ active:
1360
+ type: boolean
1361
+ default: true
1362
+ description: ""
1363
+ required:
1364
+ - user
1365
+ - creationDate
1366
+ - lastUpdate
1367
+ cartItem:
1368
+ type: object
1369
+ properties:
1370
+ _id:
1371
+ type: string
1372
+ description: Unique document identifier (MongoDB ObjectId)
1373
+ readOnly: true
1374
+ _user:
1375
+ type: string
1376
+ description: Identifier of the user owning this document
1377
+ readOnly: true
1378
+ _model:
1379
+ type: string
1380
+ description: Name of the model this document belongs to
1381
+ readOnly: true
1382
+ default: cartItem
1383
+ _hash:
1384
+ type: number
1385
+ description: Document hash for integrity verification
1386
+ readOnly: true
1387
+ _pack:
1388
+ type: string
1389
+ description: Name of the pack this document belongs to (if applicable)
1390
+ readOnly: true
1391
+ product:
1392
+ type: string
1393
+ description: ID of a product document
1394
+ quantity:
1395
+ type: number
1396
+ minimum: 1
1397
+ description: ""
1398
+ variant:
1399
+ type: string
1400
+ description: ID of a productVariant document
1401
+ required:
1402
+ - product
1403
+ - quantity
1404
+ discount:
1405
+ type: object
1406
+ properties:
1407
+ _id:
1408
+ type: string
1409
+ description: Unique document identifier (MongoDB ObjectId)
1410
+ readOnly: true
1411
+ _user:
1412
+ type: string
1413
+ description: Identifier of the user owning this document
1414
+ readOnly: true
1415
+ _model:
1416
+ type: string
1417
+ description: Name of the model this document