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

@shopify/app-bridge

Package Overview
Dependencies
Maintainers
25
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/app-bridge - npm Package Compare versions

Comparing version 3.7.10 to 3.7.11-snapshot-20240220213625

4

actions/Cart/index.d.ts

@@ -1,4 +0,4 @@

import { Action, Data, Payload, Options, AddCustomerAddressPayload, AddLineItemPayload, SetCustomerPayload, UpdateCustomerAddressPayload, SetDiscountPayload, SetPropertiesPayload, RemovePropertiesPayload, UpdateLineItemData, UpdateLineItemPayload, RemoveLineItemPayload, SetLineItemDiscountPayload, RemoveLineItemDiscountPayload, SetLineItemPropertiesPayload, RemoveLineItemPropertiesPayload, Cart, Customer, CustomerWithAddresses, Address, DiscountAmount, DiscountCode, Discount, LineItem, NoteAttributes, Properties, fetch, update, setCustomer, addCustomerAddress, updateCustomerAddress, setDiscount, setProperties, removeProperties, addLineItem, updateLineItem, removeLineItem, setLineItemDiscount, removeLineItemDiscount, setLineItemProperties } from '@shopify/app-bridge-core/actions/Cart';
import { Action, Data, Payload, Options, AddCustomerAddressPayload, AddLineItemPayload, SetCustomerPayload, UpdateCustomerAddressPayload, SetDiscountPayload, SetCodeDiscountPayload, SetPropertiesPayload, RemovePropertiesPayload, UpdateLineItemData, UpdateLineItemPayload, RemoveLineItemPayload, SetLineItemDiscountPayload, RemoveLineItemDiscountPayload, SetLineItemPropertiesPayload, RemoveLineItemPropertiesPayload, Cart, Customer, CustomerWithAddresses, Address, DiscountAmount, DiscountCode, Discount, LineItem, NoteAttributes, Properties, fetch, update, setCustomer, addCustomerAddress, updateCustomerAddress, setDiscount, setCodeDiscount, setProperties, removeProperties, addLineItem, updateLineItem, removeLineItem, setLineItemDiscount, removeLineItemDiscount, setLineItemProperties } from '@shopify/app-bridge-core/actions/Cart';
import { ClientApplication } from '../../client';
export { Action, Data, Payload, Options, AddCustomerAddressPayload, AddLineItemPayload, SetCustomerPayload, UpdateCustomerAddressPayload, SetDiscountPayload, SetPropertiesPayload, RemovePropertiesPayload, UpdateLineItemData, UpdateLineItemPayload, RemoveLineItemPayload, SetLineItemDiscountPayload, RemoveLineItemDiscountPayload, SetLineItemPropertiesPayload, RemoveLineItemPropertiesPayload, Cart, Customer, CustomerWithAddresses, Address, DiscountAmount, DiscountCode, Discount, LineItem, NoteAttributes, Properties, fetch, update, setCustomer, addCustomerAddress, updateCustomerAddress, setDiscount, setProperties, removeProperties, addLineItem, updateLineItem, removeLineItem, setLineItemDiscount, removeLineItemDiscount, setLineItemProperties, };
export { Action, Data, Payload, Options, AddCustomerAddressPayload, AddLineItemPayload, SetCustomerPayload, UpdateCustomerAddressPayload, SetDiscountPayload, SetCodeDiscountPayload, SetPropertiesPayload, RemovePropertiesPayload, UpdateLineItemData, UpdateLineItemPayload, RemoveLineItemPayload, SetLineItemDiscountPayload, RemoveLineItemDiscountPayload, SetLineItemPropertiesPayload, RemoveLineItemPropertiesPayload, Cart, Customer, CustomerWithAddresses, Address, DiscountAmount, DiscountCode, Discount, LineItem, NoteAttributes, Properties, fetch, update, setCustomer, addCustomerAddress, updateCustomerAddress, setDiscount, setCodeDiscount, setProperties, removeProperties, addLineItem, updateLineItem, removeLineItem, setLineItemDiscount, removeLineItemDiscount, setLineItemProperties, };
export declare function create(app: ClientApplication, options?: Options): Cart;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = exports.setLineItemProperties = exports.removeLineItemDiscount = exports.setLineItemDiscount = exports.removeLineItem = exports.updateLineItem = exports.addLineItem = exports.removeProperties = exports.setProperties = exports.setDiscount = exports.updateCustomerAddress = exports.addCustomerAddress = exports.setCustomer = exports.update = exports.fetch = exports.Cart = exports.Action = void 0;
exports.create = exports.setLineItemProperties = exports.removeLineItemDiscount = exports.setLineItemDiscount = exports.removeLineItem = exports.updateLineItem = exports.addLineItem = exports.removeProperties = exports.setProperties = exports.setCodeDiscount = exports.setDiscount = exports.updateCustomerAddress = exports.addCustomerAddress = exports.setCustomer = exports.update = exports.fetch = exports.Cart = exports.Action = void 0;
var Cart_1 = require("@shopify/app-bridge-core/actions/Cart");

@@ -13,2 +13,3 @@ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return Cart_1.Action; } });

Object.defineProperty(exports, "setDiscount", { enumerable: true, get: function () { return Cart_1.setDiscount; } });
Object.defineProperty(exports, "setCodeDiscount", { enumerable: true, get: function () { return Cart_1.setCodeDiscount; } });
Object.defineProperty(exports, "setProperties", { enumerable: true, get: function () { return Cart_1.setProperties; } });

@@ -15,0 +16,0 @@ Object.defineProperty(exports, "removeProperties", { enumerable: true, get: function () { return Cart_1.removeProperties; } });

{
"name": "@shopify/app-bridge",
"version": "3.7.10",
"version": "3.7.11-snapshot-20240220213625",
"types": "index.d.ts",

@@ -54,3 +54,3 @@ "main": "index.js",

"dependencies": {
"@shopify/app-bridge-core": "1.1.1",
"@shopify/app-bridge-core": "1.2.0-snapshot-20240220213625",
"base64url": "^3.0.1",

@@ -57,0 +57,0 @@ "web-vitals": "^3.0.1"

@@ -61,2 +61,3 @@ "use strict";

cartDiscount: type_validate_1.makeOptional(discountSchema),
cartDiscounts: type_validate_1.makeOptional(type_validate_1.matchesArray(discountSchema)),
customer: type_validate_1.makeOptional(customerSchema),

@@ -89,8 +90,2 @@ grandTotal: type_validate_1.makeOptional(type_validate_1.matchesString()),

}
function getDiscountSchema(data) {
if (data.amount) {
return discountAmount;
}
return discountCode;
}
function validateAction(action) {

@@ -107,3 +102,5 @@ switch (action.type) {

case Cart_1.Action.SET_DISCOUNT:
return type_validate_1.validate(action, createDataValidator(getDiscountSchema(action.payload.data)));
return type_validate_1.validate(action, createDataValidator(discountAmount));
case Cart_1.Action.SET_CODE_DISCOUNT:
return type_validate_1.validate(action, createDataValidator(discountCode));
case Cart_1.Action.SET_PROPERTIES:

@@ -110,0 +107,0 @@ return type_validate_1.validate(action, createDataValidator(propertiesSchema));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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