@gradientedge/commercetools-utils 4.30.1 → 4.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ge-commercetools-utils-browser.cjs.js +1 -1
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-node.esm.js +1 -1
- package/dist/typings/models/cart-discount.d.ts +6 -6
- package/dist/typings/models/cart.d.ts +16 -16
- package/dist/typings/models/category.d.ts +1 -1
- package/dist/typings/models/channel.d.ts +2 -2
- package/dist/typings/models/common.d.ts +8 -8
- package/dist/typings/models/customer-group.d.ts +1 -1
- package/dist/typings/models/customer.d.ts +3 -3
- package/dist/typings/models/discount-code.d.ts +1 -1
- package/dist/typings/models/error.d.ts +1 -1
- package/dist/typings/models/extension.d.ts +5 -5
- package/dist/typings/models/inventory.d.ts +1 -1
- package/dist/typings/models/me.d.ts +5 -5
- package/dist/typings/models/message.d.ts +4 -4
- package/dist/typings/models/order-edit.d.ts +2 -2
- package/dist/typings/models/order.d.ts +8 -8
- package/dist/typings/models/payment.d.ts +3 -24
- package/dist/typings/models/product-discount.d.ts +3 -3
- package/dist/typings/models/product-selection.d.ts +5 -5
- package/dist/typings/models/product-type.d.ts +6 -6
- package/dist/typings/models/product.d.ts +6 -6
- package/dist/typings/models/project.d.ts +4 -4
- package/dist/typings/models/quote-request.d.ts +2 -2
- package/dist/typings/models/quote.d.ts +2 -2
- package/dist/typings/models/review.d.ts +1 -1
- package/dist/typings/models/scalar-types.d.ts +4 -4
- package/dist/typings/models/shipping-method.d.ts +3 -3
- package/dist/typings/models/shopping-list.d.ts +1 -1
- package/dist/typings/models/staged-quote.d.ts +2 -2
- package/dist/typings/models/standalone-price.d.ts +1 -1
- package/dist/typings/models/state.d.ts +3 -3
- package/dist/typings/models/store.d.ts +1 -1
- package/dist/typings/models/subscription.d.ts +5 -5
- package/dist/typings/models/tax-category.d.ts +1 -1
- package/dist/typings/models/type.d.ts +5 -5
- package/dist/typings/models/zone.d.ts +1 -1
- package/package.json +23 -23
|
@@ -13,10 +13,6 @@ export interface Payment extends BaseResource {
|
|
|
13
13
|
readonly anonymousId?: string;
|
|
14
14
|
readonly interfaceId?: string;
|
|
15
15
|
readonly amountPlanned: TypedMoney;
|
|
16
|
-
readonly amountAuthorized?: TypedMoney;
|
|
17
|
-
readonly authorizedUntil?: string;
|
|
18
|
-
readonly amountPaid?: TypedMoney;
|
|
19
|
-
readonly amountRefunded?: TypedMoney;
|
|
20
16
|
readonly paymentMethodInfo: PaymentMethodInfo;
|
|
21
17
|
readonly paymentStatus: PaymentStatus;
|
|
22
18
|
readonly transactions: Transaction[];
|
|
@@ -30,10 +26,6 @@ export interface PaymentDraft {
|
|
|
30
26
|
readonly externalId?: string;
|
|
31
27
|
readonly interfaceId?: string;
|
|
32
28
|
readonly amountPlanned: Money;
|
|
33
|
-
readonly amountAuthorized?: Money;
|
|
34
|
-
readonly authorizedUntil?: string;
|
|
35
|
-
readonly amountPaid?: Money;
|
|
36
|
-
readonly amountRefunded?: Money;
|
|
37
29
|
readonly paymentMethodInfo?: PaymentMethodInfo;
|
|
38
30
|
readonly paymentStatus?: PaymentStatusDraft;
|
|
39
31
|
readonly transactions?: TransactionDraft[];
|
|
@@ -77,7 +69,7 @@ export interface PaymentUpdate {
|
|
|
77
69
|
readonly version: number;
|
|
78
70
|
readonly actions: PaymentUpdateAction[];
|
|
79
71
|
}
|
|
80
|
-
export
|
|
72
|
+
export type PaymentUpdateAction = PaymentAddInterfaceInteractionAction | PaymentAddTransactionAction | PaymentChangeAmountPlannedAction | PaymentChangeTransactionInteractionIdAction | PaymentChangeTransactionStateAction | PaymentChangeTransactionTimestampAction | PaymentSetAnonymousIdAction | PaymentSetCustomFieldAction | PaymentSetCustomTypeAction | PaymentSetCustomerAction | PaymentSetExternalIdAction | PaymentSetInterfaceIdAction | PaymentSetKeyAction | PaymentSetMethodInfoInterfaceAction | PaymentSetMethodInfoMethodAction | PaymentSetMethodInfoNameAction | PaymentSetStatusInterfaceCodeAction | PaymentSetStatusInterfaceTextAction | PaymentSetTransactionCustomFieldAction | PaymentSetTransactionCustomTypeAction | PaymentTransitionStateAction;
|
|
81
73
|
export interface Transaction {
|
|
82
74
|
readonly id: string;
|
|
83
75
|
readonly timestamp?: string;
|
|
@@ -95,8 +87,8 @@ export interface TransactionDraft {
|
|
|
95
87
|
readonly state?: TransactionState;
|
|
96
88
|
readonly custom?: CustomFieldsDraft;
|
|
97
89
|
}
|
|
98
|
-
export
|
|
99
|
-
export
|
|
90
|
+
export type TransactionState = 'Failure' | 'Initial' | 'Pending' | 'Success';
|
|
91
|
+
export type TransactionType = 'Authorization' | 'CancelAuthorization' | 'Charge' | 'Chargeback' | 'Refund';
|
|
100
92
|
export interface PaymentAddInterfaceInteractionAction {
|
|
101
93
|
readonly action: 'addInterfaceInteraction';
|
|
102
94
|
readonly type: TypeResourceIdentifier;
|
|
@@ -125,23 +117,10 @@ export interface PaymentChangeTransactionTimestampAction {
|
|
|
125
117
|
readonly transactionId: string;
|
|
126
118
|
readonly timestamp: string;
|
|
127
119
|
}
|
|
128
|
-
export interface PaymentSetAmountPaidAction {
|
|
129
|
-
readonly action: 'setAmountPaid';
|
|
130
|
-
readonly amount?: Money;
|
|
131
|
-
}
|
|
132
|
-
export interface PaymentSetAmountRefundedAction {
|
|
133
|
-
readonly action: 'setAmountRefunded';
|
|
134
|
-
readonly amount?: Money;
|
|
135
|
-
}
|
|
136
120
|
export interface PaymentSetAnonymousIdAction {
|
|
137
121
|
readonly action: 'setAnonymousId';
|
|
138
122
|
readonly anonymousId?: string;
|
|
139
123
|
}
|
|
140
|
-
export interface PaymentSetAuthorizationAction {
|
|
141
|
-
readonly action: 'setAuthorization';
|
|
142
|
-
readonly amount?: Money;
|
|
143
|
-
readonly until?: string;
|
|
144
|
-
}
|
|
145
124
|
export interface PaymentSetCustomFieldAction {
|
|
146
125
|
readonly action: 'setCustomField';
|
|
147
126
|
readonly name: string;
|
|
@@ -55,13 +55,13 @@ export interface ProductDiscountUpdate {
|
|
|
55
55
|
readonly version: number;
|
|
56
56
|
readonly actions: ProductDiscountUpdateAction[];
|
|
57
57
|
}
|
|
58
|
-
export
|
|
59
|
-
export
|
|
58
|
+
export type ProductDiscountUpdateAction = ProductDiscountChangeIsActiveAction | ProductDiscountChangeNameAction | ProductDiscountChangePredicateAction | ProductDiscountChangeSortOrderAction | ProductDiscountChangeValueAction | ProductDiscountSetDescriptionAction | ProductDiscountSetKeyAction | ProductDiscountSetValidFromAction | ProductDiscountSetValidFromAndUntilAction | ProductDiscountSetValidUntilAction;
|
|
59
|
+
export type ProductDiscountValue = ProductDiscountValueAbsolute | ProductDiscountValueExternal | ProductDiscountValueRelative;
|
|
60
60
|
export interface ProductDiscountValueAbsolute {
|
|
61
61
|
readonly type: 'absolute';
|
|
62
62
|
readonly money: CentPrecisionMoney[];
|
|
63
63
|
}
|
|
64
|
-
export
|
|
64
|
+
export type ProductDiscountValueDraft = ProductDiscountValueAbsoluteDraft | ProductDiscountValueExternalDraft | ProductDiscountValueRelativeDraft;
|
|
65
65
|
export interface ProductDiscountValueAbsoluteDraft {
|
|
66
66
|
readonly type: 'absolute';
|
|
67
67
|
readonly money: Money[];
|
|
@@ -63,18 +63,18 @@ export interface ProductSelectionResourceIdentifier {
|
|
|
63
63
|
readonly id?: string;
|
|
64
64
|
readonly key?: string;
|
|
65
65
|
}
|
|
66
|
-
export
|
|
66
|
+
export type ProductSelectionType = IndividualProductSelectionType;
|
|
67
67
|
export interface IndividualProductSelectionType {
|
|
68
68
|
readonly type: 'individual';
|
|
69
69
|
readonly name: LocalizedString;
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export type ProductSelectionTypeEnum = 'individual';
|
|
72
72
|
export interface ProductSelectionUpdate {
|
|
73
73
|
readonly version: number;
|
|
74
74
|
readonly actions: ProductSelectionUpdateAction[];
|
|
75
75
|
}
|
|
76
|
-
export
|
|
77
|
-
export
|
|
76
|
+
export type ProductSelectionUpdateAction = ProductSelectionAddProductAction | ProductSelectionChangeNameAction | ProductSelectionRemoveProductAction | ProductSelectionSetCustomFieldAction | ProductSelectionSetCustomTypeAction | ProductSelectionSetKeyAction | ProductSelectionSetVariantSelectionAction;
|
|
77
|
+
export type ProductVariantSelection = ProductVariantSelectionExclusion | ProductVariantSelectionInclusion;
|
|
78
78
|
export interface ProductVariantSelectionExclusion {
|
|
79
79
|
readonly type: 'exclusion';
|
|
80
80
|
readonly skus: string[];
|
|
@@ -83,7 +83,7 @@ export interface ProductVariantSelectionInclusion {
|
|
|
83
83
|
readonly type: 'inclusion';
|
|
84
84
|
readonly skus: string[];
|
|
85
85
|
}
|
|
86
|
-
export
|
|
86
|
+
export type ProductVariantSelectionTypeEnum = 'exclusion' | 'inclusion';
|
|
87
87
|
export interface ProductsInStorePagedQueryResponse {
|
|
88
88
|
readonly limit: number;
|
|
89
89
|
readonly offset: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString } from './common';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type AttributeConstraintEnum = 'CombinationUnique' | 'None' | 'SameForAll' | 'Unique';
|
|
3
|
+
export type AttributeConstraintEnumDraft = 'None';
|
|
4
4
|
export interface AttributeDefinition {
|
|
5
5
|
readonly type: AttributeType;
|
|
6
6
|
readonly name: string;
|
|
@@ -29,8 +29,8 @@ export interface AttributePlainEnumValue {
|
|
|
29
29
|
readonly key: string;
|
|
30
30
|
readonly label: string;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
33
|
-
export
|
|
32
|
+
export type AttributeReferenceTypeId = 'cart' | 'category' | 'channel' | 'customer' | 'key-value-document' | 'order' | 'product' | 'product-type' | 'review' | 'shipping-method' | 'state' | 'zone';
|
|
33
|
+
export type AttributeType = AttributeBooleanType | AttributeDateTimeType | AttributeDateType | AttributeEnumType | AttributeLocalizableTextType | AttributeLocalizedEnumType | AttributeMoneyType | AttributeNestedType | AttributeNumberType | AttributeReferenceType | AttributeSetType | AttributeTextType | AttributeTimeType;
|
|
34
34
|
export interface AttributeBooleanType {
|
|
35
35
|
readonly name: 'boolean';
|
|
36
36
|
}
|
|
@@ -114,8 +114,8 @@ export interface ProductTypeUpdate {
|
|
|
114
114
|
readonly version: number;
|
|
115
115
|
readonly actions: ProductTypeUpdateAction[];
|
|
116
116
|
}
|
|
117
|
-
export
|
|
118
|
-
export
|
|
117
|
+
export type ProductTypeUpdateAction = ProductTypeAddAttributeDefinitionAction | ProductTypeAddLocalizedEnumValueAction | ProductTypeAddPlainEnumValueAction | ProductTypeChangeAttributeConstraintAction | ProductTypeChangeAttributeNameAction | ProductTypeChangeAttributeOrderByNameAction | ProductTypeChangeDescriptionAction | ProductTypeChangeEnumKeyAction | ProductTypeChangeInputHintAction | ProductTypeChangeIsSearchableAction | ProductTypeChangeLabelAction | ProductTypeChangeLocalizedEnumValueLabelAction | ProductTypeChangeLocalizedEnumValueOrderAction | ProductTypeChangeNameAction | ProductTypeChangePlainEnumValueLabelAction | ProductTypeChangePlainEnumValueOrderAction | ProductTypeRemoveAttributeDefinitionAction | ProductTypeRemoveEnumValuesAction | ProductTypeSetInputTipAction | ProductTypeSetKeyAction;
|
|
118
|
+
export type TextInputHint = 'MultiLine' | 'SingleLine';
|
|
119
119
|
export interface ProductTypeAddAttributeDefinitionAction {
|
|
120
120
|
readonly action: 'addAttributeDefinition';
|
|
121
121
|
readonly attribute: AttributeDefinitionDraft;
|
|
@@ -25,7 +25,7 @@ export interface FacetRange {
|
|
|
25
25
|
readonly max: number;
|
|
26
26
|
readonly mean: number;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type FacetResult = FilteredFacetResult | RangeFacetResult | TermFacetResult;
|
|
29
29
|
export interface FacetResults {
|
|
30
30
|
[key: string]: FacetResult;
|
|
31
31
|
}
|
|
@@ -34,7 +34,7 @@ export interface FacetTerm {
|
|
|
34
34
|
readonly count: number;
|
|
35
35
|
readonly productCount?: number;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type FacetTypes = 'filter' | 'range' | 'terms';
|
|
38
38
|
export interface FilteredFacetResult {
|
|
39
39
|
readonly type: 'filter';
|
|
40
40
|
readonly count: number;
|
|
@@ -100,7 +100,7 @@ export interface ProductPagedQueryResponse {
|
|
|
100
100
|
readonly total?: number;
|
|
101
101
|
readonly results: Product[];
|
|
102
102
|
}
|
|
103
|
-
export
|
|
103
|
+
export type ProductPriceModeEnum = 'Embedded' | 'Standalone';
|
|
104
104
|
export interface ProductProjection extends BaseResource {
|
|
105
105
|
readonly id: string;
|
|
106
106
|
readonly version: number;
|
|
@@ -153,7 +153,7 @@ export interface ProductUpdate {
|
|
|
153
153
|
readonly version: number;
|
|
154
154
|
readonly actions: ProductUpdateAction[];
|
|
155
155
|
}
|
|
156
|
-
export
|
|
156
|
+
export type ProductUpdateAction = ProductAddAssetAction | ProductAddExternalImageAction | ProductAddPriceAction | ProductAddToCategoryAction | ProductAddVariantAction | ProductChangeAssetNameAction | ProductChangeAssetOrderAction | ProductChangeMasterVariantAction | ProductChangeNameAction | ProductChangePriceAction | ProductChangeSlugAction | ProductLegacySetSkuAction | ProductMoveImageToPositionAction | ProductPublishAction | ProductRemoveAssetAction | ProductRemoveFromCategoryAction | ProductRemoveImageAction | ProductRemovePriceAction | ProductRemoveVariantAction | ProductRevertStagedChangesAction | ProductRevertStagedVariantChangesAction | ProductSetAssetCustomFieldAction | ProductSetAssetCustomTypeAction | ProductSetAssetDescriptionAction | ProductSetAssetKeyAction | ProductSetAssetSourcesAction | ProductSetAssetTagsAction | ProductSetAttributeAction | ProductSetAttributeInAllVariantsAction | ProductSetCategoryOrderHintAction | ProductSetDescriptionAction | ProductSetDiscountedPriceAction | ProductSetImageLabelAction | ProductSetKeyAction | ProductSetMetaDescriptionAction | ProductSetMetaKeywordsAction | ProductSetMetaTitleAction | ProductSetPriceModeAction | ProductSetPricesAction | ProductSetProductPriceCustomFieldAction | ProductSetProductPriceCustomTypeAction | ProductSetProductVariantKeyAction | ProductSetSearchKeywordsAction | ProductSetSkuAction | ProductSetTaxCategoryAction | ProductTransitionStateAction | ProductUnpublishAction;
|
|
157
157
|
export interface ProductVariant {
|
|
158
158
|
readonly id: number;
|
|
159
159
|
readonly sku?: string;
|
|
@@ -203,7 +203,7 @@ export interface SearchKeyword {
|
|
|
203
203
|
export interface SearchKeywords {
|
|
204
204
|
[key: string]: SearchKeyword[];
|
|
205
205
|
}
|
|
206
|
-
export
|
|
206
|
+
export type SuggestTokenizer = CustomTokenizer | WhitespaceTokenizer;
|
|
207
207
|
export interface CustomTokenizer {
|
|
208
208
|
readonly type: 'custom';
|
|
209
209
|
readonly inputs: string[];
|
|
@@ -222,7 +222,7 @@ export interface TermFacetResult {
|
|
|
222
222
|
readonly other: number;
|
|
223
223
|
readonly terms: FacetTerm[];
|
|
224
224
|
}
|
|
225
|
-
export
|
|
225
|
+
export type TermFacetResultType = 'boolean' | 'date' | 'datetime' | 'number' | 'text' | 'time';
|
|
226
226
|
export interface WhitespaceTokenizer {
|
|
227
227
|
readonly type: 'whitespace';
|
|
228
228
|
}
|
|
@@ -9,7 +9,7 @@ export interface ExternalOAuth {
|
|
|
9
9
|
readonly url: string;
|
|
10
10
|
readonly authorizationHeader: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type OrderSearchStatus = 'Activated' | 'Deactivated';
|
|
13
13
|
export interface Project {
|
|
14
14
|
readonly version: number;
|
|
15
15
|
readonly key: string;
|
|
@@ -30,18 +30,18 @@ export interface ProjectUpdate {
|
|
|
30
30
|
readonly version: number;
|
|
31
31
|
readonly actions: ProjectUpdateAction[];
|
|
32
32
|
}
|
|
33
|
-
export
|
|
33
|
+
export type ProjectUpdateAction = ProjectChangeCartsConfigurationAction | ProjectChangeCountriesAction | ProjectChangeCountryTaxRateFallbackEnabledAction | ProjectChangeCurrenciesAction | ProjectChangeLanguagesAction | ProjectChangeMessagesConfigurationAction | ProjectChangeNameAction | ProjectChangeOrderSearchStatusAction | ProjectChangeProductSearchIndexingEnabledAction | ProjectChangeShoppingListsConfigurationAction | ProjectSetExternalOAuthAction | ProjectSetShippingRateInputTypeAction;
|
|
34
34
|
export interface SearchIndexingConfiguration {
|
|
35
35
|
readonly products?: SearchIndexingConfigurationValues;
|
|
36
36
|
readonly orders?: SearchIndexingConfigurationValues;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type SearchIndexingConfigurationStatus = 'Activated' | 'Deactivated' | 'Indexing';
|
|
39
39
|
export interface SearchIndexingConfigurationValues {
|
|
40
40
|
readonly status?: SearchIndexingConfigurationStatus;
|
|
41
41
|
readonly lastModifiedAt?: string;
|
|
42
42
|
readonly lastModifiedBy?: LastModifiedBy;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type ShippingRateInputType = CartClassificationType | CartScoreType | CartValueType;
|
|
45
45
|
export interface CartClassificationType {
|
|
46
46
|
readonly type: 'CartClassification';
|
|
47
47
|
readonly values: CustomFieldLocalizedEnumValue[];
|
|
@@ -63,12 +63,12 @@ export interface QuoteRequestResourceIdentifier {
|
|
|
63
63
|
readonly id?: string;
|
|
64
64
|
readonly key?: string;
|
|
65
65
|
}
|
|
66
|
-
export
|
|
66
|
+
export type QuoteRequestState = 'Accepted' | 'Cancelled' | 'Closed' | 'Rejected' | 'Submitted';
|
|
67
67
|
export interface QuoteRequestUpdate {
|
|
68
68
|
readonly version: number;
|
|
69
69
|
readonly actions: QuoteRequestUpdateAction[];
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export type QuoteRequestUpdateAction = QuoteRequestChangeQuoteRequestStateAction | QuoteRequestSetCustomFieldAction | QuoteRequestSetCustomTypeAction | QuoteRequestTransitionStateAction;
|
|
72
72
|
export interface QuoteRequestChangeQuoteRequestStateAction {
|
|
73
73
|
readonly action: 'changeQuoteRequestState';
|
|
74
74
|
readonly quoteRequestState: QuoteRequestState;
|
|
@@ -67,12 +67,12 @@ export interface QuoteResourceIdentifier {
|
|
|
67
67
|
readonly id?: string;
|
|
68
68
|
readonly key?: string;
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type QuoteState = 'Accepted' | 'Declined' | 'DeclinedForRenegotiation' | 'Failed' | 'Pending' | 'Withdrawn';
|
|
71
71
|
export interface QuoteUpdate {
|
|
72
72
|
readonly version: number;
|
|
73
73
|
readonly actions: QuoteUpdateAction[];
|
|
74
74
|
}
|
|
75
|
-
export
|
|
75
|
+
export type QuoteUpdateAction = QuoteChangeQuoteStateAction | QuoteRequestQuoteRenegotiationAction | QuoteSetCustomFieldAction | QuoteSetCustomTypeAction | QuoteTransitionStateAction;
|
|
76
76
|
export interface QuoteChangeQuoteStateAction {
|
|
77
77
|
readonly action: 'changeQuoteState';
|
|
78
78
|
readonly quoteState: QuoteState;
|
|
@@ -65,7 +65,7 @@ export interface ReviewUpdate {
|
|
|
65
65
|
readonly version: number;
|
|
66
66
|
readonly actions: ReviewUpdateAction[];
|
|
67
67
|
}
|
|
68
|
-
export
|
|
68
|
+
export type ReviewUpdateAction = ReviewSetAuthorNameAction | ReviewSetCustomFieldAction | ReviewSetCustomTypeAction | ReviewSetCustomerAction | ReviewSetKeyAction | ReviewSetLocaleAction | ReviewSetRatingAction | ReviewSetTargetAction | ReviewSetTextAction | ReviewSetTitleAction | ReviewTransitionStateAction;
|
|
69
69
|
export interface ReviewSetAuthorNameAction {
|
|
70
70
|
readonly action: 'setAuthorName';
|
|
71
71
|
readonly authorName?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type Expansion = string;
|
|
2
|
+
export type QueryPredicate = string;
|
|
3
|
+
export type Sort = string;
|
|
4
|
+
export type OrderSearchSorting = string;
|
|
@@ -57,7 +57,7 @@ export interface ShippingMethodUpdate {
|
|
|
57
57
|
readonly version: number;
|
|
58
58
|
readonly actions: ShippingMethodUpdateAction[];
|
|
59
59
|
}
|
|
60
|
-
export
|
|
60
|
+
export type ShippingMethodUpdateAction = ShippingMethodAddShippingRateAction | ShippingMethodAddZoneAction | ShippingMethodChangeIsDefaultAction | ShippingMethodChangeNameAction | ShippingMethodChangeTaxCategoryAction | ShippingMethodRemoveShippingRateAction | ShippingMethodRemoveZoneAction | ShippingMethodSetCustomFieldAction | ShippingMethodSetCustomTypeAction | ShippingMethodSetDescriptionAction | ShippingMethodSetKeyAction | ShippingMethodSetLocalizedDescriptionAction | ShippingMethodSetLocalizedNameAction | ShippingMethodSetPredicateAction;
|
|
61
61
|
export interface ShippingRate {
|
|
62
62
|
readonly price: TypedMoney;
|
|
63
63
|
readonly freeAbove?: TypedMoney;
|
|
@@ -69,7 +69,7 @@ export interface ShippingRateDraft {
|
|
|
69
69
|
readonly freeAbove?: Money;
|
|
70
70
|
readonly tiers?: ShippingRatePriceTier[];
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type ShippingRatePriceTier = CartClassificationTier | CartScoreTier | CartValueTier;
|
|
73
73
|
export interface CartClassificationTier {
|
|
74
74
|
readonly type: 'CartClassification';
|
|
75
75
|
readonly value: string;
|
|
@@ -89,7 +89,7 @@ export interface CartValueTier {
|
|
|
89
89
|
readonly price: Money;
|
|
90
90
|
readonly isMatching?: boolean;
|
|
91
91
|
}
|
|
92
|
-
export
|
|
92
|
+
export type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue';
|
|
93
93
|
export interface ZoneRate {
|
|
94
94
|
readonly zone: ZoneReference;
|
|
95
95
|
readonly shippingRates: ShippingRate[];
|
|
@@ -78,7 +78,7 @@ export interface ShoppingListUpdate {
|
|
|
78
78
|
readonly version: number;
|
|
79
79
|
readonly actions: ShoppingListUpdateAction[];
|
|
80
80
|
}
|
|
81
|
-
export
|
|
81
|
+
export type ShoppingListUpdateAction = ShoppingListAddLineItemAction | ShoppingListAddTextLineItemAction | ShoppingListChangeLineItemQuantityAction | ShoppingListChangeLineItemsOrderAction | ShoppingListChangeNameAction | ShoppingListChangeTextLineItemNameAction | ShoppingListChangeTextLineItemQuantityAction | ShoppingListChangeTextLineItemsOrderAction | ShoppingListRemoveLineItemAction | ShoppingListRemoveTextLineItemAction | ShoppingListSetAnonymousIdAction | ShoppingListSetCustomFieldAction | ShoppingListSetCustomTypeAction | ShoppingListSetCustomerAction | ShoppingListSetDeleteDaysAfterLastModificationAction | ShoppingListSetDescriptionAction | ShoppingListSetKeyAction | ShoppingListSetLineItemCustomFieldAction | ShoppingListSetLineItemCustomTypeAction | ShoppingListSetSlugAction | ShoppingListSetStoreAction | ShoppingListSetTextLineItemCustomFieldAction | ShoppingListSetTextLineItemCustomTypeAction | ShoppingListSetTextLineItemDescriptionAction;
|
|
82
82
|
export interface TextLineItem {
|
|
83
83
|
readonly addedAt: string;
|
|
84
84
|
readonly custom?: CustomFields;
|
|
@@ -45,12 +45,12 @@ export interface StagedQuoteResourceIdentifier {
|
|
|
45
45
|
readonly id?: string;
|
|
46
46
|
readonly key?: string;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export type StagedQuoteState = 'Closed' | 'InProgress' | 'Sent';
|
|
49
49
|
export interface StagedQuoteUpdate {
|
|
50
50
|
readonly version: number;
|
|
51
51
|
readonly actions: StagedQuoteUpdateAction[];
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type StagedQuoteUpdateAction = StagedQuoteChangeStagedQuoteStateAction | StagedQuoteSetCustomFieldAction | StagedQuoteSetCustomTypeAction | StagedQuoteSetSellerCommentAction | StagedQuoteSetValidToAction | StagedQuoteTransitionStateAction;
|
|
54
54
|
export interface StagedQuoteChangeStagedQuoteStateAction {
|
|
55
55
|
readonly action: 'changeStagedQuoteState';
|
|
56
56
|
readonly stagedQuoteState: StagedQuoteState;
|
|
@@ -62,7 +62,7 @@ export interface StandalonePriceUpdate {
|
|
|
62
62
|
readonly version: number;
|
|
63
63
|
readonly actions: StandalonePriceUpdateAction[];
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type StandalonePriceUpdateAction = StandalonePriceApplyStagedChangesAction | StandalonePriceChangeActiveAction | StandalonePriceChangeValueAction | StandalonePriceSetCustomFieldAction | StandalonePriceSetCustomTypeAction | StandalonePriceSetDiscountedPriceAction;
|
|
66
66
|
export interface StandalonePriceApplyStagedChangesAction {
|
|
67
67
|
readonly action: 'applyStagedChanges';
|
|
68
68
|
}
|
|
@@ -41,13 +41,13 @@ export interface StateResourceIdentifier {
|
|
|
41
41
|
readonly id?: string;
|
|
42
42
|
readonly key?: string;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
45
|
-
export
|
|
44
|
+
export type StateRoleEnum = 'Return' | 'ReviewIncludedInStatistics';
|
|
45
|
+
export type StateTypeEnum = 'LineItemState' | 'OrderState' | 'PaymentState' | 'ProductState' | 'QuoteRequestState' | 'QuoteState' | 'ReviewState' | 'StagedQuoteState';
|
|
46
46
|
export interface StateUpdate {
|
|
47
47
|
readonly version: number;
|
|
48
48
|
readonly actions: StateUpdateAction[];
|
|
49
49
|
}
|
|
50
|
-
export
|
|
50
|
+
export type StateUpdateAction = StateAddRolesAction | StateChangeInitialAction | StateChangeKeyAction | StateChangeTypeAction | StateRemoveRolesAction | StateSetDescriptionAction | StateSetNameAction | StateSetRolesAction | StateSetTransitionsAction;
|
|
51
51
|
export interface StateAddRolesAction {
|
|
52
52
|
readonly action: 'addRoles';
|
|
53
53
|
readonly roles: StateRoleEnum[];
|
|
@@ -59,7 +59,7 @@ export interface StoreUpdate {
|
|
|
59
59
|
readonly version: number;
|
|
60
60
|
readonly actions: StoreUpdateAction[];
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export type StoreUpdateAction = StoreAddDistributionChannelAction | StoreAddProductSelectionAction | StoreAddSupplyChannelAction | StoreChangeProductSelectionAction | StoreRemoveDistributionChannelAction | StoreRemoveProductSelectionAction | StoreRemoveSupplyChannelAction | StoreSetCustomFieldAction | StoreSetCustomTypeAction | StoreSetDistributionChannelsAction | StoreSetLanguagesAction | StoreSetNameAction | StoreSetProductSelectionsAction | StoreSetSupplyChannelsAction;
|
|
63
63
|
export interface StoreAddDistributionChannelAction {
|
|
64
64
|
readonly action: 'addDistributionChannel';
|
|
65
65
|
readonly distributionChannel: ChannelResourceIdentifier;
|
|
@@ -3,13 +3,13 @@ import { UserProvidedIdentifiers } from './message';
|
|
|
3
3
|
export interface ChangeSubscription {
|
|
4
4
|
readonly resourceTypeId: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type DeliveryFormat = CloudEventsFormat | PlatformFormat;
|
|
7
7
|
export interface CloudEventsFormat {
|
|
8
8
|
readonly type: 'CloudEvents';
|
|
9
9
|
readonly cloudEventsVersion: string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type DeliveryPayload = MessageDeliveryPayload | ResourceCreatedDeliveryPayload | ResourceDeletedDeliveryPayload | ResourceUpdatedDeliveryPayload;
|
|
12
|
+
export type Destination = AzureEventGridDestination | AzureServiceBusDestination | EventBridgeDestination | GoogleCloudPubSubDestination | IronMqDestination | SnsDestination | SqsDestination;
|
|
13
13
|
export interface AzureEventGridDestination {
|
|
14
14
|
readonly type: 'EventGrid';
|
|
15
15
|
readonly uri: string;
|
|
@@ -117,7 +117,7 @@ export interface SubscriptionDraft {
|
|
|
117
117
|
readonly messages?: MessageSubscription[];
|
|
118
118
|
readonly format?: DeliveryFormat;
|
|
119
119
|
}
|
|
120
|
-
export
|
|
120
|
+
export type SubscriptionHealthStatus = 'ConfigurationError' | 'ConfigurationErrorDeliveryStopped' | 'Healthy' | 'TemporaryError';
|
|
121
121
|
export interface SubscriptionPagedQueryResponse {
|
|
122
122
|
readonly limit: number;
|
|
123
123
|
readonly count: number;
|
|
@@ -129,7 +129,7 @@ export interface SubscriptionUpdate {
|
|
|
129
129
|
readonly version: number;
|
|
130
130
|
readonly actions: SubscriptionUpdateAction[];
|
|
131
131
|
}
|
|
132
|
-
export
|
|
132
|
+
export type SubscriptionUpdateAction = SubscriptionChangeDestinationAction | SubscriptionSetChangesAction | SubscriptionSetKeyAction | SubscriptionSetMessagesAction;
|
|
133
133
|
export interface SubscriptionChangeDestinationAction {
|
|
134
134
|
readonly action: 'changeDestination';
|
|
135
135
|
readonly destination: Destination;
|
|
@@ -42,7 +42,7 @@ export interface TaxCategoryUpdate {
|
|
|
42
42
|
readonly version: number;
|
|
43
43
|
readonly actions: TaxCategoryUpdateAction[];
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type TaxCategoryUpdateAction = TaxCategoryAddTaxRateAction | TaxCategoryChangeNameAction | TaxCategoryRemoveTaxRateAction | TaxCategoryReplaceTaxRateAction | TaxCategorySetDescriptionAction | TaxCategorySetKeyAction;
|
|
46
46
|
export interface TaxRate {
|
|
47
47
|
readonly id?: string;
|
|
48
48
|
readonly name: string;
|
|
@@ -7,7 +7,7 @@ export interface CustomFieldLocalizedEnumValue {
|
|
|
7
7
|
readonly key: string;
|
|
8
8
|
readonly label: LocalizedString;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type CustomFieldReferenceValue = 'cart' | 'category' | 'channel' | 'customer' | 'key-value-document' | 'order' | 'product' | 'product-type' | 'review' | 'shipping-method' | 'state' | 'zone';
|
|
11
11
|
export interface CustomFields {
|
|
12
12
|
readonly type: TypeReference;
|
|
13
13
|
readonly fields: FieldContainer;
|
|
@@ -26,7 +26,7 @@ export interface FieldDefinition {
|
|
|
26
26
|
readonly required: boolean;
|
|
27
27
|
readonly inputHint?: TypeTextInputHint;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type FieldType = CustomFieldBooleanType | CustomFieldDateTimeType | CustomFieldDateType | CustomFieldEnumType | CustomFieldLocalizedEnumType | CustomFieldLocalizedStringType | CustomFieldMoneyType | CustomFieldNumberType | CustomFieldReferenceType | CustomFieldSetType | CustomFieldStringType | CustomFieldTimeType;
|
|
30
30
|
export interface CustomFieldBooleanType {
|
|
31
31
|
readonly name: 'Boolean';
|
|
32
32
|
}
|
|
@@ -67,7 +67,7 @@ export interface CustomFieldStringType {
|
|
|
67
67
|
export interface CustomFieldTimeType {
|
|
68
68
|
readonly name: 'Time';
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type ResourceTypeId = 'address' | 'asset' | 'cart-discount' | 'category' | 'channel' | 'custom-line-item' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'line-item' | 'order' | 'order-delivery' | 'order-edit' | 'order-parcel' | 'order-return-item' | 'payment' | 'payment-interface-interaction' | 'product-price' | 'product-selection' | 'quote' | 'review' | 'shipping-method' | 'shopping-list' | 'shopping-list-text-line-item' | 'store' | 'transaction';
|
|
71
71
|
export interface Type extends BaseResource {
|
|
72
72
|
readonly id: string;
|
|
73
73
|
readonly version: number;
|
|
@@ -105,12 +105,12 @@ export interface TypeResourceIdentifier {
|
|
|
105
105
|
readonly id?: string;
|
|
106
106
|
readonly key?: string;
|
|
107
107
|
}
|
|
108
|
-
export
|
|
108
|
+
export type TypeTextInputHint = 'MultiLine' | 'SingleLine';
|
|
109
109
|
export interface TypeUpdate {
|
|
110
110
|
readonly version: number;
|
|
111
111
|
readonly actions: TypeUpdateAction[];
|
|
112
112
|
}
|
|
113
|
-
export
|
|
113
|
+
export type TypeUpdateAction = TypeAddEnumValueAction | TypeAddFieldDefinitionAction | TypeAddLocalizedEnumValueAction | TypeChangeEnumValueLabelAction | TypeChangeEnumValueOrderAction | TypeChangeFieldDefinitionOrderAction | TypeChangeInputHintAction | TypeChangeKeyAction | TypeChangeLabelAction | TypeChangeLocalizedEnumValueLabelAction | TypeChangeLocalizedEnumValueOrderAction | TypeChangeNameAction | TypeRemoveFieldDefinitionAction | TypeSetDescriptionAction;
|
|
114
114
|
export interface TypeAddEnumValueAction {
|
|
115
115
|
readonly action: 'addEnumValue';
|
|
116
116
|
readonly fieldName: string;
|
|
@@ -42,7 +42,7 @@ export interface ZoneUpdate {
|
|
|
42
42
|
readonly version: number;
|
|
43
43
|
readonly actions: ZoneUpdateAction[];
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type ZoneUpdateAction = ZoneAddLocationAction | ZoneChangeNameAction | ZoneRemoveLocationAction | ZoneSetDescriptionAction | ZoneSetKeyAction;
|
|
46
46
|
export interface ZoneAddLocationAction {
|
|
47
47
|
readonly action: 'addLocation';
|
|
48
48
|
readonly location: Location;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/commercetools-utils",
|
|
3
|
-
"version": "4.30.
|
|
3
|
+
"version": "4.30.3",
|
|
4
4
|
"description": "Provide utility classes and functions for interacting with the commercetools API",
|
|
5
5
|
"main": "./dist/ge-commercetools-utils-node.cjs.js",
|
|
6
6
|
"module": "./dist/ge-commercetools-utils-node.esm.js",
|
|
@@ -55,36 +55,36 @@
|
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://github.com/gradientedge/commercetools-utils#readme",
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@sinonjs/fake-timers": "
|
|
59
|
-
"@types/jest": "
|
|
58
|
+
"@sinonjs/fake-timers": "10.0.2",
|
|
59
|
+
"@types/jest": "29.2.6",
|
|
60
60
|
"@types/json-stringify-safe": "5.0.0",
|
|
61
|
-
"@types/lodash": "4.14.
|
|
61
|
+
"@types/lodash": "4.14.191",
|
|
62
62
|
"@types/lodash.clonedeep": "4.5.7",
|
|
63
|
-
"@types/node": "18.
|
|
63
|
+
"@types/node": "18.11.18",
|
|
64
64
|
"@types/qs": "6.9.7",
|
|
65
65
|
"@types/sinonjs__fake-timers": "8.1.2",
|
|
66
66
|
"@types/traverse": "0.6.32",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
68
|
-
"@typescript-eslint/parser": "5.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "5.48.2",
|
|
68
|
+
"@typescript-eslint/parser": "5.48.2",
|
|
69
69
|
"codecov": "3.8.3",
|
|
70
|
-
"commitizen": "4.
|
|
70
|
+
"commitizen": "4.3.0",
|
|
71
71
|
"cz-conventional-changelog": "3.3.0",
|
|
72
|
-
"eslint": "8.
|
|
73
|
-
"eslint-config-prettier": "8.
|
|
74
|
-
"husky": "
|
|
75
|
-
"jest": "
|
|
72
|
+
"eslint": "8.32.0",
|
|
73
|
+
"eslint-config-prettier": "8.6.0",
|
|
74
|
+
"husky": "8.0.3",
|
|
75
|
+
"jest": "29.3.1",
|
|
76
76
|
"jest-matcher-specific-error": "1.0.0",
|
|
77
|
-
"jest-mock": "
|
|
78
|
-
"nock": "13.
|
|
79
|
-
"prettier": "2.
|
|
80
|
-
"rimraf": "
|
|
77
|
+
"jest-mock": "29.3.1",
|
|
78
|
+
"nock": "13.3.0",
|
|
79
|
+
"prettier": "2.8.3",
|
|
80
|
+
"rimraf": "4.1.1",
|
|
81
81
|
"semantic-release": "19.0.5",
|
|
82
|
-
"ts-jest": "
|
|
83
|
-
"ts-node": "10.9.1",
|
|
84
|
-
"typedoc": "0.23.
|
|
85
|
-
"typescript": "
|
|
86
|
-
"webpack": "5.
|
|
87
|
-
"webpack-cli": "
|
|
82
|
+
"ts-jest": "29.0.5",
|
|
83
|
+
"ts-node": "^10.9.1",
|
|
84
|
+
"typedoc": "0.23.24",
|
|
85
|
+
"typescript": "4.9.4",
|
|
86
|
+
"webpack": "5.75.0",
|
|
87
|
+
"webpack-cli": "5.0.1"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@tshttp/status": "^2.0.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"json-stringify-safe": "5.0.1",
|
|
93
93
|
"lodash.clonedeep": "4.5.0",
|
|
94
94
|
"qs": "6.11.0",
|
|
95
|
-
"traverse": "0.6.
|
|
95
|
+
"traverse": "0.6.7"
|
|
96
96
|
},
|
|
97
97
|
"config": {
|
|
98
98
|
"commitizen": {
|