Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-shopify

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-shopify - npm Package Compare versions

Comparing version 5.4.0 to 5.5.0

3

lib/index.d.ts

@@ -8,3 +8,3 @@ import { ReturningResultAsync } from 'node-result';

import { CreateCheckout, UpdateCheckout, CheckoutToken, Checkout, CheckoutShippingRates } from './types/checkout';
import { ProductId, Product, CreateProduct, UpdateProduct, ProductListing, ProductVariantId, CreateProductVariant, ProductVariant } from './types/product';
import { ProductId, Product, CreateProduct, UpdateProduct, ProductListing, ProductVariantId, CreateProductVariant, ProductVariant, CreateProductImage } from './types/product';
export declare class Shopify {

@@ -56,2 +56,3 @@ private readonly instance;

deleteProductVariant(productId: ProductId, productVariantId: ProductVariantId): ReturningResultAsync<null, Error>;
createProductImage(productId: ProductId, productImageCreate: CreateProductImage): ReturningResultAsync<Product, Error>;
}

@@ -353,2 +353,13 @@ "use strict";

}
async createProductImage(productId, productImageCreate) {
const url = `/admin/api/2021-01/products/${productId}/images.json`;
const payload = {
image: productImageCreate
};
const { data } = (await this.instance.post(url, payload)).unwrap();
if (!data) {
return node_result_1.ResultFail(new Error('Response without data.'));
}
return node_result_1.ResultOk(data.product);
}
}

@@ -355,0 +366,0 @@ __decorate([

@@ -60,1 +60,8 @@ export declare type ProductId = number;

};
export declare type CreateProductImage = {
image: {
attachment?: string;
filename?: string;
src?: string;
};
};
{
"name": "node-shopify",
"version": "5.4.0",
"version": "5.5.0",
"description": "module for creating Shopify API calls",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc