@reactionary/commercetools 0.6.9 → 0.7.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/capabilities/cart.capability.js +180 -63
- package/capabilities/employee-invitation.capability.js +1 -1
- package/capabilities/product-list.capability.js +179 -103
- package/core/capability-descriptors.js +3 -2
- package/core/client.js +23 -3
- package/factories/cart/cart.factory.js +60 -10
- package/factories/product-list/product-list.factory.js +68 -33
- package/package.json +2 -2
- package/schema/commercetools.schema.js +14 -3
- package/src/capabilities/cart.capability.d.ts +13 -10
- package/src/capabilities/product-list.capability.d.ts +13 -6
- package/src/core/client.d.ts +3 -0
- package/src/factories/cart/cart.factory.d.ts +8 -8
- package/src/factories/product-list/product-list.factory.d.ts +16 -9
- package/src/schema/commercetools.schema.d.ts +213 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/commercetools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"vitest": "^4.0.9",
|
|
9
9
|
"@nx/vite": "22.4.5",
|
|
10
|
-
"@reactionary/core": "0.
|
|
10
|
+
"@reactionary/core": "0.7.0",
|
|
11
11
|
"zod": "4.1.9",
|
|
12
12
|
"@commercetools/ts-client": "^4.9.1",
|
|
13
13
|
"@commercetools/platform-sdk": "^8.25.0",
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { BaseModelSchema, CartIdentifierSchema, CheckoutIdentifierSchema, OrderIdentifierSchema, EmployeeInvitationSchema } from "@reactionary/core";
|
|
1
|
+
import { BaseModelSchema, CartIdentifierSchema, CheckoutIdentifierSchema, OrderIdentifierSchema, EmployeeInvitationSchema, CompanyIdentifierSchema, MonetaryAmountSchema, ProductListIdentifierSchema, CartItemIdentifierSchema } from "@reactionary/core";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
const CommercetoolsCartIdentifierSchema = CartIdentifierSchema.extend({
|
|
4
|
-
version: z.number().default(0)
|
|
4
|
+
version: z.number().default(0),
|
|
5
|
+
company: CompanyIdentifierSchema.optional()
|
|
6
|
+
});
|
|
7
|
+
const CommercetoolsProductListIdentifierSchema = ProductListIdentifierSchema.extend({
|
|
8
|
+
version: z.number().default(0),
|
|
9
|
+
company: CompanyIdentifierSchema.optional()
|
|
10
|
+
});
|
|
11
|
+
const CommercetoolsCartItemIdentifierSchema = CartItemIdentifierSchema.extend({
|
|
12
|
+
originalPrice: MonetaryAmountSchema.optional().meta({ description: "The original price of the cart item. Used in case backend set the pricemode to external price, and we have to provide this value when updating quantity. This is mostly an optimization." })
|
|
5
13
|
});
|
|
6
14
|
const CommercetoolsOrderIdentifierSchema = OrderIdentifierSchema.extend({
|
|
7
|
-
version: z.number().default(0)
|
|
15
|
+
version: z.number().default(0),
|
|
16
|
+
company: CompanyIdentifierSchema.optional()
|
|
8
17
|
});
|
|
9
18
|
const CommercetoolsCheckoutIdentifierSchema = CheckoutIdentifierSchema.extend({
|
|
10
19
|
version: z.number().default(0)
|
|
@@ -37,11 +46,13 @@ const CommercetoolsEmployeeInviteCustomObjectSchema = z.looseObject({
|
|
|
37
46
|
});
|
|
38
47
|
export {
|
|
39
48
|
CommercetoolsCartIdentifierSchema,
|
|
49
|
+
CommercetoolsCartItemIdentifierSchema,
|
|
40
50
|
CommercetoolsCategoryLookupSchema,
|
|
41
51
|
CommercetoolsCheckoutIdentifierSchema,
|
|
42
52
|
CommercetoolsEmployeeInviteCustomObjectSchema,
|
|
43
53
|
CommercetoolsEmployeeInviteCustomObjectValueSchema,
|
|
44
54
|
CommercetoolsOrderIdentifierSchema,
|
|
55
|
+
CommercetoolsProductListIdentifierSchema,
|
|
45
56
|
CommercetoolsResolveCategoryQueryByIdSchema,
|
|
46
57
|
CommercetoolsResolveCategoryQueryByKeySchema
|
|
47
58
|
};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
import type { MyCartUpdateAction } from '@commercetools/platform-sdk';
|
|
1
|
+
import type { CartDraft, CartUpdateAction, MyCartUpdateAction } from '@commercetools/platform-sdk';
|
|
2
|
+
import type { Cache, CartIdentifier, CartMutationApplyCoupon, CartMutationChangeCurrency, CartMutationCreateCart, CartMutationDeleteCart, CartMutationItemAdd, CartMutationItemQuantityChange, CartMutationItemRemove, CartMutationRemoveCoupon, CartMutationRenameCart, CartPaginatedSearchResult, CartQueryById, CartQueryList, CompanyIdentifier, NotFoundError, RequestContext, Result } from '@reactionary/core';
|
|
3
|
+
import { CartCapability, type CartFactory, type CartFactoryCartOutput, type CartFactoryWithOutput } from '@reactionary/core';
|
|
5
4
|
import type { CommercetoolsAPI } from '../core/client.js';
|
|
6
5
|
import type { CommercetoolsCartFactory } from '../factories/cart/cart.factory.js';
|
|
6
|
+
import type { CommercetoolsConfiguration } from '../schema/configuration.schema.js';
|
|
7
7
|
export declare class CommercetoolsCartCapability<TFactory extends CartFactory = CommercetoolsCartFactory> extends CartCapability<CartFactoryCartOutput<TFactory>, CartIdentifier> {
|
|
8
8
|
protected config: CommercetoolsConfiguration;
|
|
9
9
|
protected commercetools: CommercetoolsAPI;
|
|
10
10
|
protected expandedCartFields: string[];
|
|
11
11
|
protected factory: CartFactoryWithOutput<TFactory>;
|
|
12
12
|
constructor(config: CommercetoolsConfiguration, cache: Cache, context: RequestContext, commercetools: CommercetoolsAPI, factory: CartFactoryWithOutput<TFactory>);
|
|
13
|
+
listCarts(payload: CartQueryList): Promise<Result<CartPaginatedSearchResult>>;
|
|
14
|
+
renameCart(payload: CartMutationRenameCart): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
15
|
+
protected createCartPayload(payload: CartMutationCreateCart): CartDraft;
|
|
16
|
+
createCart(payload: CartMutationCreateCart): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
13
17
|
getById(payload: CartQueryById): Promise<Result<CartFactoryCartOutput<TFactory>, NotFoundError>>;
|
|
14
18
|
add(payload: CartMutationItemAdd): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
15
19
|
remove(payload: CartMutationItemRemove): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
@@ -19,16 +23,15 @@ export declare class CommercetoolsCartCapability<TFactory extends CartFactory =
|
|
|
19
23
|
applyCouponCode(payload: CartMutationApplyCoupon): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
20
24
|
removeCouponCode(payload: CartMutationRemoveCoupon): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
21
25
|
changeCurrency(payload: CartMutationChangeCurrency): Promise<Result<CartFactoryCartOutput<TFactory>>>;
|
|
22
|
-
protected
|
|
23
|
-
protected applyActions(cart: CartIdentifier, actions: MyCartUpdateAction[]): Promise<CartFactoryCartOutput<TFactory>>;
|
|
26
|
+
protected getCompanyForCart(cart: CartIdentifier): Promise<CompanyIdentifier | undefined>;
|
|
27
|
+
protected applyActions(cart: CartIdentifier, actions: (MyCartUpdateAction & CartUpdateAction)[]): Promise<CartFactoryCartOutput<TFactory>>;
|
|
24
28
|
/**
|
|
25
29
|
* Creates a new Commercetools client, optionally upgrading it from Anonymous mode to Guest mode.
|
|
26
30
|
* For now, any Query or Mutation will require an upgrade to Guest mode.
|
|
27
31
|
* In the future, maybe we can delay this upgrade until we actually need it.
|
|
28
32
|
*/
|
|
29
|
-
protected getClient(): Promise<{
|
|
30
|
-
carts: import("@commercetools/platform-sdk").ByProjectKeyMeCartsRequestBuilder;
|
|
31
|
-
|
|
32
|
-
orders: import("@commercetools/platform-sdk").ByProjectKeyMeOrdersRequestBuilder;
|
|
33
|
+
protected getClient(companyIdentifier?: CompanyIdentifier): Promise<{
|
|
34
|
+
carts: import("@commercetools/platform-sdk").ByProjectKeyMeCartsRequestBuilder | import("@commercetools/platform-sdk").ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsRequestBuilder;
|
|
35
|
+
orders: import("@commercetools/platform-sdk").ByProjectKeyMeOrdersRequestBuilder | import("@commercetools/platform-sdk").ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersRequestBuilder;
|
|
33
36
|
}>;
|
|
34
37
|
}
|
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Cache, ProductListFactory, ProductListFactoryItemOutput, ProductListFactoryItemPaginatedOutput, ProductListFactoryListOutput, ProductListFactoryListPaginatedOutput, ProductListFactoryWithOutput,
|
|
1
|
+
import type { ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder, ByProjectKeyMeRequestBuilder, ShoppingListDraft } from '@commercetools/platform-sdk';
|
|
2
|
+
import type { Cache, CompanyIdentifier, ProductListFactory, ProductListFactoryItemOutput, ProductListFactoryItemPaginatedOutput, ProductListFactoryListOutput, ProductListFactoryListPaginatedOutput, ProductListFactoryWithOutput, ProductListIdentifier, ProductListItemMutationCreate, ProductListItemMutationDelete, ProductListItemMutationUpdate, ProductListItemsQuery, ProductListMutationCreate, ProductListMutationDelete, ProductListMutationUpdate, ProductListQuery, ProductListQueryById, RequestContext, Result } from '@reactionary/core';
|
|
3
3
|
import { ProductListCapability } from '@reactionary/core';
|
|
4
4
|
import type { CommercetoolsAPI } from '../core/client.js';
|
|
5
|
-
import type { CommercetoolsConfiguration } from '../schema/configuration.schema.js';
|
|
6
5
|
import type { CommercetoolsProductListFactory } from '../factories/product-list/product-list.factory.js';
|
|
6
|
+
import type { CommercetoolsConfiguration } from '../schema/configuration.schema.js';
|
|
7
7
|
export declare class CommercetoolsProductListCapability<TFactory extends ProductListFactory = CommercetoolsProductListFactory> extends ProductListCapability<ProductListFactoryListOutput<TFactory>, ProductListFactoryItemOutput<TFactory>, ProductListFactoryListPaginatedOutput<TFactory>, ProductListFactoryItemPaginatedOutput<TFactory>> {
|
|
8
8
|
protected config: CommercetoolsConfiguration;
|
|
9
9
|
protected commercetools: CommercetoolsAPI;
|
|
10
10
|
protected factory: ProductListFactoryWithOutput<TFactory>;
|
|
11
11
|
constructor(config: CommercetoolsConfiguration, cache: Cache, context: RequestContext, commercetools: CommercetoolsAPI, factory: ProductListFactoryWithOutput<TFactory>);
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new Commercetools client, optionally upgrading it from Anonymous mode to Guest mode.
|
|
14
|
+
* For now, any Query or Mutation will require an upgrade to Guest mode.
|
|
15
|
+
* In the future, maybe we can delay this upgrade until we actually need it.
|
|
16
|
+
*/
|
|
17
|
+
protected getClient(companyIdentifier?: CompanyIdentifier): Promise<ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder | ByProjectKeyMeRequestBuilder>;
|
|
18
|
+
protected isMine(listIdentifier: ProductListIdentifier): Promise<boolean>;
|
|
19
|
+
protected getCompanyForList(listIdentifier: ProductListIdentifier): Promise<CompanyIdentifier | undefined>;
|
|
13
20
|
getById(payload: ProductListQueryById): Promise<Result<ProductListFactoryListOutput<TFactory>>>;
|
|
14
21
|
queryLists(payload: ProductListQuery): Promise<Result<ProductListFactoryListPaginatedOutput<TFactory>>>;
|
|
22
|
+
protected addListPayload(payload: ProductListMutationCreate): ShoppingListDraft;
|
|
15
23
|
addList(mutation: ProductListMutationCreate): Promise<Result<ProductListFactoryListOutput<TFactory>>>;
|
|
16
24
|
updateList(mutation: ProductListMutationUpdate): Promise<Result<ProductListFactoryListOutput<TFactory>>>;
|
|
17
25
|
deleteList(mutation: ProductListMutationDelete): Promise<Result<void>>;
|
|
18
26
|
queryListItems(query: ProductListItemsQuery): Promise<Result<ProductListFactoryItemPaginatedOutput<TFactory>>>;
|
|
19
27
|
addItem(mutation: ProductListItemMutationCreate): Promise<Result<ProductListFactoryItemOutput<TFactory>>>;
|
|
28
|
+
protected isUnpublished(list: ProductListIdentifier, client: ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder | ByProjectKeyMeRequestBuilder): Promise<boolean>;
|
|
20
29
|
deleteItem(mutation: ProductListItemMutationDelete): Promise<Result<void>>;
|
|
21
30
|
updateItem(mutation: ProductListItemMutationUpdate): Promise<Result<ProductListFactoryItemOutput<TFactory>>>;
|
|
22
31
|
/**
|
|
@@ -24,6 +33,4 @@ export declare class CommercetoolsProductListCapability<TFactory extends Product
|
|
|
24
33
|
* the names of his lists will disappear, since they are not translated. But maybe there are usecases for this, so we should support it, but default to english.
|
|
25
34
|
**/
|
|
26
35
|
protected getLocaleString(): string;
|
|
27
|
-
protected parseSingle(list: ShoppingList): ProductList;
|
|
28
|
-
protected parseProductListItem(listIdentifier: ProductListIdentifier, lineItem: ShoppingListLineItem): ProductListItem;
|
|
29
36
|
}
|
package/src/core/client.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export declare class CommercetoolsAPI {
|
|
|
13
13
|
protected adminClient: Promise<ApiRoot> | undefined;
|
|
14
14
|
constructor(config: CommercetoolsConfiguration, context: RequestContext);
|
|
15
15
|
getClient(): Promise<ApiRoot>;
|
|
16
|
+
getClientForCompany(company: {
|
|
17
|
+
taxIdentifier: string;
|
|
18
|
+
}): Promise<import("@commercetools/platform-sdk").ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder>;
|
|
16
19
|
getAdminClient(): Promise<ApiRoot>;
|
|
17
20
|
getSessionData(): CommercetoolsSession;
|
|
18
21
|
setSessionData(sessionData: Partial<CommercetoolsSession>): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Cart as CTCart, LineItem } from '@commercetools/platform-sdk';
|
|
2
|
-
import type { CartSchema } from '@reactionary/core';
|
|
1
|
+
import type { CartPagedQueryResponse, Cart as CTCart, LineItem } from '@commercetools/platform-sdk';
|
|
2
|
+
import type { AnyCartPaginatedSearchResult, CartPaginatedSearchResultSchema, CartQueryList, CartSchema, CartSearchResultItem } from '@reactionary/core';
|
|
3
3
|
import { type AnyCartIdentifierSchema, type AnyCartSchema, type CartFactory, type CartItem, type RequestContext } from '@reactionary/core';
|
|
4
4
|
import type * as z from 'zod';
|
|
5
5
|
import type { CommercetoolsCartIdentifierSchema } from '../../schema/commercetools.schema.js';
|
|
6
|
-
export declare class CommercetoolsCartFactory<TCartSchema extends AnyCartSchema = typeof CartSchema, TCartIdentifierSchema extends AnyCartIdentifierSchema = typeof CommercetoolsCartIdentifierSchema> implements CartFactory<TCartSchema, TCartIdentifierSchema> {
|
|
6
|
+
export declare class CommercetoolsCartFactory<TCartSchema extends AnyCartSchema = typeof CartSchema, TCartIdentifierSchema extends AnyCartIdentifierSchema = typeof CommercetoolsCartIdentifierSchema, TCartPaginatedSearchResult extends AnyCartPaginatedSearchResult = typeof CartPaginatedSearchResultSchema> implements CartFactory<TCartSchema, TCartIdentifierSchema, TCartPaginatedSearchResult> {
|
|
7
7
|
readonly cartSchema: TCartSchema;
|
|
8
8
|
readonly cartIdentifierSchema: TCartIdentifierSchema;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
readonly cartPaginatedSearchResultSchema: TCartPaginatedSearchResult;
|
|
10
|
+
constructor(cartSchema: TCartSchema, cartIdentifierSchema: TCartIdentifierSchema, cartPaginatedSearchResultSchema: TCartPaginatedSearchResult);
|
|
11
|
+
parseCartPaginatedSearchResult(_context: RequestContext, data: CartPagedQueryResponse, _query: CartQueryList): z.output<TCartPaginatedSearchResult>;
|
|
12
|
+
parseCartIdentifier(_context: RequestContext, data: CTCart): z.output<TCartIdentifierSchema>;
|
|
13
|
+
parseCartSearchResultItem(context: RequestContext, data: CTCart): CartSearchResultItem;
|
|
14
14
|
parseCart(context: RequestContext, data: CTCart): z.output<TCartSchema>;
|
|
15
15
|
protected parseCartItem(lineItem: LineItem): CartItem;
|
|
16
16
|
}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import type { ShoppingList, ShoppingListLineItem } from '@commercetools/platform-sdk';
|
|
2
|
-
import type { ProductListItemPaginatedResultsSchema, ProductListItemSchema, ProductListPaginatedResultsSchema, ProductListSchema } from '@reactionary/core';
|
|
3
|
-
import { type AnyProductListItemPaginatedSchema, type AnyProductListItemSchema, type AnyProductListPaginatedSchema, type AnyProductListSchema, type
|
|
1
|
+
import type { ShoppingList, ShoppingListLineItem, ShoppingListPagedQueryResponse } from '@commercetools/platform-sdk';
|
|
2
|
+
import type { ProductListItemPaginatedResultsSchema, ProductListItemSchema, ProductListItemsQuery, ProductListPaginatedResultsSchema, ProductListQuery, ProductListSchema } from '@reactionary/core';
|
|
3
|
+
import { type AnyProductListItemPaginatedSchema, type AnyProductListItemSchema, type AnyProductListPaginatedSchema, type AnyProductListSchema, type ProductListFactory, type ProductListIdentifier, type RequestContext } from '@reactionary/core';
|
|
4
4
|
import type * as z from 'zod';
|
|
5
|
+
export interface CommercetoolsProductListItemFactoryInput {
|
|
6
|
+
listIdentifier: ProductListIdentifier;
|
|
7
|
+
lineItem: ShoppingListLineItem;
|
|
8
|
+
}
|
|
5
9
|
export declare class CommercetoolsProductListFactory<TProductListSchema extends AnyProductListSchema = typeof ProductListSchema, TProductListItemSchema extends AnyProductListItemSchema = typeof ProductListItemSchema, TProductListPaginatedSchema extends AnyProductListPaginatedSchema = typeof ProductListPaginatedResultsSchema, TProductListItemPaginatedSchema extends AnyProductListItemPaginatedSchema = typeof ProductListItemPaginatedResultsSchema> implements ProductListFactory<TProductListSchema, TProductListItemSchema, TProductListPaginatedSchema, TProductListItemPaginatedSchema> {
|
|
6
10
|
readonly productListSchema: TProductListSchema;
|
|
7
11
|
readonly productListItemSchema: TProductListItemSchema;
|
|
8
12
|
readonly productListPaginatedSchema: TProductListPaginatedSchema;
|
|
9
13
|
readonly productListItemPaginatedSchema: TProductListItemPaginatedSchema;
|
|
10
14
|
constructor(productListSchema: TProductListSchema, productListItemSchema: TProductListItemSchema, productListPaginatedSchema: TProductListPaginatedSchema, productListItemPaginatedSchema: TProductListItemPaginatedSchema);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* This is a customer owned resource, so we just use english as otherwise it will fail if he changes the visual language settings.
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
protected getLocaleString(): string;
|
|
20
|
+
parseProductList(_context: RequestContext, data: ShoppingList): z.output<TProductListSchema>;
|
|
21
|
+
parseProductListItem(_context: RequestContext, data: CommercetoolsProductListItemFactoryInput): z.output<TProductListItemSchema>;
|
|
22
|
+
parseProductListPaginatedResult(context: RequestContext, data: ShoppingListPagedQueryResponse, query: ProductListQuery): z.output<TProductListPaginatedSchema>;
|
|
23
|
+
parseProductListItemPaginatedResult(context: RequestContext, data: ShoppingList, query: ProductListItemsQuery): z.output<TProductListItemPaginatedSchema>;
|
|
17
24
|
}
|
|
@@ -2,10 +2,221 @@ import * as z from "zod";
|
|
|
2
2
|
export declare const CommercetoolsCartIdentifierSchema: z.ZodObject<{
|
|
3
3
|
key: z.ZodString;
|
|
4
4
|
version: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
taxIdentifier: z.ZodString;
|
|
7
|
+
}, z.core.$loose>>;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
export declare const CommercetoolsProductListIdentifierSchema: z.ZodObject<{
|
|
10
|
+
listType: z.ZodEnum<{
|
|
11
|
+
favorite: "favorite";
|
|
12
|
+
wish: "wish";
|
|
13
|
+
requisition: "requisition";
|
|
14
|
+
shopping: "shopping";
|
|
15
|
+
}>;
|
|
16
|
+
key: z.ZodString;
|
|
17
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
userId: z.ZodString;
|
|
19
|
+
}, z.core.$loose>>;
|
|
20
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
taxIdentifier: z.ZodString;
|
|
23
|
+
}, z.core.$loose>>;
|
|
24
|
+
}, z.core.$loose>;
|
|
25
|
+
export declare const CommercetoolsCartItemIdentifierSchema: z.ZodObject<{
|
|
26
|
+
key: z.ZodString;
|
|
27
|
+
originalPrice: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
value: z.ZodNumber;
|
|
29
|
+
currency: z.ZodEnum<{
|
|
30
|
+
AED: "AED";
|
|
31
|
+
AFN: "AFN";
|
|
32
|
+
ALL: "ALL";
|
|
33
|
+
AMD: "AMD";
|
|
34
|
+
ANG: "ANG";
|
|
35
|
+
AOA: "AOA";
|
|
36
|
+
ARS: "ARS";
|
|
37
|
+
AUD: "AUD";
|
|
38
|
+
AWG: "AWG";
|
|
39
|
+
AZN: "AZN";
|
|
40
|
+
BAM: "BAM";
|
|
41
|
+
BBD: "BBD";
|
|
42
|
+
BDT: "BDT";
|
|
43
|
+
BGN: "BGN";
|
|
44
|
+
BHD: "BHD";
|
|
45
|
+
BIF: "BIF";
|
|
46
|
+
BMD: "BMD";
|
|
47
|
+
BND: "BND";
|
|
48
|
+
BOB: "BOB";
|
|
49
|
+
BOV: "BOV";
|
|
50
|
+
BRL: "BRL";
|
|
51
|
+
BSD: "BSD";
|
|
52
|
+
BTN: "BTN";
|
|
53
|
+
BWP: "BWP";
|
|
54
|
+
BYN: "BYN";
|
|
55
|
+
BZD: "BZD";
|
|
56
|
+
CAD: "CAD";
|
|
57
|
+
CDF: "CDF";
|
|
58
|
+
CHE: "CHE";
|
|
59
|
+
CHF: "CHF";
|
|
60
|
+
CHW: "CHW";
|
|
61
|
+
CLF: "CLF";
|
|
62
|
+
CLP: "CLP";
|
|
63
|
+
CNY: "CNY";
|
|
64
|
+
COP: "COP";
|
|
65
|
+
COU: "COU";
|
|
66
|
+
CRC: "CRC";
|
|
67
|
+
CUC: "CUC";
|
|
68
|
+
CUP: "CUP";
|
|
69
|
+
CVE: "CVE";
|
|
70
|
+
CZK: "CZK";
|
|
71
|
+
DJF: "DJF";
|
|
72
|
+
DKK: "DKK";
|
|
73
|
+
DOP: "DOP";
|
|
74
|
+
DZD: "DZD";
|
|
75
|
+
EGP: "EGP";
|
|
76
|
+
ERN: "ERN";
|
|
77
|
+
ETB: "ETB";
|
|
78
|
+
EUR: "EUR";
|
|
79
|
+
FJD: "FJD";
|
|
80
|
+
FKP: "FKP";
|
|
81
|
+
GBP: "GBP";
|
|
82
|
+
GEL: "GEL";
|
|
83
|
+
GHS: "GHS";
|
|
84
|
+
GIP: "GIP";
|
|
85
|
+
GMD: "GMD";
|
|
86
|
+
GNF: "GNF";
|
|
87
|
+
GTQ: "GTQ";
|
|
88
|
+
GYD: "GYD";
|
|
89
|
+
HKD: "HKD";
|
|
90
|
+
HNL: "HNL";
|
|
91
|
+
HRK: "HRK";
|
|
92
|
+
HTG: "HTG";
|
|
93
|
+
HUF: "HUF";
|
|
94
|
+
IDR: "IDR";
|
|
95
|
+
ILS: "ILS";
|
|
96
|
+
INR: "INR";
|
|
97
|
+
IQD: "IQD";
|
|
98
|
+
IRR: "IRR";
|
|
99
|
+
ISK: "ISK";
|
|
100
|
+
JMD: "JMD";
|
|
101
|
+
JOD: "JOD";
|
|
102
|
+
JPY: "JPY";
|
|
103
|
+
KES: "KES";
|
|
104
|
+
KGS: "KGS";
|
|
105
|
+
KHR: "KHR";
|
|
106
|
+
KMF: "KMF";
|
|
107
|
+
KPW: "KPW";
|
|
108
|
+
KRW: "KRW";
|
|
109
|
+
KWD: "KWD";
|
|
110
|
+
KYD: "KYD";
|
|
111
|
+
KZT: "KZT";
|
|
112
|
+
LAK: "LAK";
|
|
113
|
+
LBP: "LBP";
|
|
114
|
+
LKR: "LKR";
|
|
115
|
+
LRD: "LRD";
|
|
116
|
+
LSL: "LSL";
|
|
117
|
+
LYD: "LYD";
|
|
118
|
+
MAD: "MAD";
|
|
119
|
+
MDL: "MDL";
|
|
120
|
+
MGA: "MGA";
|
|
121
|
+
MKD: "MKD";
|
|
122
|
+
MMK: "MMK";
|
|
123
|
+
MNT: "MNT";
|
|
124
|
+
MOP: "MOP";
|
|
125
|
+
MRU: "MRU";
|
|
126
|
+
MUR: "MUR";
|
|
127
|
+
MVR: "MVR";
|
|
128
|
+
MWK: "MWK";
|
|
129
|
+
MXN: "MXN";
|
|
130
|
+
MXV: "MXV";
|
|
131
|
+
MYR: "MYR";
|
|
132
|
+
MZN: "MZN";
|
|
133
|
+
NAD: "NAD";
|
|
134
|
+
NGN: "NGN";
|
|
135
|
+
NIO: "NIO";
|
|
136
|
+
NOK: "NOK";
|
|
137
|
+
NPR: "NPR";
|
|
138
|
+
NZD: "NZD";
|
|
139
|
+
OMR: "OMR";
|
|
140
|
+
PAB: "PAB";
|
|
141
|
+
PEN: "PEN";
|
|
142
|
+
PGK: "PGK";
|
|
143
|
+
PHP: "PHP";
|
|
144
|
+
PKR: "PKR";
|
|
145
|
+
PLN: "PLN";
|
|
146
|
+
PYG: "PYG";
|
|
147
|
+
QAR: "QAR";
|
|
148
|
+
RON: "RON";
|
|
149
|
+
RSD: "RSD";
|
|
150
|
+
RUB: "RUB";
|
|
151
|
+
RWF: "RWF";
|
|
152
|
+
SAR: "SAR";
|
|
153
|
+
SBD: "SBD";
|
|
154
|
+
SCR: "SCR";
|
|
155
|
+
SDG: "SDG";
|
|
156
|
+
SEK: "SEK";
|
|
157
|
+
SGD: "SGD";
|
|
158
|
+
SHP: "SHP";
|
|
159
|
+
SLE: "SLE";
|
|
160
|
+
SLL: "SLL";
|
|
161
|
+
SOS: "SOS";
|
|
162
|
+
SRD: "SRD";
|
|
163
|
+
SSP: "SSP";
|
|
164
|
+
STN: "STN";
|
|
165
|
+
SYP: "SYP";
|
|
166
|
+
SZL: "SZL";
|
|
167
|
+
THB: "THB";
|
|
168
|
+
TJS: "TJS";
|
|
169
|
+
TMT: "TMT";
|
|
170
|
+
TND: "TND";
|
|
171
|
+
TOP: "TOP";
|
|
172
|
+
TRY: "TRY";
|
|
173
|
+
TTD: "TTD";
|
|
174
|
+
TVD: "TVD";
|
|
175
|
+
TWD: "TWD";
|
|
176
|
+
TZS: "TZS";
|
|
177
|
+
UAH: "UAH";
|
|
178
|
+
UGX: "UGX";
|
|
179
|
+
USD: "USD";
|
|
180
|
+
USN: "USN";
|
|
181
|
+
UYI: "UYI";
|
|
182
|
+
UYU: "UYU";
|
|
183
|
+
UYW: "UYW";
|
|
184
|
+
UZS: "UZS";
|
|
185
|
+
VED: "VED";
|
|
186
|
+
VES: "VES";
|
|
187
|
+
VND: "VND";
|
|
188
|
+
VUV: "VUV";
|
|
189
|
+
WST: "WST";
|
|
190
|
+
XAF: "XAF";
|
|
191
|
+
XAG: "XAG";
|
|
192
|
+
XAU: "XAU";
|
|
193
|
+
XBA: "XBA";
|
|
194
|
+
XBB: "XBB";
|
|
195
|
+
XBC: "XBC";
|
|
196
|
+
XBD: "XBD";
|
|
197
|
+
XCD: "XCD";
|
|
198
|
+
XDR: "XDR";
|
|
199
|
+
XOF: "XOF";
|
|
200
|
+
XPD: "XPD";
|
|
201
|
+
XPF: "XPF";
|
|
202
|
+
XPT: "XPT";
|
|
203
|
+
XSU: "XSU";
|
|
204
|
+
XTS: "XTS";
|
|
205
|
+
XUA: "XUA";
|
|
206
|
+
XXX: "XXX";
|
|
207
|
+
YER: "YER";
|
|
208
|
+
ZAR: "ZAR";
|
|
209
|
+
ZMW: "ZMW";
|
|
210
|
+
ZWL: "ZWL";
|
|
211
|
+
}>;
|
|
212
|
+
}, z.core.$loose>>;
|
|
5
213
|
}, z.core.$loose>;
|
|
6
214
|
export declare const CommercetoolsOrderIdentifierSchema: z.ZodObject<{
|
|
7
215
|
key: z.ZodString;
|
|
8
216
|
version: z.ZodDefault<z.ZodNumber>;
|
|
217
|
+
company: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
taxIdentifier: z.ZodString;
|
|
219
|
+
}, z.core.$loose>>;
|
|
9
220
|
}, z.core.$loose>;
|
|
10
221
|
export declare const CommercetoolsCheckoutIdentifierSchema: z.ZodObject<{
|
|
11
222
|
key: z.ZodString;
|
|
@@ -85,3 +296,5 @@ export type CommercetoolsResolveCategoryQueryById = z.infer<typeof Commercetools
|
|
|
85
296
|
export type CommercetoolsCategoryLookup = z.infer<typeof CommercetoolsCategoryLookupSchema>;
|
|
86
297
|
export type CommercetoolsEmployeeInviteCustomObject = z.infer<typeof CommercetoolsEmployeeInviteCustomObjectSchema>;
|
|
87
298
|
export type CommercetoolsEmployeeInviteCustomObjectValue = z.infer<typeof CommercetoolsEmployeeInviteCustomObjectValueSchema>;
|
|
299
|
+
export type CommercetoolsCartItemIdentifier = z.infer<typeof CommercetoolsCartItemIdentifierSchema>;
|
|
300
|
+
export type CommercetoolsProductListIdentifier = z.infer<typeof CommercetoolsProductListIdentifierSchema>;
|