@commercelayer/sdk 2.3.12 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -1
- package/lib/cjs/client.d.ts +1 -1
- package/lib/cjs/commercelayer.d.ts +1 -0
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/jsonapi.d.ts +0 -2
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +2 -2
- package/lib/cjs/query.js +1 -1
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/addresses.d.ts +0 -4
- package/lib/cjs/resources/adjustments.d.ts +0 -4
- package/lib/cjs/resources/adyen_gateways.d.ts +0 -4
- package/lib/cjs/resources/adyen_payments.d.ts +0 -5
- package/lib/cjs/resources/application.d.ts +0 -4
- package/lib/cjs/resources/attachments.d.ts +0 -4
- package/lib/cjs/resources/authorizations.d.ts +0 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +0 -4
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +0 -4
- package/lib/cjs/resources/bing_geocoders.d.ts +0 -4
- package/lib/cjs/resources/braintree_gateways.d.ts +0 -4
- package/lib/cjs/resources/braintree_payments.d.ts +0 -4
- package/lib/cjs/resources/bundles.d.ts +0 -4
- package/lib/cjs/resources/captures.d.ts +0 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +0 -4
- package/lib/cjs/resources/checkout_com_gateways.d.ts +0 -4
- package/lib/cjs/resources/checkout_com_payments.d.ts +0 -5
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +0 -4
- package/lib/cjs/resources/coupon_recipients.d.ts +0 -4
- package/lib/cjs/resources/coupons.d.ts +3 -4
- package/lib/cjs/resources/customer_addresses.d.ts +0 -4
- package/lib/cjs/resources/customer_groups.d.ts +0 -4
- package/lib/cjs/resources/customer_password_resets.d.ts +0 -4
- package/lib/cjs/resources/customer_payment_sources.d.ts +0 -4
- package/lib/cjs/resources/customer_subscriptions.d.ts +0 -4
- package/lib/cjs/resources/customers.d.ts +0 -4
- package/lib/cjs/resources/delivery_lead_times.d.ts +0 -4
- package/lib/cjs/resources/event_callbacks.d.ts +0 -4
- package/lib/cjs/resources/external_gateways.d.ts +0 -4
- package/lib/cjs/resources/external_payments.d.ts +0 -4
- package/lib/cjs/resources/external_promotions.d.ts +0 -4
- package/lib/cjs/resources/external_tax_calculators.d.ts +0 -4
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -4
- package/lib/cjs/resources/fixed_price_promotions.d.ts +0 -4
- package/lib/cjs/resources/free_gift_promotions.d.ts +0 -4
- package/lib/cjs/resources/free_shipping_promotions.d.ts +0 -4
- package/lib/cjs/resources/geocoders.d.ts +2 -5
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +0 -4
- package/lib/cjs/resources/gift_cards.d.ts +0 -4
- package/lib/cjs/resources/google_geocoders.d.ts +0 -4
- package/lib/cjs/resources/imports.d.ts +0 -4
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +0 -4
- package/lib/cjs/resources/inventory_models.d.ts +0 -4
- package/lib/cjs/resources/inventory_return_locations.d.ts +0 -4
- package/lib/cjs/resources/inventory_stock_locations.d.ts +0 -4
- package/lib/cjs/resources/line_item_options.d.ts +0 -4
- package/lib/cjs/resources/line_items.d.ts +0 -4
- package/lib/cjs/resources/manual_gateways.d.ts +0 -4
- package/lib/cjs/resources/manual_tax_calculators.d.ts +0 -4
- package/lib/cjs/resources/markets.d.ts +0 -4
- package/lib/cjs/resources/merchants.d.ts +0 -4
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +0 -4
- package/lib/cjs/resources/order_copies.d.ts +0 -4
- package/lib/cjs/resources/order_subscriptions.d.ts +0 -4
- package/lib/cjs/resources/order_validation_rules.d.ts +2 -5
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +0 -4
- package/lib/cjs/resources/organization.d.ts +0 -4
- package/lib/cjs/resources/packages.d.ts +0 -4
- package/lib/cjs/resources/parcel_line_items.d.ts +0 -4
- package/lib/cjs/resources/parcels.d.ts +0 -4
- package/lib/cjs/resources/payment_gateways.d.ts +2 -15
- package/lib/cjs/resources/payment_gateways.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +3 -4
- package/lib/cjs/resources/paypal_gateways.d.ts +0 -4
- package/lib/cjs/resources/paypal_payments.d.ts +0 -4
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -4
- package/lib/cjs/resources/price_lists.d.ts +0 -4
- package/lib/cjs/resources/prices.d.ts +0 -4
- package/lib/cjs/resources/promotion_rules.d.ts +2 -5
- package/lib/cjs/resources/promotion_rules.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +2 -5
- package/lib/cjs/resources/promotions.js +1 -1
- package/lib/cjs/resources/refunds.d.ts +0 -4
- package/lib/cjs/resources/return_line_items.d.ts +0 -4
- package/lib/cjs/resources/returns.d.ts +0 -4
- package/lib/cjs/resources/shipments.d.ts +0 -4
- package/lib/cjs/resources/shipping_categories.d.ts +0 -4
- package/lib/cjs/resources/shipping_methods.d.ts +0 -4
- package/lib/cjs/resources/shipping_zones.d.ts +0 -4
- package/lib/cjs/resources/sku_list_items.d.ts +5 -6
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +0 -4
- package/lib/cjs/resources/sku_lists.d.ts +0 -4
- package/lib/cjs/resources/sku_options.d.ts +0 -4
- package/lib/cjs/resources/skus.d.ts +0 -4
- package/lib/cjs/resources/stock_items.d.ts +0 -4
- package/lib/cjs/resources/stock_line_items.d.ts +0 -4
- package/lib/cjs/resources/stock_locations.d.ts +0 -4
- package/lib/cjs/resources/stock_transfers.d.ts +0 -4
- package/lib/cjs/resources/stripe_gateways.d.ts +0 -4
- package/lib/cjs/resources/stripe_payments.d.ts +0 -4
- package/lib/cjs/resources/tax_calculators.d.ts +2 -5
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +0 -4
- package/lib/cjs/resources/tax_rules.d.ts +0 -4
- package/lib/cjs/resources/taxjar_accounts.d.ts +0 -4
- package/lib/cjs/resources/transactions.d.ts +2 -5
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/resources/voids.d.ts +0 -4
- package/lib/cjs/resources/webhooks.d.ts +0 -4
- package/lib/cjs/resources/wire_transfers.d.ts +0 -4
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.d.ts +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +1 -0
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/jsonapi.d.ts +0 -2
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +2 -2
- package/lib/esm/query.js +1 -1
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +0 -4
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.d.ts +0 -4
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +0 -4
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +0 -5
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.d.ts +0 -4
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.d.ts +0 -4
- package/lib/esm/resources/authorizations.d.ts +0 -4
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +0 -4
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +0 -4
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +0 -4
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +0 -4
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +0 -4
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +0 -4
- package/lib/esm/resources/captures.d.ts +0 -4
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +0 -4
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +0 -4
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +0 -5
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +0 -4
- package/lib/esm/resources/coupon_recipients.d.ts +0 -4
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.d.ts +3 -4
- package/lib/esm/resources/customer_addresses.d.ts +0 -4
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.d.ts +0 -4
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +0 -4
- package/lib/esm/resources/customer_payment_sources.d.ts +0 -4
- package/lib/esm/resources/customer_subscriptions.d.ts +0 -4
- package/lib/esm/resources/customers.d.ts +0 -4
- package/lib/esm/resources/delivery_lead_times.d.ts +0 -4
- package/lib/esm/resources/event_callbacks.d.ts +0 -4
- package/lib/esm/resources/external_gateways.d.ts +0 -4
- package/lib/esm/resources/external_gateways.js +1 -1
- package/lib/esm/resources/external_payments.d.ts +0 -4
- package/lib/esm/resources/external_payments.js +1 -1
- package/lib/esm/resources/external_promotions.d.ts +0 -4
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +0 -4
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +0 -4
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +0 -4
- package/lib/esm/resources/free_gift_promotions.d.ts +0 -4
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +0 -4
- package/lib/esm/resources/geocoders.d.ts +2 -5
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +0 -4
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +0 -4
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +0 -4
- package/lib/esm/resources/imports.d.ts +0 -4
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +0 -4
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.d.ts +0 -4
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +0 -4
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +0 -4
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/line_item_options.d.ts +0 -4
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +0 -4
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +0 -4
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +0 -4
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +0 -4
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +0 -4
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +0 -4
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +0 -4
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +0 -4
- package/lib/esm/resources/order_validation_rules.d.ts +2 -5
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +0 -4
- package/lib/esm/resources/organization.d.ts +0 -4
- package/lib/esm/resources/packages.d.ts +0 -4
- package/lib/esm/resources/parcel_line_items.d.ts +0 -4
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +0 -4
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +2 -15
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +3 -4
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.d.ts +0 -4
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +0 -4
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +0 -4
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.d.ts +0 -4
- package/lib/esm/resources/prices.d.ts +0 -4
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.d.ts +2 -5
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.d.ts +2 -5
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +0 -4
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +0 -4
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.d.ts +0 -4
- package/lib/esm/resources/shipments.d.ts +0 -4
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +0 -4
- package/lib/esm/resources/shipping_methods.d.ts +0 -4
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +0 -4
- package/lib/esm/resources/sku_list_items.d.ts +5 -6
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +0 -4
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.d.ts +0 -4
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +0 -4
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +0 -4
- package/lib/esm/resources/stock_items.d.ts +0 -4
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +0 -4
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.d.ts +0 -4
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +0 -4
- package/lib/esm/resources/stripe_gateways.d.ts +0 -4
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +0 -4
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +2 -5
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +0 -4
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +0 -4
- package/lib/esm/resources/taxjar_accounts.d.ts +0 -4
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +2 -5
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.d.ts +0 -4
- package/lib/esm/resources/webhooks.d.ts +0 -4
- package/lib/esm/resources/wire_transfers.d.ts +0 -4
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
@@ -1,9 +1,5 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
2
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
8
4
|
declare type TransactionRel = ResourceId & {
|
9
5
|
type: typeof Transactions.TYPE;
|
@@ -25,6 +21,7 @@ interface Transaction extends Resource {
|
|
25
21
|
declare class Transactions extends ApiResource {
|
26
22
|
static readonly TYPE: 'transactions';
|
27
23
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
24
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
28
25
|
isTransaction(resource: any): resource is Transaction;
|
29
26
|
relationship(id: string | ResourceId): TransactionRel;
|
30
27
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Transactions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Transactions.TYPE,id:e},r,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { EventCallback } from './event_callbacks';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
package/lib/esm/api.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
*
|
3
|
+
* OpenAPI schema, version 2.7.6
|
4
4
|
**/
|
5
5
|
export { default as Addresses } from './resources/addresses';
|
6
6
|
export { default as Adjustments } from './resources/adjustments';
|
package/lib/esm/client.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Method } from 'axios';
|
2
|
-
import { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
2
|
+
import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
3
3
|
import type { InterceptorManager } from './interceptor';
|
4
4
|
declare type RequestConfig = {
|
5
5
|
timeout?: number;
|
package/lib/esm/client.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var h=this&&this.__classPrivateFieldSet||function(t,e,o,
|
1
|
+
var h=this&&this.__classPrivateFieldSet||function(t,e,o,a,i){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?i.call(t,o):i?i.value=o:e.set(t,o),o},c=this&&this.__classPrivateFieldGet||function(t,e,o,a){if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?a:o==="a"?a.call(t):a?a.value:e.get(t)},s,r;import u from"axios";import{SdkError as T,ApiError as y,ErrorType as n}from"./error";import l from"./config";const p=(t,e)=>`https://${t.toLowerCase()}.${e||l.default.domain}/api`,g=t=>{let e=new T({message:t.message,type:n.GENERIC});if(u.isAxiosError(t))if(t.response){const o=new y(e);o.type=n.RESPONSE,o.status=t.response.status,o.code=String(o.status),o.errors=t.response.data.errors,e=o}else t.request?(e.type=n.REQUEST,e.request=t.request):e.type=n.CLIENT;else u.isCancel(t)?e.type=n.CANCEL:e.source=t;throw e};class f{constructor(e){s.set(this,void 0),r.set(this,void 0),this.baseUrl=p(e.organization,e.domain),h(this,s,e.accessToken,"f");const o={timeout:e.timeout||l.client.timeout};h(this,r,u.create(Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+c(this,s,"f")}},o)),"f"),this.interceptors=c(this,r,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new f(e)}config(e){const o=c(this,r,"f").defaults;e.timeout&&(o.timeout=e.timeout),e.organization&&(this.baseUrl=p(e.organization,e.domain)),e.accessToken&&h(this,s,e.accessToken,"f")}async request(e,o,a,i){const m=a?{data:a}:void 0,w=o,v=(i==null?void 0:i.organization)?p(i.organization,i.domain):void 0,E=(i==null?void 0:i.accessToken)?{Authorization:"Bearer "+i.accessToken}:void 0;return c(this,r,"f").request(Object.assign({method:e,baseURL:v,url:w,data:m,headers:E},i)).then(d=>d.data).catch(d=>g(d))}}s=new WeakMap,r=new WeakMap;export default f;
|
@@ -7,6 +7,7 @@ declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
7
7
|
declare type CommerceLayerConfig = SdkConfig & ResourcesConfig;
|
8
8
|
declare class CommerceLayerClient {
|
9
9
|
#private;
|
10
|
+
static get openApiSchemaVersion(): string;
|
10
11
|
addresses: api.Addresses;
|
11
12
|
adjustments: api.Adjustments;
|
12
13
|
adyen_gateways: api.AdyenGateways;
|
package/lib/esm/commercelayer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import w from"./resource";class
|
1
|
+
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import w from"./resource";const u="2.7.6";class p{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new w(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}static get openApiSchemaVersion(){return u}get currentOrganization(){return s(this,h,"f")}config(i){!i||(i.organization&&c(this,h,i.organization,"f"),s(this,t,"f").config(i))}resources(){return f.resources()}isApiError(i){return f.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const m=o=>new p(o);export default m;
|
package/lib/esm/common.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{resourceList as
|
1
|
+
import{resourceList as s}from"./api";const p=e=>e&&e.type&&e.id&&s.includes(e.type),i=e=>e&&typeof e.type!="undefined"&&e.type&&s.includes(e.type);export{p as isResourceId,i as isResourceType};
|
package/lib/esm/error.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var t;(function(s){s.CLIENT="client",s.REQUEST="request",s.RESPONSE="response",s.GENERIC="generic",s.CANCEL="cancel"})(t||(t={}));class e extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||t.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(t).includes(r.type)}}class i extends e{constructor(r){super(Object.assign(Object.assign({},r),{type:t.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return e.isSdkError(r)&&r.name==="ApiError"&&r.type===t.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}export{e as SdkError,i as ApiError,t as ErrorType};
|
package/lib/esm/jsonapi.d.ts
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
import { Value } from 'json-typescript';
|
2
1
|
import { DocWithData, ResourceObject } from 'jsonapi-typescript';
|
3
2
|
import type { ResourceCreate, ResourceUpdate, ResourceId, ResourceType, Resource } from './resource';
|
4
|
-
export type { DocWithData, Value as JSONValue };
|
5
3
|
declare const denormalize: <R extends Resource>(response: DocWithData) => R | R[];
|
6
4
|
declare const normalize: (resource: (ResourceCreate & ResourceType) | (ResourceUpdate & ResourceId)) => ResourceObject;
|
7
5
|
export { denormalize, normalize };
|
package/lib/esm/jsonapi.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{isResourceId as
|
1
|
+
import{isResourceId as o}from"./common";const l=e=>{let s;e.links&&delete e.links;const r=e.data,a=e.included;return Array.isArray(r)?s=r.map(i=>t(i,a)):s=t(r,a),s},d=(e,s=[])=>s.find(r=>e.id===r.id&&e.type===r.type)||e,t=(e,s)=>{const r=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(a=>{const i=e.relationships[a].data;i?Array.isArray(i)?r[a]=i.map(n=>t(d(n,s),s)):r[a]=t(d(i,s),s):i===null&&(r[a]=null)}),r},c=e=>{const s={},r={};for(const i in e){if(["type","id"].includes(i))continue;const n=e[i];n&&(o(n)||Array.isArray(n)&&o(n[0]))?r[i]={data:n}:s[i]=n}const a={type:e.type,attributes:s,relationships:r};return o(e)&&(a.id=e.id),a};export{l as denormalize,c as normalize};
|
package/lib/esm/model.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
*
|
3
|
+
* OpenAPI schema, version 2.7.6
|
4
4
|
**/
|
5
5
|
export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
|
6
6
|
export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
|
@@ -62,7 +62,7 @@ export type { Organization } from './resources/organization';
|
|
62
62
|
export type { Package, PackageCreate, PackageUpdate } from './resources/packages';
|
63
63
|
export type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate } from './resources/parcel_line_items';
|
64
64
|
export type { Parcel, ParcelCreate, ParcelUpdate } from './resources/parcels';
|
65
|
-
export type { PaymentGateway
|
65
|
+
export type { PaymentGateway } from './resources/payment_gateways';
|
66
66
|
export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './resources/payment_methods';
|
67
67
|
export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
|
68
68
|
export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
|
package/lib/esm/query.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const n=e=>e.filters||e.pageNumber||e.pageSize||e.sort,a=e=>{const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&Object.entries(e.fields).forEach(([t,s])=>{i[`fields[${t}]`]=s.join(",")}),n(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([t,s])=>`${s==="desc"?"-":""}${t}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([t,s])=>{i[`filter[q][${t}]`]=String(s)}))),i};export{a as generateQueryStringParams};
|
package/lib/esm/resource.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ApiClientConfig, ApiClientInitConfig } from './client';
|
2
|
-
import { JSONValue } from './jsonapi';
|
3
2
|
import { QueryParamsRetrieve, QueryParamsList } from './query';
|
4
3
|
import { ResourceTypeLock } from './api';
|
5
4
|
import { InterceptorManager } from './interceptor';
|
5
|
+
import { Value as JSONValue } from 'json-typescript';
|
6
6
|
declare type Metadata = {
|
7
7
|
[key: string]: JSONValue;
|
8
8
|
};
|
package/lib/esm/resource.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var f=this&&this.__classPrivateFieldSet||function(
|
1
|
+
var f=this&&this.__classPrivateFieldSet||function(i,e,a,t,s){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?s.call(i,a):s?s.value=a:e.set(i,a),a},o=this&&this.__classPrivateFieldGet||function(i,e,a,t){if(a==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!t:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?t:a==="a"?t.call(i):t?t.value:e.get(i)},n,p;import w from"./client";import{denormalize as l,normalize as h}from"./jsonapi";import{generateQueryStringParams as u}from"./query";import m from"./config";class b extends Array{constructor(e,a){super(...a||[]);this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}}class y{constructor(e){n.set(this,void 0),p.set(this,{}),f(this,n,w.create(e),"f"),this.config(e)}get interceptors(){return o(this,n,"f").interceptors}config(e){!e||o(this,n,"f").config(e)}async singleton(e,a,t){const s=u(a);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const r=await o(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:s}));return l(r)}async retrieve(e,a,t){const s=u(a);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const r=await o(this,n,"f").request("get",`${e.type}/${e.id}`,void 0,Object.assign(Object.assign({},t),{params:s}));return l(r)}async list(e,a,t){var s,r;const c=u(a);(t==null?void 0:t.params)&&Object.assign(c,t==null?void 0:t.params);const d=await o(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:c})),g=l(d),v={pageCount:Number((s=d.meta)===null||s===void 0?void 0:s.page_count),recordCount:Number((r=d.meta)===null||r===void 0?void 0:r.record_count),currentPage:(a==null?void 0:a.pageNumber)||m.default.pageNumber,recordsPerPage:(a==null?void 0:a.pageSize)||m.default.pageSize};return new b(v,g)}async create(e,a,t){const s=u(a);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const r=h(e),c=await o(this,n,"f").request("post",e.type,r,Object.assign(Object.assign({},t),{params:s}));return l(c)}async update(e,a,t){const s=u(a);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const r=h(e),c=await o(this,n,"f").request("patch",`${e.type}/${e.id}`,r,Object.assign(Object.assign({},t),{params:s}));return l(c)}async delete(e,a){await o(this,n,"f").request("delete",`${e.type}/${e.id}`,void 0,a)}}n=new WeakMap,p=new WeakMap;class j{constructor(e){this.resources=e}}export default y;export{j as ApiResource};
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Geocoder } from './geocoders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="addresses";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
declare type AdjustmentRel = ResourceId & {
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isAdjustment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="adjustments";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PaymentMethod } from './payment_methods';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isAdyenGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_gateways";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -28,7 +24,6 @@ interface AdyenPaymentUpdate extends ResourceUpdate {
|
|
28
24
|
payment_request_data?: object;
|
29
25
|
payment_request_details?: object;
|
30
26
|
payment_response?: object;
|
31
|
-
_authorize?: boolean;
|
32
27
|
_details?: boolean;
|
33
28
|
order?: OrderRel;
|
34
29
|
}
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isAdyenPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_payments";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsRetrieve } from '../query';
|
7
3
|
declare type ApplicationRel = ResourceId & {
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async retrieve(e,t){return this.resources.singleton({type:r.TYPE},e,t)}isApplication(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="application";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Bundle } from './bundles';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}isAuthorization(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="authorizations";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { TaxCategory } from './tax_categories';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as a}from"../resource";class
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isAvalaraAccount(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="avalara_accounts";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Market } from './markets';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isBillingInfoValidationRule(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="billing_info_validation_rules";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Address } from './addresses';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isBingGeocoder(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="bing_geocoders";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PaymentMethod } from './payment_methods';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class r extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isBraintreeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="braintree_gateways";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class r extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isBraintreePayment(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="braintree_payments";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Market } from './markets';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class r extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}isCapture(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="captures";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Market } from './markets';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class e extends i{async list(r,t){return this.resources.list({type:e.TYPE},r,t)}async retrieve(r,t,s){return this.resources.retrieve({type:e.TYPE,id:r},t,s)}isCarrierAccount(r){return r.type&&r.type===e.TYPE}relationship(r){return typeof r=="string"?{id:r,type:e.TYPE}:{id:r.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="carrier_accounts";export default e;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PaymentMethod } from './payment_methods';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isCheckoutComGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="checkout_com_gateways";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -33,7 +29,6 @@ interface CheckoutComPaymentUpdate extends ResourceUpdate {
|
|
33
29
|
payment_type?: string;
|
34
30
|
token?: string;
|
35
31
|
session_id?: string;
|
36
|
-
_authorize?: boolean;
|
37
32
|
_details?: boolean;
|
38
33
|
_refresh?: boolean;
|
39
34
|
order?: OrderRel;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class t extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isCheckoutComPayment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="checkout_com_payments";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Customer } from './customers';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isCouponRecipient(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="coupon_recipients";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
@@ -13,6 +9,7 @@ declare type CouponCodesPromotionRuleRel = ResourceId & {
|
|
13
9
|
};
|
14
10
|
interface Coupon extends Resource {
|
15
11
|
code?: string;
|
12
|
+
customer_single_use?: boolean;
|
16
13
|
usage_limit?: number;
|
17
14
|
usage_count?: number;
|
18
15
|
recipient_email?: string;
|
@@ -20,12 +17,14 @@ interface Coupon extends Resource {
|
|
20
17
|
}
|
21
18
|
interface CouponCreate extends ResourceCreate {
|
22
19
|
code: string;
|
20
|
+
customer_single_use?: boolean;
|
23
21
|
usage_limit: number;
|
24
22
|
recipient_email?: string;
|
25
23
|
promotion_rule?: CouponCodesPromotionRuleRel;
|
26
24
|
}
|
27
25
|
interface CouponUpdate extends ResourceUpdate {
|
28
26
|
code?: string;
|
27
|
+
customer_single_use?: boolean;
|
29
28
|
usage_limit?: number;
|
30
29
|
recipient_email?: string;
|
31
30
|
promotion_rule?: CouponCodesPromotionRuleRel;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Customer } from './customers';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class s extends i{async list(e,
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isCustomerAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_addresses";export default s;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Customer } from './customers';
|