@commercetools/history-sdk 2.3.0 → 2.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @commercetools/history-sdk
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#241](https://github.com/commercetools/commercetools-sdk-typescript/pull/241) [`85f5be3`](https://github.com/commercetools/commercetools-sdk-typescript/commit/85f5be349a9b0fa46539259981bfd8d5fc2ffdc6) Thanks [@ajimae](https://github.com/ajimae)! - Releasing the TS SDK with the following changelogs
8
+
9
+ - added functionalities to extend client user agent
10
+ - custom field added to OrderFromCardDraft
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`85f5be3`](https://github.com/commercetools/commercetools-sdk-typescript/commit/85f5be349a9b0fa46539259981bfd8d5fc2ffdc6)]:
15
+ - @commercetools/sdk-client-v2@1.3.0
16
+
3
17
  ## 2.3.0
4
18
 
5
19
  ### Minor Changes
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/common';
6
+ import { PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/change-history';
7
7
  import { executeRequest, QueryParam } from '../shared/utils/common-types';
8
8
  import { ApiRequest } from '../shared/utils/requests-utils';
9
9
  export declare class ByProjectKeyByResourceTypeByIDRequestBuilder {
@@ -36,6 +36,7 @@ export declare class ByProjectKeyByResourceTypeByIDRequestBuilder {
36
36
  clientId?: string;
37
37
  source?: string;
38
38
  changes?: string | string[];
39
+ stores?: string | string[];
39
40
  customerId?: string;
40
41
  excludePlatformInitiatedChanges?: PlatformInitiatedChange | PlatformInitiatedChange[];
41
42
  expand?: boolean;
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/common';
6
+ import { PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/change-history';
7
7
  import { executeRequest, QueryParam } from '../shared/utils/common-types';
8
8
  import { ApiRequest } from '../shared/utils/requests-utils';
9
9
  import { ByProjectKeyByResourceTypeByIDRequestBuilder } from './by-project-key-by-resource-type-by-id-request-builder';
@@ -39,6 +39,7 @@ export declare class ByProjectKeyByResourceTypeRequestBuilder {
39
39
  resourceId?: string;
40
40
  source?: string;
41
41
  changes?: string | string[];
42
+ stores?: string | string[];
42
43
  customerId?: string;
43
44
  excludePlatformInitiatedChanges?: PlatformInitiatedChange | PlatformInitiatedChange[];
44
45
  expand?: boolean;
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { ChangeHistoryResourceType, PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/common';
6
+ import { ChangeHistoryResourceType, PlatformInitiatedChange, RecordPagedQueryResponse } from '../models/change-history';
7
7
  import { executeRequest, QueryParam } from '../shared/utils/common-types';
8
8
  import { ApiRequest } from '../shared/utils/requests-utils';
9
9
  import { ByProjectKeyByResourceTypeRequestBuilder } from './by-project-key-by-resource-type-request-builder';
@@ -38,6 +38,7 @@ export declare class ByProjectKeyRequestBuilder {
38
38
  resourceId?: string;
39
39
  source?: string;
40
40
  changes?: string | string[];
41
+ stores?: string | string[];
41
42
  customerId?: string;
42
43
  excludePlatformInitiatedChanges?: PlatformInitiatedChange | PlatformInitiatedChange[];
43
44
  expand?: boolean;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export * from './client/api-root';
7
7
  export * from './models/change';
8
+ export * from './models/change-history';
8
9
  export * from './models/change-value';
9
10
  export * from './models/common';
10
11
  export * from './models/label';
@@ -0,0 +1,211 @@
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 { Change } from './change';
7
+ import { KeyReference, Reference } from './common';
8
+ import { Label } from './label';
9
+ /**
10
+ * A Record captures the differences in a resource between one version and the next.
11
+ * (Recall that the version number is not always incremented by one; see [Optimistic Concurrency Control](/general-concepts#optimistic-concurrency-control).)
12
+ *
13
+ */
14
+ export interface Record {
15
+ /**
16
+ * Version of the resource after the change.
17
+ *
18
+ */
19
+ readonly version: number;
20
+ /**
21
+ * Version of the resource before the change.
22
+ *
23
+ */
24
+ readonly previousVersion: number;
25
+ /**
26
+ * Type of the change (creation, update or deletion).
27
+ *
28
+ */
29
+ readonly type: string;
30
+ /**
31
+ * Information about the user or the API client who performed the change.
32
+ *
33
+ */
34
+ readonly modifiedBy: ModifiedBy;
35
+ /**
36
+ * Date and time when the change was made.
37
+ *
38
+ */
39
+ readonly modifiedAt: string;
40
+ /**
41
+ * Information that describes the resource after the change.
42
+ *
43
+ */
44
+ readonly label: Label;
45
+ /**
46
+ * Information that describes the resource before the change.
47
+ *
48
+ */
49
+ readonly previousLabel: Label;
50
+ /**
51
+ * Shows the differences in the resource between `previousVersion` and `version`.
52
+ * The value is not identical to the actual array of update actions that was sent to the platform and is not limited to update actions (see, for example, [Optimistic Concurrency Control](/general-concepts#optimistic-concurrency-control)).
53
+ *
54
+ *
55
+ */
56
+ readonly changes: Change[];
57
+ /**
58
+ * Reference to the changed resource.
59
+ *
60
+ *
61
+ */
62
+ readonly resource: Reference;
63
+ /**
64
+ * References to the [Stores](ctp:api:type:Store) attached to the [Change](ctp:history:type:Change).
65
+ *
66
+ *
67
+ */
68
+ readonly stores: KeyReference[];
69
+ /**
70
+ * `true` if no change was detected.
71
+ * The version number of the resource can be increased even without any change in the resource.
72
+ *
73
+ *
74
+ */
75
+ readonly withoutChanges: boolean;
76
+ }
77
+ /**
78
+ * Response to a query request for [Record](#record).
79
+ *
80
+ */
81
+ export interface RecordPagedQueryResponse {
82
+ /**
83
+ * Maximum number of results requested in the query request.
84
+ *
85
+ *
86
+ */
87
+ readonly limit: number;
88
+ /**
89
+ * Actual number of results returned.
90
+ *
91
+ *
92
+ */
93
+ readonly count: number;
94
+ /**
95
+ * Total number of results matching the query.
96
+ * This number is an estimation and not [strongly consistent](/general-concepts#strong-consistency).
97
+ *
98
+ *
99
+ */
100
+ readonly total: number;
101
+ /**
102
+ * The number of elements skipped, not a page number. Supplied by the client or the server default.
103
+ *
104
+ *
105
+ */
106
+ readonly offset: number;
107
+ /**
108
+ *
109
+ */
110
+ readonly results: Record[];
111
+ }
112
+ /**
113
+ * This data type represents the supported resource types.
114
+ * The value must be one of the following:
115
+ *
116
+ */
117
+ export declare type ChangeHistoryResourceType = 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'key-value-document' | 'order' | 'payment' | 'product' | 'product-discount' | 'product-type' | 'review' | 'shopping-list' | 'state' | 'store' | 'tax-category' | 'type' | 'zone';
118
+ /**
119
+ * This type consists of one enum value:
120
+ *
121
+ */
122
+ export declare type DateStringFilter = 'now';
123
+ export interface ErrorObject {
124
+ /**
125
+ *
126
+ */
127
+ readonly code: string;
128
+ /**
129
+ *
130
+ */
131
+ readonly message: string;
132
+ }
133
+ export interface ErrorResponse {
134
+ /**
135
+ *
136
+ */
137
+ readonly statusCode: number;
138
+ /**
139
+ *
140
+ */
141
+ readonly message: string;
142
+ /**
143
+ *
144
+ */
145
+ readonly error?: string;
146
+ /**
147
+ *
148
+ */
149
+ readonly error_description?: string;
150
+ /**
151
+ *
152
+ */
153
+ readonly errors?: ErrorObject[];
154
+ }
155
+ /**
156
+ * Information about the user or the API client who performed the change. This is a variant of
157
+ * [LastModifiedBy](/types#lastmodifiedby).
158
+ *
159
+ */
160
+ export interface ModifiedBy {
161
+ /**
162
+ * [ID](/general-concepts#identifier) of the Merchant Center user who made the change.
163
+ * Present only if the change was made in the Merchant Center.
164
+ *
165
+ *
166
+ */
167
+ readonly id: string;
168
+ /**
169
+ * Indicates whether the change was made by a user or the API client with or without an
170
+ * [External user ID](/client-logging#external-user-ids).
171
+ *
172
+ *
173
+ */
174
+ readonly type: string;
175
+ /**
176
+ * [Reference](/types#reference) to the
177
+ * [Customer](/projects/customers#customer) who made the change. Present only if
178
+ * the change was made using a token from the [Password
179
+ * Flow](/authorization#password-flow).
180
+ *
181
+ *
182
+ */
183
+ readonly customer?: Reference;
184
+ /**
185
+ * Present only if the change was made using a token from an [Anonymous
186
+ * Session](/authorization#tokens-for-anonymous-sessions).
187
+ *
188
+ *
189
+ */
190
+ readonly anonymousId?: string;
191
+ /**
192
+ * [ID](/general-concepts#identifier) of the [API
193
+ * Client](/projects/api-clients#apiclient) that made the change. Present only if
194
+ * the change was made using an API Client.
195
+ *
196
+ *
197
+ */
198
+ readonly clientId?: string;
199
+ /**
200
+ * `true` if the change was made via Merchant Center or [ImpEx](https://impex.europe-west1.gcp.commercetools.com/).
201
+ *
202
+ *
203
+ */
204
+ readonly isPlatformClient: boolean;
205
+ }
206
+ export declare type PlatformInitiatedChange = 'changeLineItemName' | 'changeReviewRatingStatistics' | 'excludeAll' | 'setApplicationVersion' | 'setIsValid' | 'setVariantAvailability';
207
+ /**
208
+ * Values for the Source enumeration.
209
+ */
210
+ export declare type Source = 'ApiClient' | 'ImpEx' | 'MerchantCenter';
211
+ export declare type UpdateType = 'addAddress' | 'addAsset' | 'addAttributeDefinition' | 'addBillingAddressId' | 'addDelivery' | 'addEnumValue' | 'addExternalImage' | 'addFieldDefinition' | 'addInterfaceInteraction' | 'addItemShippingAddress' | 'addLineItem' | 'addLocalizedEnumValue' | 'addLocation' | 'addParcelToDelivery' | 'addPayment' | 'addPlainEnumValue' | 'addPrice' | 'addReturnInfo' | 'addRoles' | 'addShippingAddressId' | 'addTaxRate' | 'addTextLineItem' | 'addToCategory' | 'addTransaction' | 'addVariant' | 'changeAddress' | 'changeAmountPlanned' | 'changeAssetName' | 'changeAssetOrder' | 'changeAttributeConstraint' | 'changeAttributeName' | 'changeAttributeOrderByName' | 'changeCartDiscounts' | 'changeCartPredicate' | 'changeDescription' | 'changeEmail' | 'changeEnumKey' | 'changeEnumValueLabel' | 'changeEnumValueOrder' | 'changeFieldDefinitionOrder' | 'changeGroups' | 'changeInitial' | 'changeInputHint' | 'changeIsActive' | 'changeIsSearchable' | 'changeKey' | 'changeLabel' | 'changeLineItemQuantity' | 'changeLineItemsOrder' | 'changeLocalizedEnumValueLabel' | 'changeLocalizedEnumValueOrder' | 'changeMasterVariant' | 'changeName' | 'changeOrderHint' | 'changeOrderState' | 'changeParent' | 'changePaymentState' | 'changePlainEnumValueLabel' | 'changePredicate' | 'changePrice' | 'changeQuantity' | 'changeRequiresDiscountCode' | 'changeReviewRatingStatistics' | 'changeShipmentState' | 'changeSlug' | 'changeSortOrder' | 'changeStackingMode' | 'changeTarget' | 'changeTextLineItemName' | 'changeTextLineItemQuantity' | 'changeTextLineItemsOrder' | 'changeTransactionInteractionId' | 'changeTransactionState' | 'changeTransactionTimestamp' | 'changeType' | 'changeValue' | 'publish' | 'removeAddress' | 'removeAsset' | 'removeAttributeDefinition' | 'removeBillingAddressId' | 'removeDelivery' | 'removeEnumValues' | 'removeFieldDefinition' | 'removeFromCategory' | 'removeImage' | 'removeItemShippingAddress' | 'removeLineItem' | 'removeLocation' | 'removeParcelFromDelivery' | 'removePayment' | 'removePrice' | 'removeRoles' | 'removeShippingAddressId' | 'removeTaxRate' | 'removeTextLineItem' | 'removeVariant' | 'setAddress' | 'setAnonymousId' | 'setAssetCustomField' | 'setAssetCustomType' | 'setAssetDescription' | 'setAssetSources' | 'setAssetTags' | 'setAsssetKey' | 'setAttribute' | 'setAuthorName' | 'setBillingAddress' | 'setCartPredicate' | 'setCategoryOrderHint' | 'setCompanyName' | 'setCustomField' | 'setCustomLineItemCustomField' | 'setCustomLineItemCustomType' | 'setCustomLineItemShippingDetails' | 'setCustomType' | 'setCustomer' | 'setCustomerEmail' | 'setCustomerGroup' | 'setCustomerId' | 'setCustomerNumber' | 'setDateOfBirth' | 'setDefaultBillingAddress' | 'setDefaultShippingAddress' | 'setDeleteDaysAfterLastModification' | 'setDeliveryAddress' | 'setDeliveryItems' | 'setDescription' | 'setDiscountedPrice' | 'setDistributionChannels' | 'setExpectedDelivery' | 'setExternalId' | 'setFirstName' | 'setGeoLocation' | 'setImageLabel' | 'setInputTip' | 'setInterfaceId' | 'setKey' | 'setLanguages' | 'setLastName' | 'setLineItemCustomField' | 'setLineItemCustomType' | 'setLineItemShippingDetails' | 'setLocale' | 'setMaxApplications' | 'setMaxApplicationsPerCustomer' | 'setMetaDescription' | 'setMetaKeywords' | 'setMetaTitle' | 'setMethodInfoInterface' | 'setMethodInfoMethod' | 'setMethodInfoName' | 'setMiddleName' | 'setName' | 'setOrderNumber' | 'setParcelItems' | 'setParcelMeasurements' | 'setParcelTrackingData' | 'setPassword' | 'setProductPriceCustomField' | 'setProductPriceCustomType' | 'setProductVariantKey' | 'setRating' | 'setRestockableInDays' | 'setReturnPaymentState' | 'setReturnShipmentState' | 'setRoles' | 'setSalutation' | 'setSearchKeywords' | 'setShippingAddress' | 'setSku' | 'setSlug' | 'setStatusInterfaceCode' | 'setStatusInterfaceText' | 'setStore' | 'setStores' | 'setSupplyChannel' | 'setTarget' | 'setTaxCategory' | 'setText' | 'setTextLineItemCustomField' | 'setTextLineItemCustomType' | 'setTextLineItemDescription' | 'setTitle' | 'setTransitions' | 'setValidFrom' | 'setValidFromAndUntil' | 'setValidUntil' | 'setVariantAvailability' | 'setVatId' | 'transitionCustomLineItemState' | 'transitionLineItemState' | 'transitionState' | 'unpublish' | 'updateItemShippingAddress' | 'updateSyncInfo' | 'verifyEmail';
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { Address, DeliveryItem, LocalizedString, Money, Parcel, Reference, SelectionMode } from './common';
6
+ import { Address, DeliveryItem, LocalizedString, Money, Parcel, Reference, SelectionMode, TaxedPrice, TaxRate } from './common';
7
7
  export declare type ChangeTargetChangeValue = ChangeTargetCustomLineItemsChangeValue | ChangeTargetLineItemsChangeValue | ChangeTargetMultiBuyCustomLineItemsChangeValue | ChangeTargetMultiBuyLineItemsChangeValue | ChangeTargetShippingChangeValue;
8
8
  export declare type ChangeValueChangeValue = ChangeValueAbsoluteChangeValue | ChangeValueExternalChangeValue | ChangeValueGiftLineItemChangeValue | ChangeValueRelativeChangeValue;
9
9
  export interface AssetChangeValue {
@@ -16,6 +16,16 @@ export interface AssetChangeValue {
16
16
  */
17
17
  readonly name: LocalizedString;
18
18
  }
19
+ export interface AttributeValue {
20
+ /**
21
+ *
22
+ */
23
+ readonly name: string;
24
+ /**
25
+ *
26
+ */
27
+ readonly value: any;
28
+ }
19
29
  /**
20
30
  * Shape of the value for cart discounts line item and custom line items target.
21
31
  */
@@ -279,6 +289,17 @@ export interface ShippingMethodChangeValue {
279
289
  */
280
290
  readonly name: string;
281
291
  }
292
+ export interface ShippingMethodTaxAmountChangeValue {
293
+ /**
294
+ *
295
+ */
296
+ readonly taxedPrice: TaxedPrice;
297
+ /**
298
+ * Shape of the value for `addTaxRate` and `removeTaxRate` actions
299
+ *
300
+ */
301
+ readonly taxRate: TaxRate;
302
+ }
282
303
  export interface ShoppingListLineItemValue {
283
304
  /**
284
305
  *
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { AssetChangeValue, ChangeTargetChangeValue, ChangeValueChangeValue, CustomFieldExpandedValue, CustomShippingMethodChangeValue, DeliveryChangeValue, EnumValue, FieldDefinitionOrderValue, InventoryQuantityValue, LocalizedEnumValue, ParcelChangeValue, SetCartClassificationShippingRateInputValue, SetCartScoreShippingRateInputValue, ShippingMethodChangeValue, ShoppingListLineItemValue, TextLineItemValue, TransactionChangeValue, ValidFromAndUntilValue } from './change-value';
6
+ import { AssetChangeValue, AttributeValue, ChangeTargetChangeValue, ChangeValueChangeValue, CustomFieldExpandedValue, CustomShippingMethodChangeValue, DeliveryChangeValue, EnumValue, FieldDefinitionOrderValue, InventoryQuantityValue, LocalizedEnumValue, ParcelChangeValue, SetCartClassificationShippingRateInputValue, SetCartScoreShippingRateInputValue, ShippingMethodChangeValue, ShippingMethodTaxAmountChangeValue, ShoppingListLineItemValue, TextLineItemValue, TransactionChangeValue, ValidFromAndUntilValue } from './change-value';
7
7
  import { Address, Asset, AssetSource, AttributeConstraintEnum, AttributeDefinition, CategoryOrderHints, ChannelRole, CustomFields, CustomLineItem, Delivery, DeliveryItem, DiscountCodeInfo, DiscountedLineItemPrice, DiscountedLineItemPriceForQuantity, FieldDefinition, GeoLocation, Image, ItemShippingDetails, ItemState, LineItem, LocalizedString, Location, Money, OrderState, Parcel, ParcelMeasurements, PaymentInfo, PaymentState, Price, ProductVariantAvailability, Reference, Reservation, ReturnInfo, ReturnPaymentState, ReturnShipmentState, ReviewRatingStatistics, RoundingMode, SearchKeywords, ShipmentState, StackingMode, StateRole, StateType, SyncInfo, TaxCalculationMode, TaxedItemPrice, TaxedPrice, TaxMode, TaxRate, TextInputHint, TextLineItem, TrackingData, Transaction, TransactionState, Variant } from './common';
8
8
  export declare type Change = AddAddressChange | AddAssetChange | AddAttributeDefinitionChange | AddBillingAddressIdChange | AddChannelRolesChange | AddCustomLineItemChange | AddDeliveryChange | AddDiscountCodeChange | AddEnumValueChange | AddExternalImageChange | AddFieldDefinitionChange | AddInterfaceInteractionChange | AddItemShippingAddressesChange | AddLocalizedEnumValueChange | AddLocationChange | AddOrderLineItemChange | AddParcelToDeliveryChange | AddPaymentChange | AddPlainEnumValueChange | AddPriceChange | AddPropertyChange | AddReturnInfoChange | AddShippingAddressIdChange | AddShoppingListLineItemChange | AddStateRolesChange | AddTaxRateChange | AddTextLineItemChange | AddToCategoryChange | AddTransactionChange | AddVariantChange | ChangeAddressChange | ChangeAmountAuthorizedChange | ChangeAmountPlannedChange | ChangeAssetNameChange | ChangeAssetOrderChange | ChangeAttributeConstraintChange | ChangeAttributeOrderByNameChange | ChangeCartDiscountsChange | ChangeCartPredicateChange | ChangeCustomLineItemQuantityChange | ChangeDescriptionChange | ChangeEmailChange | ChangeEnumValueLabelChange | ChangeEnumValueOrderChange | ChangeFieldDefinitionOrderChange | ChangeGroupsChange | ChangeInitialChange | ChangeInputHintChange | ChangeIsActiveChange | ChangeIsSearchableChange | ChangeKeyChange | ChangeLabelChange | ChangeLineItemQuantityChange | ChangeLocalizedDescriptionChange | ChangeLocalizedEnumValueLabelChange | ChangeLocalizedEnumValueOrderChange | ChangeLocalizedNameChange | ChangeMasterVariantChange | ChangeNameChange | ChangeOrderHintChange | ChangeOrderStateChange | ChangeParentChange | ChangePaymentStateChange | ChangePlainEnumValueLabelChange | ChangePlainEnumValueOrderChange | ChangePredicateChange | ChangePriceChange | ChangeQuantityChange | ChangeRequiresDiscountCodeChange | ChangeReviewRatingStatisticsChange | ChangeShipmentStateChange | ChangeShoppingListLineItemQuantityChange | ChangeShoppingListLineItemsOrderChange | ChangeSlugChange | ChangeSortOrderChange | ChangeStackingModeChange | ChangeStateTypeChange | ChangeTargetChange | ChangeTaxCalculationModeChange | ChangeTaxModeChange | ChangeTaxRoundingModeChange | ChangeTextLineItemNameChange | ChangeTextLineItemQuantityChange | ChangeTextLineItemsOrderChange | ChangeTransactionInteractionIdChange | ChangeTransactionStateChange | ChangeTransactionTimestampChange | ChangeValueChange | MoveImageToPositionChange | PublishChange | RemoveAddressChange | RemoveAssetChange | RemoveAttributeDefinitionChange | RemoveBillingAddressIdChange | RemoveChannelRolesChange | RemoveCustomLineItemChange | RemoveDeliveryItemsChange | RemoveDiscountCodeChange | RemoveEnumValuesChange | RemoveFieldDefinitionChange | RemoveFromCategoryChange | RemoveImageChange | RemoveItemShippingAddressesChange | RemoveLocalizedEnumValuesChange | RemoveLocationChange | RemoveOrderLineItemChange | RemoveParcelFromDeliveryChange | RemovePaymentChange | RemovePriceChange | RemovePropertyChange | RemoveShippingAddressIdChange | RemoveShoppingListLineItemChange | RemoveStateRolesChange | RemoveTaxRateChange | RemoveTextLineItemChange | RemoveVariantChange | SetAddressChange | SetAnonymousIdChange | SetApplicationVersionChange | SetAssetCustomFieldChange | SetAssetCustomTypeChange | SetAssetDescriptionChange | SetAssetKeyChange | SetAssetSourcesChange | SetAssetTagsChange | SetAttributeChange | SetAuthorNameChange | SetBillingAddressChange | SetCartPredicateChange | SetCategoryOrderHintChange | SetChannelRolesChange | SetCompanyNameChange | SetCountryChange | SetCustomFieldChange | SetCustomLineItemCustomFieldChange | SetCustomLineItemCustomTypeChange | SetCustomLineItemMoneyChange | SetCustomLineItemShippingDetailsChange | SetCustomLineItemTaxAmountChange | SetCustomLineItemTaxCategoryChange | SetCustomLineItemTaxRateChange | SetCustomLineItemTaxedPriceChange | SetCustomLineItemTotalPriceChange | SetCustomShippingMethodChange | SetCustomTypeChange | SetCustomerChange | SetCustomerEmailChange | SetCustomerGroupChange | SetCustomerIdChange | SetCustomerNumberChange | SetDateOfBirthChange | SetDefaultBillingAddressChange | SetDefaultShippingAddressChange | SetDeleteDaysAfterLastModificationChange | SetDeliveryAddressChange | SetDeliveryItemsChange | SetDescriptionChange | SetDiscountedPriceChange | SetDistributionChannelsChange | SetExpectedDeliveryChange | SetExternalIdChange | SetFirstNameChange | SetGeoLocationChange | SetImageLabelChange | SetInputTipChange | SetInterfaceIdChange | SetIsValidChange | SetKeyChange | SetLanguagesChange | SetLastNameChange | SetLineItemDiscountedPriceChange | SetLineItemDiscountedPricePerQuantityChange | SetLineItemDistributionChannelChange | SetLineItemPriceChange | SetLineItemProductSlugChange | SetLineItemShippingDetailsChange | SetLineItemTaxAmountChange | SetLineItemTaxRateChange | SetLineItemTaxedPriceChange | SetLineItemTotalPriceChange | SetLocaleChange | SetLocalizedDescriptionChange | SetMaxApplicationsChange | SetMaxApplicationsPerCustomerChange | SetMetaDescriptionChange | SetMetaKeywordsChange | SetMetaTitleChange | SetMethodInfoInterfaceChange | SetMethodInfoMethodChange | SetMethodInfoNameChange | SetMiddleNameChange | SetNameChange | SetOrderLineItemCustomFieldChange | SetOrderLineItemCustomTypeChange | SetOrderNumberChange | SetOrderTaxedPriceChange | SetOrderTotalPriceChange | SetOrderTotalTaxChange | SetParcelItemsChange | SetParcelMeasurementsChange | SetParcelTrackingDataChange | SetPricesChange | SetProductPriceCustomFieldChange | SetProductPriceCustomTypeChange | SetProductVariantKeyChange | SetPropertyChange | SetRatingChange | SetReservationsChange | SetRestockableInDaysChange | SetReturnPaymentStateChange | SetReturnShipmentStateChange | SetSalutationChange | SetSearchKeywordsChange | SetShippingAddressChange | SetShippingInfoPriceChange | SetShippingInfoTaxedPriceChange | SetShippingMethodChange | SetShippingMethodTaxAmountChange | SetShippingMethodTaxRateChange | SetShippingRateChange | SetShippingRateInputChange | SetShoppingListLineItemCustomFieldChange | SetShoppingListLineItemCustomTypeChange | SetSkuChange | SetSlugChange | SetStateRolesChange | SetStatusInterfaceCodeChange | SetStatusInterfaceTextChange | SetStoreChange | SetStoresChange | SetSupplyChannelChange | SetSupplyChannelsChange | SetTargetChange | SetTaxCategoryChange | SetTextChange | SetTextLineItemCustomFieldChange | SetTextLineItemCustomTypeChange | SetTextLineItemDescriptionChange | SetTitleChange | SetTransitionsChange | SetValidFromAndUntilChange | SetValidFromChange | SetValidUntilChange | SetValueChange | SetVariantAvailabilityChange | SetVatIdChange | TransitionCustomLineItemStateChange | TransitionLineItemStateChange | TransitionStateChange | UnknownChange | UnpublishChange | UpdateSyncInfoChange | VerifyEmailChange;
9
9
  export interface AddAddressChange {
@@ -2191,11 +2191,11 @@ export interface SetAttributeChange {
2191
2191
  /**
2192
2192
  *
2193
2193
  */
2194
- readonly previousValue: any;
2194
+ readonly previousValue: AttributeValue;
2195
2195
  /**
2196
2196
  *
2197
2197
  */
2198
- readonly nextValue: any;
2198
+ readonly nextValue: AttributeValue;
2199
2199
  }
2200
2200
  export interface SetAuthorNameChange {
2201
2201
  readonly type: 'SetAuthorNameChange';
@@ -3953,11 +3953,11 @@ export interface SetShippingMethodTaxAmountChange {
3953
3953
  /**
3954
3954
  *
3955
3955
  */
3956
- readonly nextValue: any;
3956
+ readonly nextValue: ShippingMethodTaxAmountChangeValue;
3957
3957
  /**
3958
3958
  *
3959
3959
  */
3960
- readonly previousValue: any;
3960
+ readonly previousValue: ShippingMethodTaxAmountChangeValue;
3961
3961
  }
3962
3962
  export interface SetShippingMethodTaxRateChange {
3963
3963
  readonly type: 'SetShippingMethodTaxRateChange';
@@ -3,204 +3,6 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { Change } from './change';
7
- import { Label } from './label';
8
- /**
9
- * A Record captures the differences in a resource between one version and the next.
10
- * (Recall that the version number is not always incremented by one; see [Optimistic Concurrency Control](/general-concepts#optimistic-concurrency-control).)
11
- *
12
- */
13
- export interface Record {
14
- /**
15
- * Version of the resource after the change.
16
- *
17
- */
18
- readonly version: number;
19
- /**
20
- * Version of the resource before the change.
21
- *
22
- */
23
- readonly previousVersion: number;
24
- /**
25
- * Type of the change (creation, update or deletion).
26
- *
27
- */
28
- readonly type: string;
29
- /**
30
- * Information about the user or the API client who performed the change.
31
- *
32
- */
33
- readonly modifiedBy: ModifiedBy;
34
- /**
35
- * Date and time when the change was made.
36
- *
37
- */
38
- readonly modifiedAt: string;
39
- /**
40
- * Information that describes the resource after the change.
41
- *
42
- */
43
- readonly label: Label;
44
- /**
45
- * Information that describes the resource before the change.
46
- *
47
- */
48
- readonly previousLabel: Label;
49
- /**
50
- * Shows the differences in the resource between `previousVersion` and `version`.
51
- * The value is not identical to the actual array of update actions that was sent to the platform and is not limited to update actions (see, for example, [Optimistic Concurrency Control](/general-concepts#optimistic-concurrency-control)).
52
- *
53
- *
54
- */
55
- readonly changes: Change[];
56
- /**
57
- * [Reference](/types#reference) to the changed resource.
58
- *
59
- *
60
- */
61
- readonly resource: Reference;
62
- /**
63
- * `true` if no change was detected.
64
- * The version number of the resource can be increased even without any change in the resource.
65
- *
66
- *
67
- */
68
- readonly withoutChanges: boolean;
69
- }
70
- /**
71
- * Response to a query request for [Record](#record).
72
- *
73
- */
74
- export interface RecordPagedQueryResponse {
75
- /**
76
- * Maximum number of results requested in the query request.
77
- *
78
- *
79
- */
80
- readonly limit: number;
81
- /**
82
- * Actual number of results returned.
83
- *
84
- *
85
- */
86
- readonly count: number;
87
- /**
88
- * Total number of results matching the query.
89
- * This number is an estimation and not [strongly consistent](/general-concepts#strong-consistency).
90
- *
91
- *
92
- */
93
- readonly total: number;
94
- /**
95
- * The number of elements skipped, not a page number. Supplied by the client or the server default.
96
- *
97
- *
98
- */
99
- readonly offset: number;
100
- /**
101
- *
102
- */
103
- readonly results: Record[];
104
- }
105
- /**
106
- * This data type represents the supported resource types.
107
- * The value must be one of the following:
108
- *
109
- */
110
- export declare type ChangeHistoryResourceType = 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'key-value-document' | 'order' | 'payment' | 'product' | 'product-discount' | 'product-type' | 'review' | 'shopping-list' | 'state' | 'store' | 'tax-category' | 'type' | 'zone';
111
- /**
112
- * This type consists of one enum value:
113
- *
114
- */
115
- export declare type DateStringFilter = 'now';
116
- export interface ErrorObject {
117
- /**
118
- *
119
- */
120
- readonly code: string;
121
- /**
122
- *
123
- */
124
- readonly message: string;
125
- }
126
- export interface ErrorResponse {
127
- /**
128
- *
129
- */
130
- readonly statusCode: number;
131
- /**
132
- *
133
- */
134
- readonly message: string;
135
- /**
136
- *
137
- */
138
- readonly error?: string;
139
- /**
140
- *
141
- */
142
- readonly error_description?: string;
143
- /**
144
- *
145
- */
146
- readonly errors?: ErrorObject[];
147
- }
148
- /**
149
- * Information about the user or the API client who performed the change. This is a variant of
150
- * [LastModifiedBy](/types#lastmodifiedby).
151
- *
152
- */
153
- export interface ModifiedBy {
154
- /**
155
- * [ID](/general-concepts#identifier) of the Merchant Center user who made the change.
156
- * Present only if the change was made in the Merchant Center.
157
- *
158
- *
159
- */
160
- readonly id: string;
161
- /**
162
- * Indicates whether the change was made by a user or the API client with or without an
163
- * [External user ID](/client-logging#external-user-ids).
164
- *
165
- *
166
- */
167
- readonly type: string;
168
- /**
169
- * [Reference](/types#reference) to the
170
- * [Customer](/projects/customers#customer) who made the change. Present only if
171
- * the change was made using a token from the [Password
172
- * Flow](/authorization#password-flow).
173
- *
174
- *
175
- */
176
- readonly customer?: Reference;
177
- /**
178
- * Present only if the change was made using a token from an [Anonymous
179
- * Session](/authorization#tokens-for-anonymous-sessions).
180
- *
181
- *
182
- */
183
- readonly anonymousId?: string;
184
- /**
185
- * [ID](/general-concepts#identifier) of the [API
186
- * Client](/projects/api-clients#apiclient) that made the change. Present only if
187
- * the change was made using an API Client.
188
- *
189
- *
190
- */
191
- readonly clientId?: string;
192
- /**
193
- * `true` if the change was made via Merchant Center or [ImpEx](https://impex.europe-west1.gcp.commercetools.com/).
194
- *
195
- *
196
- */
197
- readonly isPlatformClient: boolean;
198
- }
199
- /**
200
- * Values for the Source enumeration.
201
- */
202
- export declare type Source = 'ApiClient' | 'ImpEx' | 'MerchantCenter';
203
- export declare type UpdateType = 'addAddress' | 'addAsset' | 'addAttributeDefinition' | 'addBillingAddressId' | 'addDelivery' | 'addEnumValue' | 'addExternalImage' | 'addFieldDefinition' | 'addInterfaceInteraction' | 'addItemShippingAddress' | 'addLineItem' | 'addLocalizedEnumValue' | 'addLocation' | 'addParcelToDelivery' | 'addPayment' | 'addPlainEnumValue' | 'addPrice' | 'addReturnInfo' | 'addRoles' | 'addShippingAddressId' | 'addTaxRate' | 'addTextLineItem' | 'addToCategory' | 'addTransaction' | 'addVariant' | 'changeAddress' | 'changeAmountPlanned' | 'changeAssetName' | 'changeAssetOrder' | 'changeAttributeConstraint' | 'changeAttributeName' | 'changeAttributeOrderByName' | 'changeCartDiscounts' | 'changeCartPredicate' | 'changeDescription' | 'changeEmail' | 'changeEnumKey' | 'changeEnumValueLabel' | 'changeEnumValueOrder' | 'changeFieldDefinitionOrder' | 'changeGroups' | 'changeInitial' | 'changeInputHint' | 'changeIsActive' | 'changeIsSearchable' | 'changeKey' | 'changeLabel' | 'changeLineItemQuantity' | 'changeLineItemsOrder' | 'changeLocalizedEnumValueLabel' | 'changeLocalizedEnumValueOrder' | 'changeMasterVariant' | 'changeName' | 'changeOrderHint' | 'changeOrderState' | 'changeParent' | 'changePaymentState' | 'changePlainEnumValueLabel' | 'changePredicate' | 'changePrice' | 'changeQuantity' | 'changeRequiresDiscountCode' | 'changeReviewRatingStatistics' | 'changeShipmentState' | 'changeSlug' | 'changeSortOrder' | 'changeStackingMode' | 'changeTarget' | 'changeTextLineItemName' | 'changeTextLineItemQuantity' | 'changeTextLineItemsOrder' | 'changeTransactionInteractionId' | 'changeTransactionState' | 'changeTransactionTimestamp' | 'changeType' | 'changeValue' | 'publish' | 'removeAddress' | 'removeAsset' | 'removeAttributeDefinition' | 'removeBillingAddressId' | 'removeDelivery' | 'removeEnumValues' | 'removeFieldDefinition' | 'removeFromCategory' | 'removeImage' | 'removeItemShippingAddress' | 'removeLineItem' | 'removeLocation' | 'removeParcelFromDelivery' | 'removePayment' | 'removePrice' | 'removeRoles' | 'removeShippingAddressId' | 'removeTaxRate' | 'removeTextLineItem' | 'removeVariant' | 'setAddress' | 'setAnonymousId' | 'setAssetCustomField' | 'setAssetCustomType' | 'setAssetDescription' | 'setAssetSources' | 'setAssetTags' | 'setAsssetKey' | 'setAttribute' | 'setAuthorName' | 'setBillingAddress' | 'setCartPredicate' | 'setCategoryOrderHint' | 'setCompanyName' | 'setCustomField' | 'setCustomLineItemCustomField' | 'setCustomLineItemCustomType' | 'setCustomLineItemShippingDetails' | 'setCustomType' | 'setCustomer' | 'setCustomerEmail' | 'setCustomerGroup' | 'setCustomerId' | 'setCustomerNumber' | 'setDateOfBirth' | 'setDefaultBillingAddress' | 'setDefaultShippingAddress' | 'setDeleteDaysAfterLastModification' | 'setDeliveryAddress' | 'setDeliveryItems' | 'setDescription' | 'setDiscountedPrice' | 'setDistributionChannels' | 'setExpectedDelivery' | 'setExternalId' | 'setFirstName' | 'setGeoLocation' | 'setImageLabel' | 'setInputTip' | 'setInterfaceId' | 'setKey' | 'setLanguages' | 'setLastName' | 'setLineItemCustomField' | 'setLineItemCustomType' | 'setLineItemShippingDetails' | 'setLocale' | 'setMaxApplications' | 'setMaxApplicationsPerCustomer' | 'setMetaDescription' | 'setMetaKeywords' | 'setMetaTitle' | 'setMethodInfoInterface' | 'setMethodInfoMethod' | 'setMethodInfoName' | 'setMiddleName' | 'setName' | 'setOrderNumber' | 'setParcelItems' | 'setParcelMeasurements' | 'setParcelTrackingData' | 'setPassword' | 'setProductPriceCustomField' | 'setProductPriceCustomType' | 'setProductVariantKey' | 'setRating' | 'setRestockableInDays' | 'setReturnPaymentState' | 'setReturnShipmentState' | 'setRoles' | 'setSalutation' | 'setSearchKeywords' | 'setShippingAddress' | 'setSku' | 'setSlug' | 'setStatusInterfaceCode' | 'setStatusInterfaceText' | 'setStore' | 'setStores' | 'setSupplyChannel' | 'setTarget' | 'setTaxCategory' | 'setText' | 'setTextLineItemCustomField' | 'setTextLineItemCustomType' | 'setTextLineItemDescription' | 'setTitle' | 'setTransitions' | 'setValidFrom' | 'setValidFromAndUntil' | 'setValidUntil' | 'setVariantAvailability' | 'setVatId' | 'transitionCustomLineItemState' | 'transitionLineItemState' | 'transitionState' | 'unpublish' | 'updateItemShippingAddress' | 'updateSyncInfo' | 'verifyEmail';
204
6
  export interface LocalizedString {
205
7
  [key: string]: string;
206
8
  }
@@ -362,7 +164,7 @@ export interface AttributeDefinition {
362
164
  /**
363
165
  *
364
166
  */
365
- readonly type: any;
167
+ readonly type: AttributeType;
366
168
  /**
367
169
  * The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (`_`) and the hyphen-minus (`-`). When using the same `name` for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an `enum` or `lenum` type and sets thereof.
368
170
  *
@@ -395,6 +197,12 @@ export interface AttributeDefinition {
395
197
  */
396
198
  readonly isSearchable: boolean;
397
199
  }
200
+ export interface AttributeType {
201
+ /**
202
+ *
203
+ */
204
+ readonly name: string;
205
+ }
398
206
  export interface CategoryOrderHints {
399
207
  [key: string]: string;
400
208
  }
@@ -523,10 +331,9 @@ export interface DiscountedLineItemPriceForQuantity {
523
331
  }
524
332
  export interface FieldDefinition {
525
333
  /**
526
- * Describes the type of the field.
527
334
  *
528
335
  */
529
- readonly type: any;
336
+ readonly type: FieldType;
530
337
  /**
531
338
  * The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (`_`) and the hyphen-minus (`-`). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.
532
339
  *
@@ -541,6 +348,12 @@ export interface FieldDefinition {
541
348
  */
542
349
  readonly inputHint: TextInputHint;
543
350
  }
351
+ export interface FieldType {
352
+ /**
353
+ *
354
+ */
355
+ readonly name: string;
356
+ }
544
357
  export interface GeoLocation {
545
358
  /**
546
359
  *
@@ -608,6 +421,16 @@ export interface ItemState {
608
421
  */
609
422
  readonly state: Reference;
610
423
  }
424
+ export interface KeyReference {
425
+ /**
426
+ *
427
+ */
428
+ readonly key: string;
429
+ /**
430
+ *
431
+ */
432
+ readonly typeId: ReferenceTypeId;
433
+ }
611
434
  export interface LineItem {
612
435
  /**
613
436
  *
@@ -733,7 +556,6 @@ export interface PaymentInfo {
733
556
  readonly payments: Reference[];
734
557
  }
735
558
  export declare type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending';
736
- export declare type PlatformInitiatedChange = 'changeLineItemName' | 'changeReviewRatingStatistics' | 'excludeAll' | 'setApplicationVersion' | 'setIsValid' | 'setVariantAvailability';
737
559
  export interface Price {
738
560
  /**
739
561
  *
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "name": "@commercetools/history-sdk",
7
- "version": "2.3.0",
7
+ "version": "2.4.0",
8
8
  "description": "Type script sdk for commercetools audit log features",
9
9
  "keywords": ["commercetools", "typescript", "sdk", "history"],
10
10
  "homepage": "https://github.com/commercetools/commercetools-typescript-sdks/packages/history-sdk",
@@ -23,14 +23,14 @@
23
23
  "./dist/commercetools-history-sdk.esm.js": "./dist/commercetools-history-sdk.browser.esm.js"
24
24
  },
25
25
  "dependencies": {
26
- "@commercetools/sdk-client-v2": "^1.2.0",
26
+ "@commercetools/sdk-client-v2": "^1.3.0",
27
27
  "@commercetools/sdk-middleware-auth": "^6.0.4",
28
28
  "@commercetools/sdk-middleware-http": "^6.0.4",
29
29
  "@commercetools/sdk-middleware-logger": "^2.1.1",
30
30
  "querystring": "^0.2.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@commercetools/platform-sdk": "2.5.0",
33
+ "@commercetools/platform-sdk": "2.6.0",
34
34
  "@types/uuid": "8.3.4",
35
35
  "organize-imports-cli": "0.9.0",
36
36
  "tsconfig-replace-paths": "0.0.11",