{"id":20596976,"url":"https://github.com/tradle/models","last_synced_at":"2025-10-06T20:13:24.278Z","repository":{"id":40413390,"uuid":"46298293","full_name":"tradle/models","owner":"tradle","description":"data models (schemas) for tradle apps","archived":false,"fork":false,"pushed_at":"2025-09-29T15:56:16.000Z","size":2331,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-29T15:56:42.433Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tradle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-16T19:50:30.000Z","updated_at":"2025-09-29T15:56:19.000Z","dependencies_parsed_at":"2024-12-06T19:39:58.860Z","dependency_job_id":"2bca91d9-b95a-4dec-a25f-b4e2ddfdd6f7","html_url":"https://github.com/tradle/models","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/tradle/models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fmodels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fmodels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fmodels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fmodels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tradle","download_url":"https://codeload.github.com/tradle/models/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fmodels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278671793,"owners_count":26025756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T08:19:44.455Z","updated_at":"2025-10-06T20:13:24.268Z","avatar_url":"https://github.com/tradle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Tradle Data Modeling syntax\n\n## Introduction\n\nTradle software is divided into two parts, the code and the data models. The code uses the data models to display data on the screen, to transmit data, to store data and to search for data. Each data model defines a set of properties. Any object of this model will have properties defined there. Some properties are listed as ‘required’. There are many other annotations, which are used to create rich definition of data and its handling.\n\nWe use Json Schema as a basis for the data modeling language, but Json Schema is not rich enough for our purposes, so we have extended it.\n\nModels are like blueprints. “Resources” are like buildings created from those blueprints, and adhere to the model’s spec.\n\nBelow is the reference on data models. See some of the currently used models on github.\n\n[Learn more about modelling in Tradle here](DataModelling.md)\n\nTo validate your models, use: https://github.com/tradle/validate-model\nTo validate resources built from models, use: https://github.com/tradle/validate-resource\n\n### Example:\n\n```json\n{\n  \"id\": \"tradle.Name\",\n  \"title\": \"Name\",\n  \"subClassOf\": \"tradle.Form\",\n  \"type\": \"tradle.Model\",\n  \"properties\": {\n    \"givenName\": {\n      \"title\": \"Given name(s)\",\n      \"type\": \"string\"\n    },\n    \"surname\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\n    \"givenName\",\n    \"surname\"\n  ],\n  \"viewCols\": [\n    \"givenName\",\n    \"surname\"\n  ]\n}\n```\n\nA resource built from this model would like this:\n```\n{\n  “_t”: “tradle.Name”, // the model this resource is built from\n  “givenName”: “Joe”,\n  “surname”: “Schmo”\n}\n```\n\n## Model Attributes\n\n### properties\n\nlist of properties, each separately described. No other properties can be used in the objects of this model.\n\nThere is one exception to this rule, a special property that represents json. It allows to include any type of structured data into the object without modeling it upfront, which is very useful for integration purposes.\n\n### type\n\nmust be set to ‘tradle.Model’\n\n### id\n\nnamespaced id of the model, e.g. ‘tradle.Organization’\n\n### title\n\nhow you want the name of this model to appear in UI. This is useful for evolving UI without affecting the code that may be referencing that id.\n\n### subClassOf\n\noptional, specifies this model as an extension of another model. This is when you absolutely need a strong rigidity in the data model. Current models you can subclass:\n\n- tradle.Form: the only way to specify in model that you want it to use for entering structured data.\n- tradle.Enum: for when you can list all possible values of the property, e.g. marital status, gender, etc. This mechanism is also used for longer lists, which are predefined, like currencies, countries, etc. See for example, the Country model.\n- tradle.FinancialProduct: to define products to put in your channel’s product list. Read [here](https://github.com/tradle/models/blob/master/docs/creatingNewProduct.md) for guidelines on how to create a new product model.\n- tradle.MyProduct: see tradle.FinancialProduct\n- tradle.Check: subclasses of this represent checks carried out during the application process, via third parties (tradle.TruefaceCheck, tradle.CentrixCheck, etc.), or otherwise.\n\n### interfaces\n\noptional, array of interface models. They are more like markers. We don't enforce/check inheritance of their properties. We might consider it in the future but not at this moment\n\nExample of the Intersection implementor:\n```\n{\n  \"id\": \"tradle.TaggedIssue\",\n  \"type\": \"tradle.Model\",\n  \"interfaces\": [\n    \"tradle.Intersection\"\n  ],\n  \"properties\": {\n    \"tag\":  {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Tag\"\n    },\n    \"issue\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Issue\"\n    }\n  },\n  ...\n}\n```\nand then in tradle.Issue it'll be referred like this:\n```\n{\n  \"id\": \"tradle.Issue\",\n  \"type\": \"tradle.Model\",\n  \"subClassOf\": \"tradle.Form\",\n  \"properties\": {\n    \"tags\":  {\n      \"type\": \"array\",\n      \"backlink\": \"issue\"\n      \"items\": {\n        \"ref\": \"tradle.TaggedIssue\"\n      }\n    },\n    ...\n  },\n  ...\n}\n```\n\nWe have the following interfaces.\n\n- tradle.Document - to better group and display the resources on Profile. They will appear in the Profile's Documents tab. Some of the implementors are: tradle.PhotoID, tradle.Selfie, tradle.MediaSnippet, etc.\n- tradle.Item - to display them only in the parent resource. The resources of implementor type can be added on parent resource page\n- tradle.Intersection - to make a soft connection between two or more resources or different types. We use it for example here.\n- tradle.Singleton - is designed to restrict the creation of resources of a specific type to a single instance for the entire company.\n\n### required\n\noptional, array of properties. Server and UI both are making sure user enters all of them.\n\n### softRequired\n\noptional, array of properties. UI is making sure user enters all of them in case they are displayed in UI. This is different from properties listed in `required`, which must always be set regardless of their visibility.\n\n### viewCols\n\nrestricts the set of properties that are displayed to the user when the resource is viewed on its own page. The order defines the order in which properties are displayed.\n\n### gridCols\n\nrestricts the set of properties that are displayed to the user when the list of the resources is viewed in grid mode. The order defines the order in which properties are displayed.\n\n### editCols\n\noptional, restricts the set of properties that are displayed to the user in edit mode. The order defines the order in which properties are displayed.\n\n### inlined\n\noptional, set to true on models like Money, whose values are not persisted to storage separately, but only when inlined into another object.\n\n### plural\n\ntitle that is used in plural contact, like geese, to avoid saying gooses. But if you insist on saying gooses, we love you too.\n\n### icon\n\noptional, displayed in various UI elements accompanying objects of this type. Icon names should be taken from this list: http://ionicframework.com/docs/v2/ionicons/\n\n### notShareable\n\noptional. If true, it prevents the customer from sharing this object with other providers. For example tradle.Selfie is used for authentication in real time, and must always be taken fresh, thus it has nonShareable: true.\n\n### notEditable\n\noptional, objects of this type could not be modified. Once again, tradle.Selfie fits this description\n\n### indexes\n\noptional, to speed up the searches. Check [tradle.Application](https://github.com/tradle/models/blob/master/models/tradle.Application.json) to see how to add them\n\n### internalUse\n\noptional, the resources created from it will never be viewed by customer. For example tradle.credit.CostOfCapital, tradle.ProviderConfiguraiton, etc.\n\n### prerequisiteFor\n\noptional, this is used for two cases (the second one is not encouraged since might be re-designed). In both cases the employee fills out the application for the customer\n\n1. when the employee fills out the application for the customer but needs customer interference in the middle of the application. This way application is split in 2 and **prerequisiteFor** is what prompts these 2 applications to connect.\n2. when employee fills out the application starting from a particular resource because this resource serves as a value for the property in one of the forms of the application - this was used once because customer had a particular flow in mind.\n\nthe value for this annotation is a model **id** for some `subClassOf: tradle.FinancialProduct`\ne.g.\n```\n{\n  \"id\": \"...Quotation\",\n  \"title\": \"Quotation\",\n  \"subClassOf\": \"tradle.FinancialProduct\",\n  ...\n}\n```\n**Case #1**\n\nAnnotation is set on `subClassOf: tradle.MyProduct` - which we call the **certificate**.\n\nFor example:\n```\n{\n  \"id\": ...MyQuotation,\n  \"title\": \"My Quotation\",\n  \"subClassOf\": \"tradle.MyProduct\",\n  \"type\": \"tradle.Model\",\n  \"prerequisiteFor\": \"...LeaseApplication\",\n```\nwhere\n```\n{\n  \"id\": \"...LeaseApplication\",\n  \"title\": \"Lease Application\",\n  \"subClassOf\": \"tradle.FinancialProduct\",\n  ...\n}\n```\n\nThe flow is going to be the following:\n- Employee fills out the Quotation application for the customer\n- Employee send the bundle to customer\n- Customer reviews and submits reviewed forms\n- Employee approves application\n- Certificate is created\n- After the approval of Quotation application, the Employee from the Quotation application screen will be able to start the ...LeasingApplication\n\n**Case #2**\n\nFor example if you need to pass the `...SomeAsset` (see below) to the Quotation Application to set the it as a property value for one of the forms of Quotation Application\n```\n{\n  \"id\": \"...SomeAsset\",\n  \"title\": \"Asset\",\n  \"subClassOf\": \"tradle.Asset\",\n  \"prerequisiteFor\": \"...Quotation\",\n}\n```\n\n### displayName\n\noptional, to indicate the form the title of which is going to be the name of the Application this form is included in.\n\n## Property Attributes\n\n### title\n\noptional, to specify a name different from the property’s uncamelcased name. Useful for evolving property names without changing all the references to them in the code.\nDO NOT add a title attribute if the property name is already user-friendly and follows the convention of uncasing and capitalizing (e.g., firstName to First Name). Including redundant title attributes will not change the behavior and may clutter the model unnecessarily.\nONLY add a title attribute when you want to provide a custom label that differs from the default auto-generated label. For example:\n```\n\"dateSubmitted\": {\n  \"title\": \"Date\",\n  \"displayName\": true\n}\n```\n\n### type\n\nused to specify what values the property can hold: string, number, date, boolean, array, object\n\n### ref\n\nonly used for *type* object. This specifies the model for that object, e.g. tradle.Organization\n\n### range\n\noptional, when *type* is string, this specifies the category of values to accept, e.g. email, phone, url. This improves validation, formatting, the keyboard type shown to the user, etc. When *type* is object, and *ref* is tradle.Photo, *range* should be set to photo\n\n### inlined\n\noptional, set to true if the value for this property is a resource rather than a link to a resource. When *inlined* is true, the value will be inlined and will not be stored separately in the database / object storage. Can also used for properties with type array.\n\n### readOnly\n\noptional, set to true if this property cannot be modified by the user\n\n### immutable\n\noptional, once the property value is set, the property can not be modified\n\n### hidden\n\noptional, property is never set from UI\n\n\n### description\n\noptional, shown in UI during data entry to give the user an additional hint / instructions\n\n### displayName\n\noptional, helps UI. When a resource is shown in a list or in the nav bar, its title is displayed. Set displayName to true if you want this property to be part of the object’s displayed title.\n\n### displayAs\n\noptional, helps UI. Composing the value of the property from properties listed in attribute `group`.\nFor example:\n```\n    \"resourceTitle\": {\n      \"type\": \"string\",\n      \"readOnly\": true,\n      \"displayName\": true,\n      \"displayAs\": \"{1} {2}\\n{3}, {4}\",\n      \"group\": [\n        \"firstName\",\n        \"lastName\",\n        \"documentType\",\n        \"country\"\n      ]\n    },\n```\n\n### skipLabel\n\noptional, propety label will not show in UI\n\n### units\n\noptional, string, applicable only to numbers and provides a contextual representation for numeric values by appending a specific unit or symbol in the user interface.\n```\n{\n  \"monthlyRate\": {\n    \"type\": \"number\",\n    \"units\": \"%\"\n  },\n}\n```\nFor example if `monthlyRate` was set to 25 it'll be displayed as `25%`\n\n### format\n\noptional, dates only. Shown in UI in view mode. For example:\n\n```\n...\n\"expirationDate\": {\n  \"type\": \"date\",\n  \"format\": \"mmmm, yyyy\"\n}\n```\n\n### numberFormat\n\noptional, numbers only. Shown in UI in view mode. For example:\n\n```\n...\n\"zScore\": {\n  \"type\": \"number\",\n  \"numberFormat\": {\n    \"maximumFractionDigits\": 2\n  }\n},\n```\nIt has only one property for now: **maximumFractionDigits**. It means to round the value to the value with 2 fraction digits.\n\n### pattern\n\noptional, a regular expression (regexp) that defines the pattern for property value validation.\n\n### keyboard\n\npossible values include: default, numeric, email-address, phone-pad\n\n### backlink\n\ndefines a one-to-many relationship. Specifies by which property the \"many\" links to the \"one.\" Many must be *type* array.\nFor an example, take a look at the relationship between tradle.Application and tradle.ApplicationSubmission resources. In this case, many tradle.ApplicationSubmission resources can link to one tradle.Application\n```\n{\n  \"id\": \"tradle.Application\",\n  ...\n  \"properties\": {\n    ...\n    \"submissions\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"ref\": \"tradle.ApplicationSubmission\",\n        \"backlink\": \"application\"\n      }\n    },\n    ...\n  }\n...\n}\n```\n### showIf/hideIf\n\noptional, a formula that will be executed to make a decision if the property is going to be displayed.\n\nFor example:\n```\n{\n  \"id\": \"tradle.XXX\",\n  \"type\": \"tradle.Model\",\n  ...\n  \"properties\": {\n    \"a\": {\n      \"type\": \"string\"\n      \"showIf\": \"country\"\n    },\n    \"b\": {\n      \"type\": \"string\"\n      \"hideIf\": \"country.id.endsWith('US')\"\n    },\n    \"country\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Country\"\n    },\n    ...\n }\n```\nIt means:\n  - the property **country** will be displayed\n  - when it is set the **a** text field will be displayed - but not before\n  - hide property **b** if the country is US, but show for all other countries or until it set\n\n### internalUse\n\noptional, the properties will be viewed only by the employee\n\n### list\n\noptional, helpsUI. This attribute is used in properties that have names ending with `_group` like `personal_group`. This is the property for groupping other properties of the models.\nFor example:\n```\n    \"personal_group\": {\n      \"type\": \"string\",\n      \"title\": \"Personal\",\n      \"readOnly\": true,\n      \"list\": [\n        \"firstName\",\n        \"lastName\",\n        \"dateOfBirth\"\n      ]\n    }\n\n```\n\n### signature\n\noptional, helps UI. Specifies that property of the type `tradle.Photo` is actually a signature. _**Note**_ should have been range\nFor example:\n```\n    \"signature\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Photo\",\n      \"inlined\": true,\n      \"skipLabel\": true,\n      \"signature\": true\n    },\n```\n\n### allowPicturesFromLibrary\n\noptional, enables users to upload images directly from their device's photo library\n\n### set\n\noptional, calculates the value using formula\nFor example:\n```\n    \"netPrice\": {...},\n    \"exchangeRate\": {...},\n    \"vatRate\": {...},\n    \"vat\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Money\",\n      \"readOnly\": true,\n      \"set\": \"Math.round(netPrice.value * exchangeRate * vatRate * 100)/100\"\n    },\n```\n\n### hiddenFromClient\n\noptional, properties with this attribute are always hidden from the customer, ensuring that sensitive or complex data is not exposed unnecessarily. It is typically used in models for forms that are prefilled by employees on behalf of the customer. Often used for properties that involve calculations or internal data, such as `exchangeRate` or `vatRate`, which are crucial for determining final values but do not require customer input.\n\n### readOnlyForClients\n\noptional, the property with this attribute can’t be changed by the client\n\n### allowToAdd\n\noptional, it is specifically designed for properties that are a subClassOf tradle.Form. When specified, the value(s) for the property could be either chosen from the list of values of the specified in the model type (in example below it'll be `tradle.PersonalInfo`) or created on-the-fly while filling out the form.\n\nFor example:\n```\n    \"policyHolder\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.PersonalInfo\",\n      \"allowToAdd\": true\n    },\n    \"insuredPersons\": {\n      \"type\": \"array\",\n      \"allowToAdd\": true,\n      \"items\": {\n        \"type\": \"object\",\n        \"ref\": \"tradle.PersonalInfo\"\n      }\n    },\n ```\n\n## Attributes for `subClassOf` `tradle.Enum`\n\n### enum\nFor example:\n```\n{\n  \"id\": \"tradle.IDCardType\",\n  \"subClassOf\": \"tradle.Enum\",\n  \"type\": \"tradle.Model\",\n  \"properties\": {\n    \"idCardType\": {\n      \"displayName\": true,\n      \"type\": \"string\"\n    }\n  },\n  \"enum\": [\n    { \"id\": \"passport\", \"title\": \"Passport\" },\n    { \"id\": \"license\", \"title\": \"Driver Licence\" },\n    { \"id\": \"id\", \"title\": \"ID Card\"},\n    { \"id\": \"other\", \"title\": \"Other\"}\n  ]\n}\n```\n\n## Specific attributes for the properties with `subClassOf` `tradle.Enum` type.\n\n### pin\n\noptional, allows to highlight specific values by placing them at the top of a list. This makes it easier for users to find and select the most commonly chosen options. Usually used in the custom models or lenses created for particular customer.\n\nFor example:\n```\n    \"currency\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Currency\",\n      \"pin\": [\n        \"MXN\",\n        \"USD\"\n      ]\n    },\n```\n\n### limit\n\noptional, restricts the available options for a property to a specific subset of values from a  list. Usually used in the custom models or lenses created for particular customer.\nFor example:\n```\n    \"currency\": {\n      \"type\": \"object\",\n      \"ref\": \"tradle.Currency\",\n      \"limit\": [\n        \"MXN\",\n        \"USD\"\n      ]\n    },\n```\n\n## Lens\n\nA Lens acts as a filter or customization layer on top of a data model, allowing you to tailor the presentation and behavior of model properties to better suit specific needs or contexts. Lens is usually not generic but specific for a particular provider.\n\nAs an example let's create a simple lens for model `tradle.Order` - see [here](https://github.com/tradle/models/blob/master/models/tradle.Order.json)\n```\n{\n  \"_t\": \"tradle.Lens\",\n  \"model\": \"tradle.Order\",\n  \"id\": \"[namespace].lens.Order\",\n  \"properties\": {\n    \"dateSubmitted\": {\n      \"title\": \"Date\",\n      \"displayName\": true\n    },\n    \"description\": {\n      \"readOnlyForClients\": true\n    },\n    \"contract\": {\n      \"readOnlyForClients\": true\n    },\n    \"totalPrice\": {},\n    \"items\": {}\n  },\n  \"required\": [\n    \"dateSubmitted\"\n  ],\n  \"editCols\": [\n    \"description\",\n    \"contract\",\n    \"items\",\n    \"totalPrice\"\n  ],\n  \"viewCols\": [\n    \"dateSubmitted\",\n    \"description\",\n    \"contract\",\n    \"items\",\n    \"totalPrice\"\n  ],\n  \"gridCols\": [\n    \"dateSubmitted\",\n    \"description\",\n    \"contract\",\n    \"totalPrice\"\n  ],\n  \"hidden\": [\n    \"buyer\"\n  ]\n}\n```\n\nHere are the required attributes for the lens.\n- `_t`: Always set to `tradle.Lens`\n- `model`: Specifies the model for which this lens is created\n- `id`: The unique identifier for the lens\n- `properties`: The list of properties you want to change behavior of.\n\n**Only properties that are listed in the model can be listed in lens.**\n\nWhen lens is applied to original `tradle.Order` there going to be the following changes to the model:\n- `displayName` changes from `description` to `dateSubmitted` and the `dateSubmitted` will be displayed as `Date`\n- `description` and `contract` properties become read-only for clients\n- `required` property will change from `items` to `dateSubmitted`\n- `hidden` added so that property `buyer` will not be displayed\n- `viewCols`, `gridCold` and `editCols` will be added to specify the order in which properties are going to be displayed and limit the ones that will be entered.\n\nThese modifications demonstrate how a lens can significantly alter the presentation and behavior of a model without changing its underlying structure.\n\n### Another example would be\n\n```\n{\n  \"_t\": \"tradle.Lens\",\n  \"model\": \"tradle.PersonalInfo\",\n  \"id\": \"[namespace].lens.PersonalInfo\",\n  \"properties\": {\n    \"countryOfBirth\": {\n      \"pin\": [\n        \"US\",\n        \"UK\",\n        \"AR\"\n      ]\n    }\n  },\n  \"name_group\": {\n    \"type\": \"string\",\n    \"title\": \"Personal detail\",\n    \"list\": [\n      \"firstName\",\n      \"lastName\",\n      \"emailAddress\",\n      \"countryOfBirth\",\n      \"dateOfBirth\",\n      \"education\"\n    ]\n  },\n  \"required\": [\n    \"emailAddress\"\n  ]\n}\n```\n\nAfter the lens is applied the three countries listed will show on top of the list of all countries. Also changed the set of required properties and the set of properties that will show in `Personal detail` group.\n\n## Developer Notes\n\n### Model Merging \n\nWhen adding or removing models, the `models.js` file must be regenerated to reflect the updated set of models.\n\nThe [models.js](https://github.com/tradle/models/blob/master/models.js) file acts as a \"models registry,\" consolidating all model definitions into a single access point. It is generated using the [@tradle/pack-models](https://github.com/tradle/pack-models) utility package and is a critical component for managing models across various Tradle packages, including:\n\n    @tradle/models\n    @tradle/models-corporate-onboarding\n    @tradle/custom-models\n\nThis process is automated and runs at the pre-commit stage to ensure the registry is always up-to-date. Check the script defined in your package.json file:\n\n```\n\"scripts\": {\n  ...\n  \"merge\": \"pack-models -i ./models -o ./models.js\"\n  \"precommit\": \"npm run merge \u0026\u0026 npm run validate \u0026\u0026 git add models.js\"\n}\n```\nwhere:\n\n  -i: Input directory containing the JSON model files.  \n  -o: Output file where the merged models will be saved.  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fmodels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftradle%2Fmodels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fmodels/lists"}