Skip to content

Commit

Permalink
feat: update resources to schema v5.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Jun 11, 2024
1 parent a73b3b5 commit 1f84cd8
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 647 deletions.
477 changes: 51 additions & 426 deletions gen/openapi.json

Large diffs are not rendered by default.

141 changes: 0 additions & 141 deletions specs/resources/order_validation_rules.spec.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export { default as OrderCopies } from './resources/order_copies'
export { default as OrderFactories } from './resources/order_factories'
export { default as OrderSubscriptionItems } from './resources/order_subscription_items'
export { default as OrderSubscriptions } from './resources/order_subscriptions'
export { default as OrderValidationRules } from './resources/order_validation_rules'
export { default as Orders } from './resources/orders'
export { default as Organizations } from './resources/organization'
export { default as Packages } from './resources/packages'
Expand Down Expand Up @@ -198,7 +197,6 @@ export type ResourceTypeLock =
| 'order_factories'
| 'order_subscription_items'
| 'order_subscriptions'
| 'order_validation_rules'
| 'orders'
| 'organization'
| 'packages'
Expand Down Expand Up @@ -326,7 +324,6 @@ export const resourceList = [
'order_factories',
'order_subscription_items',
'order_subscriptions',
'order_validation_rules',
'orders',
'organization',
'packages',
Expand Down
4 changes: 1 addition & 3 deletions src/commercelayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Debug from './debug'
const debug = Debug('commercelayer')

// Autogenerated schema version number, do not remove this line
const OPEN_API_SCHEMA_VERSION = '5.4.0'
const OPEN_API_SCHEMA_VERSION = '5.4.1'
export { OPEN_API_SCHEMA_VERSION }


Expand Down Expand Up @@ -96,7 +96,6 @@ class CommerceLayerClient {
order_factories: api.OrderFactories
order_subscription_items: api.OrderSubscriptionItems
order_subscriptions: api.OrderSubscriptions
order_validation_rules: api.OrderValidationRules
orders: api.Orders
organization: api.Organizations
packages: api.Packages
Expand Down Expand Up @@ -231,7 +230,6 @@ class CommerceLayerClient {
this.order_factories = new api.OrderFactories(this.#adapter)
this.order_subscription_items = new api.OrderSubscriptionItems(this.#adapter)
this.order_subscriptions = new api.OrderSubscriptions(this.#adapter)
this.order_validation_rules = new api.OrderValidationRules(this.#adapter)
this.orders = new api.Orders(this.#adapter)
this.organization = new api.Organizations(this.#adapter)
this.packages = new api.Packages(this.#adapter)
Expand Down
1 change: 0 additions & 1 deletion src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export type { OrderCopy, OrderCopyCreate, OrderCopyUpdate } from './resources/or
export type { OrderFactory } from './resources/order_factories'
export type { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate } from './resources/order_subscription_items'
export type { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate } from './resources/order_subscriptions'
export type { OrderValidationRule } from './resources/order_validation_rules'
export type { Order, OrderCreate, OrderUpdate } from './resources/orders'
export type { Organization } from './resources/organization'
export type { Package, PackageCreate, PackageUpdate } from './resources/packages'
Expand Down
3 changes: 3 additions & 0 deletions src/resources/adyen_gateways.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface AdyenGateway extends Resource {
name?: string
live_url_prefix?: string
async_api?: boolean
native_customer_payment_sources?: boolean
webhook_endpoint_secret?: string
webhook_endpoint_url?: string

Expand All @@ -34,6 +35,7 @@ interface AdyenGatewayCreate extends ResourceCreate {
live_url_prefix: string
api_version?: number
async_api?: boolean
native_customer_payment_sources?: boolean
webhook_endpoint_secret?: string

adyen_payments?: AdyenPaymentRel[]
Expand All @@ -50,6 +52,7 @@ interface AdyenGatewayUpdate extends ResourceUpdate {
live_url_prefix?: string
api_version?: number
async_api?: boolean
native_customer_payment_sources?: boolean
webhook_endpoint_secret?: string

adyen_payments?: AdyenPaymentRel[]
Expand Down
8 changes: 5 additions & 3 deletions src/resources/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type { SkuOption } from './sku_options'
import type { Sku } from './skus'
import type { StockItem } from './stock_items'
import type { StockLocation } from './stock_locations'
import type { StockTransfer } from './stock_transfers'
import type { TaxCalculator } from './tax_calculators'
import type { TaxCategory } from './tax_categories'

Expand Down Expand Up @@ -62,6 +63,7 @@ type SkuOptionRel = ResourceRel & { type: 'sku_options' }
type SkuRel = ResourceRel & { type: 'skus' }
type StockItemRel = ResourceRel & { type: 'stock_items' }
type StockLocationRel = ResourceRel & { type: 'stock_locations' }
type StockTransferRel = ResourceRel & { type: 'stock_transfers' }
type TaxCalculatorRel = ResourceRel & { type: 'tax_calculators' }
type TaxCategoryRel = ResourceRel & { type: 'tax_categories' }

Expand All @@ -72,7 +74,7 @@ interface Attachment extends Resource {
description?: string
url?: string

attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory
attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | StockTransfer | TaxCalculator | TaxCategory

}

Expand All @@ -83,7 +85,7 @@ interface AttachmentCreate extends ResourceCreate {
description?: string
url?: string

attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel
attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | StockTransferRel | TaxCalculatorRel | TaxCategoryRel

}

Expand All @@ -94,7 +96,7 @@ interface AttachmentUpdate extends ResourceUpdate {
description?: string
url?: string

attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel
attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | StockTransferRel | TaxCalculatorRel | TaxCategoryRel

}

Expand Down
3 changes: 3 additions & 0 deletions src/resources/customers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface Customer extends Resource {
status?: string
has_password?: boolean
total_orders_count?: number
shopper_reference?: string

customer_group?: CustomerGroup
customer_addresses?: CustomerAddress[]
Expand All @@ -45,6 +46,7 @@ interface CustomerCreate extends ResourceCreate {

email: string
password?: string
shopper_reference?: string

customer_group?: CustomerGroupRel
tags?: TagRel[]
Expand All @@ -56,6 +58,7 @@ interface CustomerUpdate extends ResourceUpdate {

email?: string
password?: string
shopper_reference?: string

customer_group?: CustomerGroupRel
tags?: TagRel[]
Expand Down
70 changes: 0 additions & 70 deletions src/resources/order_validation_rules.ts

This file was deleted.

0 comments on commit 1f84cd8

Please sign in to comment.