@gradientedge/commercetools-utils 5.27.2 → 5.29.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/dist/cjs/api/types.d.ts +0 -1
- package/dist/cjs/api/types.d.ts.map +1 -1
- package/dist/cjs/auth/scopes.js +2 -3
- package/dist/cjs/auth/scopes.js.map +1 -1
- package/dist/cjs/auth/types.d.ts +0 -1
- package/dist/cjs/auth/types.d.ts.map +1 -1
- package/dist/cjs/auth/utils.js +1 -2
- package/dist/cjs/auth/utils.js.map +1 -1
- package/dist/cjs/error/CommercetoolsError.d.ts.map +1 -1
- package/dist/cjs/error/CommercetoolsError.js +2 -0
- package/dist/cjs/error/CommercetoolsError.js.map +1 -1
- package/dist/cjs/request/is-retryable-error.js +1 -2
- package/dist/cjs/request/is-retryable-error.js.map +1 -1
- package/dist/cjs/request/request-executor.d.ts +0 -1
- package/dist/cjs/request/request-executor.d.ts.map +1 -1
- package/dist/cjs/request/request-executor.js +1 -2
- package/dist/cjs/request/request-executor.js.map +1 -1
- package/dist/cjs/request/request.js +1 -2
- package/dist/cjs/request/request.js.map +1 -1
- package/dist/cjs/request/transform-error.js +1 -2
- package/dist/cjs/request/transform-error.js.map +1 -1
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -0
- package/dist/cjs/types/models/approval-flow.d.ts +264 -0
- package/dist/cjs/types/models/approval-flow.d.ts.map +1 -0
- package/dist/cjs/types/models/approval-flow.js +8 -0
- package/dist/cjs/types/models/approval-flow.js.map +1 -0
- package/dist/cjs/types/models/approval-rule.d.ts +415 -0
- package/dist/cjs/types/models/approval-rule.d.ts.map +1 -0
- package/dist/cjs/types/models/approval-rule.js +8 -0
- package/dist/cjs/types/models/approval-rule.js.map +1 -0
- package/dist/cjs/types/models/associate-role.d.ts +319 -0
- package/dist/cjs/types/models/associate-role.d.ts.map +1 -0
- package/dist/cjs/types/models/associate-role.js +8 -0
- package/dist/cjs/types/models/associate-role.js.map +1 -0
- package/dist/cjs/types/models/attribute-group.d.ts +254 -0
- package/dist/cjs/types/models/attribute-group.d.ts.map +1 -0
- package/dist/cjs/types/models/attribute-group.js +8 -0
- package/dist/cjs/types/models/attribute-group.js.map +1 -0
- package/dist/cjs/types/models/business-unit.d.ts +1244 -0
- package/dist/cjs/types/models/business-unit.d.ts.map +1 -0
- package/dist/cjs/types/models/business-unit.js +8 -0
- package/dist/cjs/types/models/business-unit.js.map +1 -0
- package/dist/cjs/types/models/cart-discount.d.ts +848 -0
- package/dist/cjs/types/models/cart-discount.d.ts.map +1 -0
- package/dist/cjs/types/models/cart-discount.js +8 -0
- package/dist/cjs/types/models/cart-discount.js.map +1 -0
- package/dist/cjs/types/models/cart.d.ts +3593 -0
- package/dist/cjs/types/models/cart.d.ts.map +1 -0
- package/dist/cjs/types/models/cart.js +8 -0
- package/dist/cjs/types/models/cart.js.map +1 -0
- package/dist/cjs/types/models/category.d.ts +636 -0
- package/dist/cjs/types/models/category.d.ts.map +1 -0
- package/dist/cjs/types/models/category.js +8 -0
- package/dist/cjs/types/models/category.js.map +1 -0
- package/dist/cjs/types/models/channel.d.ts +380 -0
- package/dist/cjs/types/models/channel.d.ts.map +1 -0
- package/dist/cjs/types/models/channel.js +8 -0
- package/dist/cjs/types/models/channel.js.map +1 -0
- package/dist/cjs/types/models/common.d.ts +1163 -0
- package/dist/cjs/types/models/common.d.ts.map +1 -0
- package/dist/cjs/types/models/common.js +8 -0
- package/dist/cjs/types/models/common.js.map +1 -0
- package/dist/cjs/types/models/custom-object.d.ts +152 -0
- package/dist/cjs/types/models/custom-object.d.ts.map +1 -0
- package/dist/cjs/types/models/custom-object.js +8 -0
- package/dist/cjs/types/models/custom-object.js.map +1 -0
- package/dist/cjs/types/models/customer-group.d.ts +235 -0
- package/dist/cjs/types/models/customer-group.d.ts.map +1 -0
- package/dist/cjs/types/models/customer-group.js +8 -0
- package/dist/cjs/types/models/customer-group.js.map +1 -0
- package/dist/cjs/types/models/customer-search.d.ts +114 -0
- package/dist/cjs/types/models/customer-search.d.ts.map +1 -0
- package/dist/cjs/types/models/customer-search.js +8 -0
- package/dist/cjs/types/models/customer-search.js.map +1 -0
- package/dist/cjs/types/models/customer.d.ts +1270 -0
- package/dist/cjs/types/models/customer.d.ts.map +1 -0
- package/dist/cjs/types/models/customer.js +8 -0
- package/dist/cjs/types/models/customer.js.map +1 -0
- package/dist/cjs/types/models/discount-code.d.ts +473 -0
- package/dist/cjs/types/models/discount-code.d.ts.map +1 -0
- package/dist/cjs/types/models/discount-code.js +8 -0
- package/dist/cjs/types/models/discount-code.js.map +1 -0
- package/dist/cjs/types/models/error.d.ts +3330 -0
- package/dist/cjs/types/models/error.d.ts.map +1 -0
- package/dist/cjs/types/models/error.js +8 -0
- package/dist/cjs/types/models/error.js.map +1 -0
- package/dist/cjs/types/models/extension.d.ts +336 -0
- package/dist/cjs/types/models/extension.d.ts.map +1 -0
- package/dist/cjs/types/models/extension.js +8 -0
- package/dist/cjs/types/models/extension.js.map +1 -0
- package/dist/cjs/types/models/index.d.ts +48 -0
- package/dist/cjs/types/models/index.d.ts.map +1 -0
- package/dist/cjs/types/models/index.js +64 -0
- package/dist/cjs/types/models/index.js.map +1 -0
- package/dist/cjs/types/models/inventory.d.ts +330 -0
- package/dist/cjs/types/models/inventory.d.ts.map +1 -0
- package/dist/cjs/types/models/inventory.js +8 -0
- package/dist/cjs/types/models/inventory.js.map +1 -0
- package/dist/cjs/types/models/me.d.ts +2636 -0
- package/dist/cjs/types/models/me.d.ts.map +1 -0
- package/dist/cjs/types/models/me.js +8 -0
- package/dist/cjs/types/models/me.js.map +1 -0
- package/dist/cjs/types/models/message.d.ts +23707 -0
- package/dist/cjs/types/models/message.d.ts.map +1 -0
- package/dist/cjs/types/models/message.js +8 -0
- package/dist/cjs/types/models/message.js.map +1 -0
- package/dist/cjs/types/models/order-edit.d.ts +2725 -0
- package/dist/cjs/types/models/order-edit.d.ts.map +1 -0
- package/dist/cjs/types/models/order-edit.js +8 -0
- package/dist/cjs/types/models/order-edit.js.map +1 -0
- package/dist/cjs/types/models/order.d.ts +3187 -0
- package/dist/cjs/types/models/order.d.ts.map +1 -0
- package/dist/cjs/types/models/order.js +8 -0
- package/dist/cjs/types/models/order.js.map +1 -0
- package/dist/cjs/types/models/payment.d.ts +680 -0
- package/dist/cjs/types/models/payment.d.ts.map +1 -0
- package/dist/cjs/types/models/payment.js +8 -0
- package/dist/cjs/types/models/payment.js.map +1 -0
- package/dist/cjs/types/models/product-discount.d.ts +465 -0
- package/dist/cjs/types/models/product-discount.d.ts.map +1 -0
- package/dist/cjs/types/models/product-discount.js +8 -0
- package/dist/cjs/types/models/product-discount.js.map +1 -0
- package/dist/cjs/types/models/product-search.d.ts +437 -0
- package/dist/cjs/types/models/product-search.d.ts.map +1 -0
- package/dist/cjs/types/models/product-search.js +8 -0
- package/dist/cjs/types/models/product-search.js.map +1 -0
- package/dist/cjs/types/models/product-selection.d.ts +579 -0
- package/dist/cjs/types/models/product-selection.d.ts.map +1 -0
- package/dist/cjs/types/models/product-selection.js +8 -0
- package/dist/cjs/types/models/product-selection.js.map +1 -0
- package/dist/cjs/types/models/product-tailoring.d.ts +1368 -0
- package/dist/cjs/types/models/product-tailoring.d.ts.map +1 -0
- package/dist/cjs/types/models/product-tailoring.js +8 -0
- package/dist/cjs/types/models/product-tailoring.js.map +1 -0
- package/dist/cjs/types/models/product-type.d.ts +775 -0
- package/dist/cjs/types/models/product-type.d.ts.map +1 -0
- package/dist/cjs/types/models/product-type.js +8 -0
- package/dist/cjs/types/models/product-type.js.map +1 -0
- package/dist/cjs/types/models/product.d.ts +2314 -0
- package/dist/cjs/types/models/product.d.ts.map +1 -0
- package/dist/cjs/types/models/product.js +8 -0
- package/dist/cjs/types/models/product.js.map +1 -0
- package/dist/cjs/types/models/project.d.ts +418 -0
- package/dist/cjs/types/models/project.d.ts.map +1 -0
- package/dist/cjs/types/models/project.js +8 -0
- package/dist/cjs/types/models/project.js.map +1 -0
- package/dist/cjs/types/models/quote-request.d.ts +452 -0
- package/dist/cjs/types/models/quote-request.d.ts.map +1 -0
- package/dist/cjs/types/models/quote-request.js +8 -0
- package/dist/cjs/types/models/quote-request.js.map +1 -0
- package/dist/cjs/types/models/quote.d.ts +473 -0
- package/dist/cjs/types/models/quote.d.ts.map +1 -0
- package/dist/cjs/types/models/quote.js +8 -0
- package/dist/cjs/types/models/quote.js.map +1 -0
- package/dist/cjs/types/models/review.d.ts +435 -0
- package/dist/cjs/types/models/review.d.ts.map +1 -0
- package/dist/cjs/types/models/review.js +8 -0
- package/dist/cjs/types/models/review.js.map +1 -0
- package/dist/cjs/types/models/scalar-types.d.ts +10 -0
- package/dist/cjs/types/models/scalar-types.d.ts.map +1 -0
- package/dist/cjs/types/models/scalar-types.js +8 -0
- package/dist/cjs/types/models/scalar-types.js.map +1 -0
- package/dist/cjs/types/models/search.d.ts +334 -0
- package/dist/cjs/types/models/search.d.ts.map +1 -0
- package/dist/cjs/types/models/search.js +8 -0
- package/dist/cjs/types/models/search.js.map +1 -0
- package/dist/cjs/types/models/shipping-method.d.ts +595 -0
- package/dist/cjs/types/models/shipping-method.d.ts.map +1 -0
- package/dist/cjs/types/models/shipping-method.js +8 -0
- package/dist/cjs/types/models/shipping-method.js.map +1 -0
- package/dist/cjs/types/models/shopping-list.d.ts +941 -0
- package/dist/cjs/types/models/shopping-list.d.ts.map +1 -0
- package/dist/cjs/types/models/shopping-list.js +8 -0
- package/dist/cjs/types/models/shopping-list.js.map +1 -0
- package/dist/cjs/types/models/staged-quote.d.ts +345 -0
- package/dist/cjs/types/models/staged-quote.d.ts.map +1 -0
- package/dist/cjs/types/models/staged-quote.js +8 -0
- package/dist/cjs/types/models/staged-quote.js.map +1 -0
- package/dist/cjs/types/models/standalone-price.d.ts +546 -0
- package/dist/cjs/types/models/standalone-price.d.ts.map +1 -0
- package/dist/cjs/types/models/standalone-price.js +8 -0
- package/dist/cjs/types/models/standalone-price.js.map +1 -0
- package/dist/cjs/types/models/state.d.ts +342 -0
- package/dist/cjs/types/models/state.d.ts.map +1 -0
- package/dist/cjs/types/models/state.js +8 -0
- package/dist/cjs/types/models/state.js.map +1 -0
- package/dist/cjs/types/models/store-country.d.ts +14 -0
- package/dist/cjs/types/models/store-country.d.ts.map +1 -0
- package/dist/cjs/types/models/store-country.js +8 -0
- package/dist/cjs/types/models/store-country.js.map +1 -0
- package/dist/cjs/types/models/store.d.ts +548 -0
- package/dist/cjs/types/models/store.d.ts.map +1 -0
- package/dist/cjs/types/models/store.js +8 -0
- package/dist/cjs/types/models/store.js.map +1 -0
- package/dist/cjs/types/models/subscription.d.ts +772 -0
- package/dist/cjs/types/models/subscription.d.ts.map +1 -0
- package/dist/cjs/types/models/subscription.js +8 -0
- package/dist/cjs/types/models/subscription.js.map +1 -0
- package/dist/cjs/types/models/tax-category.d.ts +379 -0
- package/dist/cjs/types/models/tax-category.d.ts.map +1 -0
- package/dist/cjs/types/models/tax-category.js +8 -0
- package/dist/cjs/types/models/tax-category.js.map +1 -0
- package/dist/cjs/types/models/type.d.ts +646 -0
- package/dist/cjs/types/models/type.d.ts.map +1 -0
- package/dist/cjs/types/models/type.js +8 -0
- package/dist/cjs/types/models/type.js.map +1 -0
- package/dist/cjs/types/models/warning.d.ts +24 -0
- package/dist/cjs/types/models/warning.d.ts.map +1 -0
- package/dist/cjs/types/models/warning.js +8 -0
- package/dist/cjs/types/models/warning.js.map +1 -0
- package/dist/cjs/types/models/zone.d.ts +235 -0
- package/dist/cjs/types/models/zone.d.ts.map +1 -0
- package/dist/cjs/types/models/zone.js +8 -0
- package/dist/cjs/types/models/zone.js.map +1 -0
- package/dist/cjs/types.d.ts +1 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js +15 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/axios/convert-error.js +1 -2
- package/dist/cjs/utils/axios/convert-error.js.map +1 -1
- package/dist/cjs/utils/axios/convert-response.js +1 -2
- package/dist/cjs/utils/axios/convert-response.js.map +1 -1
- package/dist/cjs/utils/axios/create-instance.d.ts +0 -1
- package/dist/cjs/utils/axios/create-instance.d.ts.map +1 -1
- package/dist/cjs/utils/axios/create-instance.js +3 -2
- package/dist/cjs/utils/axios/create-instance.js.map +1 -1
- package/dist/cjs/utils/axios/extract-headers.js +1 -2
- package/dist/cjs/utils/axios/extract-headers.js.map +1 -1
- package/dist/cjs/utils/calculate-delay.js +1 -2
- package/dist/cjs/utils/calculate-delay.js.map +1 -1
- package/dist/cjs/utils/ensure-non-empty-string.js +1 -2
- package/dist/cjs/utils/ensure-non-empty-string.js.map +1 -1
- package/dist/cjs/utils/format.js +1 -2
- package/dist/cjs/utils/format.js.map +1 -1
- package/dist/cjs/utils/get-attribute-value.js +1 -2
- package/dist/cjs/utils/get-attribute-value.js.map +1 -1
- package/dist/cjs/utils/mask.js +4 -4
- package/dist/cjs/utils/mask.js.map +1 -1
- package/dist/cjs/utils/plain-clone.js +1 -2
- package/dist/cjs/utils/plain-clone.js.map +1 -1
- package/dist/cjs/utils/retry-on-conflict.js +1 -2
- package/dist/cjs/utils/retry-on-conflict.js.map +1 -1
- package/dist/cjs/utils/useragent.js +1 -2
- package/dist/cjs/utils/useragent.js.map +1 -1
- package/dist/mjs/api/types.d.ts +0 -1
- package/dist/mjs/api/types.d.ts.map +1 -1
- package/dist/mjs/auth/types.d.ts +0 -1
- package/dist/mjs/auth/types.d.ts.map +1 -1
- package/dist/mjs/error/CommercetoolsError.d.ts.map +1 -1
- package/dist/mjs/error/CommercetoolsError.js +2 -0
- package/dist/mjs/error/CommercetoolsError.js.map +1 -1
- package/dist/mjs/request/request-executor.d.ts +0 -1
- package/dist/mjs/request/request-executor.d.ts.map +1 -1
- package/dist/mjs/tsconfig.tsbuildinfo +1 -0
- package/dist/mjs/types/models/approval-flow.d.ts +264 -0
- package/dist/mjs/types/models/approval-flow.d.ts.map +1 -0
- package/dist/mjs/types/models/approval-flow.js +7 -0
- package/dist/mjs/types/models/approval-flow.js.map +1 -0
- package/dist/mjs/types/models/approval-rule.d.ts +415 -0
- package/dist/mjs/types/models/approval-rule.d.ts.map +1 -0
- package/dist/mjs/types/models/approval-rule.js +7 -0
- package/dist/mjs/types/models/approval-rule.js.map +1 -0
- package/dist/mjs/types/models/associate-role.d.ts +319 -0
- package/dist/mjs/types/models/associate-role.d.ts.map +1 -0
- package/dist/mjs/types/models/associate-role.js +7 -0
- package/dist/mjs/types/models/associate-role.js.map +1 -0
- package/dist/mjs/types/models/attribute-group.d.ts +254 -0
- package/dist/mjs/types/models/attribute-group.d.ts.map +1 -0
- package/dist/mjs/types/models/attribute-group.js +7 -0
- package/dist/mjs/types/models/attribute-group.js.map +1 -0
- package/dist/mjs/types/models/business-unit.d.ts +1244 -0
- package/dist/mjs/types/models/business-unit.d.ts.map +1 -0
- package/dist/mjs/types/models/business-unit.js +7 -0
- package/dist/mjs/types/models/business-unit.js.map +1 -0
- package/dist/mjs/types/models/cart-discount.d.ts +848 -0
- package/dist/mjs/types/models/cart-discount.d.ts.map +1 -0
- package/dist/mjs/types/models/cart-discount.js +7 -0
- package/dist/mjs/types/models/cart-discount.js.map +1 -0
- package/dist/mjs/types/models/cart.d.ts +3593 -0
- package/dist/mjs/types/models/cart.d.ts.map +1 -0
- package/dist/mjs/types/models/cart.js +7 -0
- package/dist/mjs/types/models/cart.js.map +1 -0
- package/dist/mjs/types/models/category.d.ts +636 -0
- package/dist/mjs/types/models/category.d.ts.map +1 -0
- package/dist/mjs/types/models/category.js +7 -0
- package/dist/mjs/types/models/category.js.map +1 -0
- package/dist/mjs/types/models/channel.d.ts +380 -0
- package/dist/mjs/types/models/channel.d.ts.map +1 -0
- package/dist/mjs/types/models/channel.js +7 -0
- package/dist/mjs/types/models/channel.js.map +1 -0
- package/dist/mjs/types/models/common.d.ts +1163 -0
- package/dist/mjs/types/models/common.d.ts.map +1 -0
- package/dist/mjs/types/models/common.js +7 -0
- package/dist/mjs/types/models/common.js.map +1 -0
- package/dist/mjs/types/models/custom-object.d.ts +152 -0
- package/dist/mjs/types/models/custom-object.d.ts.map +1 -0
- package/dist/mjs/types/models/custom-object.js +7 -0
- package/dist/mjs/types/models/custom-object.js.map +1 -0
- package/dist/mjs/types/models/customer-group.d.ts +235 -0
- package/dist/mjs/types/models/customer-group.d.ts.map +1 -0
- package/dist/mjs/types/models/customer-group.js +7 -0
- package/dist/mjs/types/models/customer-group.js.map +1 -0
- package/dist/mjs/types/models/customer-search.d.ts +114 -0
- package/dist/mjs/types/models/customer-search.d.ts.map +1 -0
- package/dist/mjs/types/models/customer-search.js +7 -0
- package/dist/mjs/types/models/customer-search.js.map +1 -0
- package/dist/mjs/types/models/customer.d.ts +1270 -0
- package/dist/mjs/types/models/customer.d.ts.map +1 -0
- package/dist/mjs/types/models/customer.js +7 -0
- package/dist/mjs/types/models/customer.js.map +1 -0
- package/dist/mjs/types/models/discount-code.d.ts +473 -0
- package/dist/mjs/types/models/discount-code.d.ts.map +1 -0
- package/dist/mjs/types/models/discount-code.js +7 -0
- package/dist/mjs/types/models/discount-code.js.map +1 -0
- package/dist/mjs/types/models/error.d.ts +3330 -0
- package/dist/mjs/types/models/error.d.ts.map +1 -0
- package/dist/mjs/types/models/error.js +7 -0
- package/dist/mjs/types/models/error.js.map +1 -0
- package/dist/mjs/types/models/extension.d.ts +336 -0
- package/dist/mjs/types/models/extension.d.ts.map +1 -0
- package/dist/mjs/types/models/extension.js +7 -0
- package/dist/mjs/types/models/extension.js.map +1 -0
- package/dist/mjs/types/models/index.d.ts +48 -0
- package/dist/mjs/types/models/index.d.ts.map +1 -0
- package/dist/mjs/types/models/index.js +48 -0
- package/dist/mjs/types/models/index.js.map +1 -0
- package/dist/mjs/types/models/inventory.d.ts +330 -0
- package/dist/mjs/types/models/inventory.d.ts.map +1 -0
- package/dist/mjs/types/models/inventory.js +7 -0
- package/dist/mjs/types/models/inventory.js.map +1 -0
- package/dist/mjs/types/models/me.d.ts +2636 -0
- package/dist/mjs/types/models/me.d.ts.map +1 -0
- package/dist/mjs/types/models/me.js +7 -0
- package/dist/mjs/types/models/me.js.map +1 -0
- package/dist/mjs/types/models/message.d.ts +23707 -0
- package/dist/mjs/types/models/message.d.ts.map +1 -0
- package/dist/mjs/types/models/message.js +7 -0
- package/dist/mjs/types/models/message.js.map +1 -0
- package/dist/mjs/types/models/order-edit.d.ts +2725 -0
- package/dist/mjs/types/models/order-edit.d.ts.map +1 -0
- package/dist/mjs/types/models/order-edit.js +7 -0
- package/dist/mjs/types/models/order-edit.js.map +1 -0
- package/dist/mjs/types/models/order.d.ts +3187 -0
- package/dist/mjs/types/models/order.d.ts.map +1 -0
- package/dist/mjs/types/models/order.js +7 -0
- package/dist/mjs/types/models/order.js.map +1 -0
- package/dist/mjs/types/models/payment.d.ts +680 -0
- package/dist/mjs/types/models/payment.d.ts.map +1 -0
- package/dist/mjs/types/models/payment.js +7 -0
- package/dist/mjs/types/models/payment.js.map +1 -0
- package/dist/mjs/types/models/product-discount.d.ts +465 -0
- package/dist/mjs/types/models/product-discount.d.ts.map +1 -0
- package/dist/mjs/types/models/product-discount.js +7 -0
- package/dist/mjs/types/models/product-discount.js.map +1 -0
- package/dist/mjs/types/models/product-search.d.ts +437 -0
- package/dist/mjs/types/models/product-search.d.ts.map +1 -0
- package/dist/mjs/types/models/product-search.js +7 -0
- package/dist/mjs/types/models/product-search.js.map +1 -0
- package/dist/mjs/types/models/product-selection.d.ts +579 -0
- package/dist/mjs/types/models/product-selection.d.ts.map +1 -0
- package/dist/mjs/types/models/product-selection.js +7 -0
- package/dist/mjs/types/models/product-selection.js.map +1 -0
- package/dist/mjs/types/models/product-tailoring.d.ts +1368 -0
- package/dist/mjs/types/models/product-tailoring.d.ts.map +1 -0
- package/dist/mjs/types/models/product-tailoring.js +7 -0
- package/dist/mjs/types/models/product-tailoring.js.map +1 -0
- package/dist/mjs/types/models/product-type.d.ts +775 -0
- package/dist/mjs/types/models/product-type.d.ts.map +1 -0
- package/dist/mjs/types/models/product-type.js +7 -0
- package/dist/mjs/types/models/product-type.js.map +1 -0
- package/dist/mjs/types/models/product.d.ts +2314 -0
- package/dist/mjs/types/models/product.d.ts.map +1 -0
- package/dist/mjs/types/models/product.js +7 -0
- package/dist/mjs/types/models/product.js.map +1 -0
- package/dist/mjs/types/models/project.d.ts +418 -0
- package/dist/mjs/types/models/project.d.ts.map +1 -0
- package/dist/mjs/types/models/project.js +7 -0
- package/dist/mjs/types/models/project.js.map +1 -0
- package/dist/mjs/types/models/quote-request.d.ts +452 -0
- package/dist/mjs/types/models/quote-request.d.ts.map +1 -0
- package/dist/mjs/types/models/quote-request.js +7 -0
- package/dist/mjs/types/models/quote-request.js.map +1 -0
- package/dist/mjs/types/models/quote.d.ts +473 -0
- package/dist/mjs/types/models/quote.d.ts.map +1 -0
- package/dist/mjs/types/models/quote.js +7 -0
- package/dist/mjs/types/models/quote.js.map +1 -0
- package/dist/mjs/types/models/review.d.ts +435 -0
- package/dist/mjs/types/models/review.d.ts.map +1 -0
- package/dist/mjs/types/models/review.js +7 -0
- package/dist/mjs/types/models/review.js.map +1 -0
- package/dist/mjs/types/models/scalar-types.d.ts +10 -0
- package/dist/mjs/types/models/scalar-types.d.ts.map +1 -0
- package/dist/mjs/types/models/scalar-types.js +7 -0
- package/dist/mjs/types/models/scalar-types.js.map +1 -0
- package/dist/mjs/types/models/search.d.ts +334 -0
- package/dist/mjs/types/models/search.d.ts.map +1 -0
- package/dist/mjs/types/models/search.js +7 -0
- package/dist/mjs/types/models/search.js.map +1 -0
- package/dist/mjs/types/models/shipping-method.d.ts +595 -0
- package/dist/mjs/types/models/shipping-method.d.ts.map +1 -0
- package/dist/mjs/types/models/shipping-method.js +7 -0
- package/dist/mjs/types/models/shipping-method.js.map +1 -0
- package/dist/mjs/types/models/shopping-list.d.ts +941 -0
- package/dist/mjs/types/models/shopping-list.d.ts.map +1 -0
- package/dist/mjs/types/models/shopping-list.js +7 -0
- package/dist/mjs/types/models/shopping-list.js.map +1 -0
- package/dist/mjs/types/models/staged-quote.d.ts +345 -0
- package/dist/mjs/types/models/staged-quote.d.ts.map +1 -0
- package/dist/mjs/types/models/staged-quote.js +7 -0
- package/dist/mjs/types/models/staged-quote.js.map +1 -0
- package/dist/mjs/types/models/standalone-price.d.ts +546 -0
- package/dist/mjs/types/models/standalone-price.d.ts.map +1 -0
- package/dist/mjs/types/models/standalone-price.js +7 -0
- package/dist/mjs/types/models/standalone-price.js.map +1 -0
- package/dist/mjs/types/models/state.d.ts +342 -0
- package/dist/mjs/types/models/state.d.ts.map +1 -0
- package/dist/mjs/types/models/state.js +7 -0
- package/dist/mjs/types/models/state.js.map +1 -0
- package/dist/mjs/types/models/store-country.d.ts +14 -0
- package/dist/mjs/types/models/store-country.d.ts.map +1 -0
- package/dist/mjs/types/models/store-country.js +7 -0
- package/dist/mjs/types/models/store-country.js.map +1 -0
- package/dist/mjs/types/models/store.d.ts +548 -0
- package/dist/mjs/types/models/store.d.ts.map +1 -0
- package/dist/mjs/types/models/store.js +7 -0
- package/dist/mjs/types/models/store.js.map +1 -0
- package/dist/mjs/types/models/subscription.d.ts +772 -0
- package/dist/mjs/types/models/subscription.d.ts.map +1 -0
- package/dist/mjs/types/models/subscription.js +7 -0
- package/dist/mjs/types/models/subscription.js.map +1 -0
- package/dist/mjs/types/models/tax-category.d.ts +379 -0
- package/dist/mjs/types/models/tax-category.d.ts.map +1 -0
- package/dist/mjs/types/models/tax-category.js +7 -0
- package/dist/mjs/types/models/tax-category.js.map +1 -0
- package/dist/mjs/types/models/type.d.ts +646 -0
- package/dist/mjs/types/models/type.d.ts.map +1 -0
- package/dist/mjs/types/models/type.js +7 -0
- package/dist/mjs/types/models/type.js.map +1 -0
- package/dist/mjs/types/models/warning.d.ts +24 -0
- package/dist/mjs/types/models/warning.d.ts.map +1 -0
- package/dist/mjs/types/models/warning.js +7 -0
- package/dist/mjs/types/models/warning.js.map +1 -0
- package/dist/mjs/types/models/zone.d.ts +235 -0
- package/dist/mjs/types/models/zone.d.ts.map +1 -0
- package/dist/mjs/types/models/zone.js +7 -0
- package/dist/mjs/types/models/zone.js.map +1 -0
- package/dist/mjs/types.d.ts +1 -1
- package/dist/mjs/types.d.ts.map +1 -1
- package/dist/mjs/types.js +1 -0
- package/dist/mjs/types.js.map +1 -1
- package/dist/mjs/utils/axios/create-instance.d.ts +0 -1
- package/dist/mjs/utils/axios/create-instance.d.ts.map +1 -1
- package/dist/mjs/utils/axios/create-instance.js +2 -0
- package/dist/mjs/utils/axios/create-instance.js.map +1 -1
- package/package.json +27 -26
|
@@ -0,0 +1,2636 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { AssociateDraft, AssociateRoleAssignmentDraft, BusinessUnitResourceIdentifier, BusinessUnitUpdateAction } from './business-unit.js';
|
|
7
|
+
import { CartReference, ExternalLineItemTotalPrice, ExternalTaxRateDraft, InventoryMode, ItemShippingDetailsDraft, ItemShippingTarget, ShippingMode, TaxMode } from './cart.js';
|
|
8
|
+
import { ChannelResourceIdentifier } from './channel.js';
|
|
9
|
+
import { BaseAddress, CentPrecisionMoney, LocalizedString, _BaseAddress, _Money } from './common.js';
|
|
10
|
+
import { CustomerReference, CustomerResourceIdentifier } from './customer.js';
|
|
11
|
+
import { DiscountCodeReference } from './discount-code.js';
|
|
12
|
+
import { OrderReference } from './order.js';
|
|
13
|
+
import { PaymentMethodInfo, PaymentResourceIdentifier, Transaction, TransactionDraft, TransactionType } from './payment.js';
|
|
14
|
+
import { ShippingMethodResourceIdentifier } from './shipping-method.js';
|
|
15
|
+
import { ShoppingListLineItemDraft, TextLineItemDraft } from './shopping-list.js';
|
|
16
|
+
import { StoreResourceIdentifier } from './store.js';
|
|
17
|
+
import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type.js';
|
|
18
|
+
export interface MyBusinessUnitAssociateDraft {
|
|
19
|
+
/**
|
|
20
|
+
* Expected version of the BusinessUnit on which the changes should be applied.
|
|
21
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
readonly version: number;
|
|
26
|
+
/**
|
|
27
|
+
* [Customer](ctp:api:type:Customer) to create and assign to the Business Unit.
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
readonly customer: MyCustomerDraft;
|
|
32
|
+
/**
|
|
33
|
+
* Roles assigned to the new Associate within a Business Unit. Can only contain [AssociateRoles](ctp:api:type:AssociateRole) with the `buyerAssignable` property set to `true`.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
readonly associateRoleAssignments: AssociateRoleAssignmentDraft[];
|
|
38
|
+
}
|
|
39
|
+
export type MyBusinessUnitDraft = MyCompanyDraft | MyDivisionDraft;
|
|
40
|
+
export interface MyBusinessUnitUpdate {
|
|
41
|
+
/**
|
|
42
|
+
* Expected version of the BusinessUnit on which the changes should be applied.
|
|
43
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
readonly version: number;
|
|
48
|
+
/**
|
|
49
|
+
* Update actions to be performed on the BusinessUnit.
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
readonly actions: BusinessUnitUpdateAction[];
|
|
54
|
+
}
|
|
55
|
+
export type MyBusinessUnitUpdateAction = MyBusinessUnitAddAddressAction | MyBusinessUnitAddBillingAddressIdAction | MyBusinessUnitAddShippingAddressIdAction | MyBusinessUnitChangeAddressAction | MyBusinessUnitChangeAssociateAction | MyBusinessUnitChangeNameAction | MyBusinessUnitChangeParentUnitAction | MyBusinessUnitRemoveAddressAction | MyBusinessUnitRemoveAssociateAction | MyBusinessUnitRemoveBillingAddressIdAction | MyBusinessUnitRemoveShippingAddressIdAction | MyBusinessUnitSetAddressCustomFieldAction | MyBusinessUnitSetAddressCustomTypeAction | MyBusinessUnitSetContactEmailAction | MyBusinessUnitSetCustomFieldAction | MyBusinessUnitSetCustomTypeAction | MyBusinessUnitSetDefaultBillingAddressAction | MyBusinessUnitSetDefaultShippingAddressAction;
|
|
56
|
+
/**
|
|
57
|
+
* The `customerId` is determined by a [password flow token](/../api/authorization#password-flow) and
|
|
58
|
+
* automatically set on the resulting [Cart](ctp:api:type:Cart).
|
|
59
|
+
* The `anonymousId` is determined by a [token for an anonymous session](ctp:api:type:AnonymousSession) and
|
|
60
|
+
* automatically set on the resulting [Cart](ctp:api:type:Cart).
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export interface MyCartDraft {
|
|
64
|
+
/**
|
|
65
|
+
* Currency the Cart uses.
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
readonly currency: string;
|
|
70
|
+
/**
|
|
71
|
+
* Email address of the Customer the Cart belongs to.
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
readonly customerEmail?: string;
|
|
76
|
+
/**
|
|
77
|
+
* [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Business Unit the Cart should belong to. The [Customer](ctp:api:type:Customer) must be an [Associate](ctp:api:type:Associate) of the Business Unit.
|
|
78
|
+
*
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
readonly businessUnit?: BusinessUnitResourceIdentifier;
|
|
82
|
+
/**
|
|
83
|
+
* [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Store the Cart should belong to. Once set, it cannot be updated.
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
readonly store?: StoreResourceIdentifier;
|
|
88
|
+
/**
|
|
89
|
+
* [Line Items](ctp:api:type:LineItems) to add to the Cart.
|
|
90
|
+
*
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
readonly lineItems?: MyLineItemDraft[];
|
|
94
|
+
/**
|
|
95
|
+
* Determines how Tax Rates are set. The `Disabled` TaxMode **cannot** be set.
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
readonly taxMode?: TaxMode;
|
|
100
|
+
/**
|
|
101
|
+
* Determines how stock quantities are tracked for Line Items in the Cart.
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
readonly inventoryMode?: InventoryMode;
|
|
106
|
+
/**
|
|
107
|
+
* Billing address associated with the Cart.
|
|
108
|
+
*
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
readonly billingAddress?: _BaseAddress;
|
|
112
|
+
/**
|
|
113
|
+
* Shipping address associated with the Cart. Determines eligible [ShippingMethod](ctp:api:type:ShippingMethod) rates and Tax Rates of Line Items.
|
|
114
|
+
*
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
readonly shippingAddress?: _BaseAddress;
|
|
118
|
+
/**
|
|
119
|
+
* Shipping Method for the Cart. If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) has a `predicate` that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Cart](ctp:api:endpoint:/{projectKey}/carts:POST).
|
|
120
|
+
*
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
124
|
+
/**
|
|
125
|
+
* Multiple shipping addresses of the Cart. Each address must contain a `key` that is unique in this Cart.
|
|
126
|
+
* The keys are used by [LineItems](ctp:api:type:LineItem) to reference these addresses under their `shippingDetails`.
|
|
127
|
+
*
|
|
128
|
+
* Eligible Shipping Methods or applicable Tax Rates are determined by the [Cart](ctp:api:type:Cart) `shippingAddress`, and not `itemShippingAddresses`.
|
|
129
|
+
*
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
readonly itemShippingAddresses?: BaseAddress[];
|
|
133
|
+
/**
|
|
134
|
+
* - If set to `Single`, only a single Shipping Method can be added to the Cart.
|
|
135
|
+
* - If set to `Multiple`, multiple Shipping Methods can be added to the Cart.
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
readonly shippingMode?: ShippingMode;
|
|
139
|
+
/**
|
|
140
|
+
* `code` of the existing [DiscountCodes](ctp:api:type:DiscountCode) to add to the Cart.
|
|
141
|
+
*
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
readonly discountCodes?: string[];
|
|
145
|
+
/**
|
|
146
|
+
* Used for [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
|
|
147
|
+
* If used for [Create Cart in Store](ctp:api:endpoint:/{projectKey}/in-store/me/carts:POST), the provided country must be one of the [Store's](ctp:api:type:Store) `countries`.
|
|
148
|
+
*
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
readonly country?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Languages of the Cart.
|
|
154
|
+
* Can only contain languages supported by the [Project](ctp:api:type:Project).
|
|
155
|
+
*
|
|
156
|
+
*
|
|
157
|
+
*/
|
|
158
|
+
readonly locale?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Number of days after which a Cart with `Active` [CartState](ctp:api:type:CartState) is deleted since its last modification.
|
|
161
|
+
* If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
|
|
162
|
+
*
|
|
163
|
+
* Create a [ChangeSubscription](ctp:api:type:ChangeSubscription) for Carts to receive a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) upon deletion of the Cart.
|
|
164
|
+
*
|
|
165
|
+
*
|
|
166
|
+
*/
|
|
167
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Custom Fields for the Cart.
|
|
170
|
+
*
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
readonly custom?: CustomFieldsDraft;
|
|
174
|
+
}
|
|
175
|
+
export interface MyCartUpdate {
|
|
176
|
+
/**
|
|
177
|
+
* Expected version of the Cart on which the changes apply.
|
|
178
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
179
|
+
*
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
readonly version: number;
|
|
183
|
+
/**
|
|
184
|
+
* Update actions to be performed on the Cart.
|
|
185
|
+
*
|
|
186
|
+
*
|
|
187
|
+
*/
|
|
188
|
+
readonly actions: MyCartUpdateAction[];
|
|
189
|
+
}
|
|
190
|
+
export type MyCartUpdateAction = MyCartAddDiscountCodeAction | MyCartAddItemShippingAddressAction | MyCartAddLineItemAction | MyCartAddPaymentAction | MyCartApplyDeltaToLineItemShippingDetailsTargetsAction | MyCartChangeLineItemQuantityAction | MyCartChangeLineItemsOrderAction | MyCartChangeTaxModeAction | MyCartRecalculateAction | MyCartRemoveDiscountCodeAction | MyCartRemoveItemShippingAddressAction | MyCartRemoveLineItemAction | MyCartRemovePaymentAction | MyCartSetBillingAddressAction | MyCartSetBusinessUnitAction | MyCartSetCountryAction | MyCartSetCustomFieldAction | MyCartSetCustomTypeAction | MyCartSetCustomerEmailAction | MyCartSetDeleteDaysAfterLastModificationAction | MyCartSetLineItemCustomFieldAction | MyCartSetLineItemCustomTypeAction | MyCartSetLineItemDistributionChannelAction | MyCartSetLineItemShippingDetailsAction | MyCartSetLineItemSupplyChannelAction | MyCartSetLocaleAction | MyCartSetShippingAddressAction | MyCartSetShippingMethodAction | MyCartUpdateItemShippingAddressAction;
|
|
191
|
+
/**
|
|
192
|
+
* Draft type to represent the top level of a business.
|
|
193
|
+
* Contains the fields and values of the generic [MyBusinessUnitDraft](ctp:api:type:BusinessUnitDraft) that are used specifically for creating a [Company](ctp:api:type:Company).
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
export interface MyCompanyDraft {
|
|
197
|
+
readonly unitType: 'Company';
|
|
198
|
+
/**
|
|
199
|
+
* User-defined unique identifier for the BusinessUnit.
|
|
200
|
+
*
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
203
|
+
readonly key: string;
|
|
204
|
+
/**
|
|
205
|
+
* Name of the Business Unit.
|
|
206
|
+
*
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
209
|
+
readonly name: string;
|
|
210
|
+
/**
|
|
211
|
+
* Email address of the Business Unit.
|
|
212
|
+
*
|
|
213
|
+
*
|
|
214
|
+
*/
|
|
215
|
+
readonly contactEmail?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Custom Fields for the Business Unit.
|
|
218
|
+
*
|
|
219
|
+
*
|
|
220
|
+
*/
|
|
221
|
+
readonly custom?: CustomFieldsDraft;
|
|
222
|
+
/**
|
|
223
|
+
* Addresses used by the Business Unit.
|
|
224
|
+
*
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
readonly addresses?: BaseAddress[];
|
|
228
|
+
/**
|
|
229
|
+
* Indexes of entries in `addresses` to set as shipping addresses.
|
|
230
|
+
* The `shippingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
|
|
231
|
+
*
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
readonly shippingAddresses?: number[];
|
|
235
|
+
/**
|
|
236
|
+
* Index of the entry in `addresses` to set as the default shipping address.
|
|
237
|
+
*
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
readonly defaultShippingAddress?: number;
|
|
241
|
+
/**
|
|
242
|
+
* Indexes of entries in `addresses` to set as billing addresses.
|
|
243
|
+
* The `billingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
|
|
244
|
+
*
|
|
245
|
+
*
|
|
246
|
+
*/
|
|
247
|
+
readonly billingAddresses?: number[];
|
|
248
|
+
/**
|
|
249
|
+
* Index of the entry in `addresses` to set as the default billing address.
|
|
250
|
+
*
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
readonly defaultBillingAddress?: number;
|
|
254
|
+
}
|
|
255
|
+
export interface MyCustomerDraft {
|
|
256
|
+
/**
|
|
257
|
+
* Email address of the Customer that is [unique](/../api/customers-overview#customer-uniqueness) for an entire Project or Store the Customer is assigned to.
|
|
258
|
+
* It is the mandatory unique identifier of a Customer.
|
|
259
|
+
*
|
|
260
|
+
*
|
|
261
|
+
*/
|
|
262
|
+
readonly email: string;
|
|
263
|
+
/**
|
|
264
|
+
* Password of the Customer.
|
|
265
|
+
*
|
|
266
|
+
*
|
|
267
|
+
*/
|
|
268
|
+
readonly password: string;
|
|
269
|
+
/**
|
|
270
|
+
* Given name (first name) of the Customer.
|
|
271
|
+
*
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
readonly firstName?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Family name (last name) of the Customer.
|
|
277
|
+
*
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
280
|
+
readonly lastName?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Middle name of the Customer.
|
|
283
|
+
*
|
|
284
|
+
*
|
|
285
|
+
*/
|
|
286
|
+
readonly middleName?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Title of the Customer, for example, 'Dr.'.
|
|
289
|
+
*
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
readonly title?: string;
|
|
293
|
+
/**
|
|
294
|
+
* Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.
|
|
295
|
+
*
|
|
296
|
+
*
|
|
297
|
+
*/
|
|
298
|
+
readonly salutation?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Date of birth of the Customer.
|
|
301
|
+
*
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
readonly dateOfBirth?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Company name of the Customer.
|
|
307
|
+
*
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
310
|
+
readonly companyName?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Individual VAT ID of the Customer.
|
|
313
|
+
*
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
316
|
+
readonly vatId?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Addresses of the Customer.
|
|
319
|
+
*
|
|
320
|
+
*
|
|
321
|
+
*/
|
|
322
|
+
readonly addresses?: BaseAddress[];
|
|
323
|
+
/**
|
|
324
|
+
* Index of the address in the `addresses` array to use as the default shipping address.
|
|
325
|
+
* The `defaultShippingAddressId` of the Customer will be set to the `id` of that address.
|
|
326
|
+
*
|
|
327
|
+
*
|
|
328
|
+
*/
|
|
329
|
+
readonly defaultShippingAddress?: number;
|
|
330
|
+
/**
|
|
331
|
+
* Index of the address in the `addresses` array to use as the default billing address.
|
|
332
|
+
* The `defaultBillingAddressId` of the Customer will be set to the `id` of that address.
|
|
333
|
+
*
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
readonly defaultBillingAddress?: number;
|
|
337
|
+
/**
|
|
338
|
+
* Custom Fields for the Customer.
|
|
339
|
+
*
|
|
340
|
+
*
|
|
341
|
+
*/
|
|
342
|
+
readonly custom?: CustomFieldsDraft;
|
|
343
|
+
/**
|
|
344
|
+
* Preferred language of the Customer. Must be one of the languages supported by the [Project](ctp:api:type:Project).
|
|
345
|
+
*
|
|
346
|
+
*
|
|
347
|
+
*/
|
|
348
|
+
readonly locale?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Sets the [Stores](ctp:api:type:Store) for the Customer.
|
|
351
|
+
*
|
|
352
|
+
*
|
|
353
|
+
*/
|
|
354
|
+
readonly stores?: StoreResourceIdentifier[];
|
|
355
|
+
}
|
|
356
|
+
export interface MyCustomerUpdate {
|
|
357
|
+
/**
|
|
358
|
+
* Expected version of the Customer on which the changes should be applied.
|
|
359
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
360
|
+
*
|
|
361
|
+
*
|
|
362
|
+
*/
|
|
363
|
+
readonly version: number;
|
|
364
|
+
/**
|
|
365
|
+
* Update actions to be performed on the Customer.
|
|
366
|
+
*
|
|
367
|
+
*
|
|
368
|
+
*/
|
|
369
|
+
readonly actions: MyCustomerUpdateAction[];
|
|
370
|
+
}
|
|
371
|
+
export type MyCustomerUpdateAction = MyCustomerAddAddressAction | MyCustomerAddBillingAddressIdAction | MyCustomerAddShippingAddressIdAction | MyCustomerChangeAddressAction | MyCustomerChangeEmailAction | MyCustomerRemoveAddressAction | MyCustomerRemoveBillingAddressIdAction | MyCustomerRemoveShippingAddressIdAction | MyCustomerSetCompanyNameAction | MyCustomerSetCustomFieldAction | MyCustomerSetCustomTypeAction | MyCustomerSetDateOfBirthAction | MyCustomerSetDefaultBillingAddressAction | MyCustomerSetDefaultShippingAddressAction | MyCustomerSetFirstNameAction | MyCustomerSetLastNameAction | MyCustomerSetLocaleAction | MyCustomerSetMiddleNameAction | MyCustomerSetSalutationAction | MyCustomerSetTitleAction | MyCustomerSetVatIdAction;
|
|
372
|
+
/**
|
|
373
|
+
* Draft type to model divisions that are part of the [Company](ctp:api:type:Company) or a higher-order [Division](ctp:api:type:Division).
|
|
374
|
+
* Contains the fields and values of the generic [MyBusinessUnitDraft](ctp:api:type:MyBusinessUnitDraft) that are used specifically for creating a Division.
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
377
|
+
export interface MyDivisionDraft {
|
|
378
|
+
readonly unitType: 'Division';
|
|
379
|
+
/**
|
|
380
|
+
* User-defined unique identifier for the BusinessUnit.
|
|
381
|
+
*
|
|
382
|
+
*
|
|
383
|
+
*/
|
|
384
|
+
readonly key: string;
|
|
385
|
+
/**
|
|
386
|
+
* Name of the Business Unit.
|
|
387
|
+
*
|
|
388
|
+
*
|
|
389
|
+
*/
|
|
390
|
+
readonly name: string;
|
|
391
|
+
/**
|
|
392
|
+
* Email address of the Business Unit.
|
|
393
|
+
*
|
|
394
|
+
*
|
|
395
|
+
*/
|
|
396
|
+
readonly contactEmail?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Custom Fields for the Business Unit.
|
|
399
|
+
*
|
|
400
|
+
*
|
|
401
|
+
*/
|
|
402
|
+
readonly custom?: CustomFieldsDraft;
|
|
403
|
+
/**
|
|
404
|
+
* Addresses used by the Business Unit.
|
|
405
|
+
*
|
|
406
|
+
*
|
|
407
|
+
*/
|
|
408
|
+
readonly addresses?: BaseAddress[];
|
|
409
|
+
/**
|
|
410
|
+
* Indexes of entries in `addresses` to set as shipping addresses.
|
|
411
|
+
* The `shippingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
|
|
412
|
+
*
|
|
413
|
+
*
|
|
414
|
+
*/
|
|
415
|
+
readonly shippingAddresses?: number[];
|
|
416
|
+
/**
|
|
417
|
+
* Index of the entry in `addresses` to set as the default shipping address.
|
|
418
|
+
*
|
|
419
|
+
*
|
|
420
|
+
*/
|
|
421
|
+
readonly defaultShippingAddress?: number;
|
|
422
|
+
/**
|
|
423
|
+
* Indexes of entries in `addresses` to set as billing addresses.
|
|
424
|
+
* The `billingAddressIds` of the [Customer](ctp:api:type:Customer) will be replaced by these addresses.
|
|
425
|
+
*
|
|
426
|
+
*
|
|
427
|
+
*/
|
|
428
|
+
readonly billingAddresses?: number[];
|
|
429
|
+
/**
|
|
430
|
+
* Index of the entry in `addresses` to set as the default billing address.
|
|
431
|
+
*
|
|
432
|
+
*
|
|
433
|
+
*/
|
|
434
|
+
readonly defaultBillingAddress?: number;
|
|
435
|
+
/**
|
|
436
|
+
* The parent unit of this Division. Can be a Company or a Division.
|
|
437
|
+
*
|
|
438
|
+
*
|
|
439
|
+
*/
|
|
440
|
+
readonly parentUnit: BusinessUnitResourceIdentifier;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* For Product Variant identification, either the `productId` and `variantId`, or `sku` must be provided.
|
|
444
|
+
*
|
|
445
|
+
*/
|
|
446
|
+
export interface MyLineItemDraft {
|
|
447
|
+
/**
|
|
448
|
+
* User-defined unique identifier of the LineItem.
|
|
449
|
+
*
|
|
450
|
+
*
|
|
451
|
+
*/
|
|
452
|
+
readonly key?: string;
|
|
453
|
+
/**
|
|
454
|
+
* `id` of the [Product](ctp:api:type:Product).
|
|
455
|
+
*
|
|
456
|
+
*
|
|
457
|
+
*/
|
|
458
|
+
readonly productId?: string;
|
|
459
|
+
/**
|
|
460
|
+
* `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
|
|
461
|
+
* If not provided, the Master Variant is used.
|
|
462
|
+
*
|
|
463
|
+
*
|
|
464
|
+
*/
|
|
465
|
+
readonly variantId?: number;
|
|
466
|
+
/**
|
|
467
|
+
* `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
|
|
468
|
+
*
|
|
469
|
+
*
|
|
470
|
+
*/
|
|
471
|
+
readonly sku?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Number of Product Variants to add to the Cart.
|
|
474
|
+
*
|
|
475
|
+
*
|
|
476
|
+
*/
|
|
477
|
+
readonly quantity?: number;
|
|
478
|
+
/**
|
|
479
|
+
* Date and time (UTC) the Product Variant is added to the Cart.
|
|
480
|
+
* If not set, it defaults to the current date and time.
|
|
481
|
+
*
|
|
482
|
+
* Optional for backwards compatibility reasons.
|
|
483
|
+
*
|
|
484
|
+
*
|
|
485
|
+
*/
|
|
486
|
+
readonly addedAt?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
|
|
489
|
+
* The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
490
|
+
*
|
|
491
|
+
*
|
|
492
|
+
*/
|
|
493
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
494
|
+
/**
|
|
495
|
+
* Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price.
|
|
496
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
497
|
+
*
|
|
498
|
+
* If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set,
|
|
499
|
+
* the Channel must match one of the Store's distribution channels.
|
|
500
|
+
*
|
|
501
|
+
*
|
|
502
|
+
*/
|
|
503
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
504
|
+
/**
|
|
505
|
+
* Container for Line Item-specific addresses.
|
|
506
|
+
*
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
509
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
510
|
+
/**
|
|
511
|
+
* Custom Fields for the Cart.
|
|
512
|
+
*
|
|
513
|
+
*
|
|
514
|
+
*/
|
|
515
|
+
readonly custom?: CustomFieldsDraft;
|
|
516
|
+
}
|
|
517
|
+
export interface MyOrderFromCartDraft {
|
|
518
|
+
/**
|
|
519
|
+
* `id` of the [Cart](ctp:api:type:Cart) from which the Order is created.
|
|
520
|
+
*
|
|
521
|
+
*
|
|
522
|
+
*/
|
|
523
|
+
readonly id: string;
|
|
524
|
+
/**
|
|
525
|
+
* Current `version` of the [Cart](ctp:api:type:Cart) from which the Order is created.
|
|
526
|
+
*
|
|
527
|
+
*
|
|
528
|
+
*/
|
|
529
|
+
readonly version: number;
|
|
530
|
+
}
|
|
531
|
+
export interface MyOrderFromQuoteDraft {
|
|
532
|
+
/**
|
|
533
|
+
* `id` of the [Quote](ctp:api:type:Quote) from which the Order is created.
|
|
534
|
+
*
|
|
535
|
+
*
|
|
536
|
+
*/
|
|
537
|
+
readonly id: string;
|
|
538
|
+
/**
|
|
539
|
+
* Current `version` of the [Quote](ctp:api:type:Quote) from which the Order is created.
|
|
540
|
+
*
|
|
541
|
+
*
|
|
542
|
+
*/
|
|
543
|
+
readonly version: number;
|
|
544
|
+
/**
|
|
545
|
+
* Set to `true`, if the `quoteState` of the referenced [Quote](ctp:api:type:Quote) should be set to `Accepted`.
|
|
546
|
+
*
|
|
547
|
+
*
|
|
548
|
+
*/
|
|
549
|
+
readonly quoteStateToAccepted?: boolean;
|
|
550
|
+
}
|
|
551
|
+
export interface MyPayment {
|
|
552
|
+
/**
|
|
553
|
+
* Unique identifier of the Payment.
|
|
554
|
+
*
|
|
555
|
+
*
|
|
556
|
+
*/
|
|
557
|
+
readonly id: string;
|
|
558
|
+
/**
|
|
559
|
+
* Current version of the Payment.
|
|
560
|
+
*
|
|
561
|
+
*
|
|
562
|
+
*/
|
|
563
|
+
readonly version: number;
|
|
564
|
+
/**
|
|
565
|
+
* Reference to a [Customer](ctp:api:type:Customer) associated with the Payment. Set automatically with a [password flow token](/../api/authorization#password-flow). Either `customer` or `anonymousId` is present.
|
|
566
|
+
*
|
|
567
|
+
*
|
|
568
|
+
*/
|
|
569
|
+
readonly customer?: CustomerReference;
|
|
570
|
+
/**
|
|
571
|
+
* [Anonymous session](ctp:api:type:AnonymousSession) associated with the Payment. Set automatically with a [token for an anonymous session](ctp:api:type:AnonymousSession). Either `customer` or `anonymousId` is present.
|
|
572
|
+
*
|
|
573
|
+
*
|
|
574
|
+
*/
|
|
575
|
+
readonly anonymousId?: string;
|
|
576
|
+
/**
|
|
577
|
+
* Money value the Payment intends to receive from the customer.
|
|
578
|
+
* The value typically matches the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) gross total.
|
|
579
|
+
*
|
|
580
|
+
*
|
|
581
|
+
*/
|
|
582
|
+
readonly amountPlanned: CentPrecisionMoney;
|
|
583
|
+
/**
|
|
584
|
+
* Information regarding the payment interface (for example, a PSP), and the specific payment method used.
|
|
585
|
+
*
|
|
586
|
+
*
|
|
587
|
+
*/
|
|
588
|
+
readonly paymentMethodInfo: PaymentMethodInfo;
|
|
589
|
+
/**
|
|
590
|
+
* Financial transactions of the Payment. Each Transaction has a [TransactionType](ctp:api:type:TransactionType) and a [TransactionState](ctp:api:type:TransactionState).
|
|
591
|
+
*
|
|
592
|
+
*
|
|
593
|
+
*/
|
|
594
|
+
readonly transactions: Transaction[];
|
|
595
|
+
/**
|
|
596
|
+
* Custom Fields defined for the Payment.
|
|
597
|
+
*
|
|
598
|
+
*
|
|
599
|
+
*/
|
|
600
|
+
readonly custom?: CustomFields;
|
|
601
|
+
}
|
|
602
|
+
export interface MyPaymentDraft {
|
|
603
|
+
/**
|
|
604
|
+
* Money value the Payment intends to receive from the customer.
|
|
605
|
+
* The value usually matches the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) gross total.
|
|
606
|
+
*
|
|
607
|
+
*
|
|
608
|
+
*/
|
|
609
|
+
readonly amountPlanned: _Money;
|
|
610
|
+
/**
|
|
611
|
+
* Information regarding the payment interface (for example, a PSP), and the specific payment method used.
|
|
612
|
+
*
|
|
613
|
+
*
|
|
614
|
+
*/
|
|
615
|
+
readonly paymentMethodInfo?: PaymentMethodInfo;
|
|
616
|
+
/**
|
|
617
|
+
* Custom Fields for the Payment.
|
|
618
|
+
*
|
|
619
|
+
*
|
|
620
|
+
*/
|
|
621
|
+
readonly custom?: CustomFieldsDraft;
|
|
622
|
+
/**
|
|
623
|
+
* Financial transactions of the [TransactionTypes](ctp:api:type:TransactionType) `Authorization` or `Charge`.
|
|
624
|
+
*
|
|
625
|
+
*
|
|
626
|
+
*/
|
|
627
|
+
readonly transaction?: MyTransactionDraft;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [MyPayment](ctp:api:type:MyPayment).
|
|
631
|
+
*
|
|
632
|
+
*/
|
|
633
|
+
export interface MyPaymentPagedQueryResponse {
|
|
634
|
+
/**
|
|
635
|
+
* Number of [results requested](/../api/general-concepts#limit).
|
|
636
|
+
*
|
|
637
|
+
*
|
|
638
|
+
*/
|
|
639
|
+
readonly limit: number;
|
|
640
|
+
/**
|
|
641
|
+
* Actual number of results returned.
|
|
642
|
+
*
|
|
643
|
+
*
|
|
644
|
+
*/
|
|
645
|
+
readonly count: number;
|
|
646
|
+
/**
|
|
647
|
+
* Total number of results matching the query.
|
|
648
|
+
* This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
|
|
649
|
+
* This field is returned by default.
|
|
650
|
+
* For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
|
|
651
|
+
* When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
|
|
652
|
+
*
|
|
653
|
+
*
|
|
654
|
+
*/
|
|
655
|
+
readonly total?: number;
|
|
656
|
+
/**
|
|
657
|
+
* Number of [elements skipped](/../api/general-concepts#offset).
|
|
658
|
+
*
|
|
659
|
+
*
|
|
660
|
+
*/
|
|
661
|
+
readonly offset: number;
|
|
662
|
+
/**
|
|
663
|
+
* [MyPayments](ctp:api:type:MyPayment) matching the query.
|
|
664
|
+
*
|
|
665
|
+
*
|
|
666
|
+
*/
|
|
667
|
+
readonly results: MyPayment[];
|
|
668
|
+
}
|
|
669
|
+
export interface MyPaymentUpdate {
|
|
670
|
+
/**
|
|
671
|
+
* Expected version of the Payment on which the changes should be applied.
|
|
672
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
673
|
+
*
|
|
674
|
+
*
|
|
675
|
+
*/
|
|
676
|
+
readonly version: number;
|
|
677
|
+
/**
|
|
678
|
+
* Update actions to be performed on the Payment.
|
|
679
|
+
*
|
|
680
|
+
*
|
|
681
|
+
*/
|
|
682
|
+
readonly actions: MyPaymentUpdateAction[];
|
|
683
|
+
}
|
|
684
|
+
export type MyPaymentUpdateAction = MyPaymentAddTransactionAction | MyPaymentChangeAmountPlannedAction | MyPaymentSetCustomFieldAction | MyPaymentSetMethodInfoInterfaceAction | MyPaymentSetMethodInfoMethodAction | MyPaymentSetMethodInfoNameAction | MyPaymentSetTransactionCustomFieldAction;
|
|
685
|
+
export interface MyQuoteRequestDraft {
|
|
686
|
+
/**
|
|
687
|
+
* `id` of the Cart from which the Quote Request is created. Carts with [Discount Codes](ctp:api:type:DiscountCode) and Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode) are not supported.
|
|
688
|
+
* The Cart must have a `shippingAddress` defined, otherwise an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Quote Request](ctp:api:endpoint:/{projectKey}/me/quote-requests:POST).
|
|
689
|
+
*
|
|
690
|
+
*
|
|
691
|
+
*/
|
|
692
|
+
readonly cartId: string;
|
|
693
|
+
/**
|
|
694
|
+
* Current version of the Cart.
|
|
695
|
+
*
|
|
696
|
+
*/
|
|
697
|
+
readonly cartVersion: number;
|
|
698
|
+
/**
|
|
699
|
+
* Message from the Buyer included in the Quote Request.
|
|
700
|
+
*
|
|
701
|
+
*/
|
|
702
|
+
readonly comment?: string;
|
|
703
|
+
}
|
|
704
|
+
export interface MyQuoteRequestUpdate {
|
|
705
|
+
/**
|
|
706
|
+
*
|
|
707
|
+
*/
|
|
708
|
+
readonly version: number;
|
|
709
|
+
/**
|
|
710
|
+
*
|
|
711
|
+
*/
|
|
712
|
+
readonly actions: MyQuoteRequestUpdateAction[];
|
|
713
|
+
}
|
|
714
|
+
export type MyQuoteRequestUpdateAction = MyQuoteRequestCancelAction;
|
|
715
|
+
/**
|
|
716
|
+
* [QuoteStates](ctp:api:type:QuoteState) that can be set using the [Change My Quote State](ctp:api:type:MyQuoteChangeMyQuoteStateAction) update action.
|
|
717
|
+
*
|
|
718
|
+
*/
|
|
719
|
+
export type MyQuoteState = 'Accepted' | 'Declined' | string;
|
|
720
|
+
export interface MyQuoteUpdate {
|
|
721
|
+
/**
|
|
722
|
+
* Expected version of the [Quote](ctp:api:type:Quote) to which the changes should be applied.
|
|
723
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
724
|
+
*
|
|
725
|
+
*
|
|
726
|
+
*/
|
|
727
|
+
readonly version: number;
|
|
728
|
+
/**
|
|
729
|
+
* Update actions to be performed on the [Quote](ctp:api:type:Quote).
|
|
730
|
+
*
|
|
731
|
+
*
|
|
732
|
+
*/
|
|
733
|
+
readonly actions: MyQuoteUpdateAction[];
|
|
734
|
+
}
|
|
735
|
+
export type MyQuoteUpdateAction = MyQuoteChangeMyQuoteStateAction;
|
|
736
|
+
/**
|
|
737
|
+
* A [MyShoppingListDraft](ctp:api:type:MyShoppingListDraft) is the object submitted as payload to the [Create MyShoppingList request](ctp:api:endpoint:/{projectKey}/me/shopping-lists:POST).
|
|
738
|
+
* The `customer` field of [ShoppingList](ctp:api:type:ShoppingList) is automatically set with
|
|
739
|
+
* a [password flow token](/authorization#password-flow).
|
|
740
|
+
* The `anonymousId` is automatically set with a [token for an anonymous session](/authorization#tokens-for-anonymous-sessions).
|
|
741
|
+
* The `key` and `slug` fields can not be set.
|
|
742
|
+
*
|
|
743
|
+
*/
|
|
744
|
+
export interface MyShoppingListDraft {
|
|
745
|
+
/**
|
|
746
|
+
* Name of the [ShoppingList](ctp:api:type:ShoppingList).
|
|
747
|
+
*
|
|
748
|
+
*
|
|
749
|
+
*/
|
|
750
|
+
readonly name: LocalizedString;
|
|
751
|
+
/**
|
|
752
|
+
* Description of the ShoppingList.
|
|
753
|
+
*
|
|
754
|
+
*
|
|
755
|
+
*/
|
|
756
|
+
readonly description?: LocalizedString;
|
|
757
|
+
/**
|
|
758
|
+
* [Line Items](ctp:api:type:ShoppingListLineItem) (containing Products) to add to the ShoppingList.
|
|
759
|
+
*
|
|
760
|
+
*
|
|
761
|
+
*/
|
|
762
|
+
readonly lineItems?: ShoppingListLineItemDraft[];
|
|
763
|
+
/**
|
|
764
|
+
* [Line Items](ctp:api:type:TextLineItem) (containing text values) to add to the ShoppingList.
|
|
765
|
+
*
|
|
766
|
+
*
|
|
767
|
+
*/
|
|
768
|
+
readonly textLineItems?: TextLineItemDraft[];
|
|
769
|
+
/**
|
|
770
|
+
* Custom Fields defined for the ShoppingList.
|
|
771
|
+
*
|
|
772
|
+
*
|
|
773
|
+
*/
|
|
774
|
+
readonly custom?: CustomFieldsDraft;
|
|
775
|
+
/**
|
|
776
|
+
* Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the [default value](ctp:api:type:ShoppingListsConfiguration) configured in the [Project](ctp:api:type:Project) is used.
|
|
777
|
+
*
|
|
778
|
+
*
|
|
779
|
+
*/
|
|
780
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
781
|
+
/**
|
|
782
|
+
* Assigns the new ShoppingList to the [Store](ctp:api:type:Store). The Store assignment can not be modified.
|
|
783
|
+
*
|
|
784
|
+
*
|
|
785
|
+
*/
|
|
786
|
+
readonly store?: StoreResourceIdentifier;
|
|
787
|
+
}
|
|
788
|
+
export interface MyShoppingListUpdate {
|
|
789
|
+
/**
|
|
790
|
+
* Expected version of the ShoppingList on which the changes should be applied.
|
|
791
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
792
|
+
*
|
|
793
|
+
*
|
|
794
|
+
*/
|
|
795
|
+
readonly version: number;
|
|
796
|
+
/**
|
|
797
|
+
* List of update actions to be performed on the ShoppingList.
|
|
798
|
+
*
|
|
799
|
+
*
|
|
800
|
+
*/
|
|
801
|
+
readonly actions: MyShoppingListUpdateAction[];
|
|
802
|
+
}
|
|
803
|
+
export type MyShoppingListUpdateAction = MyShoppingListAddLineItemAction | MyShoppingListAddTextLineItemAction | MyShoppingListChangeLineItemQuantityAction | MyShoppingListChangeLineItemsOrderAction | MyShoppingListChangeNameAction | MyShoppingListChangeTextLineItemNameAction | MyShoppingListChangeTextLineItemQuantityAction | MyShoppingListChangeTextLineItemsOrderAction | MyShoppingListRemoveLineItemAction | MyShoppingListRemoveTextLineItemAction | MyShoppingListSetCustomFieldAction | MyShoppingListSetCustomTypeAction | MyShoppingListSetDeleteDaysAfterLastModificationAction | MyShoppingListSetDescriptionAction | MyShoppingListSetLineItemCustomFieldAction | MyShoppingListSetLineItemCustomTypeAction | MyShoppingListSetTextLineItemCustomFieldAction | MyShoppingListSetTextLineItemCustomTypeAction | MyShoppingListSetTextLineItemDescriptionAction;
|
|
804
|
+
export interface MyTransactionDraft {
|
|
805
|
+
/**
|
|
806
|
+
* Date and time (UTC) the Transaction took place.
|
|
807
|
+
*
|
|
808
|
+
*
|
|
809
|
+
*/
|
|
810
|
+
readonly timestamp?: string;
|
|
811
|
+
/**
|
|
812
|
+
* Type of the Transaction.
|
|
813
|
+
* Only `Authorization` or `Charge` is allowed.
|
|
814
|
+
*
|
|
815
|
+
*
|
|
816
|
+
*/
|
|
817
|
+
readonly type: TransactionType;
|
|
818
|
+
/**
|
|
819
|
+
* Money value for the Transaction.
|
|
820
|
+
*
|
|
821
|
+
*
|
|
822
|
+
*/
|
|
823
|
+
readonly amount: _Money;
|
|
824
|
+
/**
|
|
825
|
+
* Identifier used by the payment service that manages the Transaction.
|
|
826
|
+
* Can be used to correlate the Transaction to an interface interaction.
|
|
827
|
+
*
|
|
828
|
+
*
|
|
829
|
+
*/
|
|
830
|
+
readonly interactionId?: string;
|
|
831
|
+
/**
|
|
832
|
+
* Custom Fields of the Transaction.
|
|
833
|
+
*
|
|
834
|
+
*
|
|
835
|
+
*/
|
|
836
|
+
readonly custom?: CustomFieldsDraft;
|
|
837
|
+
}
|
|
838
|
+
export interface ReplicaMyCartDraft {
|
|
839
|
+
/**
|
|
840
|
+
* [Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) that is replicated.
|
|
841
|
+
*
|
|
842
|
+
*
|
|
843
|
+
*/
|
|
844
|
+
readonly reference: CartReference | OrderReference;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Adding an address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitAddressAdded](ctp:api:type:BusinessUnitAddressAddedMessage) Message.
|
|
848
|
+
*
|
|
849
|
+
*/
|
|
850
|
+
export interface MyBusinessUnitAddAddressAction {
|
|
851
|
+
readonly action: 'addAddress';
|
|
852
|
+
/**
|
|
853
|
+
* The address to add to `addresses`.
|
|
854
|
+
*
|
|
855
|
+
*
|
|
856
|
+
*/
|
|
857
|
+
readonly address: _BaseAddress;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Adding a billing address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitBillingAddressAdded](ctp:api:type:BusinessUnitBillingAddressAddedMessage) Message.
|
|
861
|
+
*
|
|
862
|
+
*/
|
|
863
|
+
export interface MyBusinessUnitAddBillingAddressIdAction {
|
|
864
|
+
readonly action: 'addBillingAddressId';
|
|
865
|
+
/**
|
|
866
|
+
* ID of the address to add as a billing address. Either `addressId` or `addressKey` is required.
|
|
867
|
+
*
|
|
868
|
+
*
|
|
869
|
+
*/
|
|
870
|
+
readonly addressId?: string;
|
|
871
|
+
/**
|
|
872
|
+
* Key of the address to add as a billing address. Either `addressId` or `addressKey` is required.
|
|
873
|
+
*
|
|
874
|
+
*
|
|
875
|
+
*/
|
|
876
|
+
readonly addressKey?: string;
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Adding a shipping address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressAdded](ctp:api:type:BusinessUnitShippingAddressAddedMessage) Message.
|
|
880
|
+
*
|
|
881
|
+
*/
|
|
882
|
+
export interface MyBusinessUnitAddShippingAddressIdAction {
|
|
883
|
+
readonly action: 'addShippingAddressId';
|
|
884
|
+
/**
|
|
885
|
+
* ID of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
|
|
886
|
+
*
|
|
887
|
+
*
|
|
888
|
+
*/
|
|
889
|
+
readonly addressId?: string;
|
|
890
|
+
/**
|
|
891
|
+
* Key of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
|
|
892
|
+
*
|
|
893
|
+
*
|
|
894
|
+
*/
|
|
895
|
+
readonly addressKey?: string;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Changing the address on a Business Unit generates the [BusinessUnitAddressChanged](ctp:api:type:BusinessUnitAddressChangedMessage) Message.
|
|
899
|
+
*
|
|
900
|
+
*/
|
|
901
|
+
export interface MyBusinessUnitChangeAddressAction {
|
|
902
|
+
readonly action: 'changeAddress';
|
|
903
|
+
/**
|
|
904
|
+
* ID of the address to change. Either `addressId` or `addressKey` is required.
|
|
905
|
+
*
|
|
906
|
+
*
|
|
907
|
+
*/
|
|
908
|
+
readonly addressId?: string;
|
|
909
|
+
/**
|
|
910
|
+
* Key of the address to change. Either `addressId` or `addressKey` is required.
|
|
911
|
+
*
|
|
912
|
+
*
|
|
913
|
+
*/
|
|
914
|
+
readonly addressKey?: string;
|
|
915
|
+
/**
|
|
916
|
+
* New address to set.
|
|
917
|
+
*
|
|
918
|
+
*
|
|
919
|
+
*/
|
|
920
|
+
readonly address: _BaseAddress;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Updating the [Associate](ctp:api:type:Associate) on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitAssociateChanged](ctp:api:type:BusinessUnitAssociateChangedMessage) Message.
|
|
924
|
+
*
|
|
925
|
+
*/
|
|
926
|
+
export interface MyBusinessUnitChangeAssociateAction {
|
|
927
|
+
readonly action: 'changeAssociate';
|
|
928
|
+
/**
|
|
929
|
+
* The Associate to add.
|
|
930
|
+
*
|
|
931
|
+
*
|
|
932
|
+
*/
|
|
933
|
+
readonly associate: AssociateDraft;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Updating the name on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitNameChanged](ctp:api:type:BusinessUnitNameChangedMessage) Message.
|
|
937
|
+
*
|
|
938
|
+
*/
|
|
939
|
+
export interface MyBusinessUnitChangeNameAction {
|
|
940
|
+
readonly action: 'changeName';
|
|
941
|
+
/**
|
|
942
|
+
* New name to set.
|
|
943
|
+
*
|
|
944
|
+
*
|
|
945
|
+
*/
|
|
946
|
+
readonly name: string;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Changing the parent of a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitParentChanged](ctp:api:type:BusinessUnitParentChangedMessage) Message.
|
|
950
|
+
*
|
|
951
|
+
*/
|
|
952
|
+
export interface MyBusinessUnitChangeParentUnitAction {
|
|
953
|
+
readonly action: 'changeParentUnit';
|
|
954
|
+
/**
|
|
955
|
+
* New parent unit of the [Business Unit](ctp:api:type:BusinessUnit). The new parent unit must have the same top-level unit as the old parent unit.
|
|
956
|
+
*
|
|
957
|
+
*
|
|
958
|
+
*/
|
|
959
|
+
readonly parentUnit: BusinessUnitResourceIdentifier;
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Removing the address from a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitAddressRemoved](ctp:api:type:BusinessUnitAddressRemovedMessage) Message.
|
|
963
|
+
*
|
|
964
|
+
*/
|
|
965
|
+
export interface MyBusinessUnitRemoveAddressAction {
|
|
966
|
+
readonly action: 'removeAddress';
|
|
967
|
+
/**
|
|
968
|
+
* ID of the address to be removed. Either `addressId` or `addressKey` is required.
|
|
969
|
+
*
|
|
970
|
+
*
|
|
971
|
+
*/
|
|
972
|
+
readonly addressId?: string;
|
|
973
|
+
/**
|
|
974
|
+
* Key of the address to be removed. Either `addressId` or `addressKey` is required.
|
|
975
|
+
*
|
|
976
|
+
*
|
|
977
|
+
*/
|
|
978
|
+
readonly addressKey?: string;
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Removing an [Associate](ctp:api:type:Associate) from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitAssociateRemoved](ctp:api:type:BusinessUnitAssociateRemovedMessage) Message.
|
|
982
|
+
*
|
|
983
|
+
*/
|
|
984
|
+
export interface MyBusinessUnitRemoveAssociateAction {
|
|
985
|
+
readonly action: 'removeAssociate';
|
|
986
|
+
/**
|
|
987
|
+
* [Associate](ctp:api:type:Associate) to remove.
|
|
988
|
+
*
|
|
989
|
+
*
|
|
990
|
+
*/
|
|
991
|
+
readonly customer: CustomerResourceIdentifier;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* Removing a billing address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitBillingAddressRemoved](ctp:api:type:BusinessUnitBillingAddressRemovedMessage) Message.
|
|
995
|
+
*
|
|
996
|
+
*/
|
|
997
|
+
export interface MyBusinessUnitRemoveBillingAddressIdAction {
|
|
998
|
+
readonly action: 'removeBillingAddressId';
|
|
999
|
+
/**
|
|
1000
|
+
* ID of the billing address to be removed. Either `addressId` or `addressKey` is required.
|
|
1001
|
+
*
|
|
1002
|
+
*
|
|
1003
|
+
*/
|
|
1004
|
+
readonly addressId?: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* Key of the billing address to be removed. Either `addressId` or `addressKey` is required.
|
|
1007
|
+
*
|
|
1008
|
+
*
|
|
1009
|
+
*/
|
|
1010
|
+
readonly addressKey?: string;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Removing a shipping address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressRemoved](ctp:api:type:BusinessUnitShippingAddressRemovedMessage) Message.
|
|
1014
|
+
*
|
|
1015
|
+
*/
|
|
1016
|
+
export interface MyBusinessUnitRemoveShippingAddressIdAction {
|
|
1017
|
+
readonly action: 'removeShippingAddressId';
|
|
1018
|
+
/**
|
|
1019
|
+
* ID of the shipping address to be removed. Either `addressId` or `addressKey` is required.
|
|
1020
|
+
*
|
|
1021
|
+
*
|
|
1022
|
+
*/
|
|
1023
|
+
readonly addressId?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Key of the shipping address to be removed. Either `addressId` or `addressKey` is required.
|
|
1026
|
+
*
|
|
1027
|
+
*
|
|
1028
|
+
*/
|
|
1029
|
+
readonly addressKey?: string;
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Adding a Custom Field to an Address of a Business Unit generates the [BusinessUnitAddressCustomFieldAdded](ctp:api:type:BusinessUnitAddressCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitAddressCustomFieldRemoved](ctp:api:type:BusinessUnitAddressCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitAddressCustomFieldChanged](ctp:api:type:BusinessUnitAddressCustomFieldChangedMessage) Message.
|
|
1033
|
+
*
|
|
1034
|
+
*/
|
|
1035
|
+
export interface MyBusinessUnitSetAddressCustomFieldAction {
|
|
1036
|
+
readonly action: 'setAddressCustomField';
|
|
1037
|
+
/**
|
|
1038
|
+
* ID of the `address` to be extended.
|
|
1039
|
+
*
|
|
1040
|
+
*
|
|
1041
|
+
*/
|
|
1042
|
+
readonly addressId: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1045
|
+
*
|
|
1046
|
+
*
|
|
1047
|
+
*/
|
|
1048
|
+
readonly name: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1051
|
+
* Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1052
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1053
|
+
*
|
|
1054
|
+
*
|
|
1055
|
+
*/
|
|
1056
|
+
readonly value?: any;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Adding or updating a Custom Type to an Address of a Business Unit generates the [BusinessUnitAddressCustomTypeSet](ctp:api:type:BusinessUnitAddressCustomTypeSetMessage) Message, and removing one generates the [BusinessUnitAddressCustomTypeRemoved](ctp:api:type:BusinessUnitAddressCustomTypeRemovedMessage) Message.
|
|
1060
|
+
*
|
|
1061
|
+
*/
|
|
1062
|
+
export interface MyBusinessUnitSetAddressCustomTypeAction {
|
|
1063
|
+
readonly action: 'setAddressCustomType';
|
|
1064
|
+
/**
|
|
1065
|
+
* Defines the [Type](ctp:api:type:Type) that extends the `address` with [Custom Fields](/../api/projects/custom-fields).
|
|
1066
|
+
* If absent, any existing Type and Custom Fields are removed from the `address`.
|
|
1067
|
+
*
|
|
1068
|
+
*
|
|
1069
|
+
*/
|
|
1070
|
+
readonly type?: TypeResourceIdentifier;
|
|
1071
|
+
/**
|
|
1072
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `address`.
|
|
1073
|
+
*
|
|
1074
|
+
*
|
|
1075
|
+
*/
|
|
1076
|
+
readonly fields?: FieldContainer;
|
|
1077
|
+
/**
|
|
1078
|
+
* ID of the `address` to be extended.
|
|
1079
|
+
*
|
|
1080
|
+
*
|
|
1081
|
+
*/
|
|
1082
|
+
readonly addressId: string;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Setting the contact email on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitContactEmailSet](ctp:api:type:BusinessUnitContactEmailSetMessage) Message.
|
|
1086
|
+
*
|
|
1087
|
+
*/
|
|
1088
|
+
export interface MyBusinessUnitSetContactEmailAction {
|
|
1089
|
+
readonly action: 'setContactEmail';
|
|
1090
|
+
/**
|
|
1091
|
+
* Email to set.
|
|
1092
|
+
* If `contactEmail` is absent or `null`, the existing contact email, if any, will be removed.
|
|
1093
|
+
*
|
|
1094
|
+
*
|
|
1095
|
+
*/
|
|
1096
|
+
readonly contactEmail?: string;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Adding a Custom Field to a Business Unit generates the [BusinessUnitCustomFieldAdded](ctp:api:type:BusinessUnitCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitCustomFieldRemoved](ctp:api:type:BusinessUnitCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitCustomFieldChanged](ctp:api:type:BusinessUnitCustomFieldChangedMessage) Message.
|
|
1100
|
+
*
|
|
1101
|
+
*/
|
|
1102
|
+
export interface MyBusinessUnitSetCustomFieldAction {
|
|
1103
|
+
readonly action: 'setCustomField';
|
|
1104
|
+
/**
|
|
1105
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1106
|
+
*
|
|
1107
|
+
*
|
|
1108
|
+
*/
|
|
1109
|
+
readonly name: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1112
|
+
* Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1113
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1114
|
+
*
|
|
1115
|
+
*
|
|
1116
|
+
*/
|
|
1117
|
+
readonly value?: any;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Adding or updating a Custom Type on a Business Unit generates the [BusinessUnitCustomTypeSet](ctp:api:type:BusinessUnitCustomTypeSetMessage) Message, removing one generates the [BusinessUnitCustomTypeRemoved](ctp:api:type:BusinessUnitCustomTypeRemovedMessage) Message.
|
|
1121
|
+
*
|
|
1122
|
+
*/
|
|
1123
|
+
export interface MyBusinessUnitSetCustomTypeAction {
|
|
1124
|
+
readonly action: 'setCustomType';
|
|
1125
|
+
/**
|
|
1126
|
+
* Defines the [Type](ctp:api:type:Type) that extends the BusinessUnit with [Custom Fields](/../api/projects/custom-fields).
|
|
1127
|
+
* If absent, any existing Type and Custom Fields are removed from the BusinessUnit.
|
|
1128
|
+
*
|
|
1129
|
+
*
|
|
1130
|
+
*/
|
|
1131
|
+
readonly type?: TypeResourceIdentifier;
|
|
1132
|
+
/**
|
|
1133
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) for the BusinessUnit.
|
|
1134
|
+
*
|
|
1135
|
+
*
|
|
1136
|
+
*/
|
|
1137
|
+
readonly fields?: FieldContainer;
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Setting the default billing address on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitDefaultBillingAddressSet](ctp:api:type:BusinessUnitDefaultBillingAddressSetMessage) Message.
|
|
1141
|
+
*
|
|
1142
|
+
*/
|
|
1143
|
+
export interface MyBusinessUnitSetDefaultBillingAddressAction {
|
|
1144
|
+
readonly action: 'setDefaultBillingAddress';
|
|
1145
|
+
/**
|
|
1146
|
+
* ID of the address to add as a billing address. Either `addressId` or `addressKey` is required.
|
|
1147
|
+
*
|
|
1148
|
+
*
|
|
1149
|
+
*/
|
|
1150
|
+
readonly addressId?: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* Key of the address to add as a billing address. Either `addressId` or `addressKey` is required.
|
|
1153
|
+
*
|
|
1154
|
+
*
|
|
1155
|
+
*/
|
|
1156
|
+
readonly addressKey?: string;
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* Setting the default shipping address on a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitDefaultShippingAddressSet](ctp:api:type:BusinessUnitDefaultShippingAddressSetMessage) Message.
|
|
1160
|
+
*
|
|
1161
|
+
*/
|
|
1162
|
+
export interface MyBusinessUnitSetDefaultShippingAddressAction {
|
|
1163
|
+
readonly action: 'setDefaultShippingAddress';
|
|
1164
|
+
/**
|
|
1165
|
+
* ID of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
|
|
1166
|
+
*
|
|
1167
|
+
*
|
|
1168
|
+
*/
|
|
1169
|
+
readonly addressId?: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* Key of the address to add as a shipping address. Either `addressId` or `addressKey` is required.
|
|
1172
|
+
*
|
|
1173
|
+
*
|
|
1174
|
+
*/
|
|
1175
|
+
readonly addressKey?: string;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Adds a [DiscountCode](ctp:api:type:DiscountCode) to the Cart to activate the related [CartDiscounts](/../api/projects/cartDiscounts).
|
|
1179
|
+
* Adding a Discount Code is only possible if no [DirectDiscount](ctp:api:type:DirectDiscount) has been applied to the Cart.
|
|
1180
|
+
* Discount Codes can be added to [frozen Carts](ctp:api:type:FrozenCarts), but their [DiscountCodeState](ctp:api:type:DiscountCodeState) is then `DoesNotMatchCart`.
|
|
1181
|
+
*
|
|
1182
|
+
* The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
|
|
1183
|
+
*
|
|
1184
|
+
* Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
|
|
1185
|
+
*
|
|
1186
|
+
*/
|
|
1187
|
+
export interface MyCartAddDiscountCodeAction {
|
|
1188
|
+
readonly action: 'addDiscountCode';
|
|
1189
|
+
/**
|
|
1190
|
+
* `code` of a [DiscountCode](ctp:api:type:DiscountCode).
|
|
1191
|
+
*
|
|
1192
|
+
*
|
|
1193
|
+
*/
|
|
1194
|
+
readonly code: string;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Adds an address to a Cart when shipping to multiple addresses is desired.
|
|
1198
|
+
*
|
|
1199
|
+
*/
|
|
1200
|
+
export interface MyCartAddItemShippingAddressAction {
|
|
1201
|
+
readonly action: 'addItemShippingAddress';
|
|
1202
|
+
/**
|
|
1203
|
+
* Address to append to `itemShippingAddresses`.
|
|
1204
|
+
*
|
|
1205
|
+
* The new address must have a key that is unique accross this Cart.
|
|
1206
|
+
*
|
|
1207
|
+
*
|
|
1208
|
+
*/
|
|
1209
|
+
readonly address: _BaseAddress;
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* If the Cart contains a [LineItem](ctp:api:type:LineItem) for a Product Variant with the same [LineItemMode](ctp:api:type:LineItemMode), [Custom Fields](/../api/projects/custom-fields), supply and distribution channel, then only the quantity of the existing Line Item is increased.
|
|
1213
|
+
* If [LineItem](ctp:api:type:LineItem) `shippingDetails` is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up.
|
|
1214
|
+
* The [LineItem](ctp:api:type:LineItem) price is set as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
|
|
1215
|
+
*
|
|
1216
|
+
* If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
|
|
1217
|
+
*
|
|
1218
|
+
* If the Line Items do not have a Price according to the [Product](ctp:api:type:Product) `priceMode` value for a selected currency and/or country, Customer Group, or Channel, a [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) error is returned.
|
|
1219
|
+
*
|
|
1220
|
+
*/
|
|
1221
|
+
export interface MyCartAddLineItemAction {
|
|
1222
|
+
readonly action: 'addLineItem';
|
|
1223
|
+
/**
|
|
1224
|
+
* User-defined unique identifier of the LineItem.
|
|
1225
|
+
*
|
|
1226
|
+
*
|
|
1227
|
+
*/
|
|
1228
|
+
readonly key?: string;
|
|
1229
|
+
/**
|
|
1230
|
+
* `id` of the [Product](ctp:api:type:Product).
|
|
1231
|
+
*
|
|
1232
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
1233
|
+
*
|
|
1234
|
+
*
|
|
1235
|
+
*/
|
|
1236
|
+
readonly productId?: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
|
|
1239
|
+
*
|
|
1240
|
+
* If not given, the Master Variant is used.
|
|
1241
|
+
*
|
|
1242
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
1243
|
+
*
|
|
1244
|
+
*
|
|
1245
|
+
*/
|
|
1246
|
+
readonly variantId?: number;
|
|
1247
|
+
/**
|
|
1248
|
+
* `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
|
|
1249
|
+
*
|
|
1250
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
1251
|
+
*
|
|
1252
|
+
*
|
|
1253
|
+
*/
|
|
1254
|
+
readonly sku?: string;
|
|
1255
|
+
/**
|
|
1256
|
+
* Number of Line Items to add to the Cart.
|
|
1257
|
+
*
|
|
1258
|
+
*
|
|
1259
|
+
*/
|
|
1260
|
+
readonly quantity?: number;
|
|
1261
|
+
/**
|
|
1262
|
+
* Date and time (UTC) the Line Item was added to the Cart.
|
|
1263
|
+
* If not set, it defaults to the current date and time.
|
|
1264
|
+
*
|
|
1265
|
+
* Optional for backwards compatibility reasons.
|
|
1266
|
+
*
|
|
1267
|
+
*
|
|
1268
|
+
*/
|
|
1269
|
+
readonly addedAt?: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price.
|
|
1272
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
1273
|
+
* If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set, the Channel must match one of the Store's distribution channels.
|
|
1274
|
+
*
|
|
1275
|
+
*
|
|
1276
|
+
*/
|
|
1277
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
1278
|
+
/**
|
|
1279
|
+
* Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
|
|
1280
|
+
* The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
1281
|
+
*
|
|
1282
|
+
*
|
|
1283
|
+
*/
|
|
1284
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
1285
|
+
/**
|
|
1286
|
+
* Container for Line Item-specific addresses.
|
|
1287
|
+
*
|
|
1288
|
+
*
|
|
1289
|
+
*/
|
|
1290
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
1291
|
+
/**
|
|
1292
|
+
* Custom Fields for the Line Item.
|
|
1293
|
+
*
|
|
1294
|
+
*
|
|
1295
|
+
*/
|
|
1296
|
+
readonly custom?: CustomFieldsDraft;
|
|
1297
|
+
}
|
|
1298
|
+
export interface MyCartAddPaymentAction {
|
|
1299
|
+
readonly action: 'addPayment';
|
|
1300
|
+
/**
|
|
1301
|
+
* Payment to add to the Cart.
|
|
1302
|
+
* Must not be assigned to another Order or active Cart already.
|
|
1303
|
+
*
|
|
1304
|
+
*
|
|
1305
|
+
*/
|
|
1306
|
+
readonly payment: PaymentResourceIdentifier;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* To override the shipping details, see [Set LineItem ShippingDetails](ctp:api:type:MyCartSetLineItemShippingDetailsAction).
|
|
1310
|
+
*
|
|
1311
|
+
*/
|
|
1312
|
+
export interface MyCartApplyDeltaToLineItemShippingDetailsTargetsAction {
|
|
1313
|
+
readonly action: 'applyDeltaToLineItemShippingDetailsTargets';
|
|
1314
|
+
/**
|
|
1315
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1316
|
+
*
|
|
1317
|
+
*
|
|
1318
|
+
*/
|
|
1319
|
+
readonly lineItemId?: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1322
|
+
*
|
|
1323
|
+
*
|
|
1324
|
+
*/
|
|
1325
|
+
readonly lineItemKey?: string;
|
|
1326
|
+
/**
|
|
1327
|
+
* Using positive or negative quantities increases or decreases the number of items shipped to an address.
|
|
1328
|
+
*
|
|
1329
|
+
*
|
|
1330
|
+
*/
|
|
1331
|
+
readonly targetsDelta: ItemShippingTarget[];
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* When multiple shipping addresses are set for a Line Item,
|
|
1335
|
+
* use the [Remove LineItem](ctp:api:type:CartRemoveLineItemAction) and [Add LineItem](ctp:api:type:CartAddLineItemAction) update action
|
|
1336
|
+
* to change the shipping details.
|
|
1337
|
+
* Since it is not possible for the API to infer how the overall change in the Line Item quantity should be distributed over the sub-quantities,
|
|
1338
|
+
* the `shippingDetails` field is kept in its current state to avoid data loss.
|
|
1339
|
+
*
|
|
1340
|
+
* To change the Line Item quantity and shipping details together,
|
|
1341
|
+
* use this update action in combination with the [Set LineItem ShippingDetails](ctp:api:type:CartSetLineItemShippingDetailsAction) update action
|
|
1342
|
+
* in a single Cart update command.
|
|
1343
|
+
*
|
|
1344
|
+
* When the action applies to [LineItems](ctp:api:type:LineItem) with `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode),
|
|
1345
|
+
* it will be changed to `ExternalPrice` and the existing `externalPrice` value, i.e. `LineItem.price`, will be retained.
|
|
1346
|
+
* The LineItem total will be calculated by the system instead, so that the `externalTotalPrice` will be dropped.
|
|
1347
|
+
*
|
|
1348
|
+
*/
|
|
1349
|
+
export interface MyCartChangeLineItemQuantityAction {
|
|
1350
|
+
readonly action: 'changeLineItemQuantity';
|
|
1351
|
+
/**
|
|
1352
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1353
|
+
*
|
|
1354
|
+
*
|
|
1355
|
+
*/
|
|
1356
|
+
readonly lineItemId?: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1359
|
+
*
|
|
1360
|
+
*
|
|
1361
|
+
*/
|
|
1362
|
+
readonly lineItemKey?: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* New value to set.
|
|
1365
|
+
*
|
|
1366
|
+
* If `0`, the Line Item is removed from the Cart.
|
|
1367
|
+
*
|
|
1368
|
+
*
|
|
1369
|
+
*/
|
|
1370
|
+
readonly quantity: number;
|
|
1371
|
+
}
|
|
1372
|
+
export interface MyCartChangeLineItemsOrderAction {
|
|
1373
|
+
readonly action: 'changeLineItemsOrder';
|
|
1374
|
+
/**
|
|
1375
|
+
* All existing [LineItem](ctp:api:type:LineItem) `id`s of the [Cart](ctp:api:type:Cart) in the desired new order.
|
|
1376
|
+
*
|
|
1377
|
+
*
|
|
1378
|
+
*/
|
|
1379
|
+
readonly lineItemOrder: string[];
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* - When `External` [TaxMode](ctp:api:type:TaxMode) is changed to `Platform` or `Disabled`, all previously set external Tax Rates are removed.
|
|
1383
|
+
* - When set to `Platform`, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's `shippingAddress`.
|
|
1384
|
+
*
|
|
1385
|
+
*/
|
|
1386
|
+
export interface MyCartChangeTaxModeAction {
|
|
1387
|
+
readonly action: 'changeTaxMode';
|
|
1388
|
+
/**
|
|
1389
|
+
* The new TaxMode.
|
|
1390
|
+
*
|
|
1391
|
+
*
|
|
1392
|
+
*/
|
|
1393
|
+
readonly taxMode: TaxMode;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* This update action does not set any Cart field in particular, but it triggers several [Cart updates](/../api/carts-orders-overview#cart-updates)
|
|
1397
|
+
* to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and
|
|
1398
|
+
* prices on related Products have changed in the meanwhile.
|
|
1399
|
+
*
|
|
1400
|
+
* If the `priceMode` of the [Product](ctp:api:type:Product) related to a Line Item is of `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum),
|
|
1401
|
+
* the updated `price` of that [LineItem](ctp:api:type:LineItem) may not correspond to a Price in the `variant.prices` anymore.
|
|
1402
|
+
*
|
|
1403
|
+
*/
|
|
1404
|
+
export interface MyCartRecalculateAction {
|
|
1405
|
+
readonly action: 'recalculate';
|
|
1406
|
+
/**
|
|
1407
|
+
* - Leave empty or set to `false` to only update the Prices and TaxRates of the Line Items.
|
|
1408
|
+
* - Set to `true` to update the Line Items' product data (like `name`, `variant` and `productType`) also.
|
|
1409
|
+
*
|
|
1410
|
+
*
|
|
1411
|
+
*/
|
|
1412
|
+
readonly updateProductData?: boolean;
|
|
1413
|
+
}
|
|
1414
|
+
export interface MyCartRemoveDiscountCodeAction {
|
|
1415
|
+
readonly action: 'removeDiscountCode';
|
|
1416
|
+
/**
|
|
1417
|
+
* Discount Code to remove from the Cart.
|
|
1418
|
+
*
|
|
1419
|
+
*
|
|
1420
|
+
*/
|
|
1421
|
+
readonly discountCode: DiscountCodeReference;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* An address can only be removed if it is not referenced in any [ItemShippingTarget](ctp:api:type:ItemShippingTarget) of the Cart.
|
|
1425
|
+
*
|
|
1426
|
+
*/
|
|
1427
|
+
export interface MyCartRemoveItemShippingAddressAction {
|
|
1428
|
+
readonly action: 'removeItemShippingAddress';
|
|
1429
|
+
/**
|
|
1430
|
+
* `key` of the Address to remove from `itemShippingAddresses`.
|
|
1431
|
+
*
|
|
1432
|
+
*
|
|
1433
|
+
*/
|
|
1434
|
+
readonly addressKey: string;
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* The [LineItem](ctp:api:type:LineItem) price is updated as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
|
|
1438
|
+
*
|
|
1439
|
+
*/
|
|
1440
|
+
export interface MyCartRemoveLineItemAction {
|
|
1441
|
+
readonly action: 'removeLineItem';
|
|
1442
|
+
/**
|
|
1443
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1444
|
+
*
|
|
1445
|
+
*
|
|
1446
|
+
*/
|
|
1447
|
+
readonly lineItemId?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1450
|
+
*
|
|
1451
|
+
*
|
|
1452
|
+
*/
|
|
1453
|
+
readonly lineItemKey?: string;
|
|
1454
|
+
/**
|
|
1455
|
+
* Amount to subtract from the LineItem's `quantity`.
|
|
1456
|
+
* If absent, the LineItem is removed from the Cart.
|
|
1457
|
+
*
|
|
1458
|
+
*
|
|
1459
|
+
*/
|
|
1460
|
+
readonly quantity?: number;
|
|
1461
|
+
/**
|
|
1462
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
1463
|
+
*
|
|
1464
|
+
*
|
|
1465
|
+
*/
|
|
1466
|
+
readonly externalPrice?: _Money;
|
|
1467
|
+
/**
|
|
1468
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` to the given value when decreasing the quantity of a Line Item with the `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
1469
|
+
*
|
|
1470
|
+
*
|
|
1471
|
+
*/
|
|
1472
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
1473
|
+
/**
|
|
1474
|
+
* Container for Line Item-specific addresses to remove.
|
|
1475
|
+
*
|
|
1476
|
+
*
|
|
1477
|
+
*/
|
|
1478
|
+
readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
|
|
1479
|
+
}
|
|
1480
|
+
export interface MyCartRemovePaymentAction {
|
|
1481
|
+
readonly action: 'removePayment';
|
|
1482
|
+
/**
|
|
1483
|
+
* Payment to remove from the Cart.
|
|
1484
|
+
*
|
|
1485
|
+
*
|
|
1486
|
+
*/
|
|
1487
|
+
readonly payment: PaymentResourceIdentifier;
|
|
1488
|
+
}
|
|
1489
|
+
export interface MyCartSetBillingAddressAction {
|
|
1490
|
+
readonly action: 'setBillingAddress';
|
|
1491
|
+
/**
|
|
1492
|
+
* Value to set.
|
|
1493
|
+
* If empty, any existing value is removed.
|
|
1494
|
+
*
|
|
1495
|
+
*
|
|
1496
|
+
*/
|
|
1497
|
+
readonly address?: _BaseAddress;
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Updates the Business Unit on the Cart. The Cart must have an existing Business Unit assigned already.
|
|
1501
|
+
*
|
|
1502
|
+
*/
|
|
1503
|
+
export interface MyCartSetBusinessUnitAction {
|
|
1504
|
+
readonly action: 'setBusinessUnit';
|
|
1505
|
+
/**
|
|
1506
|
+
* New Business Unit to assign to the Cart, which must have access to the [Store](/../api/projects/stores) that is set on the Cart.
|
|
1507
|
+
* Additionally, the authenticated user must be an [Associate](/projects/business-units#associate) in the [Business Unit](/projects/business-units#businessunit).
|
|
1508
|
+
*
|
|
1509
|
+
*
|
|
1510
|
+
*/
|
|
1511
|
+
readonly businessUnit: BusinessUnitResourceIdentifier;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Setting the country can lead to changes in the [LineItem](ctp:api:type:LineItem) prices.
|
|
1515
|
+
*
|
|
1516
|
+
*/
|
|
1517
|
+
export interface MyCartSetCountryAction {
|
|
1518
|
+
readonly action: 'setCountry';
|
|
1519
|
+
/**
|
|
1520
|
+
* Value to set.
|
|
1521
|
+
* If empty, any existing value is removed.
|
|
1522
|
+
*
|
|
1523
|
+
* If the Cart is bound to a `store`, the provided value must be included in the [Store's](ctp:api:type:Store) `countries`.
|
|
1524
|
+
* Otherwise a [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError) error is returned.
|
|
1525
|
+
*
|
|
1526
|
+
*
|
|
1527
|
+
*/
|
|
1528
|
+
readonly country?: string;
|
|
1529
|
+
}
|
|
1530
|
+
export interface MyCartSetCustomFieldAction {
|
|
1531
|
+
readonly action: 'setCustomField';
|
|
1532
|
+
/**
|
|
1533
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1534
|
+
*
|
|
1535
|
+
*
|
|
1536
|
+
*/
|
|
1537
|
+
readonly name: string;
|
|
1538
|
+
/**
|
|
1539
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1540
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1541
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1542
|
+
*
|
|
1543
|
+
*
|
|
1544
|
+
*/
|
|
1545
|
+
readonly value?: any;
|
|
1546
|
+
}
|
|
1547
|
+
export interface MyCartSetCustomTypeAction {
|
|
1548
|
+
readonly action: 'setCustomType';
|
|
1549
|
+
/**
|
|
1550
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Cart with [Custom Fields](/../api/projects/custom-fields).
|
|
1551
|
+
* If absent, any existing Type and Custom Fields are removed from the Cart.
|
|
1552
|
+
*
|
|
1553
|
+
*
|
|
1554
|
+
*/
|
|
1555
|
+
readonly type?: TypeResourceIdentifier;
|
|
1556
|
+
/**
|
|
1557
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Cart.
|
|
1558
|
+
*
|
|
1559
|
+
*
|
|
1560
|
+
*/
|
|
1561
|
+
readonly fields?: FieldContainer;
|
|
1562
|
+
}
|
|
1563
|
+
export interface MyCartSetCustomerEmailAction {
|
|
1564
|
+
readonly action: 'setCustomerEmail';
|
|
1565
|
+
/**
|
|
1566
|
+
* Value to set.
|
|
1567
|
+
* If empty, any existing value is removed.
|
|
1568
|
+
*
|
|
1569
|
+
*
|
|
1570
|
+
*/
|
|
1571
|
+
readonly email?: string;
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Number of days after which a Cart with `Active` [CartState](ctp:api:type:CartState) is deleted since its last modification.
|
|
1575
|
+
*
|
|
1576
|
+
* If a [ChangeSubscription](ctp:api:type:ChangeSubscription) exists for Carts, a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) is sent.
|
|
1577
|
+
*
|
|
1578
|
+
*/
|
|
1579
|
+
export interface MyCartSetDeleteDaysAfterLastModificationAction {
|
|
1580
|
+
readonly action: 'setDeleteDaysAfterLastModification';
|
|
1581
|
+
/**
|
|
1582
|
+
* Value to set.
|
|
1583
|
+
* If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
|
|
1584
|
+
*
|
|
1585
|
+
*
|
|
1586
|
+
*/
|
|
1587
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
1588
|
+
}
|
|
1589
|
+
export interface MyCartSetLineItemCustomFieldAction {
|
|
1590
|
+
readonly action: 'setLineItemCustomField';
|
|
1591
|
+
/**
|
|
1592
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1593
|
+
*
|
|
1594
|
+
*
|
|
1595
|
+
*/
|
|
1596
|
+
readonly lineItemId?: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1599
|
+
*
|
|
1600
|
+
*
|
|
1601
|
+
*/
|
|
1602
|
+
readonly lineItemKey?: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1605
|
+
*
|
|
1606
|
+
*
|
|
1607
|
+
*/
|
|
1608
|
+
readonly name: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1611
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1612
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1613
|
+
*
|
|
1614
|
+
*
|
|
1615
|
+
*/
|
|
1616
|
+
readonly value?: any;
|
|
1617
|
+
}
|
|
1618
|
+
export interface MyCartSetLineItemCustomTypeAction {
|
|
1619
|
+
readonly action: 'setLineItemCustomType';
|
|
1620
|
+
/**
|
|
1621
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1622
|
+
*
|
|
1623
|
+
*
|
|
1624
|
+
*/
|
|
1625
|
+
readonly lineItemId?: string;
|
|
1626
|
+
/**
|
|
1627
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1628
|
+
*
|
|
1629
|
+
*
|
|
1630
|
+
*/
|
|
1631
|
+
readonly lineItemKey?: string;
|
|
1632
|
+
/**
|
|
1633
|
+
* Defines the [Type](ctp:api:type:Type) that extends the LineItem with [Custom Fields](/../api/projects/custom-fields).
|
|
1634
|
+
* If absent, any existing Type and Custom Fields are removed from the Line Item.
|
|
1635
|
+
*
|
|
1636
|
+
*
|
|
1637
|
+
*/
|
|
1638
|
+
readonly type?: TypeResourceIdentifier;
|
|
1639
|
+
/**
|
|
1640
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Line Item.
|
|
1641
|
+
*
|
|
1642
|
+
*
|
|
1643
|
+
*/
|
|
1644
|
+
readonly fields?: FieldContainer;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* Setting a distribution channel for a [LineItem](ctp:api:type:LineItem) can lead to an updated `price` as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
|
|
1648
|
+
*
|
|
1649
|
+
*/
|
|
1650
|
+
export interface MyCartSetLineItemDistributionChannelAction {
|
|
1651
|
+
readonly action: 'setLineItemDistributionChannel';
|
|
1652
|
+
/**
|
|
1653
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1654
|
+
*
|
|
1655
|
+
*
|
|
1656
|
+
*/
|
|
1657
|
+
readonly lineItemId?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1660
|
+
*
|
|
1661
|
+
*
|
|
1662
|
+
*/
|
|
1663
|
+
readonly lineItemKey?: string;
|
|
1664
|
+
/**
|
|
1665
|
+
* - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
|
|
1666
|
+
* - If not present, the current [Reference](ctp:api:type:Reference) to a distribution channel is removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
|
|
1667
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
1668
|
+
*
|
|
1669
|
+
*
|
|
1670
|
+
*/
|
|
1671
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
1672
|
+
}
|
|
1673
|
+
export interface MyCartSetLineItemShippingDetailsAction {
|
|
1674
|
+
readonly action: 'setLineItemShippingDetails';
|
|
1675
|
+
/**
|
|
1676
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1677
|
+
*
|
|
1678
|
+
*
|
|
1679
|
+
*/
|
|
1680
|
+
readonly lineItemId?: string;
|
|
1681
|
+
/**
|
|
1682
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1683
|
+
*
|
|
1684
|
+
*
|
|
1685
|
+
*/
|
|
1686
|
+
readonly lineItemKey?: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* Value to set.
|
|
1689
|
+
* If empty, the existing value is removed.
|
|
1690
|
+
*
|
|
1691
|
+
*
|
|
1692
|
+
*/
|
|
1693
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* Performing this action has no impact on inventory that should be reserved.
|
|
1697
|
+
*
|
|
1698
|
+
*/
|
|
1699
|
+
export interface MyCartSetLineItemSupplyChannelAction {
|
|
1700
|
+
readonly action: 'setLineItemSupplyChannel';
|
|
1701
|
+
/**
|
|
1702
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1703
|
+
*
|
|
1704
|
+
*
|
|
1705
|
+
*/
|
|
1706
|
+
readonly lineItemId?: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1709
|
+
*
|
|
1710
|
+
*
|
|
1711
|
+
*/
|
|
1712
|
+
readonly lineItemKey?: string;
|
|
1713
|
+
/**
|
|
1714
|
+
* - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
|
|
1715
|
+
* - If not present, the current [Reference](ctp:api:type:Reference) to a supply channel will be removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
|
|
1716
|
+
* The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
1717
|
+
*
|
|
1718
|
+
*
|
|
1719
|
+
*/
|
|
1720
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
1721
|
+
}
|
|
1722
|
+
export interface MyCartSetLocaleAction {
|
|
1723
|
+
readonly action: 'setLocale';
|
|
1724
|
+
/**
|
|
1725
|
+
* Value to set.
|
|
1726
|
+
* Must be one of the [Project](ctp:api:type:Project)'s `languages`.
|
|
1727
|
+
* If empty, any existing value will be removed.
|
|
1728
|
+
*
|
|
1729
|
+
*
|
|
1730
|
+
*/
|
|
1731
|
+
readonly locale?: string;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Setting the shipping address also sets the [TaxRate](ctp:api:type:TaxRate) of Line Items and calculates the [TaxedPrice](ctp:api:type:TaxedPrice).
|
|
1735
|
+
*
|
|
1736
|
+
* If a matching price cannot be found for the given shipping address during [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection),
|
|
1737
|
+
* a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
|
|
1738
|
+
*
|
|
1739
|
+
* If you want to allow shipping to states inside a country that are not explicitly covered by a TaxRate,
|
|
1740
|
+
* set the `countryTaxRateFallbackEnabled` field to `true` in the [CartsConfiguration](ctp:api:type:CartsConfiguration) by using
|
|
1741
|
+
* the [Change CountryTaxRateFallbackEnabled](ctp:api:type:ProjectChangeCountryTaxRateFallbackEnabledAction) update action.
|
|
1742
|
+
*
|
|
1743
|
+
*/
|
|
1744
|
+
export interface MyCartSetShippingAddressAction {
|
|
1745
|
+
readonly action: 'setShippingAddress';
|
|
1746
|
+
/**
|
|
1747
|
+
* Value to set.
|
|
1748
|
+
* If not set, the shipping address is unset, and the `taxedPrice` and `taxRate` are unset in all Line Items.
|
|
1749
|
+
*
|
|
1750
|
+
*
|
|
1751
|
+
*/
|
|
1752
|
+
readonly address?: _BaseAddress;
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* To set the Cart's Shipping Method the Cart must have the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
|
|
1756
|
+
*
|
|
1757
|
+
*/
|
|
1758
|
+
export interface MyCartSetShippingMethodAction {
|
|
1759
|
+
readonly action: 'setShippingMethod';
|
|
1760
|
+
/**
|
|
1761
|
+
* Value to set.
|
|
1762
|
+
* If empty, any existing value is removed.
|
|
1763
|
+
*
|
|
1764
|
+
* If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
|
|
1765
|
+
*
|
|
1766
|
+
*
|
|
1767
|
+
*/
|
|
1768
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
1769
|
+
/**
|
|
1770
|
+
* An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
1771
|
+
*
|
|
1772
|
+
*
|
|
1773
|
+
*/
|
|
1774
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Updates an address in `itemShippingAddresses` by keeping the Address `key`.
|
|
1778
|
+
*
|
|
1779
|
+
*/
|
|
1780
|
+
export interface MyCartUpdateItemShippingAddressAction {
|
|
1781
|
+
readonly action: 'updateItemShippingAddress';
|
|
1782
|
+
/**
|
|
1783
|
+
* The new Address with the same `key` as the Address it will replace.
|
|
1784
|
+
*
|
|
1785
|
+
*
|
|
1786
|
+
*/
|
|
1787
|
+
readonly address: _BaseAddress;
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Adding an address to the Customer produces the [CustomerAddressAdded](ctp:api:type:CustomerAddressAddedMessage) Message.
|
|
1791
|
+
*
|
|
1792
|
+
*/
|
|
1793
|
+
export interface MyCustomerAddAddressAction {
|
|
1794
|
+
readonly action: 'addAddress';
|
|
1795
|
+
/**
|
|
1796
|
+
* Value to append to the `addresses` array.
|
|
1797
|
+
*
|
|
1798
|
+
*
|
|
1799
|
+
*/
|
|
1800
|
+
readonly address: _BaseAddress;
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* Adds an address from the `addresses` array to `billingAddressIds`. Either `addressId` or `addressKey` is required.
|
|
1804
|
+
*
|
|
1805
|
+
*/
|
|
1806
|
+
export interface MyCustomerAddBillingAddressIdAction {
|
|
1807
|
+
readonly action: 'addBillingAddressId';
|
|
1808
|
+
/**
|
|
1809
|
+
* `id` of the [Address](ctp:api:type:Address) to become a billing address.
|
|
1810
|
+
*
|
|
1811
|
+
*
|
|
1812
|
+
*/
|
|
1813
|
+
readonly addressId?: string;
|
|
1814
|
+
/**
|
|
1815
|
+
* `key` of the [Address](ctp:api:type:Address) to become a billing address.
|
|
1816
|
+
*
|
|
1817
|
+
*
|
|
1818
|
+
*/
|
|
1819
|
+
readonly addressKey?: string;
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* Adds an address from the `addresses` array to `shippingAddressIds`. Either `addressId` or `addressKey` is required.
|
|
1823
|
+
*
|
|
1824
|
+
*/
|
|
1825
|
+
export interface MyCustomerAddShippingAddressIdAction {
|
|
1826
|
+
readonly action: 'addShippingAddressId';
|
|
1827
|
+
/**
|
|
1828
|
+
* `id` of the [Address](ctp:api:type:Address) to become a shipping address.
|
|
1829
|
+
*
|
|
1830
|
+
*
|
|
1831
|
+
*/
|
|
1832
|
+
readonly addressId?: string;
|
|
1833
|
+
/**
|
|
1834
|
+
* `key` of the [Address](ctp:api:type:Address) to become a shipping address.
|
|
1835
|
+
*
|
|
1836
|
+
*
|
|
1837
|
+
*/
|
|
1838
|
+
readonly addressKey?: string;
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Changing an address of the Customer produces the [CustomerAddressChanged](ctp:api:type:CustomerAddressChangedMessage) Message.
|
|
1842
|
+
*
|
|
1843
|
+
* Either `addressId` or `addressKey` is required.
|
|
1844
|
+
*
|
|
1845
|
+
*/
|
|
1846
|
+
export interface MyCustomerChangeAddressAction {
|
|
1847
|
+
readonly action: 'changeAddress';
|
|
1848
|
+
/**
|
|
1849
|
+
* `id` of the [Address](ctp:api:type:Address) to change.
|
|
1850
|
+
*
|
|
1851
|
+
*
|
|
1852
|
+
*/
|
|
1853
|
+
readonly addressId?: string;
|
|
1854
|
+
/**
|
|
1855
|
+
* `key` of the [Address](ctp:api:type:Address) to change.
|
|
1856
|
+
*
|
|
1857
|
+
*
|
|
1858
|
+
*/
|
|
1859
|
+
readonly addressKey?: string;
|
|
1860
|
+
/**
|
|
1861
|
+
* Value to set.
|
|
1862
|
+
*
|
|
1863
|
+
*
|
|
1864
|
+
*/
|
|
1865
|
+
readonly address: _BaseAddress;
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Changing the email of the Customer produces the [CustomerEmailChanged](ctp:api:type:CustomerEmailChangedMessage) Message.
|
|
1869
|
+
*
|
|
1870
|
+
*/
|
|
1871
|
+
export interface MyCustomerChangeEmailAction {
|
|
1872
|
+
readonly action: 'changeEmail';
|
|
1873
|
+
/**
|
|
1874
|
+
* New value to set.
|
|
1875
|
+
*
|
|
1876
|
+
*
|
|
1877
|
+
*/
|
|
1878
|
+
readonly email: string;
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Removing an address of the Customer produces the [CustomerAddressRemoved](ctp:api:type:CustomerAddressRemovedMessage) Message.
|
|
1882
|
+
*
|
|
1883
|
+
* Either `addressId` or `addressKey` is required.
|
|
1884
|
+
*
|
|
1885
|
+
*/
|
|
1886
|
+
export interface MyCustomerRemoveAddressAction {
|
|
1887
|
+
readonly action: 'removeAddress';
|
|
1888
|
+
/**
|
|
1889
|
+
* `id` of the [Address](ctp:api:type:Address) to remove.
|
|
1890
|
+
*
|
|
1891
|
+
*
|
|
1892
|
+
*/
|
|
1893
|
+
readonly addressId?: string;
|
|
1894
|
+
/**
|
|
1895
|
+
* `key` of the [Address](ctp:api:type:Address) to remove.
|
|
1896
|
+
*
|
|
1897
|
+
*
|
|
1898
|
+
*/
|
|
1899
|
+
readonly addressKey?: string;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* Removes an existing billing address from `billingAddressesIds`.
|
|
1903
|
+
* If the billing address is the default billing address, the `defaultBillingAddressId` is unset. Either `addressId` or `addressKey` is required.
|
|
1904
|
+
*
|
|
1905
|
+
*/
|
|
1906
|
+
export interface MyCustomerRemoveBillingAddressIdAction {
|
|
1907
|
+
readonly action: 'removeBillingAddressId';
|
|
1908
|
+
/**
|
|
1909
|
+
* `id` of the [Address](ctp:api:type:Address) to remove from `billingAddressesIds`.
|
|
1910
|
+
*
|
|
1911
|
+
*
|
|
1912
|
+
*/
|
|
1913
|
+
readonly addressId?: string;
|
|
1914
|
+
/**
|
|
1915
|
+
* `key` of the [Address](ctp:api:type:Address) to remove from `billingAddressesIds`.
|
|
1916
|
+
*
|
|
1917
|
+
*
|
|
1918
|
+
*/
|
|
1919
|
+
readonly addressKey?: string;
|
|
1920
|
+
}
|
|
1921
|
+
/**
|
|
1922
|
+
* Removes an existing shipping address from `shippingAddressesIds`.
|
|
1923
|
+
* If the shipping address is the default shipping address, the `defaultShippingAddressId` is unset. Either `addressId` or `addressKey` is required.
|
|
1924
|
+
*
|
|
1925
|
+
*/
|
|
1926
|
+
export interface MyCustomerRemoveShippingAddressIdAction {
|
|
1927
|
+
readonly action: 'removeShippingAddressId';
|
|
1928
|
+
/**
|
|
1929
|
+
* `id` of the [Address](ctp:api:type:Address) to remove from `shippingAddressesIds`.
|
|
1930
|
+
*
|
|
1931
|
+
*
|
|
1932
|
+
*/
|
|
1933
|
+
readonly addressId?: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* `key` of the [Address](ctp:api:type:Address) to remove from `shippingAddressesIds`.
|
|
1936
|
+
*
|
|
1937
|
+
*
|
|
1938
|
+
*/
|
|
1939
|
+
readonly addressKey?: string;
|
|
1940
|
+
}
|
|
1941
|
+
/**
|
|
1942
|
+
* Setting the `companyName` field on the Customer produces the [CustomerCompanyNameSet](ctp:api:type:CustomerCompanyNameSetMessage) Message.
|
|
1943
|
+
*
|
|
1944
|
+
*/
|
|
1945
|
+
export interface MyCustomerSetCompanyNameAction {
|
|
1946
|
+
readonly action: 'setCompanyName';
|
|
1947
|
+
/**
|
|
1948
|
+
* Value to set.
|
|
1949
|
+
* If empty, any existing value is removed.
|
|
1950
|
+
*
|
|
1951
|
+
*
|
|
1952
|
+
*/
|
|
1953
|
+
readonly companyName?: string;
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* Adding a Custom Field to a Customer generates the [CustomerCustomFieldAdded](ctp:api:type:CustomerCustomFieldAddedMessage) Message, removing one generates the [CustomerCustomFieldRemoved](ctp:api:type:CustomerCustomFieldRemovedMessage) Message, and updating an existing one generates the [CustomerCustomFieldChanged](ctp:api:type:CustomerCustomFieldChangedMessage) Message.
|
|
1957
|
+
*
|
|
1958
|
+
*/
|
|
1959
|
+
export interface MyCustomerSetCustomFieldAction {
|
|
1960
|
+
readonly action: 'setCustomField';
|
|
1961
|
+
/**
|
|
1962
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1963
|
+
*
|
|
1964
|
+
*
|
|
1965
|
+
*/
|
|
1966
|
+
readonly name: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1969
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1970
|
+
* Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1971
|
+
*
|
|
1972
|
+
*
|
|
1973
|
+
*/
|
|
1974
|
+
readonly value?: any;
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Adding or updating a Custom Type on a Customer generates the [CustomerCustomTypeSet](ctp:api:type:CustomerCustomTypeSetMessage) Message, removing one generates the [CustomerCustomTypeRemoved](ctp:api:type:CustomerCustomTypeRemovedMessage) Message.
|
|
1978
|
+
*
|
|
1979
|
+
*/
|
|
1980
|
+
export interface MyCustomerSetCustomTypeAction {
|
|
1981
|
+
readonly action: 'setCustomType';
|
|
1982
|
+
/**
|
|
1983
|
+
* Defines the [Type](ctp:api:type:Type) that extends the MyCustomer with [Custom Fields](/../api/projects/custom-fields).
|
|
1984
|
+
* If absent, any existing Type and Custom Fields are removed from the MyCustomer.
|
|
1985
|
+
*
|
|
1986
|
+
*
|
|
1987
|
+
*/
|
|
1988
|
+
readonly type?: TypeResourceIdentifier;
|
|
1989
|
+
/**
|
|
1990
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the MyCustomer.
|
|
1991
|
+
*
|
|
1992
|
+
*
|
|
1993
|
+
*/
|
|
1994
|
+
readonly fields?: FieldContainer;
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Setting the date of birth of the Customer produces the [CustomerDateOfBirthSet](ctp:api:type:CustomerDateOfBirthSetMessage) Message.
|
|
1998
|
+
*
|
|
1999
|
+
*/
|
|
2000
|
+
export interface MyCustomerSetDateOfBirthAction {
|
|
2001
|
+
readonly action: 'setDateOfBirth';
|
|
2002
|
+
/**
|
|
2003
|
+
* Value to set.
|
|
2004
|
+
* If empty, any existing value is removed.
|
|
2005
|
+
*
|
|
2006
|
+
*
|
|
2007
|
+
*/
|
|
2008
|
+
readonly dateOfBirth?: string;
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Sets the default billing address from `addresses`.
|
|
2012
|
+
* If the address is not currently a billing address, it is added to `billingAddressIds`. Either `addressId` or `addressKey` is required.
|
|
2013
|
+
*
|
|
2014
|
+
*/
|
|
2015
|
+
export interface MyCustomerSetDefaultBillingAddressAction {
|
|
2016
|
+
readonly action: 'setDefaultBillingAddress';
|
|
2017
|
+
/**
|
|
2018
|
+
* `id` of the [Address](ctp:api:type:Address) to become the default billing address.
|
|
2019
|
+
*
|
|
2020
|
+
*
|
|
2021
|
+
*/
|
|
2022
|
+
readonly addressId?: string;
|
|
2023
|
+
/**
|
|
2024
|
+
* `key` of the [Address](ctp:api:type:Address) to become the default billing address.
|
|
2025
|
+
*
|
|
2026
|
+
*
|
|
2027
|
+
*/
|
|
2028
|
+
readonly addressKey?: string;
|
|
2029
|
+
}
|
|
2030
|
+
/**
|
|
2031
|
+
* Sets the default shipping address from `addresses`.
|
|
2032
|
+
* If the address is not currently a shipping address, it is added to `shippingAddressIds`. Either `addressId` or `addressKey` is required.
|
|
2033
|
+
*
|
|
2034
|
+
*/
|
|
2035
|
+
export interface MyCustomerSetDefaultShippingAddressAction {
|
|
2036
|
+
readonly action: 'setDefaultShippingAddress';
|
|
2037
|
+
/**
|
|
2038
|
+
* `id` of the [Address](ctp:api:type:Address) to become the default shipping address.
|
|
2039
|
+
*
|
|
2040
|
+
*
|
|
2041
|
+
*/
|
|
2042
|
+
readonly addressId?: string;
|
|
2043
|
+
/**
|
|
2044
|
+
* `key` of the [Address](ctp:api:type:Address) to become the default shipping address.
|
|
2045
|
+
*
|
|
2046
|
+
*
|
|
2047
|
+
*/
|
|
2048
|
+
readonly addressKey?: string;
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* Setting the first name of the Customer produces the [CustomerFirstNameSet](ctp:api:type:CustomerFirstNameSetMessage) Message.
|
|
2052
|
+
*
|
|
2053
|
+
*/
|
|
2054
|
+
export interface MyCustomerSetFirstNameAction {
|
|
2055
|
+
readonly action: 'setFirstName';
|
|
2056
|
+
/**
|
|
2057
|
+
* Value to set.
|
|
2058
|
+
* If empty, any existing value is removed.
|
|
2059
|
+
*
|
|
2060
|
+
*
|
|
2061
|
+
*/
|
|
2062
|
+
readonly firstName?: string;
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* Setting the last name of the Customer produces the [CustomerLastNameSet](ctp:api:type:CustomerLastNameSetMessage) Message.
|
|
2066
|
+
*
|
|
2067
|
+
*/
|
|
2068
|
+
export interface MyCustomerSetLastNameAction {
|
|
2069
|
+
readonly action: 'setLastName';
|
|
2070
|
+
/**
|
|
2071
|
+
* Value to set.
|
|
2072
|
+
* If empty, any existing value is removed.
|
|
2073
|
+
*
|
|
2074
|
+
*
|
|
2075
|
+
*/
|
|
2076
|
+
readonly lastName?: string;
|
|
2077
|
+
}
|
|
2078
|
+
export interface MyCustomerSetLocaleAction {
|
|
2079
|
+
readonly action: 'setLocale';
|
|
2080
|
+
/**
|
|
2081
|
+
* Value to set.
|
|
2082
|
+
* Must be one of the languages supported by the [Project](ctp:api:type:Project).
|
|
2083
|
+
*
|
|
2084
|
+
*
|
|
2085
|
+
*/
|
|
2086
|
+
readonly locale?: string;
|
|
2087
|
+
}
|
|
2088
|
+
export interface MyCustomerSetMiddleNameAction {
|
|
2089
|
+
readonly action: 'setMiddleName';
|
|
2090
|
+
/**
|
|
2091
|
+
* Value to set.
|
|
2092
|
+
* If empty, any existing value is removed.
|
|
2093
|
+
*
|
|
2094
|
+
*
|
|
2095
|
+
*/
|
|
2096
|
+
readonly middleName?: string;
|
|
2097
|
+
}
|
|
2098
|
+
export interface MyCustomerSetSalutationAction {
|
|
2099
|
+
readonly action: 'setSalutation';
|
|
2100
|
+
/**
|
|
2101
|
+
* Value to set.
|
|
2102
|
+
* If empty, any existing value is removed.
|
|
2103
|
+
*
|
|
2104
|
+
*
|
|
2105
|
+
*/
|
|
2106
|
+
readonly salutation?: string;
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Setting the title of the Customer produces the [CustomerTitleSetMessage](ctp:api:type:CustomerTitleSetMessage).
|
|
2110
|
+
*
|
|
2111
|
+
*/
|
|
2112
|
+
export interface MyCustomerSetTitleAction {
|
|
2113
|
+
readonly action: 'setTitle';
|
|
2114
|
+
/**
|
|
2115
|
+
* Value to set.
|
|
2116
|
+
* If empty, any existing value is removed.
|
|
2117
|
+
*
|
|
2118
|
+
*
|
|
2119
|
+
*/
|
|
2120
|
+
readonly title?: string;
|
|
2121
|
+
}
|
|
2122
|
+
export interface MyCustomerSetVatIdAction {
|
|
2123
|
+
readonly action: 'setVatId';
|
|
2124
|
+
/**
|
|
2125
|
+
* Value to set.
|
|
2126
|
+
* If empty, any existing value is removed.
|
|
2127
|
+
*
|
|
2128
|
+
*
|
|
2129
|
+
*/
|
|
2130
|
+
readonly vatId?: string;
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Adding a Transaction to a Payment generates the [PaymentTransactionAdded](ctp:api:type:PaymentTransactionAddedMessage) Message.
|
|
2134
|
+
* Once a Transaction is added to the Payment, it can no longer be updated or deleted using the My Payments API.
|
|
2135
|
+
*
|
|
2136
|
+
*/
|
|
2137
|
+
export interface MyPaymentAddTransactionAction {
|
|
2138
|
+
readonly action: 'addTransaction';
|
|
2139
|
+
/**
|
|
2140
|
+
* Transaction to add to the Payment.
|
|
2141
|
+
*
|
|
2142
|
+
*
|
|
2143
|
+
*/
|
|
2144
|
+
readonly transaction: TransactionDraft;
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Can be used to update the Payment if a customer changes the [Cart](ctp:api:type:Cart), or adds or removes a [CartDiscount](ctp:api:type:CartDiscount) during checkout.
|
|
2148
|
+
*
|
|
2149
|
+
*/
|
|
2150
|
+
export interface MyPaymentChangeAmountPlannedAction {
|
|
2151
|
+
readonly action: 'changeAmountPlanned';
|
|
2152
|
+
/**
|
|
2153
|
+
* New value to set.
|
|
2154
|
+
*
|
|
2155
|
+
*
|
|
2156
|
+
*/
|
|
2157
|
+
readonly amount: _Money;
|
|
2158
|
+
}
|
|
2159
|
+
export interface MyPaymentSetCustomFieldAction {
|
|
2160
|
+
readonly action: 'setCustomField';
|
|
2161
|
+
/**
|
|
2162
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2163
|
+
*
|
|
2164
|
+
*
|
|
2165
|
+
*/
|
|
2166
|
+
readonly name: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2169
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2170
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2171
|
+
*
|
|
2172
|
+
*
|
|
2173
|
+
*/
|
|
2174
|
+
readonly value?: any;
|
|
2175
|
+
}
|
|
2176
|
+
export interface MyPaymentSetMethodInfoInterfaceAction {
|
|
2177
|
+
readonly action: 'setMethodInfoInterface';
|
|
2178
|
+
/**
|
|
2179
|
+
* Value to set.
|
|
2180
|
+
* Once set, the `paymentInterface` of the `paymentMethodInfo` cannot be changed.
|
|
2181
|
+
*
|
|
2182
|
+
*
|
|
2183
|
+
*/
|
|
2184
|
+
readonly interface: string;
|
|
2185
|
+
}
|
|
2186
|
+
export interface MyPaymentSetMethodInfoMethodAction {
|
|
2187
|
+
readonly action: 'setMethodInfoMethod';
|
|
2188
|
+
/**
|
|
2189
|
+
* Value to set.
|
|
2190
|
+
* If empty, any existing value will be removed.
|
|
2191
|
+
*
|
|
2192
|
+
*
|
|
2193
|
+
*/
|
|
2194
|
+
readonly method?: string;
|
|
2195
|
+
}
|
|
2196
|
+
export interface MyPaymentSetMethodInfoNameAction {
|
|
2197
|
+
readonly action: 'setMethodInfoName';
|
|
2198
|
+
/**
|
|
2199
|
+
* Value to set.
|
|
2200
|
+
* If empty, any existing value will be removed.
|
|
2201
|
+
*
|
|
2202
|
+
*
|
|
2203
|
+
*/
|
|
2204
|
+
readonly name?: LocalizedString;
|
|
2205
|
+
}
|
|
2206
|
+
export interface MyPaymentSetTransactionCustomFieldAction {
|
|
2207
|
+
readonly action: 'setTransactionCustomField';
|
|
2208
|
+
/**
|
|
2209
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2210
|
+
*
|
|
2211
|
+
*
|
|
2212
|
+
*/
|
|
2213
|
+
readonly name: string;
|
|
2214
|
+
/**
|
|
2215
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2216
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2217
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2218
|
+
*
|
|
2219
|
+
*
|
|
2220
|
+
*/
|
|
2221
|
+
readonly value?: any;
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* When accepting, declining, or renegotiating [B2B Quotes](/../api/associates-overview#b2b-resources), the Customer must have the `AcceptMyQuotes`, `DeclineMyQuotes`, or `RenegotiateMyQuotes` [Permission](ctp:api:type:Permission), respectively. If the required [Permission](/projects/associate-roles#permission) is missing, an [AssociateMissingPermission](/errors#associatemissingpermission) error is returned.
|
|
2225
|
+
*/
|
|
2226
|
+
export interface MyQuoteChangeMyQuoteStateAction {
|
|
2227
|
+
readonly action: 'changeMyQuoteState';
|
|
2228
|
+
/**
|
|
2229
|
+
* New state to be set for the Quote.
|
|
2230
|
+
*
|
|
2231
|
+
*/
|
|
2232
|
+
readonly quoteState: MyQuoteState;
|
|
2233
|
+
}
|
|
2234
|
+
/**
|
|
2235
|
+
* Transitions the `quoteRequestState` of the Quote Request to `Cancelled`. Can only be used when the Quote Request is in state `Submitted`.
|
|
2236
|
+
*
|
|
2237
|
+
*/
|
|
2238
|
+
export interface MyQuoteRequestCancelAction {
|
|
2239
|
+
readonly action: 'cancelQuoteRequest';
|
|
2240
|
+
}
|
|
2241
|
+
export interface MyShoppingListAddLineItemAction {
|
|
2242
|
+
readonly action: 'addLineItem';
|
|
2243
|
+
/**
|
|
2244
|
+
* User-defined identifier of the ShoppingListLineItem. Must be unique per [ShoppingList](ctp:api:type:ShoppingList).
|
|
2245
|
+
*
|
|
2246
|
+
*/
|
|
2247
|
+
readonly key?: string;
|
|
2248
|
+
/**
|
|
2249
|
+
* `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
|
|
2250
|
+
*
|
|
2251
|
+
*
|
|
2252
|
+
*/
|
|
2253
|
+
readonly sku?: string;
|
|
2254
|
+
/**
|
|
2255
|
+
* Unique identifier of a [Product](ctp:api:type:Product).
|
|
2256
|
+
*
|
|
2257
|
+
*
|
|
2258
|
+
*/
|
|
2259
|
+
readonly productId?: string;
|
|
2260
|
+
/**
|
|
2261
|
+
* `id` of the [ProductVariant](ctp:api:type:ProductVariant). If not set, the ShoppingListLineItem refers to the Master Variant.
|
|
2262
|
+
*
|
|
2263
|
+
*
|
|
2264
|
+
*/
|
|
2265
|
+
readonly variantId?: number;
|
|
2266
|
+
/**
|
|
2267
|
+
* Number of Products in the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem).
|
|
2268
|
+
*
|
|
2269
|
+
*
|
|
2270
|
+
*/
|
|
2271
|
+
readonly quantity?: number;
|
|
2272
|
+
/**
|
|
2273
|
+
* Date and time the TextLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used.
|
|
2274
|
+
*
|
|
2275
|
+
*
|
|
2276
|
+
*/
|
|
2277
|
+
readonly addedAt?: string;
|
|
2278
|
+
/**
|
|
2279
|
+
* Custom Fields defined for the ShoppingListLineItem.
|
|
2280
|
+
*
|
|
2281
|
+
*
|
|
2282
|
+
*/
|
|
2283
|
+
readonly custom?: CustomFieldsDraft;
|
|
2284
|
+
}
|
|
2285
|
+
export interface MyShoppingListAddTextLineItemAction {
|
|
2286
|
+
readonly action: 'addTextLineItem';
|
|
2287
|
+
/**
|
|
2288
|
+
* Name of the [TextLineItem](ctp:api:type:TextLineItem).
|
|
2289
|
+
*
|
|
2290
|
+
*
|
|
2291
|
+
*/
|
|
2292
|
+
readonly name: LocalizedString;
|
|
2293
|
+
/**
|
|
2294
|
+
* User-defined identifier of the TextLineItem. Must be unique per [ShoppingList](ctp:api:type:ShoppingList).
|
|
2295
|
+
*
|
|
2296
|
+
*
|
|
2297
|
+
*/
|
|
2298
|
+
readonly key?: string;
|
|
2299
|
+
/**
|
|
2300
|
+
* Description of the TextLineItem.
|
|
2301
|
+
*
|
|
2302
|
+
*
|
|
2303
|
+
*/
|
|
2304
|
+
readonly description?: LocalizedString;
|
|
2305
|
+
/**
|
|
2306
|
+
* Number of entries in the TextLineItem.
|
|
2307
|
+
*
|
|
2308
|
+
*
|
|
2309
|
+
*/
|
|
2310
|
+
readonly quantity?: number;
|
|
2311
|
+
/**
|
|
2312
|
+
* Date and time the TextLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used.
|
|
2313
|
+
*
|
|
2314
|
+
*
|
|
2315
|
+
*/
|
|
2316
|
+
readonly addedAt?: string;
|
|
2317
|
+
/**
|
|
2318
|
+
* Custom Fields defined for the TextLineItem.
|
|
2319
|
+
*
|
|
2320
|
+
*
|
|
2321
|
+
*/
|
|
2322
|
+
readonly custom?: CustomFieldsDraft;
|
|
2323
|
+
}
|
|
2324
|
+
export interface MyShoppingListChangeLineItemQuantityAction {
|
|
2325
|
+
readonly action: 'changeLineItemQuantity';
|
|
2326
|
+
/**
|
|
2327
|
+
* `id` of the ShoppingListLineItem to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2328
|
+
*
|
|
2329
|
+
*
|
|
2330
|
+
*/
|
|
2331
|
+
readonly lineItemId?: string;
|
|
2332
|
+
/**
|
|
2333
|
+
* `key` of the ShoppingListLineItem to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2334
|
+
*
|
|
2335
|
+
*
|
|
2336
|
+
*/
|
|
2337
|
+
readonly lineItemKey?: string;
|
|
2338
|
+
/**
|
|
2339
|
+
* New value to set. If `0`, the ShoppingListLineItem is removed from the ShoppingList.
|
|
2340
|
+
*
|
|
2341
|
+
*
|
|
2342
|
+
*/
|
|
2343
|
+
readonly quantity: number;
|
|
2344
|
+
}
|
|
2345
|
+
export interface MyShoppingListChangeLineItemsOrderAction {
|
|
2346
|
+
readonly action: 'changeLineItemsOrder';
|
|
2347
|
+
/**
|
|
2348
|
+
* All existing [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) `id`s of the [ShoppingList](ctp:api:type:ShoppingList) in the desired new order.
|
|
2349
|
+
*
|
|
2350
|
+
*
|
|
2351
|
+
*/
|
|
2352
|
+
readonly lineItemOrder: string[];
|
|
2353
|
+
}
|
|
2354
|
+
export interface MyShoppingListChangeNameAction {
|
|
2355
|
+
readonly action: 'changeName';
|
|
2356
|
+
/**
|
|
2357
|
+
* New value to set. Must not be empty.
|
|
2358
|
+
*
|
|
2359
|
+
*
|
|
2360
|
+
*/
|
|
2361
|
+
readonly name: LocalizedString;
|
|
2362
|
+
}
|
|
2363
|
+
export interface MyShoppingListChangeTextLineItemNameAction {
|
|
2364
|
+
readonly action: 'changeTextLineItemName';
|
|
2365
|
+
/**
|
|
2366
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2367
|
+
*
|
|
2368
|
+
*
|
|
2369
|
+
*/
|
|
2370
|
+
readonly textLineItemId?: string;
|
|
2371
|
+
/**
|
|
2372
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2373
|
+
*
|
|
2374
|
+
*
|
|
2375
|
+
*/
|
|
2376
|
+
readonly textLineItemKey?: string;
|
|
2377
|
+
/**
|
|
2378
|
+
* New value to set. Must not be empty.
|
|
2379
|
+
*
|
|
2380
|
+
*
|
|
2381
|
+
*/
|
|
2382
|
+
readonly name: LocalizedString;
|
|
2383
|
+
}
|
|
2384
|
+
export interface MyShoppingListChangeTextLineItemQuantityAction {
|
|
2385
|
+
readonly action: 'changeTextLineItemQuantity';
|
|
2386
|
+
/**
|
|
2387
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2388
|
+
*
|
|
2389
|
+
*
|
|
2390
|
+
*/
|
|
2391
|
+
readonly textLineItemId?: string;
|
|
2392
|
+
/**
|
|
2393
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2394
|
+
*
|
|
2395
|
+
*
|
|
2396
|
+
*/
|
|
2397
|
+
readonly textLineItemKey?: string;
|
|
2398
|
+
/**
|
|
2399
|
+
* New value to set. If `0`, the TextLineItem is removed from the ShoppingList.
|
|
2400
|
+
*
|
|
2401
|
+
*
|
|
2402
|
+
*/
|
|
2403
|
+
readonly quantity: number;
|
|
2404
|
+
}
|
|
2405
|
+
export interface MyShoppingListChangeTextLineItemsOrderAction {
|
|
2406
|
+
readonly action: 'changeTextLineItemsOrder';
|
|
2407
|
+
/**
|
|
2408
|
+
* All existing [TextLineItem](ctp:api:type:TextLineItem) `id`s in the desired new order.
|
|
2409
|
+
*
|
|
2410
|
+
*
|
|
2411
|
+
*/
|
|
2412
|
+
readonly textLineItemOrder: string[];
|
|
2413
|
+
}
|
|
2414
|
+
export interface MyShoppingListRemoveLineItemAction {
|
|
2415
|
+
readonly action: 'removeLineItem';
|
|
2416
|
+
/**
|
|
2417
|
+
* The `id` of the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2418
|
+
*
|
|
2419
|
+
*
|
|
2420
|
+
*/
|
|
2421
|
+
readonly lineItemId?: string;
|
|
2422
|
+
/**
|
|
2423
|
+
* The `key` of the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2424
|
+
*
|
|
2425
|
+
*
|
|
2426
|
+
*/
|
|
2427
|
+
readonly lineItemKey?: string;
|
|
2428
|
+
/**
|
|
2429
|
+
* Amount to remove from the `quantity` of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current `quantity` of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.
|
|
2430
|
+
*
|
|
2431
|
+
*
|
|
2432
|
+
*/
|
|
2433
|
+
readonly quantity?: number;
|
|
2434
|
+
}
|
|
2435
|
+
export interface MyShoppingListRemoveTextLineItemAction {
|
|
2436
|
+
readonly action: 'removeTextLineItem';
|
|
2437
|
+
/**
|
|
2438
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2439
|
+
*
|
|
2440
|
+
*
|
|
2441
|
+
*/
|
|
2442
|
+
readonly textLineItemId?: string;
|
|
2443
|
+
/**
|
|
2444
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2445
|
+
*
|
|
2446
|
+
*
|
|
2447
|
+
*/
|
|
2448
|
+
readonly textLineItemKey?: string;
|
|
2449
|
+
/**
|
|
2450
|
+
* Amount to remove from the `quantity` of the TextLineItem. If not set, the TextLineItem is removed from the ShoppingList. If this value matches or exceeds the current `quantity` of the TextLineItem, the TextLineItem is removed from the ShoppingList.
|
|
2451
|
+
*
|
|
2452
|
+
*
|
|
2453
|
+
*/
|
|
2454
|
+
readonly quantity?: number;
|
|
2455
|
+
}
|
|
2456
|
+
export interface MyShoppingListSetCustomFieldAction {
|
|
2457
|
+
readonly action: 'setCustomField';
|
|
2458
|
+
/**
|
|
2459
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2460
|
+
*
|
|
2461
|
+
*
|
|
2462
|
+
*/
|
|
2463
|
+
readonly name: string;
|
|
2464
|
+
/**
|
|
2465
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2466
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2467
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2468
|
+
*
|
|
2469
|
+
*
|
|
2470
|
+
*/
|
|
2471
|
+
readonly value?: any;
|
|
2472
|
+
}
|
|
2473
|
+
export interface MyShoppingListSetCustomTypeAction {
|
|
2474
|
+
readonly action: 'setCustomType';
|
|
2475
|
+
/**
|
|
2476
|
+
* Defines the [Type](ctp:api:type:Type) that extends the MyShoppingList with [Custom Fields](/../api/projects/custom-fields).
|
|
2477
|
+
* If absent, any existing Type and Custom Fields are removed from the MyShoppingList.
|
|
2478
|
+
*
|
|
2479
|
+
*
|
|
2480
|
+
*/
|
|
2481
|
+
readonly type?: TypeResourceIdentifier;
|
|
2482
|
+
/**
|
|
2483
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the MyShoppingList.
|
|
2484
|
+
*
|
|
2485
|
+
*
|
|
2486
|
+
*/
|
|
2487
|
+
readonly fields?: FieldContainer;
|
|
2488
|
+
}
|
|
2489
|
+
export interface MyShoppingListSetDeleteDaysAfterLastModificationAction {
|
|
2490
|
+
readonly action: 'setDeleteDaysAfterLastModification';
|
|
2491
|
+
/**
|
|
2492
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2493
|
+
*
|
|
2494
|
+
*
|
|
2495
|
+
*/
|
|
2496
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
2497
|
+
}
|
|
2498
|
+
export interface MyShoppingListSetDescriptionAction {
|
|
2499
|
+
readonly action: 'setDescription';
|
|
2500
|
+
/**
|
|
2501
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2502
|
+
*
|
|
2503
|
+
*
|
|
2504
|
+
*/
|
|
2505
|
+
readonly description?: LocalizedString;
|
|
2506
|
+
}
|
|
2507
|
+
export interface MyShoppingListSetLineItemCustomFieldAction {
|
|
2508
|
+
readonly action: 'setLineItemCustomField';
|
|
2509
|
+
/**
|
|
2510
|
+
* Unique identifier of an the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem). Either `lineItemId` or `lineItemKey` is required.
|
|
2511
|
+
*
|
|
2512
|
+
*
|
|
2513
|
+
*/
|
|
2514
|
+
readonly lineItemId?: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* The `key` of the [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2517
|
+
*
|
|
2518
|
+
*
|
|
2519
|
+
*/
|
|
2520
|
+
readonly lineItemKey?: string;
|
|
2521
|
+
/**
|
|
2522
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2523
|
+
*
|
|
2524
|
+
*
|
|
2525
|
+
*/
|
|
2526
|
+
readonly name: string;
|
|
2527
|
+
/**
|
|
2528
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2529
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2530
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2531
|
+
*
|
|
2532
|
+
*
|
|
2533
|
+
*/
|
|
2534
|
+
readonly value?: any;
|
|
2535
|
+
}
|
|
2536
|
+
export interface MyShoppingListSetLineItemCustomTypeAction {
|
|
2537
|
+
readonly action: 'setLineItemCustomType';
|
|
2538
|
+
/**
|
|
2539
|
+
* Unique identifier of an existing [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem) in the [ShoppingList](ctp:api:type:ShoppingList).
|
|
2540
|
+
*
|
|
2541
|
+
*
|
|
2542
|
+
*/
|
|
2543
|
+
readonly lineItemId: string;
|
|
2544
|
+
/**
|
|
2545
|
+
* Defines the [Type](ctp:api:type:Type) that extends the ShoppingListLineItem with [Custom Fields](/../api/projects/custom-fields).
|
|
2546
|
+
* If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.
|
|
2547
|
+
*
|
|
2548
|
+
*
|
|
2549
|
+
*/
|
|
2550
|
+
readonly type?: TypeResourceIdentifier;
|
|
2551
|
+
/**
|
|
2552
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the ShoppingListLineItem.
|
|
2553
|
+
*
|
|
2554
|
+
*
|
|
2555
|
+
*/
|
|
2556
|
+
readonly fields?: FieldContainer;
|
|
2557
|
+
}
|
|
2558
|
+
export interface MyShoppingListSetTextLineItemCustomFieldAction {
|
|
2559
|
+
readonly action: 'setTextLineItemCustomField';
|
|
2560
|
+
/**
|
|
2561
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2562
|
+
*
|
|
2563
|
+
*
|
|
2564
|
+
*/
|
|
2565
|
+
readonly textLineItemId?: string;
|
|
2566
|
+
/**
|
|
2567
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2568
|
+
*
|
|
2569
|
+
*
|
|
2570
|
+
*/
|
|
2571
|
+
readonly textLineItemKey?: string;
|
|
2572
|
+
/**
|
|
2573
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2574
|
+
*
|
|
2575
|
+
*
|
|
2576
|
+
*/
|
|
2577
|
+
readonly name: string;
|
|
2578
|
+
/**
|
|
2579
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2580
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2581
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2582
|
+
*
|
|
2583
|
+
*
|
|
2584
|
+
*/
|
|
2585
|
+
readonly value?: any;
|
|
2586
|
+
}
|
|
2587
|
+
export interface MyShoppingListSetTextLineItemCustomTypeAction {
|
|
2588
|
+
readonly action: 'setTextLineItemCustomType';
|
|
2589
|
+
/**
|
|
2590
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2591
|
+
*
|
|
2592
|
+
*
|
|
2593
|
+
*/
|
|
2594
|
+
readonly textLineItemId?: string;
|
|
2595
|
+
/**
|
|
2596
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2597
|
+
*
|
|
2598
|
+
*
|
|
2599
|
+
*/
|
|
2600
|
+
readonly textLineItemKey?: string;
|
|
2601
|
+
/**
|
|
2602
|
+
* Defines the [Type](ctp:api:type:Type) that extends the TextLineItem with [Custom Fields](/../api/projects/custom-fields).
|
|
2603
|
+
* If absent, any existing Type and Custom Fields are removed from the TextLineItem.
|
|
2604
|
+
*
|
|
2605
|
+
*
|
|
2606
|
+
*/
|
|
2607
|
+
readonly type?: TypeResourceIdentifier;
|
|
2608
|
+
/**
|
|
2609
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the TextLineItem.
|
|
2610
|
+
*
|
|
2611
|
+
*
|
|
2612
|
+
*/
|
|
2613
|
+
readonly fields?: FieldContainer;
|
|
2614
|
+
}
|
|
2615
|
+
export interface MyShoppingListSetTextLineItemDescriptionAction {
|
|
2616
|
+
readonly action: 'setTextLineItemDescription';
|
|
2617
|
+
/**
|
|
2618
|
+
* The `id` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2619
|
+
*
|
|
2620
|
+
*
|
|
2621
|
+
*/
|
|
2622
|
+
readonly textLineItemId?: string;
|
|
2623
|
+
/**
|
|
2624
|
+
* The `key` of the [TextLineItem](ctp:api:type:TextLineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2625
|
+
*
|
|
2626
|
+
*
|
|
2627
|
+
*/
|
|
2628
|
+
readonly textLineItemKey?: string;
|
|
2629
|
+
/**
|
|
2630
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2631
|
+
*
|
|
2632
|
+
*
|
|
2633
|
+
*/
|
|
2634
|
+
readonly description?: LocalizedString;
|
|
2635
|
+
}
|
|
2636
|
+
//# sourceMappingURL=me.d.ts.map
|