@wix/vibe-bookings-plugin 0.23.0 → 0.26.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/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -11995,7 +11995,7 @@ createEventModule(
|
|
|
11995
11995
|
onStaffMemberSettingsUpdated
|
|
11996
11996
|
);
|
|
11997
11997
|
|
|
11998
|
-
// node_modules/@wix/auto_sdk_bookings_booking-policies/build/es/index.mjs
|
|
11998
|
+
// ../../../node_modules/@wix/auto_sdk_bookings_booking-policies/build/es/index.mjs
|
|
11999
11999
|
var onBookingPolicyCreated = EventDefinition(
|
|
12000
12000
|
"wix.bookings.v1.booking_policy_created",
|
|
12001
12001
|
true,
|
|
@@ -12362,7 +12362,7 @@ function mapBookingServiceDetailsToServerService(details) {
|
|
|
12362
12362
|
custom: {
|
|
12363
12363
|
address: {
|
|
12364
12364
|
addressLine: "Business location",
|
|
12365
|
-
|
|
12365
|
+
formatted: "Business location"
|
|
12366
12366
|
}
|
|
12367
12367
|
}
|
|
12368
12368
|
}
|
|
@@ -12402,7 +12402,7 @@ function mapBookingServiceDetailsToServerService(details) {
|
|
|
12402
12402
|
service.defaultCapacity = defaultCapacity;
|
|
12403
12403
|
return service;
|
|
12404
12404
|
}
|
|
12405
|
-
function mapServiceType() {
|
|
12405
|
+
function mapServiceType(serviceType) {
|
|
12406
12406
|
return es_exports2.ServiceType.APPOINTMENT;
|
|
12407
12407
|
}
|
|
12408
12408
|
|
|
@@ -13402,8 +13402,8 @@ var CategoriesAPIClient = class {
|
|
|
13402
13402
|
if (!client) {
|
|
13403
13403
|
return null;
|
|
13404
13404
|
}
|
|
13405
|
-
const response = await client.categoriesV2.queryCategories();
|
|
13406
|
-
return response;
|
|
13405
|
+
const response = await client.categoriesV2.queryCategories().find();
|
|
13406
|
+
return response?.items ?? [];
|
|
13407
13407
|
} catch (error) {
|
|
13408
13408
|
this.logger.error("Failed to query categories", { error });
|
|
13409
13409
|
return null;
|
|
@@ -13444,7 +13444,7 @@ var prompts = {
|
|
|
13444
13444
|
var bookingServicesDetailsExample = {
|
|
13445
13445
|
items: [
|
|
13446
13446
|
{
|
|
13447
|
-
type: "
|
|
13447
|
+
type: "APPOINTMENT",
|
|
13448
13448
|
name: "Service name",
|
|
13449
13449
|
description: "Service description",
|
|
13450
13450
|
location: "business address",
|
|
@@ -13478,6 +13478,11 @@ var ContentInjectionService = class {
|
|
|
13478
13478
|
null,
|
|
13479
13479
|
2
|
|
13480
13480
|
);
|
|
13481
|
+
this.logger.info("generating services", {
|
|
13482
|
+
businessDescription,
|
|
13483
|
+
lng,
|
|
13484
|
+
responseExample
|
|
13485
|
+
});
|
|
13481
13486
|
const response = await this.llmService.generateObjectByProject(
|
|
13482
13487
|
prompts.serviceGenerationProjectId,
|
|
13483
13488
|
{
|
|
@@ -13538,8 +13543,9 @@ var ContentInjectionService = class {
|
|
|
13538
13543
|
fn: async () => {
|
|
13539
13544
|
this.logger.info("getting categories");
|
|
13540
13545
|
const categories = await this.categoriesAPIClient.queryCategories();
|
|
13541
|
-
const defaultCategory = categories?.
|
|
13546
|
+
const defaultCategory = categories?.[0];
|
|
13542
13547
|
if (!defaultCategory) {
|
|
13548
|
+
this.logger.warn("Failed to get default category");
|
|
13543
13549
|
throw new Error("Failed to get default category");
|
|
13544
13550
|
}
|
|
13545
13551
|
this.logger.info("default category", { defaultCategory });
|