feat(Shopify Node): Update Shopify API version (#10155)

This commit is contained in:
Jon 2024-07-29 10:05:16 +01:00 committed by GitHub
parent 40a5226e24
commit e2ee91569a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 5 deletions

View file

@ -4,7 +4,6 @@ import type {
ICredentialType, ICredentialType,
INodeProperties, INodeProperties,
} from 'n8n-workflow'; } from 'n8n-workflow';
export class ShopifyAccessTokenApi implements ICredentialType { export class ShopifyAccessTokenApi implements ICredentialType {
name = 'shopifyAccessTokenApi'; name = 'shopifyAccessTokenApi';
@ -51,7 +50,7 @@ export class ShopifyAccessTokenApi implements ICredentialType {
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {
baseURL: '=https://{{$credentials?.shopSubdomain}}.myshopify.com/admin/api/2019-10', baseURL: '=https://{{$credentials?.shopSubdomain}}.myshopify.com/admin/api/2024-07',
url: '/products.json', url: '/products.json',
}, },
}; };

View file

@ -6,7 +6,6 @@ import type {
IHttpRequestOptions, IHttpRequestOptions,
INodeProperties, INodeProperties,
} from 'n8n-workflow'; } from 'n8n-workflow';
export class ShopifyApi implements ICredentialType { export class ShopifyApi implements ICredentialType {
name = 'shopifyApi'; name = 'shopifyApi';
@ -63,7 +62,7 @@ export class ShopifyApi implements ICredentialType {
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {
baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2019-10', baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2024-07',
url: '/products.json', url: '/products.json',
}, },
}; };

View file

@ -38,7 +38,7 @@ export async function shopifyApiRequest(
const options: IRequestOptions = { const options: IRequestOptions = {
method, method,
qs: query, qs: query,
uri: uri || `https://${credentials.shopSubdomain}.myshopify.com/admin/api/2019-10${resource}`, uri: uri || `https://${credentials.shopSubdomain}.myshopify.com/admin/api/2024-07/${resource}`,
body, body,
json: true, json: true,
}; };

View file

@ -63,6 +63,13 @@ export class Shopify implements INodeType {
}, },
], ],
properties: [ properties: [
{
displayName: 'Shopify API Version: 2024-07',
type: 'notice',
name: 'apiVersion',
default: '',
isNodeSetting: true,
},
{ {
displayName: 'Authentication', displayName: 'Authentication',
name: 'authentication', name: 'authentication',