diff --git a/.github/issue_template.md b/.github/issue_template.md index 5f09eaceb..5ef78cb3f 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -17,7 +17,9 @@ Please inform the type(s) of issue(s) you are reporting: ## Description -Please provide a clear and concise description of the issue or enhancement. Include any relevant information that could help reproduce the issue or understand the request. +Please provide a clear and concise description of the issue or enhancement. +Include any relevant information that could help reproduce the issue or +understand the request. ## Steps to Reproduce (for bugs) @@ -35,7 +37,8 @@ Describe what actually happened. ## Additional Context -Add any other context about the issue here, including screenshots, logs, or other supporting information. +Add any other context about the issue here, including screenshots, logs, or +other supporting information. --- diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index ea3af275b..e967f6cd7 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -5,30 +5,30 @@ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -education, socio-economic status, nationality, personal appearance, race, -religion, or sexual identity and orientation. +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or +- The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities @@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. ## Scope @@ -55,11 +55,11 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at {{ email }}. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +reported by contacting the project team at {{ email }}. All complaints will be +reviewed and investigated and will result in a response that is deemed necessary +and appropriate to the circumstances. The project team is obligated to maintain +confidentiality with regard to the reporter of an incident. Further details of +specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other @@ -67,7 +67,8 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -[homepage]: https://www.contributor-covenant.org \ No newline at end of file +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb71fca70..5114d78e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,9 @@ # Contributing Guidelines -Thank you for your interest in contributing to the `deco-cx/apps` repository! We are excited to have community members like you involved in improving our collection of powerful apps. This document outlines how you can contribute effectively to the project. +Thank you for your interest in contributing to the `deco-cx/apps` repository! We +are excited to have community members like you involved in improving our +collection of powerful apps. This document outlines how you can contribute +effectively to the project. ## How to Contribute @@ -9,57 +12,77 @@ Thank you for your interest in contributing to the `deco-cx/apps` repository! We When submitting an issue, please use one of the following types: - **Issue/Bug**: Report bugs or track existing issues. -- **Issue/Discussion**: Start a discussion to gather input on a topic before it becomes a proposal. -- **Issue/Proposal**: Propose a new idea or functionality. This allows for feedback before any code is written. -- **Issue/Question**: Ask for help or clarification on any topic related to the project. +- **Issue/Discussion**: Start a discussion to gather input on a topic before it + becomes a proposal. +- **Issue/Proposal**: Propose a new idea or functionality. This allows for + feedback before any code is written. +- **Issue/Question**: Ask for help or clarification on any topic related to the + project. ### Before You File an Issue Before submitting an issue, ensure the following: -1. **Correct Repository**: Verify that you are filing the issue in the correct repository within the deco ecosystem. -2. **Existing Issues**: Search through [open issues](./issues) to check if the issue has already been reported or the feature has already been requested. +1. **Correct Repository**: Verify that you are filing the issue in the correct + repository within the deco ecosystem. +2. **Existing Issues**: Search through [open issues](./issues) to check if the + issue has already been reported or the feature has already been requested. 3. **For Bugs**: - - Confirm that itโ€™s not an environment-specific issue. Ensure all prerequisites (e.g., dependencies, configurations) are met. - - Provide detailed logs, stack traces, or any other relevant data to help diagnose the issue. + - Confirm that itโ€™s not an environment-specific issue. Ensure all + prerequisites (e.g., dependencies, configurations) are met. + - Provide detailed logs, stack traces, or any other relevant data to help + diagnose the issue. 4. **For Proposals**: - - Discuss potential features in the appropriate issue to gather feedback before coding. + - Discuss potential features in the appropriate issue to gather feedback + before coding. ### Pull Requests -We welcome contributions via pull requests (PRs). Follow this workflow to submit your changes: +We welcome contributions via pull requests (PRs). Follow this workflow to submit +your changes: -1. **Issue Reference**: Ensure there is an issue raised that corresponds to your PR. -2. **Fork and Branch**: Fork the repository and create a new branch for your changes. +1. **Issue Reference**: Ensure there is an issue raised that corresponds to your + PR. +2. **Fork and Branch**: Fork the repository and create a new branch for your + changes. 3. **Code Changes**: - Include appropriate tests with your code changes. - Run linters and format the code according to project standards: - Run `deno task check` 4. **Documentation**: Update any relevant documentation with your changes. 5. **Commit and PR**: Commit your changes and submit a PR for review. -6. **CI Checks**: Ensure that all Continuous Integration (CI) checks pass successfully. -7. **Review Process**: A maintainer will review your PR, usually within a few days. +6. **CI Checks**: Ensure that all Continuous Integration (CI) checks pass + successfully. +7. **Review Process**: A maintainer will review your PR, usually within a few + days. #### Work-in-Progress (WIP) PRs -If youโ€™d like early feedback on your work, you can create a PR with the prefix `[WIP]` to indicate that it is still under development and not ready for merging. +If youโ€™d like early feedback on your work, you can create a PR with the prefix +`[WIP]` to indicate that it is still under development and not ready for +merging. ### Testing Your Contributions -Since this repository contains integrations that must be tested against a deco site, you cannot test your contributions in isolation. Please refer to this [Helpful content](https://www.notion.so/decocx/Helpful-Community-Content-101eec7ce64f4becaebb685dd9571e24) for instructions on how to set up a deco site for testing purposes. +Since this repository contains integrations that must be tested against a deco +site, you cannot test your contributions in isolation. Please refer to this +[Helpful content](https://www.notion.so/decocx/Helpful-Community-Content-101eec7ce64f4becaebb685dd9571e24) +for instructions on how to set up a deco site for testing purposes. ### Use of Third-Party Code -- Ensure that any third-party code included in your contributions comes with the appropriate licenses. +- Ensure that any third-party code included in your contributions comes with the + appropriate licenses. ### Releasing a New Version -We follow semantic versioning, and all apps in this repository are versioned collectively using git tags. To release a new version: +We follow semantic versioning, and all apps in this repository are versioned +collectively using git tags. To release a new version: 1. Fork the repository and create a pull request with your changes. -2. After the PR is approved and merged, request a maintainer to react the releaser comment with the required emoji -๐Ÿ‘ for **Patch** -๐ŸŽ‰ for **Minor** -๐Ÿš€ for **Major** +2. After the PR is approved and merged, request a maintainer to react the + releaser comment with the required emoji ๐Ÿ‘ for **Patch** ๐ŸŽ‰ for **Minor** ๐Ÿš€ + for **Major** -When your PR got merged, a new tag will arrive with the desired semver modification. +When your PR got merged, a new tag will arrive with the desired semver +modification. diff --git a/commerce/types.ts b/commerce/types.ts index 1c2d85ebf..c489adfed 100644 --- a/commerce/types.ts +++ b/commerce/types.ts @@ -41,8 +41,8 @@ export interface Thing { /** The identifier property represents any kind of identifier for any kind of {@link https://schema.org/Thing Thing}, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See {@link /docs/datamodel.html#identifierBg background notes} for more details. */ identifier?: string; /** An image of the item. This can be a {@link https://schema.org/URL URL} or a fully described {@link https://schema.org/ImageObject ImageObject}. */ - image?: ImageObject[]; - video?: VideoObject[]; + image?: ImageObject[] | null; + video?: VideoObject[] | null; /** The name of the item. */ name?: string; /** URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website. */ @@ -440,7 +440,7 @@ export interface Person extends Omit { /** Gender of something, typically a Person, but possibly also fictional characters, animals, etc */ gender?: "https://schema.org/Male" | "https://schema.org/Female"; /** An image of the item. This can be a URL or a fully described ImageObject. **/ - image?: ImageObject[]; + image?: ImageObject[] | null; /** The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ taxID?: string; } @@ -533,9 +533,9 @@ export interface Product extends Omit { inProductGroupWithID?: string; // TODO: Make json schema generator support self-referencing types // /** A pointer to another, somehow related product (or multiple products). */ - isRelatedTo?: Product[]; + isRelatedTo?: Product[] | null; /** A pointer to another, functionally similar product (or multiple products). */ - isSimilarTo?: Product[]; + isSimilarTo?: Product[] | null; /** Indicates the kind of product that this is a variant of. In the case of {@link https://schema.org/ProductModel ProductModel}, this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a {@link https://schema.org/ProductGroup ProductGroup}, the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with {@link https://schema.org/ProductGroup ProductGroup}, this property can apply to any {@link https://schema.org/Product Product} included in the group. */ isVariantOf?: ProductGroup; /** An offer to provide this itemโ€”for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use {@link https://schema.org/businessFunction businessFunction} to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a {@link https://schema.org/Demand Demand}. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. */ @@ -551,7 +551,7 @@ export interface Product extends Omit { /** The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ sku: string; /** A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - isAccessoryOrSparePartFor?: Product[]; + isAccessoryOrSparePartFor?: Product[] | null; questions?: Question[]; } @@ -923,7 +923,7 @@ export interface Search { export interface Suggestion { searches?: Search[]; - products?: Product[]; + products?: Product[] | null; hits?: number; } @@ -938,7 +938,7 @@ export interface SiteNavigationElementLeaf { /** The identifier property represents any kind of identifier for any kind of {@link https://schema.org/Thing Thing}, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See {@link /docs/datamodel.html#identifierBg background notes} for more details. */ identifier?: string; /** An image of the item. This can be a {@link https://schema.org/URL URL} or a fully described {@link https://schema.org/ImageObject ImageObject}. */ - image?: ImageObject[]; + image?: ImageObject[] | null; /** The name of the item. */ name?: string; /** URL of the item. */