@adobe/aio-commerce-lib-webhooks 1.2.0 → 1.2.1-alpha-20260819113253
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 +6 -0
- package/dist/cjs/api/index.cjs +1 -1
- package/dist/cjs/api/index.d.cts +0 -1
- package/dist/cjs/responses/index.d.cts +18 -10
- package/dist/es/api/index.d.mts +0 -1
- package/dist/es/responses/index.d.mts +18 -10
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/dist/cjs/api/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
34
|
}
|
|
35
35
|
return to;
|
|
36
36
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
38
|
value: mod,
|
|
39
39
|
enumerable: true
|
|
40
40
|
}) : target, mod));
|
package/dist/cjs/api/index.d.cts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
16
16
|
import { Options } from "ky";
|
|
17
17
|
import * as v from "valibot";
|
|
18
|
-
|
|
19
18
|
//#region source/api/webhooks/schema.d.ts
|
|
20
19
|
/**
|
|
21
20
|
* Schema for the webhook payload sent to POST /webhooks/subscribe.
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
import { SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
|
|
16
16
|
import { HTTP_OK } from "@adobe/aio-commerce-lib-api/utils";
|
|
17
|
-
|
|
18
17
|
//#region source/responses/helpers.d.ts
|
|
19
18
|
/**
|
|
20
19
|
* Determines whether a webhook action's result represents a successful outcome.
|
|
@@ -48,8 +47,10 @@ type SuccessOperation = {
|
|
|
48
47
|
* Causes Commerce to terminate the process that triggered the original event.
|
|
49
48
|
*/
|
|
50
49
|
type ExceptionOperation = {
|
|
51
|
-
op: "exception";
|
|
52
|
-
|
|
50
|
+
op: "exception";
|
|
51
|
+
/** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
52
|
+
type?: string;
|
|
53
|
+
/** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
53
54
|
message?: string;
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
@@ -58,9 +59,12 @@ type ExceptionOperation = {
|
|
|
58
59
|
* @template TValue - The type of the value to be added (defaults to unknown)
|
|
59
60
|
*/
|
|
60
61
|
type AddOperation<TValue = unknown> = {
|
|
61
|
-
op: "add";
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
op: "add";
|
|
63
|
+
/** Specifies the path at which the value should be added to the triggered event arguments. */
|
|
64
|
+
path: string;
|
|
65
|
+
/** Specifies the value to be added. This can be a single value or in an array format. */
|
|
66
|
+
value: TValue;
|
|
67
|
+
/** Specifies the DataObject class name to create, based on the value and added to the provided path. */
|
|
64
68
|
instance?: string;
|
|
65
69
|
};
|
|
66
70
|
/**
|
|
@@ -69,9 +73,12 @@ type AddOperation<TValue = unknown> = {
|
|
|
69
73
|
* @template TValue - The type of the replacement value (defaults to unknown)
|
|
70
74
|
*/
|
|
71
75
|
type ReplaceOperation<TValue = unknown> = {
|
|
72
|
-
op: "replace";
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
op: "replace";
|
|
77
|
+
/** Specifies the path at which the value should be replaced with the provided value. */
|
|
78
|
+
path: string;
|
|
79
|
+
/** Specifies the replacement value. This can be a single value or in an array format. */
|
|
80
|
+
value: TValue;
|
|
81
|
+
/** Specifies the DataObject class name to create, based on the value and added to the provided path. */
|
|
75
82
|
instance?: string;
|
|
76
83
|
};
|
|
77
84
|
/**
|
|
@@ -79,7 +86,8 @@ type ReplaceOperation<TValue = unknown> = {
|
|
|
79
86
|
* Causes Commerce to remove a value or node in triggered event arguments by the provided path.
|
|
80
87
|
*/
|
|
81
88
|
type RemoveOperation = {
|
|
82
|
-
op: "remove";
|
|
89
|
+
op: "remove";
|
|
90
|
+
/** Specifies the path at which the value should be removed. */
|
|
83
91
|
path: string;
|
|
84
92
|
};
|
|
85
93
|
/**
|
package/dist/es/api/index.d.mts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
16
16
|
import * as v from "valibot";
|
|
17
17
|
import { Options } from "ky";
|
|
18
|
-
|
|
19
18
|
//#region source/api/webhooks/schema.d.ts
|
|
20
19
|
/**
|
|
21
20
|
* Schema for the webhook payload sent to POST /webhooks/subscribe.
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
import { HTTP_OK } from "@adobe/aio-commerce-lib-api/utils";
|
|
16
16
|
import { SuccessResponse } from "@adobe/aio-commerce-lib-core/responses";
|
|
17
|
-
|
|
18
17
|
//#region source/responses/helpers.d.ts
|
|
19
18
|
/**
|
|
20
19
|
* Determines whether a webhook action's result represents a successful outcome.
|
|
@@ -48,8 +47,10 @@ type SuccessOperation = {
|
|
|
48
47
|
* Causes Commerce to terminate the process that triggered the original event.
|
|
49
48
|
*/
|
|
50
49
|
type ExceptionOperation = {
|
|
51
|
-
op: "exception";
|
|
52
|
-
|
|
50
|
+
op: "exception";
|
|
51
|
+
/** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
52
|
+
type?: string;
|
|
53
|
+
/** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
53
54
|
message?: string;
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
@@ -58,9 +59,12 @@ type ExceptionOperation = {
|
|
|
58
59
|
* @template TValue - The type of the value to be added (defaults to unknown)
|
|
59
60
|
*/
|
|
60
61
|
type AddOperation<TValue = unknown> = {
|
|
61
|
-
op: "add";
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
op: "add";
|
|
63
|
+
/** Specifies the path at which the value should be added to the triggered event arguments. */
|
|
64
|
+
path: string;
|
|
65
|
+
/** Specifies the value to be added. This can be a single value or in an array format. */
|
|
66
|
+
value: TValue;
|
|
67
|
+
/** Specifies the DataObject class name to create, based on the value and added to the provided path. */
|
|
64
68
|
instance?: string;
|
|
65
69
|
};
|
|
66
70
|
/**
|
|
@@ -69,9 +73,12 @@ type AddOperation<TValue = unknown> = {
|
|
|
69
73
|
* @template TValue - The type of the replacement value (defaults to unknown)
|
|
70
74
|
*/
|
|
71
75
|
type ReplaceOperation<TValue = unknown> = {
|
|
72
|
-
op: "replace";
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
op: "replace";
|
|
77
|
+
/** Specifies the path at which the value should be replaced with the provided value. */
|
|
78
|
+
path: string;
|
|
79
|
+
/** Specifies the replacement value. This can be a single value or in an array format. */
|
|
80
|
+
value: TValue;
|
|
81
|
+
/** Specifies the DataObject class name to create, based on the value and added to the provided path. */
|
|
75
82
|
instance?: string;
|
|
76
83
|
};
|
|
77
84
|
/**
|
|
@@ -79,7 +86,8 @@ type ReplaceOperation<TValue = unknown> = {
|
|
|
79
86
|
* Causes Commerce to remove a value or node in triggered event arguments by the provided path.
|
|
80
87
|
*/
|
|
81
88
|
type RemoveOperation = {
|
|
82
|
-
op: "remove";
|
|
89
|
+
op: "remove";
|
|
90
|
+
/** Specifies the path at which the value should be removed. */
|
|
83
91
|
path: string;
|
|
84
92
|
};
|
|
85
93
|
/**
|
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.2.
|
|
5
|
+
"version": "1.2.1-alpha-20260819113253",
|
|
6
6
|
"private": false,
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22 <=24"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"ky": "^1.9.0",
|
|
66
66
|
"valibot": "^1.1.0",
|
|
67
|
-
"@adobe/aio-commerce-lib-api": "1.3.
|
|
67
|
+
"@adobe/aio-commerce-lib-api": "1.3.1-alpha-20260819113253",
|
|
68
68
|
"@adobe/aio-commerce-lib-core": "1.2.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@aio-commerce-sdk/config-tsdown": "1.0.1",
|
|
74
74
|
"@aio-commerce-sdk/config-typescript": "1.0.0",
|
|
75
75
|
"@aio-commerce-sdk/config-vitest": "1.0.0",
|
|
76
|
-
"@aio-commerce-sdk/scripting-utils": "0.3.
|
|
77
|
-
"@aio-commerce-sdk/scripts": "0.1.
|
|
76
|
+
"@aio-commerce-sdk/scripting-utils": "0.3.5-alpha-20260819113253",
|
|
77
|
+
"@aio-commerce-sdk/scripts": "0.1.1"
|
|
78
78
|
},
|
|
79
79
|
"sideEffects": false,
|
|
80
80
|
"scripts": {
|