@gradientedge/commercetools-utils 4.17.0 → 4.18.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.
@@ -1,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { CommercetoolsApiConfig, CommercetoolsRetryConfig } from './types';
3
- import { CommercetoolsAuth } from '../';
3
+ import { CommercetoolsAuth, PaymentDraft } from '../';
4
4
  import { RegionEndpoints } from '../types';
5
5
  import type { Cart, CartDiscount, CartDiscountPagedQueryResponse, CartDraft, CartPagedQueryResponse, CartUpdateAction, Category, CategoryDraft, CategoryPagedQueryResponse, CategoryUpdate, Channel, ChannelPagedQueryResponse, Customer, CustomerCreatePasswordResetToken, CustomerDraft, CustomerGroup, CustomerGroupDraft, CustomerGroupPagedQueryResponse, CustomerGroupUpdate, CustomerPagedQueryResponse, CustomerResetPassword, CustomerSignin, CustomerSignInResult, CustomerToken, CustomerUpdate, CustomObject, CustomObjectDraft, DiscountCode, GraphQLRequest, GraphQLResponse, MyCartDraft, MyCartUpdateAction, MyCustomerDraft, MyPayment, MyPaymentDraft, MyPaymentPagedQueryResponse, MyPaymentUpdate, Order, OrderImportDraft, OrderPagedQueryResponse, OrderUpdate, Payment, PaymentPagedQueryResponse, PaymentUpdate, Product, ProductDraft, ProductProjection, ProductProjectionPagedQueryResponse, ProductsInStorePagedQueryResponse, ProductSelection, ProductSelectionDraft, ProductSelectionPagedQueryResponse, ProductSelectionUpdateAction, ProductType, ProductUpdate, ShippingMethod, ShippingMethodPagedQueryResponse, State, StatePagedQueryResponse, Store, StoreDraft, StorePagedQueryResponse, StoreUpdate, Type } from '../models';
6
6
  export interface FetchOptions<T = Record<string, any>> {
@@ -15,7 +15,7 @@ export interface FetchOptions<T = Record<string, any>> {
15
15
  }
16
16
  export interface CommonRequestOptions {
17
17
  correlationId?: string;
18
- params?: Record<string, any>;
18
+ params?: Record<string, undefined | string | boolean | number | (string | boolean | number)[]>;
19
19
  retry?: CommercetoolsRetryConfig;
20
20
  }
21
21
  export interface CommonStoreEnabledRequestOptions extends CommonRequestOptions {
@@ -162,12 +162,15 @@ export declare class CommercetoolsApi {
162
162
  createMyOrderFromActiveCart(options: CommonStoreEnabledRequestOptions & {
163
163
  accessToken: string;
164
164
  }): Promise<Order>;
165
+ createOrderFromCart(options: CommonStoreEnabledRequestOptions & {
166
+ id: string;
167
+ }): Promise<Order>;
165
168
  deleteCartById(options: CommonStoreEnabledRequestOptions & {
166
169
  id: string;
167
170
  version: number;
168
171
  }): Promise<Cart>;
169
172
  createPayment(options: CommonRequestOptions & {
170
- data: MyPaymentDraft;
173
+ data: PaymentDraft;
171
174
  }): Promise<Payment>;
172
175
  deletePaymentById(options: CommonRequestOptions & {
173
176
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/commercetools-utils",
3
- "version": "4.17.0",
3
+ "version": "4.18.0",
4
4
  "description": "Provide utility classes and functions for interacting with the commercetools API",
5
5
  "main": "./dist/ge-commercetools-utils-node.cjs.js",
6
6
  "module": "./dist/ge-commercetools-utils-node.esm.js",