@adobe/aio-commerce-lib-webhooks 0.1.0 → 1.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 +23 -0
- package/README.md +0 -3
- package/dist/cjs/api/index.cjs +1 -1
- package/dist/cjs/api/index.d.cts +3 -3
- package/dist/cjs/responses/index.cjs +5 -7
- package/dist/es/api/index.d.mts +3 -3
- package/dist/es/responses/index.mjs +5 -7
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-webhooks
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#345](https://github.com/adobe/aio-commerce-sdk/pull/345) [`38adb09`](https://github.com/adobe/aio-commerce-sdk/commit/38adb09e1e2bd1b8fa764ecc2e0d21ecc0071ca7) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Drop Node 20 support (EOL April 2026).
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`38adb09`](https://github.com/adobe/aio-commerce-sdk/commit/38adb09e1e2bd1b8fa764ecc2e0d21ecc0071ca7)]:
|
|
12
|
+
- @adobe/aio-commerce-lib-api@1.2.0
|
|
13
|
+
- @adobe/aio-commerce-lib-core@1.1.0
|
|
14
|
+
|
|
15
|
+
## 1.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- [#407](https://github.com/adobe/aio-commerce-sdk/pull/407) [`aa2ac1a`](https://github.com/adobe/aio-commerce-sdk/commit/aa2ac1a33df543c7f62675f1c920722969fc0a30) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Bump version to first stable `1.0.0`.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`aeb0411`](https://github.com/adobe/aio-commerce-sdk/commit/aeb0411521c0cd8bc9e878beb160eeb92e98d090)]:
|
|
24
|
+
- @adobe/aio-commerce-lib-api@1.1.0
|
|
25
|
+
|
|
3
26
|
## 0.1.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# `@adobe/aio-commerce-lib-webhooks`
|
|
2
2
|
|
|
3
|
-
> [!WARNING]
|
|
4
|
-
> This package is a work in progress and is not yet ready for use. You may be able to install it, but if you do, expect breaking changes.
|
|
5
|
-
|
|
6
3
|
This package provides an interface to interact with the Adobe Commerce Webhooks API.
|
|
7
4
|
|
|
8
5
|
## Installation
|
package/dist/cjs/api/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
42
42
|
//#endregion
|
|
43
43
|
let _adobe_aio_commerce_lib_api = require("@adobe/aio-commerce-lib-api");
|
|
44
44
|
let valibot = require("valibot");
|
|
45
|
-
valibot = __toESM(valibot);
|
|
45
|
+
valibot = __toESM(valibot, 1);
|
|
46
46
|
|
|
47
47
|
//#region source/api/webhooks/schema.ts
|
|
48
48
|
function nonEmptyString(fieldName) {
|
package/dist/cjs/api/index.d.cts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
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";
|
|
15
|
+
import * as _$_adobe_aio_commerce_lib_api0 from "@adobe/aio-commerce-lib-api";
|
|
16
16
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
17
17
|
import { Options } from "ky";
|
|
18
18
|
import * as v from "valibot";
|
|
@@ -178,7 +178,7 @@ declare function getSupportedWebhookList(httpClient: AdobeCommerceHttpClient, fe
|
|
|
178
178
|
* Creates a new API client for the Commerce Webhooks API.
|
|
179
179
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
180
180
|
*/
|
|
181
|
-
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): _adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, {
|
|
181
|
+
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): _$_adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, {
|
|
182
182
|
getWebhookList: typeof getWebhookList;
|
|
183
183
|
subscribeWebhook: typeof subscribeWebhook;
|
|
184
184
|
unsubscribeWebhook: typeof unsubscribeWebhook;
|
|
@@ -194,6 +194,6 @@ type CommerceWebhooksApiClient = ReturnType<typeof createCommerceWebhooksApiClie
|
|
|
194
194
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
195
195
|
* @param functions - The API functions to include in the client.
|
|
196
196
|
*/
|
|
197
|
-
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): _adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
197
|
+
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): _$_adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
198
198
|
//#endregion
|
|
199
199
|
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 };
|
|
@@ -44,13 +44,11 @@ const successOperation = () => ({ op: "success" });
|
|
|
44
44
|
* );
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
const exceptionOperation = (message, exceptionClass) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
};
|
|
47
|
+
const exceptionOperation = (message, exceptionClass) => ({
|
|
48
|
+
op: "exception",
|
|
49
|
+
...message && { message },
|
|
50
|
+
...exceptionClass && { class: exceptionClass }
|
|
51
|
+
});
|
|
54
52
|
/**
|
|
55
53
|
* Creates an add operation response
|
|
56
54
|
* Causes Commerce to add the provided value to the provided path in the triggered event arguments.
|
package/dist/es/api/index.d.mts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
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";
|
|
15
|
+
import * as _$_adobe_aio_commerce_lib_api0 from "@adobe/aio-commerce-lib-api";
|
|
16
16
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
17
17
|
import * as v from "valibot";
|
|
18
18
|
import { Options } from "ky";
|
|
@@ -178,7 +178,7 @@ declare function getSupportedWebhookList(httpClient: AdobeCommerceHttpClient, fe
|
|
|
178
178
|
* Creates a new API client for the Commerce Webhooks API.
|
|
179
179
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
180
180
|
*/
|
|
181
|
-
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): _adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, {
|
|
181
|
+
declare function createCommerceWebhooksApiClient(params: CommerceHttpClientParams): _$_adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, {
|
|
182
182
|
getWebhookList: typeof getWebhookList;
|
|
183
183
|
subscribeWebhook: typeof subscribeWebhook;
|
|
184
184
|
unsubscribeWebhook: typeof unsubscribeWebhook;
|
|
@@ -194,6 +194,6 @@ type CommerceWebhooksApiClient = ReturnType<typeof createCommerceWebhooksApiClie
|
|
|
194
194
|
* @param params - The parameters to build the Commerce HTTP client.
|
|
195
195
|
* @param functions - The API functions to include in the client.
|
|
196
196
|
*/
|
|
197
|
-
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): _adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
197
|
+
declare function createCustomCommerceWebhooksApiClient<TFunctions extends Record<string, ApiFunction<AdobeCommerceHttpClient, any[], any>>>(params: CommerceHttpClientParams, functions: TFunctions): _$_adobe_aio_commerce_lib_api0.ApiClientRecord<AdobeCommerceHttpClient, TFunctions>;
|
|
198
198
|
//#endregion
|
|
199
199
|
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 };
|
|
@@ -42,13 +42,11 @@ const successOperation = () => ({ op: "success" });
|
|
|
42
42
|
* );
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
const exceptionOperation = (message, exceptionClass) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
};
|
|
45
|
+
const exceptionOperation = (message, exceptionClass) => ({
|
|
46
|
+
op: "exception",
|
|
47
|
+
...message && { message },
|
|
48
|
+
...exceptionClass && { class: exceptionClass }
|
|
49
|
+
});
|
|
52
50
|
/**
|
|
53
51
|
* Creates an add operation response
|
|
54
52
|
* Causes Commerce to add the provided value to the provided path in the triggered event arguments.
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@adobe/aio-commerce-lib-webhooks",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Adobe Inc.",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=22 <=24"
|
|
9
9
|
},
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"description": "A library to interact with the Adobe Commerce Webhooks API",
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"ky": "^1.9.0",
|
|
62
62
|
"valibot": "^1.1.0",
|
|
63
|
-
"@adobe/aio-commerce-lib-api": "1.0
|
|
64
|
-
"@adobe/aio-commerce-lib-core": "1.
|
|
63
|
+
"@adobe/aio-commerce-lib-api": "1.2.0",
|
|
64
|
+
"@adobe/aio-commerce-lib-core": "1.1.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"typescript": "^
|
|
67
|
+
"typescript": "^6.0.0",
|
|
68
68
|
"msw": "^2.11.1",
|
|
69
69
|
"@aio-commerce-sdk/config-tsdown": "1.0.1",
|
|
70
70
|
"@aio-commerce-sdk/config-typescript": "1.0.0",
|
|
71
71
|
"@aio-commerce-sdk/config-vitest": "1.0.0",
|
|
72
|
-
"@aio-commerce-sdk/scripting-utils": "0.3.
|
|
72
|
+
"@aio-commerce-sdk/scripting-utils": "0.3.2",
|
|
73
73
|
"@aio-commerce-sdk/scripts": "0.1.0"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|