@gradientedge/commercetools-utils 4.16.0 → 4.17.2
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/dist/ge-commercetools-utils-browser.cjs.js +1 -1
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-node.esm.js +1 -1
- package/dist/typings/api/CommercetoolsApi.d.ts +11 -4
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
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, Store, StoreDraft, StorePagedQueryResponse, StoreUpdate, Type } from '../models';
|
|
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>> {
|
|
7
7
|
path: string;
|
|
8
8
|
headers?: Record<string, string>;
|
|
@@ -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,
|
|
18
|
+
params?: Record<string, undefined | string | boolean | number | (string | boolean | number)[]>;
|
|
19
19
|
retry?: CommercetoolsRetryConfig;
|
|
20
20
|
}
|
|
21
21
|
export interface CommonStoreEnabledRequestOptions extends CommonRequestOptions {
|
|
@@ -167,7 +167,7 @@ export declare class CommercetoolsApi {
|
|
|
167
167
|
version: number;
|
|
168
168
|
}): Promise<Cart>;
|
|
169
169
|
createPayment(options: CommonRequestOptions & {
|
|
170
|
-
data:
|
|
170
|
+
data: PaymentDraft;
|
|
171
171
|
}): Promise<Payment>;
|
|
172
172
|
deletePaymentById(options: CommonRequestOptions & {
|
|
173
173
|
id: string;
|
|
@@ -425,6 +425,13 @@ export declare class CommercetoolsApi {
|
|
|
425
425
|
key: string;
|
|
426
426
|
version: number;
|
|
427
427
|
}): Promise<CustomerGroup>;
|
|
428
|
+
getStateById(options: CommonRequestOptions & {
|
|
429
|
+
id: string;
|
|
430
|
+
}): Promise<State>;
|
|
431
|
+
getStateByKey(options: CommonRequestOptions & {
|
|
432
|
+
key: string;
|
|
433
|
+
}): Promise<State>;
|
|
434
|
+
queryStates(options?: CommonRequestOptions): Promise<StatePagedQueryResponse>;
|
|
428
435
|
graphql(options: CommonRequestOptions & {
|
|
429
436
|
accessToken?: string;
|
|
430
437
|
data: GraphQLRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/commercetools-utils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.2",
|
|
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",
|