@commercetools/history-sdk 3.6.0 → 4.1.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,68 @@
1
1
  # @commercetools/history-sdk
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#553](https://github.com/commercetools/commercetools-sdk-typescript/pull/553) [`8e0a312`](https://github.com/commercetools/commercetools-sdk-typescript/commit/8e0a312404020c2f14cb15786a262c78476b5152) Thanks [@github-actions](https://github.com/apps/github-actions)! - **Api changes**
8
+
9
+ <details>
10
+ <summary>Added QueryParameter(s)</summary>
11
+
12
+ - added query parameter `expand` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
13
+ - added query parameter `sort` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
14
+ - added query parameter `limit` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
15
+ - added query parameter `offset` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
16
+ - added query parameter `withTotal` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
17
+ - added query parameter `where` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
18
+ - added query parameter `/^var[.][a-zA-Z0-9]+$/` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
19
+ - added query parameter `expand` to method `post /{projectKey}/in-store/key={storeKey}/cart-discounts`
20
+ </details>
21
+
22
+ <details>
23
+ <summary>Changed MethodResponseBody(s)</summary>
24
+
25
+ - :warning: changed response body for `200: application/json` of method `get /{projectKey}/in-store/key={storeKey}/cart-discounts` from type `CartDiscount` to `CartDiscountPagedQueryResponse`
26
+ </details>
27
+
28
+ ## 4.0.0
29
+
30
+ ### Major Changes
31
+
32
+ - [#551](https://github.com/commercetools/commercetools-sdk-typescript/pull/551) [`9e7939a`](https://github.com/commercetools/commercetools-sdk-typescript/commit/9e7939a1df234fd1f4f77c60f4ff75b31d7fc3fd) Thanks [@github-actions](https://github.com/apps/github-actions)! - BREAKING CHANGE:
33
+
34
+ - fix URI parameters to be URI encoded
35
+
36
+ ### Minor Changes
37
+
38
+ - [#527](https://github.com/commercetools/commercetools-sdk-typescript/pull/527) [`00c6176`](https://github.com/commercetools/commercetools-sdk-typescript/commit/00c617692543f9a8d0ac64e81d583f89e002e81b) Thanks [@github-actions](https://github.com/apps/github-actions)! - **History changes**
39
+
40
+ <details>
41
+ <summary>Added Property(s)</summary>
42
+
43
+ - added property `businessUnit` to type `Record`
44
+ </details>
45
+
46
+ <details>
47
+ <summary>Changed Property(s)</summary>
48
+
49
+ - :warning: changed property `previousValue` of type `SetNameChange` from type `LocalizedString` to `string`
50
+ - :warning: changed property `nextValue` of type `SetNameChange` from type `LocalizedString` to `string`
51
+ </details>
52
+
53
+ <details>
54
+ <summary>Added QueryParameter(s)</summary>
55
+
56
+ - added query parameter `businessUnit` to method `get /{projectKey}`
57
+ - added query parameter `businessUnit` to method `get /{projectKey}/{resourceType}`
58
+ - added query parameter `businessUnit` to method `get /{projectKey}/{resourceType}/{ID}`
59
+ </details>
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [[`a6d0df2`](https://github.com/commercetools/commercetools-sdk-typescript/commit/a6d0df2034b72504db2aa2d13a8d3726d97cc881)]:
64
+ - @commercetools/sdk-client-v2@2.2.2
65
+
3
66
  ## 3.6.0
4
67
 
5
68
  ### Minor Changes
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
86
86
  const pathMap = commonRequest.pathVariables;
87
87
  var uri = commonRequest.uriTemplate;
88
88
  for (const param in pathMap) {
89
- uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
89
+ const value = encodeURIComponent(`${pathMap[param]}`);
90
+ uri = uri.replace(`{${param}}`, `${value}`);
90
91
  }
91
92
  const resQuery = formatQueryString(commonRequest.queryParams || {});
92
93
  return `${uri}${resQuery}`;
@@ -82,7 +82,8 @@ function buildRelativeUri(commonRequest) {
82
82
  const pathMap = commonRequest.pathVariables;
83
83
  var uri = commonRequest.uriTemplate;
84
84
  for (const param in pathMap) {
85
- uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
85
+ const value = encodeURIComponent(`${pathMap[param]}`);
86
+ uri = uri.replace(`{${param}}`, `${value}`);
86
87
  }
87
88
  const resQuery = formatQueryString(commonRequest.queryParams || {});
88
89
  return `${uri}${resQuery}`;
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
86
86
  const pathMap = commonRequest.pathVariables;
87
87
  var uri = commonRequest.uriTemplate;
88
88
  for (const param in pathMap) {
89
- uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
89
+ const value = encodeURIComponent(`${pathMap[param]}`);
90
+ uri = uri.replace(`{${param}}`, `${value}`);
90
91
  }
91
92
  const resQuery = formatQueryString(commonRequest.queryParams || {});
92
93
  return `${uri}${resQuery}`;
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
86
86
  const pathMap = commonRequest.pathVariables;
87
87
  var uri = commonRequest.uriTemplate;
88
88
  for (const param in pathMap) {
89
- uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
89
+ const value = encodeURIComponent(`${pathMap[param]}`);
90
+ uri = uri.replace(`{${param}}`, `${value}`);
90
91
  }
91
92
  const resQuery = formatQueryString(commonRequest.queryParams || {});
92
93
  return `${uri}${resQuery}`;
@@ -82,7 +82,8 @@ function buildRelativeUri(commonRequest) {
82
82
  const pathMap = commonRequest.pathVariables;
83
83
  var uri = commonRequest.uriTemplate;
84
84
  for (const param in pathMap) {
85
- uri = uri.replace(`{${param}}`, `${pathMap[param]}`);
85
+ const value = encodeURIComponent(`${pathMap[param]}`);
86
+ uri = uri.replace(`{${param}}`, `${value}`);
86
87
  }
87
88
  const resQuery = formatQueryString(commonRequest.queryParams || {});
88
89
  return `${uri}${resQuery}`;
@@ -40,6 +40,7 @@ export declare class ByProjectKeyByResourceTypeByIDRequestBuilder {
40
40
  clientId?: string;
41
41
  customerId?: string;
42
42
  associateId?: string;
43
+ businessUnit?: string;
43
44
  type?: string;
44
45
  source?: string;
45
46
  changes?: string | string[];
@@ -42,6 +42,7 @@ export declare class ByProjectKeyByResourceTypeRequestBuilder {
42
42
  clientId?: string;
43
43
  customerId?: string;
44
44
  associateId?: string;
45
+ businessUnit?: string;
45
46
  type?: string;
46
47
  resourceKey?: string;
47
48
  source?: string;
@@ -41,6 +41,7 @@ export declare class ByProjectKeyRequestBuilder {
41
41
  clientId?: string;
42
42
  customerId?: string;
43
43
  associateId?: string;
44
+ businessUnit?: string;
44
45
  type?: string;
45
46
  resourceId?: string;
46
47
  resourceKey?: string;
@@ -9,5 +9,6 @@ export * from "./models/change-history.js";
9
9
  export * from "./models/change-value.js";
10
10
  export * from "./models/common.js";
11
11
  export * from "./models/label.js";
12
+ export * from "./models/scalar-types.js";
12
13
  export * from "./shared/utils/common-types.js";
13
14
  export * from "./shared/utils/middleware.js";
@@ -73,6 +73,12 @@ export interface Record {
73
73
  *
74
74
  */
75
75
  readonly stores: KeyReference[];
76
+ /**
77
+ * Reference to the [Business Unit](ctp:api:type:BusinessUnit) associated with the [Change](ctp:history:type:Change).
78
+ *
79
+ *
80
+ */
81
+ readonly businessUnit?: KeyReference;
76
82
  /**
77
83
  * `true` if no change was detected.
78
84
  *
@@ -179,7 +185,7 @@ export interface ModifiedBy {
179
185
  * Indicates who performed the change.
180
186
  *
181
187
  * - If the change was made by a user, the value is `"user"`.
182
- * - If the change was made by an API Client with or without an [external user ID](/client-logging#external-user-ids), the value is `"external-user"`.
188
+ * - If the change was made by an API Client with or without an [external user ID](/general-concepts#external-user-ids), the value is `"external-user"`.
183
189
  * - If the change was made by an [Associate](ctp:api:type:Associate), the value is `"associate"`.
184
190
  *
185
191
  *
@@ -5157,12 +5157,7 @@ export interface SetMiddleNameChange {
5157
5157
  readonly nextValue: string;
5158
5158
  }
5159
5159
  /**
5160
- * Change triggered by the following update actions:
5161
- *
5162
- * - [Set Name](ctp:api:type:DiscountCodeSetNameAction) on Discount Codes.
5163
- * - [Set State Name](ctp:api:type:StateSetNameAction) on States.
5164
- * - [Set Name](ctp:api:type:StoreSetNameAction) on Stores.
5165
- *
5160
+ * Change triggered by the [Set Name](ctp:api:type:AssociateRoleSetNameAction) update action.
5166
5161
  */
5167
5162
  export interface SetNameChange {
5168
5163
  readonly type: 'SetNameChange';
@@ -5174,13 +5169,21 @@ export interface SetNameChange {
5174
5169
  * Value before the change.
5175
5170
  *
5176
5171
  */
5177
- readonly previousValue: LocalizedString;
5172
+ readonly previousValue: string;
5178
5173
  /**
5179
5174
  * Value after the change.
5180
5175
  *
5181
5176
  */
5182
- readonly nextValue: LocalizedString;
5177
+ readonly nextValue: string;
5183
5178
  }
5179
+ /**
5180
+ * Change triggered by the following update actions:
5181
+ *
5182
+ * - [Set Name](ctp:api:type:DiscountCodeSetNameAction) on Discount Codes.
5183
+ * - [Set State Name](ctp:api:type:StateSetNameAction) on States.
5184
+ * - [Set Name](ctp:api:type:StoreSetNameAction) on Stores.
5185
+ *
5186
+ */
5184
5187
  export interface SetLocalizedNameChange {
5185
5188
  readonly type: 'SetLocalizedNameChange';
5186
5189
  /**
@@ -0,0 +1,6 @@
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
+ export type Locale = string;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "name": "@commercetools/history-sdk",
7
- "version": "3.6.0",
7
+ "version": "4.1.0",
8
8
  "engines": {
9
9
  "node": ">=14"
10
10
  },
@@ -32,13 +32,13 @@
32
32
  "./dist/commercetools-history-sdk.esm.js": "./dist/commercetools-history-sdk.browser.esm.js"
33
33
  },
34
34
  "dependencies": {
35
- "@commercetools/sdk-client-v2": "^2.1.6",
35
+ "@commercetools/sdk-client-v2": "^2.2.2",
36
36
  "@commercetools/sdk-middleware-auth": "^7.0.0",
37
37
  "@commercetools/sdk-middleware-http": "^7.0.0",
38
38
  "@commercetools/sdk-middleware-logger": "^3.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@commercetools/platform-sdk": "6.0.0",
41
+ "@commercetools/platform-sdk": "7.1.0",
42
42
  "@types/uuid": "9.0.2",
43
43
  "organize-imports-cli": "0.10.0",
44
44
  "tsconfig-replace-paths": "0.0.13",