@adobe/aio-commerce-lib-events 0.4.0 → 0.5.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 +13 -0
- package/dist/cjs/commerce/index.cjs +1 -1
- package/dist/cjs/commerce/index.d.cts +47 -76
- package/dist/cjs/io-events/index.cjs +1 -1
- package/dist/cjs/io-events/index.d.cts +273 -3007
- package/dist/es/commerce/index.d.mts +47 -76
- package/dist/es/commerce/index.mjs +1 -1
- package/dist/es/io-events/index.d.mts +273 -3007
- package/dist/es/io-events/index.mjs +1 -1
- package/package.json +4 -4
|
@@ -2,19 +2,33 @@ import * as v from "valibot";
|
|
|
2
2
|
import * as _adobe_aio_commerce_lib_api0 from "@adobe/aio-commerce-lib-api";
|
|
3
3
|
import { AdobeCommerceHttpClient, ApiFunction, CommerceHttpClientParams } from "@adobe/aio-commerce-lib-api";
|
|
4
4
|
import { Options } from "@adobe/aio-commerce-lib-api/ky";
|
|
5
|
-
import { CamelCasedPropertiesDeep } from "type-fest";
|
|
6
5
|
import * as ky0 from "ky";
|
|
7
6
|
|
|
7
|
+
//#region source/commerce/api/event-providers/types.d.ts
|
|
8
|
+
/** Defines the structure of a Commerce event provider. */
|
|
9
|
+
type CommerceEventProvider = {
|
|
10
|
+
id: string;
|
|
11
|
+
provider_id: string;
|
|
12
|
+
instance_id?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
workspace_configuration?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Defines the fields of an event provider entity returned by the Commerce API. */
|
|
18
|
+
type CommerceEventProviderOneResponse = CommerceEventProvider;
|
|
19
|
+
/** Defines the fields of many event provider entities returned by the Commerce API. */
|
|
20
|
+
type CommerceEventProviderManyResponse = CommerceEventProvider[];
|
|
21
|
+
//#endregion
|
|
8
22
|
//#region source/commerce/api/event-providers/schema.d.ts
|
|
9
23
|
declare const EventProviderGetByIdParamsSchema: v.ObjectSchema<{
|
|
10
|
-
readonly providerId: v.StringSchema<`Expected a string value for
|
|
24
|
+
readonly providerId: v.StringSchema<`Expected a string value for '${string}'`>;
|
|
11
25
|
}, undefined>;
|
|
12
26
|
declare const EventProviderCreateParamsSchema: v.ObjectSchema<{
|
|
13
|
-
readonly providerId: v.StringSchema<`Expected a string value for
|
|
14
|
-
readonly instanceId: v.StringSchema<`Expected a string value for
|
|
15
|
-
readonly label: v.OptionalSchema<v.StringSchema<`Expected a string value for
|
|
16
|
-
readonly description: v.OptionalSchema<v.StringSchema<`Expected a string value for
|
|
17
|
-
readonly associatedWorkspaceConfiguration: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
27
|
+
readonly providerId: v.StringSchema<`Expected a string value for '${string}'`>;
|
|
28
|
+
readonly instanceId: v.StringSchema<`Expected a string value for '${string}'`>;
|
|
29
|
+
readonly label: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
30
|
+
readonly description: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
31
|
+
readonly associatedWorkspaceConfiguration: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.EmptyAction<string, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.ParseJsonAction<string, undefined, `Expected valid JSON string for property '${string}'`>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
18
32
|
[x: string]: unknown;
|
|
19
33
|
}, undefined, undefined>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
20
34
|
[x: string]: unknown;
|
|
@@ -31,21 +45,6 @@ type EventProviderGetByIdParams = v.InferInput<typeof EventProviderGetByIdParams
|
|
|
31
45
|
*/
|
|
32
46
|
type EventProviderCreateParams = v.InferInput<typeof EventProviderCreateParamsSchema>;
|
|
33
47
|
//#endregion
|
|
34
|
-
//#region source/commerce/api/event-providers/types.d.ts
|
|
35
|
-
/** Defines the structure of a Commerce event provider. */
|
|
36
|
-
type CommerceEventProvider = {
|
|
37
|
-
id: string;
|
|
38
|
-
provider_id: string;
|
|
39
|
-
instance_id?: string;
|
|
40
|
-
label?: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
workspace_configuration?: string;
|
|
43
|
-
};
|
|
44
|
-
/** Defines the fields of an event provider entity returned by the Commerce API. */
|
|
45
|
-
type CommerceEventProviderOneResponse = CamelCasedPropertiesDeep<CommerceEventProvider>;
|
|
46
|
-
/** Defines the fields of many event provider entities returned by the Commerce API. */
|
|
47
|
-
type CommerceEventProviderManyResponse = CommerceEventProviderOneResponse[];
|
|
48
|
-
//#endregion
|
|
49
48
|
//#region source/commerce/api/event-providers/endpoints.d.ts
|
|
50
49
|
/**
|
|
51
50
|
* Lists all event providers of the Commerce instance bound to the given {@link AdobeCommerceHttpClient}.
|
|
@@ -68,14 +67,7 @@ declare function getAllEventProviders(httpClient: AdobeCommerceHttpClient, fetch
|
|
|
68
67
|
* @throws A {@link CommerceSdkValidationError} If the parameters are in the wrong format.
|
|
69
68
|
* @throws An {@link HTTPError} If the status code is not 2XX.
|
|
70
69
|
*/
|
|
71
|
-
declare function getEventProviderById(httpClient: AdobeCommerceHttpClient, params: EventProviderGetByIdParams, fetchOptions?: Options): Promise<
|
|
72
|
-
id: string;
|
|
73
|
-
providerId: string;
|
|
74
|
-
instanceId?: string | undefined;
|
|
75
|
-
label?: string | undefined;
|
|
76
|
-
description?: string | undefined;
|
|
77
|
-
workspaceConfiguration?: string | undefined;
|
|
78
|
-
}>;
|
|
70
|
+
declare function getEventProviderById(httpClient: AdobeCommerceHttpClient, params: EventProviderGetByIdParams, fetchOptions?: Options): Promise<CommerceEventProvider>;
|
|
79
71
|
/**
|
|
80
72
|
* Creates an event provider in the Commerce instance bound to the given {@link AdobeCommerceHttpClient}.
|
|
81
73
|
* @see https://developer.adobe.com/commerce/extensibility/events/api/#create-an-event-provider
|
|
@@ -87,27 +79,20 @@ declare function getEventProviderById(httpClient: AdobeCommerceHttpClient, param
|
|
|
87
79
|
* @throws A {@link CommerceSdkValidationError} If the parameters are in the wrong format.
|
|
88
80
|
* @throws An {@link HTTPError} If the status code is not 2XX.
|
|
89
81
|
*/
|
|
90
|
-
declare function createEventProvider(httpClient: AdobeCommerceHttpClient, params: EventProviderCreateParams, fetchOptions?: Options): Promise<
|
|
91
|
-
id: string;
|
|
92
|
-
providerId: string;
|
|
93
|
-
instanceId?: string | undefined;
|
|
94
|
-
label?: string | undefined;
|
|
95
|
-
description?: string | undefined;
|
|
96
|
-
workspaceConfiguration?: string | undefined;
|
|
97
|
-
}>;
|
|
82
|
+
declare function createEventProvider(httpClient: AdobeCommerceHttpClient, params: EventProviderCreateParams, fetchOptions?: Options): Promise<CommerceEventProvider>;
|
|
98
83
|
//#endregion
|
|
99
84
|
//#region source/commerce/api/event-subscriptions/schema.d.ts
|
|
100
85
|
declare const EventSubscriptionCreateParamsSchema: v.ObjectSchema<{
|
|
101
|
-
readonly name: v.StringSchema<`Expected a string value for
|
|
102
|
-
readonly providerId: v.OptionalSchema<v.StringSchema<`Expected a string value for
|
|
103
|
-
readonly parent: v.OptionalSchema<v.StringSchema<`Expected a string value for
|
|
86
|
+
readonly name: v.StringSchema<`Expected a string value for '${string}'`>;
|
|
87
|
+
readonly providerId: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
88
|
+
readonly parent: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
104
89
|
readonly fields: v.ArraySchema<v.ObjectSchema<{
|
|
105
|
-
readonly name: v.StringSchema<`Expected a string value for
|
|
90
|
+
readonly name: v.StringSchema<`Expected a string value for '${string}'`>;
|
|
106
91
|
}, undefined>, `Expected an array of objects with a 'name' property for the property "${string}"`>;
|
|
107
|
-
readonly destination: v.OptionalSchema<v.StringSchema<`Expected a string value for
|
|
108
|
-
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for
|
|
109
|
-
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for
|
|
110
|
-
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for
|
|
92
|
+
readonly destination: v.OptionalSchema<v.StringSchema<`Expected a string value for '${string}'`>, undefined>;
|
|
93
|
+
readonly hipaaAuditRequired: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
94
|
+
readonly prioritary: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
95
|
+
readonly force: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
111
96
|
}, undefined>;
|
|
112
97
|
/**
|
|
113
98
|
* The schema of the parameters received by the POST `eventing/eventSubscribe` Commerce API endpoint.
|
|
@@ -139,9 +124,9 @@ type CommerceEventSubscription = {
|
|
|
139
124
|
hipaa_audit_required: boolean;
|
|
140
125
|
};
|
|
141
126
|
/** Defines the fields of an event subscription entity returned by the Commerce API. */
|
|
142
|
-
type CommerceEventSubscriptionOneResponse =
|
|
127
|
+
type CommerceEventSubscriptionOneResponse = CommerceEventSubscription;
|
|
143
128
|
/** Defines the fields of many event subscription entities returned by the Commerce API. */
|
|
144
|
-
type CommerceEventSubscriptionManyResponse =
|
|
129
|
+
type CommerceEventSubscriptionManyResponse = CommerceEventSubscription[];
|
|
145
130
|
//#endregion
|
|
146
131
|
//#region source/commerce/api/event-subscriptions/endpoints.d.ts
|
|
147
132
|
/**
|
|
@@ -168,24 +153,24 @@ declare function createEventSubscription(httpClient: AdobeCommerceHttpClient, pa
|
|
|
168
153
|
//#region source/commerce/api/eventing-configuration/schema.d.ts
|
|
169
154
|
/** The schema of the parameters received by the `updateConfiguration` Commerce Eventing API endpoint. */
|
|
170
155
|
declare const UpdateEventingConfigurationParamsSchema: Omit<v.ObjectSchema<{
|
|
171
|
-
readonly enabled: v.BooleanSchema<`Expected a boolean value for
|
|
172
|
-
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
173
|
-
readonly instanceId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
174
|
-
readonly merchantId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
175
|
-
readonly environmentId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
176
|
-
readonly workspaceConfiguration: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
156
|
+
readonly enabled: v.BooleanSchema<`Expected a boolean value for '${string}'`>;
|
|
157
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters, underscores, and hyphens are allowed in string value of "${string}"${string}`>]>;
|
|
158
|
+
readonly instanceId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters, underscores, and hyphens are allowed in string value of "${string}"${string}`>]>;
|
|
159
|
+
readonly merchantId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>;
|
|
160
|
+
readonly environmentId: v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>;
|
|
161
|
+
readonly workspaceConfiguration: v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.EmptyAction<string, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.ParseJsonAction<string, undefined, `Expected valid JSON string for property '${string}'`>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
177
162
|
[x: string]: unknown;
|
|
178
163
|
}, undefined, undefined>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
179
164
|
[x: string]: unknown;
|
|
180
165
|
}, undefined, `Expected valid JSON data for property '${string}'`>]>], undefined>;
|
|
181
166
|
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
182
167
|
readonly entries: {
|
|
183
|
-
readonly enabled: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for
|
|
184
|
-
readonly providerId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
185
|
-
readonly instanceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
186
|
-
readonly merchantId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
187
|
-
readonly environmentId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
188
|
-
readonly workspaceConfiguration: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for
|
|
168
|
+
readonly enabled: v.OptionalSchema<v.BooleanSchema<`Expected a boolean value for '${string}'`>, undefined>;
|
|
169
|
+
readonly providerId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters, underscores, and hyphens are allowed in string value of "${string}"${string}`>]>, undefined>;
|
|
170
|
+
readonly instanceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters, underscores, and hyphens are allowed in string value of "${string}"${string}`>]>, undefined>;
|
|
171
|
+
readonly merchantId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>, undefined>;
|
|
172
|
+
readonly environmentId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.RegexAction<string, `Only alphanumeric characters and underscores are allowed in string value of "${string}"${string}`>]>, undefined>;
|
|
173
|
+
readonly workspaceConfiguration: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.EmptyAction<string, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<`Expected a string value for '${string}'`>, v.ParseJsonAction<string, undefined, `Expected valid JSON string for property '${string}'`>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
189
174
|
[x: string]: unknown;
|
|
190
175
|
}, undefined, undefined>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.StringifyJsonAction<{
|
|
191
176
|
[x: string]: unknown;
|
|
@@ -276,22 +261,8 @@ declare function createCommerceEventsApiClient(params: CommerceHttpClientParams)
|
|
|
276
261
|
getAllEventSubscriptions(httpClient: AdobeCommerceHttpClient, fetchOptions?: ky0.Options): Promise<CommerceEventSubscriptionManyResponse>;
|
|
277
262
|
createEventSubscription(httpClient: AdobeCommerceHttpClient, params: EventSubscriptionCreateParams, fetchOptions?: ky0.Options): Promise<void>;
|
|
278
263
|
getAllEventProviders(httpClient: AdobeCommerceHttpClient, fetchOptions?: ky0.Options): Promise<CommerceEventProviderManyResponse>;
|
|
279
|
-
getEventProviderById(httpClient: AdobeCommerceHttpClient, params: EventProviderGetByIdParams, fetchOptions?: ky0.Options): Promise<
|
|
280
|
-
|
|
281
|
-
providerId: string;
|
|
282
|
-
instanceId?: string | undefined;
|
|
283
|
-
label?: string | undefined;
|
|
284
|
-
description?: string | undefined;
|
|
285
|
-
workspaceConfiguration?: string | undefined;
|
|
286
|
-
}>;
|
|
287
|
-
createEventProvider(httpClient: AdobeCommerceHttpClient, params: EventProviderCreateParams, fetchOptions?: ky0.Options): Promise<{
|
|
288
|
-
id: string;
|
|
289
|
-
providerId: string;
|
|
290
|
-
instanceId?: string | undefined;
|
|
291
|
-
label?: string | undefined;
|
|
292
|
-
description?: string | undefined;
|
|
293
|
-
workspaceConfiguration?: string | undefined;
|
|
294
|
-
}>;
|
|
264
|
+
getEventProviderById(httpClient: AdobeCommerceHttpClient, params: EventProviderGetByIdParams, fetchOptions?: ky0.Options): Promise<CommerceEventProvider>;
|
|
265
|
+
createEventProvider(httpClient: AdobeCommerceHttpClient, params: EventProviderCreateParams, fetchOptions?: ky0.Options): Promise<CommerceEventProvider>;
|
|
295
266
|
}>;
|
|
296
267
|
/**
|
|
297
268
|
* An API Client for the Commerce Events API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as __exportAll}from"../chunk-BKfb2J6I.mjs";import
|
|
1
|
+
import{t as __exportAll}from"../chunk-BKfb2J6I.mjs";import"@adobe/aio-commerce-lib-core/error";import{alphaNumericOrUnderscoreOrHyphenSchema,alphaNumericOrUnderscoreSchema,booleanValueSchema,parseOrThrow,stringValueSchema}from"@aio-commerce-sdk/common-utils/valibot";import*as v from"valibot";import{AdobeCommerceHttpClient,ApiClient}from"@adobe/aio-commerce-lib-api";function workspaceConfigurationSchema(propertyName){return v.union([v.pipe(stringValueSchema(propertyName),v.empty()),v.pipe(stringValueSchema(propertyName),v.parseJson(void 0,`Expected valid JSON string for property '${propertyName}'`),v.record(v.string(),v.unknown()),v.stringifyJson()),v.pipe(v.record(v.string(),v.unknown()),v.stringifyJson(void 0,`Expected valid JSON data for property '${propertyName}'`))])}const EventProviderGetByIdParamsSchema=v.object({providerId:stringValueSchema(`providerId`)}),EventProviderCreateParamsSchema=v.object({providerId:stringValueSchema(`providerId`),instanceId:stringValueSchema(`instanceId`),label:v.optional(stringValueSchema(`label`)),description:v.optional(stringValueSchema(`description`)),associatedWorkspaceConfiguration:v.optional(workspaceConfigurationSchema(`associatedWorkspaceConfiguration`))});var endpoints_exports$1=__exportAll({createEventProvider:()=>createEventProvider,getAllEventProviders:()=>getAllEventProviders,getEventProviderById:()=>getEventProviderById});async function getAllEventProviders(httpClient,fetchOptions){return httpClient.get(`eventing/eventProvider`,fetchOptions).json()}async function getEventProviderById(httpClient,params,fetchOptions){let validatedParams=parseOrThrow(EventProviderGetByIdParamsSchema,params);return httpClient.get(`eventing/eventProvider/${validatedParams.providerId}`,fetchOptions).json()}async function createEventProvider(httpClient,params,fetchOptions){let validatedParams=parseOrThrow(EventProviderCreateParamsSchema,params);return httpClient.post(`eventing/eventProvider`,{...fetchOptions,json:{eventProvider:{provider_id:validatedParams.providerId,instance_id:validatedParams.instanceId,label:validatedParams.label,description:validatedParams.description,workspace_configuration:validatedParams.associatedWorkspaceConfiguration}}}).json()}function fieldsSchema(propertyName){return v.array(v.object({name:stringValueSchema(`${propertyName}[i].name`)}),`Expected an array of objects with a 'name' property for the property "${propertyName}"`)}const EventSubscriptionCreateParamsSchema=v.object({name:stringValueSchema(`name`),providerId:v.optional(stringValueSchema(`providerId`)),parent:v.optional(stringValueSchema(`parent`)),fields:fieldsSchema(`fields`),destination:v.optional(stringValueSchema(`destination`)),hipaaAuditRequired:v.optional(booleanValueSchema(`hipaaAuditRequired`)),prioritary:v.optional(booleanValueSchema(`prioritary`)),force:v.optional(booleanValueSchema(`force`))});var endpoints_exports=__exportAll({createEventSubscription:()=>createEventSubscription,getAllEventSubscriptions:()=>getAllEventSubscriptions});async function getAllEventSubscriptions(httpClient,fetchOptions){return httpClient.get(`eventing/getEventSubscriptions`,fetchOptions).json()}async function createEventSubscription(httpClient,params,fetchOptions){let{force,...event}=parseOrThrow(EventSubscriptionCreateParamsSchema,params);return httpClient.post(`eventing/eventSubscribe`,{...fetchOptions,json:{force,event:{name:event.name,parent:event.parent,fields:event.fields,destination:event.destination,hipaa_audit_required:event.hipaaAuditRequired,priority:event.prioritary,provider_id:event.providerId}}}).json().then(_res=>{})}const UpdateEventingConfigurationParamsSchema=v.partial(v.object({enabled:booleanValueSchema(`enabled`),providerId:alphaNumericOrUnderscoreOrHyphenSchema(`providerId`),instanceId:alphaNumericOrUnderscoreOrHyphenSchema(`instanceId`),merchantId:alphaNumericOrUnderscoreSchema(`merchantId`),environmentId:alphaNumericOrUnderscoreSchema(`environmentId`),workspaceConfiguration:workspaceConfigurationSchema(`workspaceConfiguration`)}));async function updateEventingConfiguration(httpClient,params,fetchOptions){let validatedParams=parseOrThrow(UpdateEventingConfigurationParamsSchema,params);return httpClient.put(`eventing/updateConfiguration`,{...fetchOptions,json:{config:validatedParams}}).json()}function createCommerceEventsApiClient(params){return ApiClient.create(new AdobeCommerceHttpClient(params),{...endpoints_exports$1,...endpoints_exports,updateEventingConfiguration})}function createCustomCommerceEventsApiClient(params,functions){return ApiClient.create(new AdobeCommerceHttpClient(params),functions)}export{createCommerceEventsApiClient,createCustomCommerceEventsApiClient,createEventProvider,createEventSubscription,getAllEventProviders,getAllEventSubscriptions,getEventProviderById,updateEventingConfiguration};
|