@adobe/aio-commerce-lib-webhooks 0.1.0 → 1.0.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,16 @@
1
1
  # @adobe/aio-commerce-lib-webhooks
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#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`.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`aeb0411`](https://github.com/adobe/aio-commerce-sdk/commit/aeb0411521c0cd8bc9e878beb160eeb92e98d090)]:
12
+ - @adobe/aio-commerce-lib-api@1.1.0
13
+
3
14
  ## 0.1.0
4
15
 
5
16
  ### 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
@@ -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) {
@@ -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
- return {
49
- op: "exception",
50
- ...message && { message },
51
- ...exceptionClass && { class: exceptionClass }
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.
@@ -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
- return {
47
- op: "exception",
48
- ...message && { message },
49
- ...exceptionClass && { class: exceptionClass }
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,7 +2,7 @@
2
2
  "name": "@adobe/aio-commerce-lib-webhooks",
3
3
  "type": "module",
4
4
  "author": "Adobe Inc.",
5
- "version": "0.1.0",
5
+ "version": "1.0.0",
6
6
  "private": false,
7
7
  "engines": {
8
8
  "node": ">=20 <=24"
@@ -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.1",
63
+ "@adobe/aio-commerce-lib-api": "1.1.0",
64
64
  "@adobe/aio-commerce-lib-core": "1.0.0"
65
65
  },
66
66
  "devDependencies": {
67
- "typescript": "^5.9.3",
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.0",
72
+ "@aio-commerce-sdk/scripting-utils": "0.3.1",
73
73
  "@aio-commerce-sdk/scripts": "0.1.0"
74
74
  },
75
75
  "sideEffects": false,