MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
954 stars 280 forks source link

deprecated API and custom app warning #632

Open GhaithxSW opened 1 year ago

GhaithxSW commented 1 year ago

I have Shopify custom app warning for a while saying the app may stop working due to using deprecated API versions:

Some of your custom apps and/or admin webbook subscriptions may not work as expected because they are using deprecated API versions. Contact your developer to ensure your store doesn’t experience disruptions. If you can’t contact the original developer, you can hire a Shopify expert. This message is based on data from the last 14 days and may not reflect recently fixed apps and webhooks.

I checked the deprecated API list by calling deprecatedApiCall.list() and the response:

`[
    {
        "api_type": "REST",
        "description": " The relationship between a ProductVariant and a FulfillmentService was changed in the 2022-07 API version.  A ProductVariant can be stocked by multiple fulfillment services. As a result, we recommend that you no longer use the following fields: - ProductVariant.fulfillment_service (GraphQL) (REST) - LineItem.fulfillment_service (GraphQL) (REST)  Instead, you should use inventory items and inventory levels if you need to find, or manage, where a product is stocked.  If you need to determine whether a product is a gift card, you should continue to use the ProductVariant.fulfillment_service field until an alternative is available.  Learn more about managing inventory quantities and states.  ",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource",
        "endpoint": "Order",
        "last_call_at": "2023-08-15T14:49:03.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-07"
    },
    {
        "api_type": "REST",
        "description": "The delivery_category field has been removed from the ShippingLine REST Admin API.",
        "documentation_url": "https://shopify.dev/changelog/removal-of-the-delivery_category-field-on-order-shipping-lines",
        "endpoint": "Order",
        "last_call_at": "2023-09-12T05:00:24.000000Z",
        "migration_deadline": "2024-04-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2023-07"
    },
    {
        "api_type": "REST",
        "description": "Some customer fields have been deprecated from the Admin REST API's Order resource.",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-rest-admin-api-order-resource",
        "endpoint": "Order",
        "last_call_at": "2023-08-15T14:49:03.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-07"
    },
    {
        "api_type": "REST",
        "description": "The gateway, payment_details, and processing_method fields on the Order resource have been removed.\n\n\nThe `orders/transactions.json` REST endpoint, and the `transactions` GraphQL connection provide correct information per transaction set.\n",
        "documentation_url": "https://shopify.dev/changelog/payment-properties-deprecation-on-the-admin-api-order-resource",
        "endpoint": "Order",
        "last_call_at": "2023-09-12T05:00:24.000000Z",
        "migration_deadline": "2024-01-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2023-04"
    },
    {
        "api_type": "REST",
        "description": "The `total_price_usd` field on `Order` has been deprecated from the Admin REST API's Order resource.",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource",
        "endpoint": "Order",
        "last_call_at": "2023-09-12T05:00:24.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-10"
    },
    {
        "api_type": "REST",
        "description": "The `origin_location` and `destination_location` fields on line items have been deprecated from Admin REST API's Order resource.",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource",
        "endpoint": "Order",
        "last_call_at": "2023-09-12T05:00:24.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-10"
    }
]` 

I noticed that they're exist in shopify-api-node\types\index.d.ts How can I fix this? should I do something or it should be updated by you?

Appreciate your work and time, Best regards.

AlexandreSantos76 commented 1 year ago

Your private app in the Shopify store has an old API version that will no longer be supported in October, you must go to your store and change the version of your custom app to newer API versions.

https://shopify.dev/docs/api/usage/versioning

GhaithxSW commented 1 year ago

@AlexandreSantos76 Thanks for replying, Do you mean the Webhook subscription version here: Screenshot 2023-09-20 140422 , or I should add the apiVersion option in my Shopify instance?

AlexandreSantos76 commented 1 year ago

@GhaithxSW yes select latest in Event version

GhaithxSW commented 1 year ago

@AlexandreSantos76 Got it, I think I have to wait about 14 days to see the effects and the warning should disappear right? Just to confirm I have to change nothing in my code right?

GhaithxSW commented 1 year ago

I still get the deprecated API warning after upgrading the version..

[
    {
        "api_type": "REST",
        "description": "The gateway, payment_details, and processing_method fields on the Order resource have been removed.\n\n\nThe `orders/transactions.json` REST endpoint, and the `transactions` GraphQL connection provide correct information per transaction set.\n",
        "documentation_url": "https://shopify.dev/changelog/payment-properties-deprecation-on-the-admin-api-order-resource",
        "endpoint": "Order",
        "last_call_at": "2023-10-01T09:19:47.000000Z",
        "migration_deadline": "2024-01-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2023-04"
    },
    {
        "api_type": "REST",
        "description": "The delivery_category field has been removed from the ShippingLine REST Admin API.",
        "documentation_url": "https://shopify.dev/changelog/removal-of-the-delivery_category-field-on-order-shipping-lines",
        "endpoint": "Order",
        "last_call_at": "2023-10-01T09:19:47.000000Z",
        "migration_deadline": "2024-04-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2023-07"
    },
    {
        "api_type": "REST",
        "description": "The `origin_location` and `destination_location` fields on line items have been deprecated from Admin REST API's Order resource.",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource",
        "endpoint": "Order",
        "last_call_at": "2023-10-01T09:19:47.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-10"
    },
    {
        "api_type": "REST",
        "description": "The `total_price_usd` field on `Order` has been deprecated from the Admin REST API's Order resource.",
        "documentation_url": "https://shopify.dev/changelog/property-deprecations-in-the-admin-api-order-and-lineitem-resource",
        "endpoint": "Order",
        "last_call_at": "2023-10-01T09:19:47.000000Z",
        "migration_deadline": "2023-07-01T15:00:00.000000Z",
        "graphql_schema_name": null,
        "version": "2022-10"
    }
]
Ryvix commented 10 months ago

Hello,

I believe Shopify-api-node has to be updated to accommodate these changes. I don't think the Event version the app uses is the issue.

I got an email on the 31st that says:

One or more of your apps have made deprecated API calls in the last 14 days. Support for this version will be removed on January 2, 2024. Please update the apps listed below to API version 2023-04 or later to ensure they continue to function correctly.

The delivery_category field has been removed from the ShippingLine REST Admin API View change

The gateway, payment_details, and processing_method fields on the Order resource have been removed. The orders/transactions.json REST endpoint, and the transactions GraphQL connection provide correct information per transaction set. View change

Thank you!

klu2 commented 8 months ago

Hi,

first thanks for the great work on that library, awesome!

Is there any update on this specific issue? We just received a similar message, that the fields gateway, payment_details and processing_method have been removed in the Resource Order (orders/transaction.json) and the Field delivery_category from the ShippingLine.

Support for this version will be dropped by April 1, 2024 as of Shopify.