oneentry 1.0.117 → 1.0.118

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 (2) hide show
  1. package/README.md +112 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -200,6 +200,9 @@ Now you can use the following links to jump to specific entries:
200
200
 
201
201
  ## <h2 id="admins"> Admins </h2>
202
202
 
203
+ The "Administrators" module is designed for creating and managing administrators.
204
+ An administrator is a user who can add, update, and edit information on the website or in the mobile application.
205
+
203
206
  ```js
204
207
  const { Admins } = defineOneEntry('your-url');
205
208
  ```
@@ -354,6 +357,54 @@ const result = await Admins.getAdminsInfo(body, 'en_US', 0, 30);
354
357
 
355
358
  ## <h2 id="attributesets"> AttributesSets </h2>
356
359
 
360
+ Attributes are an entity that allows you to configure the structure of your application. With them, you can achieve maximum flexibility and eliminate hardcoding.
361
+
362
+ Attribute sets are similar to a collection of properties, the values of which you can manage through the admin panel. They differ by the type of binding to various entities. You can read more about the types in the section "Types".
363
+
364
+ An attribute set forms the data structure that can then be used within your project. For example, for a product, you can define that its structure should contain a name, image, price, and text description. At the same time, the structure of a blog post may contain text with a title and a set of images.
365
+
366
+ Some attributes may be similar in structure and used in different entities, so you can reuse attribute sets for different entities.
367
+
368
+ Structure
369
+ Each attribute set contains a customizable collection of attributes that store the content of your project. You can manage these attributes from the management system. This is convenient, as you no longer need to edit the application code to change your project. Just move all content components that can be changed into attributes.
370
+
371
+ Markers
372
+ Markers cannot contain spaces and cannot start with a digit. If you attempt to enter invalid values in the marker field, the system will ignore the input.
373
+
374
+ Name
375
+ To make it easier for you to navigate, each attribute has a required name parameter, which is a non-unique string. Name the attributes in a way that makes it easy for you to work with them.
376
+
377
+ Marker
378
+ As an identifier, each attribute has a required parameter - "marker", which is a unique string. The marker is also used as a key to access the attributes in your project code. Keep this in mind when setting the attribute marker to avoid syntax conflicts.
379
+
380
+ Data Type
381
+ Choose the data type for each attribute field that it will store.
382
+
383
+ Data types can be of the following types:
384
+
385
+ String: Simple text, for example, "Hello, world!".
386
+ Text: Longer text, often formatted, for example, an article or a letter.
387
+ Text with Header: Text with a header that can be used to denote a topic or category.
388
+ Integer: An integer, for example, 5, 100, -2.
389
+ Float: A data type for floating-point numbers that can have a decimal part, for example, 3.14, 1.5, -0.25.
390
+ Real: The same as Float, but with higher precision.
391
+ Date and Time: A combination of date and time, for example, 2023-10-27 10:00:00.
392
+ Date: A date, for example, 2023-10-27.
393
+ Time: A time, for example, 10:00:00.
394
+ File: Any file on your computer, for example, a document, image, music.
395
+ Image: An image, for example, a photograph, drawing.
396
+ Group of Images: A collection of images, for example, a photo album.
397
+ Radio Button: A selection button from which only one option can be chosen.
398
+ List: A list of items, for example, a shopping list.
399
+ Entity: An entity representing an object from the real world, for example, a person, place, organization.
400
+ The content filling interface will correspond to the selected data type for each attribute field.
401
+
402
+ Opportunities
403
+ You can add validators for attributes. This mechanism is discussed in more detail in the section "Validators".
404
+
405
+ Attributes
406
+ If one attribute set is used by several entities at once, you need to be careful when changing the attributes of that set. For example, if you delete one of the attributes, that attribute will be removed everywhere it is used along with the content. If you add a new attribute to the set, that attribute will also be added everywhere the attribute set is used.
407
+
357
408
  ```js
358
409
  const { AttributesSets } = defineOneEntry('your-url');
359
410
  ```
@@ -793,6 +844,8 @@ Example return:
793
844
 
794
845
  ## <h2 id="authprovider"> User Auth Provider </h2>
795
846
 
847
+ The User Auth Provider in OneEntry Headless CMS facilitates user authentication and registration through various methods, such as email. By using the AuthProvider object, developers can handle user registration, including sending activation codes when necessary. The system supports diverse data types for form attributes, allowing comprehensive user data management. Key functionalities include user authentication, token management (access and refresh tokens), password changes, and logout. Additionally, it provides methods to manage authentication providers and retrieve specific details by marker or language code, ensuring secure and efficient user management across applications.
848
+
796
849
  ```js
797
850
  const { AuthProvider } = defineOneEntry('your-url');
798
851
  ```
@@ -1900,6 +1953,10 @@ Example return:
1900
1953
 
1901
1954
  ## <h2 id="blocks"> Blocks </h2>
1902
1955
 
1956
+ The "Blocks" module is designed to create structures that contain sets of attributes. The Headless CMS OneEntry provides users with very flexible tools, and you can use the "Blocks" module as you see fit for your specific case. The main concept of the "Blocks" module is to create reusable entities (blocks) that contain sets of attributes and additional content.
1957
+
1958
+ For example, you can create a block - "footer" and use it on all pages of your project.
1959
+
1903
1960
  ```js
1904
1961
  const { Blocks } = defineOneEntry('your-url');
1905
1962
  ```
@@ -2206,10 +2263,17 @@ Example return:
2206
2263
 
2207
2264
  ## <h2 id="events"> Events </h2>
2208
2265
 
2266
+ The "Events" module allows you to create and edit events, through which you can interact with the users of your system. In this module, you select an event that the system will respond to and send notifications to the users of your system. For example, you have statuses for catalog items "In stock" and "Out of stock," and you want to send users a notification about the status change from "Out of stock" to "In stock"
2267
+
2209
2268
  ```js
2210
2269
  const { Events } = defineOneEntry('your-url');
2211
2270
  ```
2212
2271
 
2272
+ In the Headless CMS OneEntry, there are three ways to interact with the users of your system through the "Events" module: <br/>
2273
+ Push Notification <br/>
2274
+ Email <br/>
2275
+ Socket IO <br/>
2276
+
2213
2277
  ### Events.getAllSubscriptions(offset, limit)
2214
2278
 
2215
2279
  Returns all subscriptions to products 🔐 This method requires authorization.
@@ -2327,6 +2391,8 @@ This method unsubscribes to the product event. Returns nothing if the unsubscrip
2327
2391
 
2328
2392
  ## <h2 id="fileuploading"> FileUploading </h2>
2329
2393
 
2394
+ FileUploading in OneEntry Headless CMS provides methods for managing files in cloud storage. The upload method allows uploading files with optional parameters such as type, entity, ID, and image optimization options. It returns information about the uploaded file, including its name and download link. The delete method removes a file from storage by its name and specified parameters. The getFile method searches for and returns a file object based on provided parameters such as ID, type, entity, and filename.
2395
+
2330
2396
  ```js
2331
2397
  const { FileUploading } = defineOneEntry('your-url');
2332
2398
  ```
@@ -2513,6 +2579,8 @@ Example return:
2513
2579
 
2514
2580
  ## <h2 id="forms"> Forms </h2>
2515
2581
 
2582
+ The "Forms" module is a user-friendly tool for creating and managing various forms, such as contact forms, surveys, and registration sheets. With an intuitive interface, users can add form elements, customize layouts, and apply themes. The module supports organizing and categorizing forms, setting access permissions, and tracking responses in real-time. Automation features include notifications upon form submissions and integration with applications.
2583
+
2516
2584
  ```js
2517
2585
  const { Forms } = defineOneEntry('your-url');
2518
2586
  ```
@@ -2769,6 +2837,8 @@ Example return:
2769
2837
 
2770
2838
  ## <h2 id="formsdata"> FormData </h2>
2771
2839
 
2840
+ The FormData module in OneEntry Headless CMS allows for managing and interacting with form data. By using the defineOneEntry function, you can create a FormData object to handle various operations. The module supports different data types such as strings, numbers, dates, text, images, files, lists, and nested entities. It provides methods like getFormsData, postFormsData, and getFormsDataByMarker for retrieving, creating, and searching form data. Each method interacts with the API to perform these tasks, returning structured JSON objects with detailed information about the form data, including identifiers, timestamps, and language-specific data.
2841
+
2772
2842
  ```js
2773
2843
  const { FormData } = defineOneEntry('your-url');
2774
2844
  ```
@@ -3193,6 +3263,8 @@ Example return:
3193
3263
 
3194
3264
  ## <h2 id="generaltypes"> GeneralTypes </h2>
3195
3265
 
3266
+ The `GeneralTypes` module in OneEntry Headless CMS is designed to manage and retrieve general types used within the system. By using the `defineOneEntry` function, you can create a `GeneralTypes` object to interact with these types. The primary method available is `getAllTypes`, which retrieves all objects of type `GeneralTypeEntity` from the API. This method returns a Promise that resolves to an array of `GeneralTypeEntity` objects, each containing an `id` and a `type`. The types cover various purposes, such as page layouts, forms, product blocks, and more, providing flexibility for different content management needs.
3267
+
3196
3268
  ```js
3197
3269
  const { GeneralTypes } = defineOneEntry('your-url');
3198
3270
  ```
@@ -3237,6 +3309,8 @@ Example return:
3237
3309
 
3238
3310
  ## <h2 id="integrationcollections">IntegrationCollections</h2>
3239
3311
 
3312
+ Integration Collections is a module for storing various data that can be used for integrating different services and systems. To integrate third-party services, it is necessary to create and configure collections.
3313
+
3240
3314
  ```js
3241
3315
  const { IntegrationCollections } = defineOneEntry('your-url');
3242
3316
  ```
@@ -3845,6 +3919,8 @@ Returns true (in case of successful deletion) or false (in case of unsuccessful
3845
3919
 
3846
3920
  ## <h2 id="locales"> Locales </h2>
3847
3921
 
3922
+ Thanks to the support of multiple languages in Oneentry Headless CMS, you can flexibly customize the interface of your dashboard and conveniently manage languages in your project. In this section, you can learn about the principles of working with languages.
3923
+
3848
3924
  ```js
3849
3925
  const { Locales } = defineOneEntry('your-url');
3850
3926
  ```
@@ -3917,6 +3993,24 @@ Example return:
3917
3993
 
3918
3994
  ## <h2 id="menus"> Menus </h2>
3919
3995
 
3996
+ The menu is a key element of the structure and navigation of your site. With the menu, you provide visitors with a convenient way to navigate through different sections of your application and find the information they need.
3997
+
3998
+ In OneEntry Headless CMS, you can create the menu structure directly from your personal account. This allows you to change the set of pages included in the menu, their order, and titles without modifying the source code of your application.
3999
+
4000
+ Additionally, if necessary, you can create nested levels in the menu, allowing for a tree-like structure with sections and subsections.
4001
+
4002
+ All of this enables you to work conveniently and flexibly with the navigation of your application directly from your personal account.
4003
+
4004
+ At the core of the menu are pages. The menu structure is created from pages.
4005
+
4006
+ You can define:
4007
+
4008
+ Which pages will be included in the menu
4009
+ In what order they will be presented to the user
4010
+ What title will be given to the menu item leading to a specific page
4011
+ The nesting of menu items (Tree structure)
4012
+ Some of these concepts were discussed in the pages section, and some page settings affect the menu structure you can create from these pages.
4013
+
3920
4014
  ```js
3921
4015
  const { Menus } = defineOneEntry('your-url')
3922
4016
  ```
@@ -3994,6 +4088,8 @@ Example return:
3994
4088
 
3995
4089
  ## <h2 id="orders"> Orders </h2>
3996
4090
 
4091
+ The ability to make and pay for goods or services is an integral part of the E-commerce application. In this section, you can familiarize yourself with the principles of working with orders.
4092
+
3997
4093
  ```js
3998
4094
  const { Orders } = defineOneEntry('your-url');
3999
4095
  ```
@@ -4673,6 +4769,8 @@ Example return:
4673
4769
 
4674
4770
  ## <h2 id="pages"> Pages </h2>
4675
4771
 
4772
+ The Pages module in the Headless CMS OneEntry interface allows you to manage pages if it is a web application, or screens if it is a mobile application.
4773
+
4676
4774
  ```js
4677
4775
  const { Pages } = defineOneEntry('your-url');
4678
4776
  ```
@@ -5596,6 +5694,8 @@ Example return:
5596
5694
 
5597
5695
  ## <h2 id="payments"> Payments </h2>
5598
5696
 
5697
+ An important part of the E-commerce application is working with payments. In this section, you can learn about the principles of working with payments.
5698
+
5599
5699
  ```js
5600
5700
  const { Payments } = defineOneEntry('your-url');
5601
5701
  ```
@@ -6244,6 +6344,8 @@ This method use webhook for Stripe. Returns true (in case of successful executio
6244
6344
 
6245
6345
  ## <h2 id="products"> Products </h2>
6246
6346
 
6347
+ Products is a separate module in the Headless CMS OneEntry interface that allows you to create a product catalog or a set of multimedia elements, such as a gallery.
6348
+
6247
6349
  ```js
6248
6350
  const { Products } = defineOneEntry('your-url');
6249
6351
  ```
@@ -8092,6 +8194,8 @@ Example return:
8092
8194
 
8093
8195
  ## <h2 id="productstatuses"> ProductStatuses </h2>
8094
8196
 
8197
+ To create additional filtering conditions for catalog items in Headless CMS OneEntry, the functionality of Product Statuses has been added. In this tab, you can create a status that will serve as an additional filter alongside the existing conditions from attributes.
8198
+
8095
8199
  ```js
8096
8200
  const { ProductStatuses } = defineOneEntry('your-url');
8097
8201
  ```
@@ -8297,6 +8401,8 @@ true
8297
8401
 
8298
8402
  ## <h2 id="system"> System </h2>
8299
8403
 
8404
+ The System module in OneEntry Headless CMS provides methods for testing error page redirections, allowing developers to ensure that their error handling mechanisms are functioning correctly. By using the defineOneEntry function, you can create a System object to access these functionalities. The module offers two primary methods: test404 and test500. Both methods simulate scenarios where the user is redirected to an error page, specifically 404 (Not Found) and 500 (Internal Server Error) pages, respectively. These tools are essential for verifying that the system's error pages are correctly implemented and displayed to users when needed.
8405
+
8300
8406
  ```js
8301
8407
  const { System } = defineOneEntry('your-url');
8302
8408
  ```
@@ -8321,6 +8427,8 @@ const value = await System.test500()
8321
8427
 
8322
8428
  ## <h2 id="templates"> Templates </h2>
8323
8429
 
8430
+ Templates help configure the display of the content part of your application. Some templates affect the images stored in the CMS system, while others influence the appearance of other entities, such as blocks, pages, products, etc. In this section, you can familiarize yourself with the principles of working with templates.
8431
+
8324
8432
  ```js
8325
8433
  const { Templates } = defineOneEntry('your-url');
8326
8434
  ```
@@ -8679,6 +8787,8 @@ Example return:
8679
8787
 
8680
8788
  ## <h2 id="templatepreviews"> TemplatePreviews </h2>
8681
8789
 
8790
+ Preview templates allow you to configure the image parameters used in attributes. By applying a template to an attribute of type "Image" or "Image Group," you will get images standardized according to the specifications in the preview template. This is convenient if the design of your project is sensitive to image sizes. By configuring the preview template, you can change the image parameters that the end user will see.
8791
+
8682
8792
  ```js
8683
8793
  const { TemplatePreviews } = defineOneEntry('your-url');
8684
8794
  ```
@@ -8998,6 +9108,8 @@ Example return:
8998
9108
 
8999
9109
  ## <h2 id="users"> Users </h2>
9000
9110
 
9111
+ In Headless CMS OneEntry, there are the necessary tools for working with registered users. In this section, you can familiarize yourself with the principles of working with users.
9112
+
9001
9113
  You can store the data necessary for your application to work in a state object. When changing the user, add the necessary data to the state. When the user's data is subsequently received, it will contain a state object.
9002
9114
 
9003
9115
  An example in which we add information to the user about how many orders he has made. Add a field "orderCount" with the value to the state object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",