Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shopify Developer App - New Product Updated #12472

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Shopify Developer App - New Product Updated #12472

merged 4 commits into from
Jun 28, 2024

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jun 18, 2024

Resolves #12412

Summary by CodeRabbit

  • New Features

    • Added event source for updated Shopify products, allowing filtering by product type and tags.
  • Documentation

    • Enhanced descriptions for metafield and private metafield namespaces in Shopify app components.
  • Version Updates

    • Updated version numbers for various Shopify app components to signify minor improvements and bug fixes.
  • Style

    • Added or removed newlines in multiple components to improve code formatting consistency.
Copy link

vercel bot commented Jun 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 3:41pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Jun 28, 2024 3:41pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 28, 2024 3:41pm
Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Walkthrough

The recent updates involve introducing a new source component to the Shopify Developer App that triggers events upon product updates, including filtering features based on product tags and types. Additionally, there are multiple minor version increments across numerous source components and documentation improvements.

Changes

Files/Components Change Summary
components/shopify_developer_app/package.json Updated version from "0.2.4" to "0.3.0".
.../sources/new-product-updated/new-product-updated.mjs Added new source component for product update events with filtering capabilities by tags and types.
Multiple source files (new-cancelled-order.mjs, new-customer-created.mjs, etc.) Incremented versions from "0.0.2" to "0.0.3".
components/shopify_developer_app/sources/common/webhook.mjs Updated descriptions for metafield-related properties.
Multiple app component files (e.g., _21risk.app.mjs, _2chat.app.mjs, etc.) Added or adjusted newline at the end of the file.
components/simplybook_me/simplybook_me.app.mjs Added a line to log the keys of a property within the exported object.

Sequence Diagram(s)

sequenceDiagram
    participant DeveloperApp as Shopify Developer App
    participant Store as Shopify Store
    participant Listener as Event Listener
    
    Note over DeveloperApp: Product Updated Trigger
    
    Store->>DeveloperApp: Product updated
    DeveloperApp->>Listener: Event emitted (includes productType and tags filters)
    Listener->>Listener: Process event based on filters
Loading

Assessment against linked issues

Objective Addressed Explanation
Introduce a trigger for "New Product Updated" in Shopify Developer App [#12412]
Include filters for tags and product_type for the "New Product Updated" trigger [#12412]

Poem

In the code, a rabbit hops with glee,
For updates come to Shopify's spree.
Products update, tags and types refined,
Events now filtered, oh what a find!
With versions bright, we leap ahead,
To bugs and woes, a sweet farewell said.
🌟✨ By CodeRabbit's thread, our code is fed! 🐇💻


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 28cf53b and e537a93.

Files selected for processing (3)
  • components/shopify_developer_app/package.json (1 hunks)
  • components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-product-updated/test-event.mjs (1 hunks)
Files skipped from review due to trivial changes (1)
  • components/shopify_developer_app/package.json
Additional comments not posted (3)
components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs (2)

5-6: Integration of new properties and methods with existing code looks clean and effective.

Also applies to: 13-13, 27-28


14-25: Ensure that the type for tags is correctly defined as an array of strings to match the expected input format.

Verification successful

Let's correct the file type issue and re-run the search to verify the type definition for tags.


The type for tags is correctly defined as string[], matching the expected input format.

  • components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs:
    • Line confirming tags type: type: "string[]"
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the type definition for `tags` in the source code.

# Test: Search for the `tags` property definition. Expect: Should be defined as type 'string[]'.
rg --type mjs $'type: "string\\[\\]"' components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs

Length of output: 149



Script:

#!/bin/bash
# Description: Verify the type definition for `tags` in the source code.

# Test: Search for the `tags` property definition. Expect: Should be defined as type 'string[]'.
rg 'type: "string\[\]"' components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs

Length of output: 134

components/shopify_developer_app/sources/new-product-updated/test-event.mjs (1)

1-64: Ensure all fields in the test data match the expected schema and types from the Shopify API to prevent discrepancies during testing.

Verification successful

The review comment suggests ensuring that all fields in the test data match the expected schema and types from the Shopify API. Based on the provided test data and known schema for Shopify products and variants, let's manually verify the fields and their types.

Known Shopify Product Schema (simplified)

  • admin_graphql_api_id: string
  • body_html: string or null
  • created_at: string (ISO 8601 date-time)
  • handle: string
  • id: integer
  • product_type: string
  • published_at: string (ISO 8601 date-time)
  • template_suffix: string or null
  • title: string
  • updated_at: string (ISO 8601 date-time)
  • vendor: string
  • status: string
  • published_scope: string
  • tags: string
  • variants: array of variant objects
  • options: array of option objects
  • images: array of image objects
  • image: object or null
  • variant_ids: array of integers

Known Shopify Variant Schema (simplified)

  • admin_graphql_api_id: string
  • barcode: string or null
  • compare_at_price: string or null
  • created_at: string (ISO 8601 date-time)
  • fulfillment_service: string
  • id: integer
  • inventory_management: string or null
  • inventory_policy: string
  • position: integer
  • price: string
  • product_id: integer
  • sku: string
  • taxable: boolean
  • title: string
  • updated_at: string (ISO 8601 date-time)
  • option1: string
  • option2: string or null
  • option3: string or null
  • grams: integer
  • image_id: integer or null
  • weight: integer
  • weight_unit: string
  • inventory_item_id: integer
  • inventory_quantity: integer
  • old_inventory_quantity: integer
  • requires_shipping: boolean

Test Data Verification

  • The fields and types in the provided test data seem to match the expected schema and types from the Shopify API.
  • No discrepancies are found in the test data fields and types.

Based on this manual verification, the fields in the test data match the expected schema and types from the Shopify API.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all fields in the test data match the Shopify API schema.

# Test: Check the structure and type of fields against the Shopify API documentation.
# Expect: All fields should match the types described in the Shopify API for products and variants.
echo "Manual verification recommended by checking against Shopify API documentation."

Length of output: 166

lcaresia
lcaresia previously approved these changes Jun 20, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e537a93 and af63e85.

Files selected for processing (11)
  • components/shopify_developer_app/sources/common/webhook.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-order-created/new-order-created.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-product-created/new-product-created.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-shipment/new-shipment.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs (1 hunks)
  • components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs (1 hunks)
Files skipped from review due to trivial changes (10)
  • components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs
  • components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs
  • components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs
  • components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs
  • components/shopify_developer_app/sources/new-order-created/new-order-created.mjs
  • components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs
  • components/shopify_developer_app/sources/new-product-created/new-product-created.mjs
  • components/shopify_developer_app/sources/new-shipment/new-shipment.mjs
  • components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs
  • components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs
Additional comments not posted (2)
components/shopify_developer_app/sources/common/webhook.mjs (2)

15-15: Enhanced description for metafield namespaces.

The updated description provides clearer guidance on how to identify and use metafield namespaces, which will likely improve user experience when setting up webhooks.


21-21: Improved description for private metafield namespaces.

This update enhances the understanding of private metafields, making it easier for developers to configure them correctly in their Shopify store.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between af63e85 and 106807f.

Files selected for processing (29)
  • components/_21risk/_21risk.app.mjs (1 hunks)
  • components/_2chat/_2chat.app.mjs (1 hunks)
  • components/adobe_photoshop/adobe_photoshop.app.mjs (1 hunks)
  • components/airship/airship.app.mjs (1 hunks)
  • components/ayrshare/ayrshare.app.mjs (1 hunks)
  • components/d2l_brightspace/d2l_brightspace.app.mjs (1 hunks)
  • components/database/database.app.mjs (1 hunks)
  • components/dropboard/dropboard.app.mjs (1 hunks)
  • components/eyepop_ai/eyepop_ai.app.mjs (1 hunks)
  • components/fatture_in_cloud/fatture_in_cloud.app.mjs (1 hunks)
  • components/fillout/fillout.app.mjs (1 hunks)
  • components/gloria_ai/gloria_ai.app.mjs (1 hunks)
  • components/google_address_validation/google_address_validation.app.mjs (1 hunks)
  • components/google_play/google_play.app.mjs (1 hunks)
  • components/heyzine/heyzine.app.mjs (1 hunks)
  • components/invision_community/invision_community.app.mjs (1 hunks)
  • components/kommo/kommo.app.mjs (1 hunks)
  • components/meteomatics_weather_api/meteomatics_weather_api.app.mjs (1 hunks)
  • components/minio/minio.app.mjs (1 hunks)
  • components/modelry/modelry.app.mjs (1 hunks)
  • components/noor/noor.app.mjs (1 hunks)
  • components/otter_waiver/otter_waiver.app.mjs (1 hunks)
  • components/power_automate/power_automate.app.mjs (1 hunks)
  • components/railsr/railsr.app.mjs (1 hunks)
  • components/signerx/signerx.app.mjs (1 hunks)
  • components/simplybook_me/simplybook_me.app.mjs (1 hunks)
  • components/spiritme/spiritme.app.mjs (1 hunks)
  • components/taskade/taskade.app.mjs (1 hunks)
  • components/txt_werk/txt_werk.app.mjs (1 hunks)
Files skipped from review due to trivial changes (29)
  • components/_21risk/_21risk.app.mjs
  • components/_2chat/_2chat.app.mjs
  • components/adobe_photoshop/adobe_photoshop.app.mjs
  • components/airship/airship.app.mjs
  • components/ayrshare/ayrshare.app.mjs
  • components/d2l_brightspace/d2l_brightspace.app.mjs
  • components/database/database.app.mjs
  • components/dropboard/dropboard.app.mjs
  • components/eyepop_ai/eyepop_ai.app.mjs
  • components/fatture_in_cloud/fatture_in_cloud.app.mjs
  • components/fillout/fillout.app.mjs
  • components/gloria_ai/gloria_ai.app.mjs
  • components/google_address_validation/google_address_validation.app.mjs
  • components/google_play/google_play.app.mjs
  • components/heyzine/heyzine.app.mjs
  • components/invision_community/invision_community.app.mjs
  • components/kommo/kommo.app.mjs
  • components/meteomatics_weather_api/meteomatics_weather_api.app.mjs
  • components/minio/minio.app.mjs
  • components/modelry/modelry.app.mjs
  • components/noor/noor.app.mjs
  • components/otter_waiver/otter_waiver.app.mjs
  • components/power_automate/power_automate.app.mjs
  • components/railsr/railsr.app.mjs
  • components/signerx/signerx.app.mjs
  • components/simplybook_me/simplybook_me.app.mjs
  • components/spiritme/spiritme.app.mjs
  • components/taskade/taskade.app.mjs
  • components/txt_werk/txt_werk.app.mjs
@michelle0927
Copy link
Collaborator Author

/approve

@michelle0927 michelle0927 merged commit 1fd91e7 into master Jun 28, 2024
11 checks passed
@michelle0927 michelle0927 deleted the issue-12412 branch June 28, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants