New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@figuredev/orders-sdk

Package Overview
Dependencies
Maintainers
3
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@figuredev/orders-sdk - npm Package Compare versions

Comparing version 0.8.2 to 0.9.0

README.md

140

dto.ts

@@ -1,20 +0,19 @@

export type OrderInputDTO = {
id: string
store?: OrderStoreInputDTO
customer?: OrderCustomerInputDTO
price?: OrderPriceInputDTO
state?: OrderStateInputDTO
orderNumber: string
export type OrderDTO = {
id?: string
price?: OrderPriceDTO
state?: OrderStateDTO
orderNumber?: string
acceptLink?: string
declineLink?: string
note?: string
placedAt: string
scheduledFor?: string
items: OrderItemInputDTO[]
deliveryMethod: OrderDeliveryMethodInputDTO
paymentMethod: OrderPaymentInputDTO
placedAt?: string
source?: string
items?: OrderItemDTO
fulfillments?: OrderFulfillmentDTO
payments?: OrderPaymentDTO
pricings?: OrderPricingDTO
}
export type OrderItemInputDTO = {
id: string
export type OrderItemDTO = {
id?: string
name?: string

@@ -25,14 +24,15 @@ price?: number

note?: string
modifiersGroups?: OrderItemModifierGroupInputDTO[]
taxes?: OrderItemTaxInputDTO[]
modifiersGroups?: OrderItemModifierGroupDTO
taxes?: OrderItemTaxDTO
pricings?: OrderItemPricingDTO
}
export type OrderItemModifierGroupInputDTO = {
export type OrderItemModifierGroupDTO = {
id?: string
name?: string
price?: number
modifiers?: OrderItemModifierInputDTO[]
modifiers?: OrderItemModifierDTO
}
export type OrderItemModifierInputDTO = {
export type OrderItemModifierDTO = {
id?: string

@@ -45,3 +45,3 @@ productId?: string

export type OrderItemTaxInputDTO = {
export type OrderItemTaxDTO = {
id?: string

@@ -55,3 +55,25 @@ taxId?: string

export type OrderPriceInputDTO = {
export type OrderItemPricingDTO = {
id?: string
pricingId?: string
name?: string
percentage?: number
absolute?: number
}
export type OrderPricingDTO = {
id?: string
pricingId?: string
type?: OrderPricingType
name?: string
percentage?: number
absolute?: number
}
export enum OrderPricingType {
Normal = "normal",
Delivery = "delivery",
}
export type OrderPriceDTO = {
base?: number

@@ -62,32 +84,70 @@ subtotal?: number

export type OrderCustomerInputDTO = {
firstName?: string
surname?: string
emailAddress?: string
phoneNumber?: string
export type OrderPaymentDTO = {
id?: string
type?: OrderPaymentType
state?: OrderPaymentState
transactionNumber?: string
amount?: number
tip?: number
}
export type OrderStoreInputDTO = {
id?: string
name?: string
export enum OrderPaymentType {
Card = "card",
Cash = "cash",
External = "external",
}
export type OrderDeliveryMethodInputDTO = {
type: "delivery" | "pick-up" | "for-here"
address?: AddressDTO
export enum OrderPaymentState {
Pending = "pending",
processed = "processed",
}
export type OrderStateDTO = {
type?: OrderStateType
}
export enum OrderStateType {
Placed = "placed",
Accepted = "accepted",
Declined = "declined",
Closed = "closed",
}
export type OrderFulfillmentDTO = {
id?: string
type?: OrderFulfillmentType
recipient?: OrderFulfillmentRecipientDTO
note?: string
fee?: number
scheduleType?: OrderFulfillmentScheduleType
scheduledFor?: string
deliveryService?: string
attributes?: OrderFulfillmentAttributesDTO
}
export type OrderPaymentInputDTO = {
type: "card" | "cash"
tip?: number
amount?: number
status?: "paid" | "pending"
export enum OrderFulfillmentType {
Delivery = "placed",
PickUp = "pick-up",
ForHere = "for-here",
}
export type OrderStateInputDTO = {
type?: "Placed" | "Accepted" | "Declined" | "Closed"
export enum OrderFulfillmentScheduleType {
Scheduled = "scheduled",
ASAP = "asap",
}
export type OrderFulfillmentAttributesDTO = {
isEcoFriendly?: boolean
contactFreeDelivery?: boolean
curbsidePickup?: boolean
}
export type OrderFulfillmentRecipientDTO = {
customerId?: string
firstName?: string
surname?: string
emailAddress?: string
phoneNumber?: string
address?: AddressDTO
}
export type AddressDTO = {

@@ -94,0 +154,0 @@ line1?: string

import axios from "axios"
import { OrderInputDTO } from "./dto"
import { UserContext } from "./utils"
import { OrderDTO } from "./dto"

@@ -13,3 +13,3 @@ type OrdersClientConfig = {

async placeOrder(order: OrderInputDTO, ctx: UserContext) {
async placeOrder(order: OrderDTO, ctx: UserContext) {
return await axios.request({

@@ -25,5 +25,7 @@ baseURL: this.config.baseUrl,

},
data: { order: order },
data: {
order: order,
},
})
}
}
{
"name": "@figuredev/orders-sdk",
"version": "0.8.2",
"version": "0.9.0",
"license": "ISC",

@@ -5,0 +5,0 @@ "dependencies": {

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