@wix/auto_sdk_bookings_service-options-and-variants 1.0.30 → 1.0.31
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/build/cjs/index.d.ts +8 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal-Ctu6ajbD.d.ts → index.typings.d.ts} +310 -1
- package/build/cjs/index.typings.js +570 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +8 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/{bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal-Ctu6ajbD.d.mts → index.typings.d.mts} +310 -1
- package/build/es/index.typings.mjs +534 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +8 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal-Ctu6ajbD.d.ts → index.typings.d.ts} +310 -1
- package/build/internal/cjs/index.typings.js +570 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +8 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{bookings-catalog-v1-service-options-and-variants-service-options-and-variants.universal-Ctu6ajbD.d.mts → index.typings.d.mts} +310 -1
- package/build/internal/es/index.typings.mjs +534 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* The `serviceOptionsAndVariants` object links a *service*
|
|
3
5
|
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
|
|
@@ -813,6 +815,72 @@ declare enum WebhookIdentityType {
|
|
|
813
815
|
}
|
|
814
816
|
/** @enumType */
|
|
815
817
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
818
|
+
type CreateServiceOptionsAndVariantsApplicationErrors = {
|
|
819
|
+
code?: 'UNKNOWN_OPTION_IDS';
|
|
820
|
+
description?: string;
|
|
821
|
+
data?: Record<string, any>;
|
|
822
|
+
} | {
|
|
823
|
+
code?: 'MULTIPLE_CURRENCIES';
|
|
824
|
+
description?: string;
|
|
825
|
+
data?: Record<string, any>;
|
|
826
|
+
} | {
|
|
827
|
+
code?: 'UNSUPPORTED_OPTION_TYPE';
|
|
828
|
+
description?: string;
|
|
829
|
+
data?: Record<string, any>;
|
|
830
|
+
} | {
|
|
831
|
+
code?: 'UNKNOWN_STAFF_IDS';
|
|
832
|
+
description?: string;
|
|
833
|
+
data?: Record<string, any>;
|
|
834
|
+
} | {
|
|
835
|
+
code?: 'MISSING_STAFF_VARIANTS';
|
|
836
|
+
description?: string;
|
|
837
|
+
data?: Record<string, any>;
|
|
838
|
+
} | {
|
|
839
|
+
code?: 'IDENTICAL_CHOICES';
|
|
840
|
+
description?: string;
|
|
841
|
+
data?: Record<string, any>;
|
|
842
|
+
} | {
|
|
843
|
+
code?: 'MISSING_CUSTOM_CHOICES';
|
|
844
|
+
description?: string;
|
|
845
|
+
data?: Record<string, any>;
|
|
846
|
+
} | {
|
|
847
|
+
code?: 'UNSUPPORTED_OPTION_DATA';
|
|
848
|
+
description?: string;
|
|
849
|
+
data?: Record<string, any>;
|
|
850
|
+
};
|
|
851
|
+
type UpdateServiceOptionsAndVariantsApplicationErrors = {
|
|
852
|
+
code?: 'UNKNOWN_OPTION_IDS';
|
|
853
|
+
description?: string;
|
|
854
|
+
data?: Record<string, any>;
|
|
855
|
+
} | {
|
|
856
|
+
code?: 'MULTIPLE_CURRENCIES';
|
|
857
|
+
description?: string;
|
|
858
|
+
data?: Record<string, any>;
|
|
859
|
+
} | {
|
|
860
|
+
code?: 'UNSUPPORTED_OPTION_TYPE';
|
|
861
|
+
description?: string;
|
|
862
|
+
data?: Record<string, any>;
|
|
863
|
+
} | {
|
|
864
|
+
code?: 'UNKNOWN_STAFF_IDS';
|
|
865
|
+
description?: string;
|
|
866
|
+
data?: Record<string, any>;
|
|
867
|
+
} | {
|
|
868
|
+
code?: 'MISSING_STAFF_VARIANTS';
|
|
869
|
+
description?: string;
|
|
870
|
+
data?: Record<string, any>;
|
|
871
|
+
} | {
|
|
872
|
+
code?: 'IDENTICAL_CHOICES';
|
|
873
|
+
description?: string;
|
|
874
|
+
data?: Record<string, any>;
|
|
875
|
+
} | {
|
|
876
|
+
code?: 'MISSING_CUSTOM_CHOICES';
|
|
877
|
+
description?: string;
|
|
878
|
+
data?: Record<string, any>;
|
|
879
|
+
} | {
|
|
880
|
+
code?: 'UNSUPPORTED_OPTION_DATA';
|
|
881
|
+
description?: string;
|
|
882
|
+
data?: Record<string, any>;
|
|
883
|
+
};
|
|
816
884
|
interface BaseEventMetadata {
|
|
817
885
|
/**
|
|
818
886
|
* App instance ID.
|
|
@@ -861,14 +929,213 @@ interface ServiceOptionsAndVariantsCreatedEnvelope {
|
|
|
861
929
|
entity: ServiceOptionsAndVariants;
|
|
862
930
|
metadata: EventMetadata;
|
|
863
931
|
}
|
|
932
|
+
/** @permissionScope Read Bookings - Public Data
|
|
933
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
934
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
935
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
936
|
+
* @permissionScope Manage Bookings
|
|
937
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
938
|
+
* @permissionScope Read Bookings - Including Participants
|
|
939
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
940
|
+
* @permissionScope Read Bookings - all read permissions
|
|
941
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
942
|
+
* @permissionScope Manage Bookings - all permissions
|
|
943
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
944
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
945
|
+
* @webhook
|
|
946
|
+
* @eventType wix.bookings.catalog.v1.service_options_and_variants_created
|
|
947
|
+
* @slug created
|
|
948
|
+
*/
|
|
949
|
+
declare function onServiceOptionsAndVariantsCreated(handler: (event: ServiceOptionsAndVariantsCreatedEnvelope) => void | Promise<void>): void;
|
|
864
950
|
interface ServiceOptionsAndVariantsDeletedEnvelope {
|
|
865
951
|
entity: ServiceOptionsAndVariants;
|
|
866
952
|
metadata: EventMetadata;
|
|
867
953
|
}
|
|
954
|
+
/** @permissionScope Read Bookings - Public Data
|
|
955
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
956
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
957
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
958
|
+
* @permissionScope Manage Bookings
|
|
959
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
960
|
+
* @permissionScope Read Bookings - Including Participants
|
|
961
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
962
|
+
* @permissionScope Read Bookings - all read permissions
|
|
963
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
964
|
+
* @permissionScope Manage Bookings - all permissions
|
|
965
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
966
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
967
|
+
* @webhook
|
|
968
|
+
* @eventType wix.bookings.catalog.v1.service_options_and_variants_deleted
|
|
969
|
+
* @slug deleted
|
|
970
|
+
*/
|
|
971
|
+
declare function onServiceOptionsAndVariantsDeleted(handler: (event: ServiceOptionsAndVariantsDeletedEnvelope) => void | Promise<void>): void;
|
|
868
972
|
interface ServiceOptionsAndVariantsUpdatedEnvelope {
|
|
869
973
|
entity: ServiceOptionsAndVariants;
|
|
870
974
|
metadata: EventMetadata;
|
|
871
975
|
}
|
|
976
|
+
/** @permissionScope Read Bookings - Public Data
|
|
977
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
978
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
979
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
980
|
+
* @permissionScope Manage Bookings
|
|
981
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
982
|
+
* @permissionScope Read Bookings - Including Participants
|
|
983
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
984
|
+
* @permissionScope Read Bookings - all read permissions
|
|
985
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
986
|
+
* @permissionScope Manage Bookings - all permissions
|
|
987
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
988
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
989
|
+
* @webhook
|
|
990
|
+
* @eventType wix.bookings.catalog.v1.service_options_and_variants_updated
|
|
991
|
+
* @slug updated
|
|
992
|
+
*/
|
|
993
|
+
declare function onServiceOptionsAndVariantsUpdated(handler: (event: ServiceOptionsAndVariantsUpdatedEnvelope) => void | Promise<void>): void;
|
|
994
|
+
type ServiceOptionsAndVariantsNonNullablePaths = `options.values` | `options.values.${number}.customData.name` | `options.values.${number}._id` | `options.values.${number}.type` | `variants.values` | `variants.values.${number}.price.value` | `variants.values.${number}.price.currency` | `minPrice.value` | `minPrice.currency` | `maxPrice.value` | `maxPrice.currency`;
|
|
995
|
+
/**
|
|
996
|
+
* Creates a `serviceOptionsAndVariants` object and for a service.
|
|
997
|
+
*
|
|
998
|
+
*
|
|
999
|
+
* ## Calculate variants
|
|
1000
|
+
*
|
|
1001
|
+
* Before creating a `serviceOptionsAndVariants` object, you need to
|
|
1002
|
+
* anticipate and manually define all its variants, since Wix Bookings doesn't
|
|
1003
|
+
* automatically calculate them. For the actual
|
|
1004
|
+
* Create Service Options And Variants* call, specify both the `options` and
|
|
1005
|
+
* `variants` arrays.
|
|
1006
|
+
*
|
|
1007
|
+
* ## Limitations
|
|
1008
|
+
*
|
|
1009
|
+
* Wix Bookings allows you to connect only a single `serviceOptionsAndVariants`
|
|
1010
|
+
* object to a service. *Create Service Options And Variants* fails, if the
|
|
1011
|
+
* service already has a connected `serviceOptionsAndVariants` object.
|
|
1012
|
+
*
|
|
1013
|
+
* Currently, you can include only a single option per
|
|
1014
|
+
* `serviceOptionsAndVariants` object. Taken together, this means that services
|
|
1015
|
+
* are limited to a single option.
|
|
1016
|
+
*
|
|
1017
|
+
* ## Option ID
|
|
1018
|
+
*
|
|
1019
|
+
* When creating a`serviceOptionsAndVariants` object, you must specify an ID in
|
|
1020
|
+
* [UUID format](https://en.wikipedia.org/wiki/Universally_unique_identifier)
|
|
1021
|
+
* for its only option. You must reference this option ID for each variant as
|
|
1022
|
+
* `variants.values.choices.optionId`.
|
|
1023
|
+
*
|
|
1024
|
+
* ## Staff member option
|
|
1025
|
+
*
|
|
1026
|
+
* To creating an option based on the *staff member*
|
|
1027
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))
|
|
1028
|
+
* providing the service, you need to specify `STAFF_MEMBER` as `options.values.type`.
|
|
1029
|
+
* Also, specify all staff member IDs as `variants.values.choices.staffMemberId`.
|
|
1030
|
+
* You could follow this *sample flow*
|
|
1031
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-staff-member-based-service-variants) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-staff-member-based-service-variants)).
|
|
1032
|
+
*
|
|
1033
|
+
* ## Custom option
|
|
1034
|
+
*
|
|
1035
|
+
* To create an option based on a custom parameter, specify `CUSTOM` as
|
|
1036
|
+
* `options.values.type`. Provide descriptive names for all custom choices as
|
|
1037
|
+
* `variants.values.choices.custom`. These names are displayed to customers
|
|
1038
|
+
* during the book flow. You could follow this *sample flow*
|
|
1039
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/sample-flows#create-service-variants-based-on-the-booked-equipment)).
|
|
1040
|
+
*
|
|
1041
|
+
* ## Duration option
|
|
1042
|
+
*
|
|
1043
|
+
* To create an option based on appointment duration, specify `DURATION` as
|
|
1044
|
+
* `options.values.type` and set a descriptive name in `options.values.durationData.name`.
|
|
1045
|
+
* Also, indicate the appointment length in `minutes` and provide a descriptive
|
|
1046
|
+
* `name` for each duration choice in `variants.values.choices.duration`.
|
|
1047
|
+
* @param serviceOptionsAndVariants - Service options and variants to create.
|
|
1048
|
+
* @public
|
|
1049
|
+
* @requiredField serviceOptionsAndVariants
|
|
1050
|
+
* @requiredField serviceOptionsAndVariants.options
|
|
1051
|
+
* @requiredField serviceOptionsAndVariants.serviceId
|
|
1052
|
+
* @requiredField serviceOptionsAndVariants.variants
|
|
1053
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_CREATE
|
|
1054
|
+
* @applicableIdentity APP
|
|
1055
|
+
* @returns Information about the created service options and variants.
|
|
1056
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.CreateServiceOptionsAndVariants
|
|
1057
|
+
*/
|
|
1058
|
+
declare function createServiceOptionsAndVariants(serviceOptionsAndVariants: NonNullablePaths<ServiceOptionsAndVariants, `options` | `serviceId` | `variants`>): Promise<NonNullablePaths<ServiceOptionsAndVariants, ServiceOptionsAndVariantsNonNullablePaths> & {
|
|
1059
|
+
__applicationErrorsType?: CreateServiceOptionsAndVariantsApplicationErrors;
|
|
1060
|
+
}>;
|
|
1061
|
+
/**
|
|
1062
|
+
* Clones a `serviceOptionsAndVariants` object and connects it to a *service*
|
|
1063
|
+
* ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)).
|
|
1064
|
+
*
|
|
1065
|
+
*
|
|
1066
|
+
* The call fails if the service already has a connected
|
|
1067
|
+
* `serviceOptionsAndVariants` object.
|
|
1068
|
+
*
|
|
1069
|
+
* The cloned `serviceOptionsAndVariants` object gets a new, unique option ID.
|
|
1070
|
+
* The option ID of the existing `serviceOptionsAndVariants` object isn't reused.
|
|
1071
|
+
*
|
|
1072
|
+
* For example, you may call this method after *cloning a service*
|
|
1073
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/clone-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/clone-service)).
|
|
1074
|
+
* @param cloneFromId - ID of the `serviceOptionsAndVariants` object to clone.
|
|
1075
|
+
* @param targetServiceId - ID of the service to which the cloned `serviceOptionsAndVariants` are
|
|
1076
|
+
* connected.
|
|
1077
|
+
* @public
|
|
1078
|
+
* @requiredField cloneFromId
|
|
1079
|
+
* @requiredField targetServiceId
|
|
1080
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_CREATE
|
|
1081
|
+
* @applicableIdentity APP
|
|
1082
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.CloneServiceOptionsAndVariants
|
|
1083
|
+
*/
|
|
1084
|
+
declare function cloneServiceOptionsAndVariants(cloneFromId: string, targetServiceId: string): Promise<NonNullablePaths<CloneServiceOptionsAndVariantsResponse, {
|
|
1085
|
+
[P in ServiceOptionsAndVariantsNonNullablePaths]: `serviceOptionsAndVariants.${P}`;
|
|
1086
|
+
}[ServiceOptionsAndVariantsNonNullablePaths]>>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Retrieves a `serviceOptionsAndVariants` object by its ID.
|
|
1089
|
+
* @param serviceOptionsAndVariantsId - ID of the `serviceOptionsAndVariants` object to retrieve.
|
|
1090
|
+
* @public
|
|
1091
|
+
* @requiredField serviceOptionsAndVariantsId
|
|
1092
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
1093
|
+
* @applicableIdentity APP
|
|
1094
|
+
* @applicableIdentity VISITOR
|
|
1095
|
+
* @returns Retrieved `serviceOptionsAndVariants` object.
|
|
1096
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.GetServiceOptionsAndVariants
|
|
1097
|
+
*/
|
|
1098
|
+
declare function getServiceOptionsAndVariants(serviceOptionsAndVariantsId: string): Promise<NonNullablePaths<ServiceOptionsAndVariants, ServiceOptionsAndVariantsNonNullablePaths>>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Retrieves a `serviceOptionsAndVariants` object by *service ID*
|
|
1101
|
+
* ([SDK](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction) | [REST](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction)).
|
|
1102
|
+
* @param serviceId - ID of the service to retrieve options and variants for.
|
|
1103
|
+
* @public
|
|
1104
|
+
* @requiredField serviceId
|
|
1105
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
1106
|
+
* @applicableIdentity APP
|
|
1107
|
+
* @applicableIdentity VISITOR
|
|
1108
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.GetServiceOptionsAndVariantsByServiceId
|
|
1109
|
+
*/
|
|
1110
|
+
declare function getServiceOptionsAndVariantsByServiceId(serviceId: string): Promise<NonNullablePaths<GetServiceOptionsAndVariantsByServiceIdResponse, {
|
|
1111
|
+
[P in ServiceOptionsAndVariantsNonNullablePaths]: `serviceVariants.${P}`;
|
|
1112
|
+
}[ServiceOptionsAndVariantsNonNullablePaths]>>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Updates a `serviceOptionsAndVariants` object.
|
|
1115
|
+
*
|
|
1116
|
+
*
|
|
1117
|
+
* Currently, only a single option is supported per `serviceOptionsAndVariants` object.
|
|
1118
|
+
*
|
|
1119
|
+
* If you want to update `variants`, you must pass the entire list of supported
|
|
1120
|
+
* variants, not only newly added variants.
|
|
1121
|
+
*
|
|
1122
|
+
* If you want to update `options`, you must pass the entire list of supported
|
|
1123
|
+
* options, not only newly added options.
|
|
1124
|
+
* @param _id - ID of the `serviceOptionsAndVariants` object.
|
|
1125
|
+
* @public
|
|
1126
|
+
* @requiredField _id
|
|
1127
|
+
* @requiredField serviceOptionsAndVariants
|
|
1128
|
+
* @requiredField serviceOptionsAndVariants.revision
|
|
1129
|
+
* @param serviceOptionsAndVariants - Service options and variants to update.
|
|
1130
|
+
* @param options - Options for updating the service options and variants.
|
|
1131
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_UPDATE
|
|
1132
|
+
* @applicableIdentity APP
|
|
1133
|
+
* @returns Updated `serviceOptionsAndVariants` object.
|
|
1134
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.UpdateServiceOptionsAndVariants
|
|
1135
|
+
*/
|
|
1136
|
+
declare function updateServiceOptionsAndVariants(_id: string, serviceOptionsAndVariants: NonNullablePaths<UpdateServiceOptionsAndVariants, `revision`>): Promise<NonNullablePaths<ServiceOptionsAndVariants, ServiceOptionsAndVariantsNonNullablePaths> & {
|
|
1137
|
+
__applicationErrorsType?: UpdateServiceOptionsAndVariantsApplicationErrors;
|
|
1138
|
+
}>;
|
|
872
1139
|
interface UpdateServiceOptionsAndVariants {
|
|
873
1140
|
/**
|
|
874
1141
|
* ID of the `serviceOptionsAndVariants` object.
|
|
@@ -908,10 +1175,52 @@ interface UpdateServiceOptionsAndVariants {
|
|
|
908
1175
|
/** Extensions enabling users to save custom data related to service options and variants. */
|
|
909
1176
|
extendedFields?: ExtendedFields;
|
|
910
1177
|
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Deletes a `serviceOptionsAndVariants` object.
|
|
1180
|
+
*
|
|
1181
|
+
*
|
|
1182
|
+
* Because each service can be connected to only a single `serviceOptionsAndVariants`
|
|
1183
|
+
* object, the service doesn't support *varied pricing*
|
|
1184
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments#service-rates))
|
|
1185
|
+
* after deleting a `serviceOptionsAndVariants` object. Instead, Wix Bookings
|
|
1186
|
+
* uses its standard price calculation.
|
|
1187
|
+
* @param serviceOptionsAndVariantsId - ID of the `serviceOptionsAndVariants` object to delete.
|
|
1188
|
+
* @public
|
|
1189
|
+
* @requiredField serviceOptionsAndVariantsId
|
|
1190
|
+
* @param options - Options for deleting the service options and variants.
|
|
1191
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_DELETE
|
|
1192
|
+
* @applicableIdentity APP
|
|
1193
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.DeleteServiceOptionsAndVariants
|
|
1194
|
+
*/
|
|
1195
|
+
declare function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions): Promise<void>;
|
|
911
1196
|
interface DeleteServiceOptionsAndVariantsOptions {
|
|
912
1197
|
/** Revision of the `serviceOptionsAndVariants` object to delete. */
|
|
913
1198
|
revision?: string;
|
|
914
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Creates a query to retrieve a list of `serviceOptionsAndVariants` objects.
|
|
1202
|
+
*
|
|
1203
|
+
* The `queryServiceOptionsAndVariants()` function builds a query to retrieve a list of `serviceOptionsAndVariants` objects and returns a `ServiceOptionsAndVariantsQueryBuilder` object.
|
|
1204
|
+
*
|
|
1205
|
+
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/service-options-and-variants-list-query-builder/find) function.
|
|
1206
|
+
*
|
|
1207
|
+
* You can refine the query by chaining `ServiceOptionsAndVariantsQueryBuilder` functions onto the query. `ServiceOptionsAndVariantsQueryBuilder` functions enable you to sort, filter, and control the results that `queryServiceOptionsAndVariants()` returns.
|
|
1208
|
+
*
|
|
1209
|
+
* `queryServiceOptionsAndVariants()` runs with the following `ServiceOptionsAndVariantsQueryBuilder` default that you can override:
|
|
1210
|
+
*
|
|
1211
|
+
* + `limit` is `50`.
|
|
1212
|
+
* + Sorted by `id` in ascending order.
|
|
1213
|
+
*
|
|
1214
|
+
* The functions that are chained to `queryServiceOptionsAndVariants()` are applied in the order they are called. For example, if you apply `ascending("options.values.type")` and then `ascending("variants.values.price")`, the results are sorted first by the `"type"`, and then, if there are multiple results with the same `"type"`, the items are sorted by `"price"`.
|
|
1215
|
+
*
|
|
1216
|
+
* The following `ServiceOptionsAndVariantsQueryBuilder` functions are supported for the `queryServiceOptionsAndVariants()` function. For a full description of the `serviceOptionsAndVariants` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/service-options-and-variants-list-query-result/items) property in `ServiceOptionsAndVariantsQueryResult`.
|
|
1217
|
+
* @public
|
|
1218
|
+
* @permissionId BOOKINGS.SERVICE_OPTIONS_AND_VARIANTS_READ
|
|
1219
|
+
* @applicableIdentity APP
|
|
1220
|
+
* @applicableIdentity VISITOR
|
|
1221
|
+
* @fqn wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants
|
|
1222
|
+
*/
|
|
1223
|
+
declare function queryServiceOptionsAndVariants(): ServiceOptionsAndVariantsListQueryBuilder;
|
|
915
1224
|
interface QueryCursorResult {
|
|
916
1225
|
cursors: Cursors;
|
|
917
1226
|
hasNext: () => boolean;
|
|
@@ -971,4 +1280,4 @@ interface ServiceOptionsAndVariantsListQueryBuilder {
|
|
|
971
1280
|
find: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
|
|
972
1281
|
}
|
|
973
1282
|
|
|
974
|
-
export { type
|
|
1283
|
+
export { type ActionEvent, type Address, type AddressHint, type BaseEventMetadata, type BusinessSchedule, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, type CloneServiceOptionsAndVariantsRequest, type CloneServiceOptionsAndVariantsResponse, type ConsentPolicy, type CreateServiceOptionsAndVariantsApplicationErrors, type CreateServiceOptionsAndVariantsRequest, type CreateServiceOptionsAndVariantsResponse, type CursorPaging, type Cursors, type CustomServiceOption, DayOfWeek, type DayOfWeekWithLiterals, type DeleteServiceOptionsAndVariantsOptions, type DeleteServiceOptionsAndVariantsRequest, type DeleteServiceOptionsAndVariantsResponse, type DomainEvent, type DomainEventBodyOneOf, type Duration, type DurationServiceOption, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GeoCoordinates, type GetServiceOptionsAndVariantsByServiceIdRequest, type GetServiceOptionsAndVariantsByServiceIdResponse, type GetServiceOptionsAndVariantsRequest, type GetServiceOptionsAndVariantsResponse, type IdentificationData, type IdentificationDataIdOneOf, type Locale, type MessageEnvelope, type Money, type Multilingual, type Paging, type PagingMetadataV2, PlacementType, type PlacementTypeWithLiterals, type Properties, type PropertiesChange, type QueryServiceOptionsAndVariantsRequest, type QueryServiceOptionsAndVariantsResponse, type QueryV2, type QueryV2PagingMethodOneOf, ResolutionMethod, type ResolutionMethodWithLiterals, type RestoreInfo, type ServiceChoice, type ServiceChoiceChoiceOneOf, type ServiceOption, type ServiceOptionOptionSpecificDataOneOf, ServiceOptionType, type ServiceOptionTypeWithLiterals, type ServiceOptions, type ServiceOptionsAndVariants, type ServiceOptionsAndVariantsCreatedEnvelope, type ServiceOptionsAndVariantsDeletedEnvelope, type ServiceOptionsAndVariantsListQueryBuilder, type ServiceOptionsAndVariantsListQueryResult, type ServiceOptionsAndVariantsUpdatedEnvelope, type ServiceVariant, type ServiceVariants, type SiteCloned, type SiteCreated, type SitePropertiesEvent, type SitePropertiesNotification, SortOrder, type SortOrderWithLiterals, type Sorting, type SpecialHourPeriod, type SupportedLanguage, type TimePeriod, type Translation, type UpdateServiceOptionsAndVariants, type UpdateServiceOptionsAndVariantsApplicationErrors, type UpdateServiceOptionsAndVariantsRequest, type UpdateServiceOptionsAndVariantsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, cloneServiceOptionsAndVariants, createServiceOptionsAndVariants, deleteServiceOptionsAndVariants, getServiceOptionsAndVariants, getServiceOptionsAndVariantsByServiceId, onServiceOptionsAndVariantsCreated, onServiceOptionsAndVariantsDeleted, onServiceOptionsAndVariantsUpdated, queryServiceOptionsAndVariants, updateServiceOptionsAndVariants };
|