@adobe/aio-commerce-lib-webhooks 1.1.0 → 1.1.2
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 +14 -0
- package/dist/cjs/api/index.cjs +0 -1
- package/dist/cjs/api/index.d.cts +2 -3
- package/dist/cjs/responses/index.cjs +1 -2
- package/dist/cjs/responses/index.d.cts +1 -1
- package/dist/es/api/index.d.mts +2 -3
- package/dist/es/responses/index.d.mts +1 -1
- package/dist/es/responses/index.mjs +1 -1
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-webhooks
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#498](https://github.com/adobe/aio-commerce-sdk/pull/498) [`f6aec01`](https://github.com/adobe/aio-commerce-sdk/commit/f6aec01a22ed185fe130170751353fae881c0f2d) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Fix the webhook exception operation to emit the exception class under the `type` field instead of `class`, matching the Adobe Commerce webhook response spec. Previously the supplied exception class was ignored by Commerce.
|
|
8
|
+
|
|
9
|
+
## 1.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`ec2d426`](https://github.com/adobe/aio-commerce-sdk/commit/ec2d4262166bde68a434025667f38609313ad712)]:
|
|
14
|
+
- @adobe/aio-commerce-lib-api@1.2.1
|
|
15
|
+
- @adobe/aio-commerce-lib-core@1.1.1
|
|
16
|
+
|
|
3
17
|
## 1.1.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/api/index.cjs
CHANGED
|
@@ -192,7 +192,6 @@ function createCustomCommerceWebhooksApiClient(params, functions) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
//#endregion
|
|
195
|
-
exports.__toESM = __toESM;
|
|
196
195
|
exports.createCommerceWebhooksApiClient = createCommerceWebhooksApiClient;
|
|
197
196
|
exports.createCustomCommerceWebhooksApiClient = createCustomCommerceWebhooksApiClient;
|
|
198
197
|
exports.getSupportedWebhookList = getSupportedWebhookList;
|
package/dist/cjs/api/index.d.cts
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import * as _$_adobe_aio_commerce_lib_api0 from "@adobe/aio-commerce-lib-api";
|
|
16
15
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
17
16
|
import { Options } from "ky";
|
|
18
17
|
import * as v from "valibot";
|
|
@@ -178,7 +177,7 @@ declare function getSupportedWebhookList(httpClient: AdobeCommerceHttpClient, fe
|
|
|
178
177
|
* Creates a new API client for the Commerce Webhooks API.
|
|
179
178
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
180
179
|
*/
|
|
181
|
-
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams):
|
|
180
|
+
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, {
|
|
182
181
|
getWebhookList: typeof getWebhookList;
|
|
183
182
|
subscribeWebhook: typeof subscribeWebhook;
|
|
184
183
|
unsubscribeWebhook: typeof unsubscribeWebhook;
|
|
@@ -194,6 +193,6 @@ type CommerceWebhooksApiClient = ReturnType<typeof createCommerceWebhooksApiClie
|
|
|
194
193
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
195
194
|
* @param functions - The API functions to include in the client.
|
|
196
195
|
*/
|
|
197
|
-
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions):
|
|
196
|
+
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
198
197
|
//#endregion
|
|
199
198
|
export { type CommerceSupportedWebhook, type CommerceSupportedWebhookManyResponse, type CommerceWebhook, type CommerceWebhookDeveloperConsoleOAuth, type CommerceWebhookField, type CommerceWebhookHeader, type CommerceWebhookManyResponse, type CommerceWebhookRule, type CommerceWebhooksApiClient, type WebhookSubscribeParams, type WebhookUnsubscribeParams, createCommerceWebhooksApiClient, createCustomCommerceWebhooksApiClient, getSupportedWebhookList, getWebhookList, subscribeWebhook, unsubscribeWebhook };
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
16
|
-
const require_api_index = require('../api/index.cjs');
|
|
17
16
|
let _adobe_aio_commerce_lib_core_responses = require("@adobe/aio-commerce-lib-core/responses");
|
|
18
17
|
|
|
19
18
|
//#region source/responses/operations/presets.ts
|
|
@@ -47,7 +46,7 @@ const successOperation = () => ({ op: "success" });
|
|
|
47
46
|
const exceptionOperation = (message, exceptionClass) => ({
|
|
48
47
|
op: "exception",
|
|
49
48
|
...message && { message },
|
|
50
|
-
...exceptionClass && {
|
|
49
|
+
...exceptionClass && { type: exceptionClass }
|
|
51
50
|
});
|
|
52
51
|
/**
|
|
53
52
|
* Creates an add operation response
|
|
@@ -28,7 +28,7 @@ type SuccessOperation = {
|
|
|
28
28
|
*/
|
|
29
29
|
type ExceptionOperation = {
|
|
30
30
|
op: "exception"; /** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
31
|
-
|
|
31
|
+
type?: string; /** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
32
32
|
message?: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
package/dist/es/api/index.d.mts
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import * as _$_adobe_aio_commerce_lib_api0 from "@adobe/aio-commerce-lib-api";
|
|
16
15
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
17
16
|
import * as v from "valibot";
|
|
18
17
|
import { Options } from "ky";
|
|
@@ -178,7 +177,7 @@ declare function getSupportedWebhookList(httpClient: AdobeCommerceHttpClient, fe
|
|
|
178
177
|
* Creates a new API client for the Commerce Webhooks API.
|
|
179
178
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
180
179
|
*/
|
|
181
|
-
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams):
|
|
180
|
+
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, {
|
|
182
181
|
getWebhookList: typeof getWebhookList;
|
|
183
182
|
subscribeWebhook: typeof subscribeWebhook;
|
|
184
183
|
unsubscribeWebhook: typeof unsubscribeWebhook;
|
|
@@ -194,6 +193,6 @@ type CommerceWebhooksApiClient = ReturnType<typeof createCommerceWebhooksApiClie
|
|
|
194
193
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
195
194
|
* @param functions - The API functions to include in the client.
|
|
196
195
|
*/
|
|
197
|
-
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions):
|
|
196
|
+
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): import("@adobe/aio-commerce-lib-api").ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
198
197
|
//#endregion
|
|
199
198
|
export { type CommerceSupportedWebhook, type CommerceSupportedWebhookManyResponse, type CommerceWebhook, type CommerceWebhookDeveloperConsoleOAuth, type CommerceWebhookField, type CommerceWebhookHeader, type CommerceWebhookManyResponse, type CommerceWebhookRule, type CommerceWebhooksApiClient, type WebhookSubscribeParams, type WebhookUnsubscribeParams, createCommerceWebhooksApiClient, createCustomCommerceWebhooksApiClient, getSupportedWebhookList, getWebhookList, subscribeWebhook, unsubscribeWebhook };
|
|
@@ -28,7 +28,7 @@ type SuccessOperation = {
|
|
|
28
28
|
*/
|
|
29
29
|
type ExceptionOperation = {
|
|
30
30
|
op: "exception"; /** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
31
|
-
|
|
31
|
+
type?: string; /** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
32
32
|
message?: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
@@ -45,7 +45,7 @@ const successOperation = () => ({ op: "success" });
|
|
|
45
45
|
const exceptionOperation = (message, exceptionClass) => ({
|
|
46
46
|
op: "exception",
|
|
47
47
|
...message && { message },
|
|
48
|
-
...exceptionClass && {
|
|
48
|
+
...exceptionClass && { type: exceptionClass }
|
|
49
49
|
});
|
|
50
50
|
/**
|
|
51
51
|
* Creates an add operation response
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@adobe/aio-commerce-lib-webhooks",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Adobe Inc.",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.2",
|
|
6
6
|
"private": false,
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22 <=24"
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"url": "git+https://github.com/adobe/aio-commerce-sdk.git",
|
|
25
25
|
"directory": "packages/aio-commerce-lib-webhooks"
|
|
26
26
|
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"registry": "https://registry.npmjs.org",
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
27
31
|
"exports": {
|
|
28
32
|
"./api": {
|
|
29
33
|
"import": {
|
|
@@ -60,8 +64,8 @@
|
|
|
60
64
|
"dependencies": {
|
|
61
65
|
"ky": "^1.9.0",
|
|
62
66
|
"valibot": "^1.1.0",
|
|
63
|
-
"@adobe/aio-commerce-lib-api": "1.2.
|
|
64
|
-
"@adobe/aio-commerce-lib-core": "1.1.
|
|
67
|
+
"@adobe/aio-commerce-lib-api": "1.2.1",
|
|
68
|
+
"@adobe/aio-commerce-lib-core": "1.1.1"
|
|
65
69
|
},
|
|
66
70
|
"devDependencies": {
|
|
67
71
|
"typescript": "^6.0.0",
|
|
@@ -69,7 +73,7 @@
|
|
|
69
73
|
"@aio-commerce-sdk/config-tsdown": "1.0.1",
|
|
70
74
|
"@aio-commerce-sdk/config-typescript": "1.0.0",
|
|
71
75
|
"@aio-commerce-sdk/config-vitest": "1.0.0",
|
|
72
|
-
"@aio-commerce-sdk/scripting-utils": "0.3.
|
|
76
|
+
"@aio-commerce-sdk/scripting-utils": "0.3.3",
|
|
73
77
|
"@aio-commerce-sdk/scripts": "0.1.0"
|
|
74
78
|
},
|
|
75
79
|
"sideEffects": false,
|