@wix/auto_sdk_bookings_bookings 1.0.124 → 1.0.126
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 +72 -72
- package/build/cjs/index.js +211 -211
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +379 -370
- package/build/cjs/index.typings.js +193 -193
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +331 -331
- package/build/cjs/meta.js +171 -171
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +72 -72
- package/build/es/index.mjs +211 -211
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +379 -370
- package/build/es/index.typings.mjs +193 -193
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +331 -331
- package/build/es/meta.mjs +171 -171
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +72 -72
- package/build/internal/cjs/index.js +211 -211
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +379 -370
- package/build/internal/cjs/index.typings.js +193 -193
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +331 -331
- package/build/internal/cjs/meta.js +171 -171
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +72 -72
- package/build/internal/es/index.mjs +211 -211
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +379 -370
- package/build/internal/es/index.typings.mjs +193 -193
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +331 -331
- package/build/internal/es/meta.mjs +171 -171
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -884,6 +884,246 @@ interface BookingFormFilled {
|
|
|
884
884
|
*/
|
|
885
885
|
formId?: string | null;
|
|
886
886
|
}
|
|
887
|
+
interface ConfirmOrDeclineBookingRequest {
|
|
888
|
+
/**
|
|
889
|
+
* ID of the booking to confirm or decline.
|
|
890
|
+
* @format GUID
|
|
891
|
+
*/
|
|
892
|
+
bookingId: string;
|
|
893
|
+
/**
|
|
894
|
+
* Current payment status of the booking when using a custom checkout page and
|
|
895
|
+
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
896
|
+
*
|
|
897
|
+
* The booking is declined if there is a double booking conflict and you provide
|
|
898
|
+
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
899
|
+
*/
|
|
900
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
901
|
+
}
|
|
902
|
+
interface ConfirmOrDeclineBookingResponse {
|
|
903
|
+
/** Updated booking. */
|
|
904
|
+
booking?: Booking;
|
|
905
|
+
}
|
|
906
|
+
interface BulkConfirmOrDeclineBookingRequest {
|
|
907
|
+
/**
|
|
908
|
+
* Bookings to confirm or decline.
|
|
909
|
+
* @minSize 1
|
|
910
|
+
* @maxSize 300
|
|
911
|
+
*/
|
|
912
|
+
details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
|
|
913
|
+
/** Whether to return the confirmed or declined booking objects. */
|
|
914
|
+
returnEntity?: boolean;
|
|
915
|
+
}
|
|
916
|
+
interface BulkConfirmOrDeclineBookingRequestBookingDetails {
|
|
917
|
+
/**
|
|
918
|
+
* ID of the booking to confirm or decline.
|
|
919
|
+
* @format GUID
|
|
920
|
+
*/
|
|
921
|
+
bookingId?: string;
|
|
922
|
+
/**
|
|
923
|
+
* Current payment status of the booking when using a custom checkout page and
|
|
924
|
+
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
925
|
+
*
|
|
926
|
+
* The booking is declined if there is a double booking conflict and you provide
|
|
927
|
+
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
928
|
+
*/
|
|
929
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
930
|
+
}
|
|
931
|
+
interface BulkConfirmOrDeclineBookingResponse {
|
|
932
|
+
/** List of confirmed or declined bookings, including metadata. */
|
|
933
|
+
results?: BulkBookingResult[];
|
|
934
|
+
/** Total successes and failures of the Bulk Confirm Or Decline call. */
|
|
935
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
936
|
+
}
|
|
937
|
+
interface BulkBookingResult {
|
|
938
|
+
/**
|
|
939
|
+
* Information about the booking that was created or updated.
|
|
940
|
+
* Including its ID, index in the bulk request and whether it was
|
|
941
|
+
* successfully created or updated.
|
|
942
|
+
*/
|
|
943
|
+
itemMetadata?: ItemMetadata;
|
|
944
|
+
/**
|
|
945
|
+
* Created or updated booking. Available only if you requested
|
|
946
|
+
* to return the booking entity.
|
|
947
|
+
*/
|
|
948
|
+
item?: Booking;
|
|
949
|
+
}
|
|
950
|
+
interface ItemMetadata {
|
|
951
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
952
|
+
_id?: string | null;
|
|
953
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
954
|
+
originalIndex?: number;
|
|
955
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
956
|
+
success?: boolean;
|
|
957
|
+
/** Details about the error in case of failure. */
|
|
958
|
+
error?: ApplicationError;
|
|
959
|
+
}
|
|
960
|
+
interface ApplicationError {
|
|
961
|
+
/** Error code. */
|
|
962
|
+
code?: string;
|
|
963
|
+
/** Description of the error. */
|
|
964
|
+
description?: string;
|
|
965
|
+
/** Data related to the error. */
|
|
966
|
+
data?: Record<string, any> | null;
|
|
967
|
+
}
|
|
968
|
+
interface BulkActionMetadata {
|
|
969
|
+
/** Number of items that were successfully processed. */
|
|
970
|
+
totalSuccesses?: number;
|
|
971
|
+
/** Number of items that couldn't be processed. */
|
|
972
|
+
totalFailures?: number;
|
|
973
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
974
|
+
undetailedFailures?: number;
|
|
975
|
+
}
|
|
976
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
977
|
+
createdEvent?: EntityCreatedEvent;
|
|
978
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
979
|
+
deletedEvent?: EntityDeletedEvent;
|
|
980
|
+
actionEvent?: ActionEvent;
|
|
981
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
982
|
+
_id?: string;
|
|
983
|
+
/**
|
|
984
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
985
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
986
|
+
*/
|
|
987
|
+
entityFqdn?: string;
|
|
988
|
+
/**
|
|
989
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
990
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
991
|
+
*/
|
|
992
|
+
slug?: string;
|
|
993
|
+
/** ID of the entity associated with the event. */
|
|
994
|
+
entityId?: string;
|
|
995
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
996
|
+
eventTime?: Date | null;
|
|
997
|
+
/**
|
|
998
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
999
|
+
* (for example, GDPR).
|
|
1000
|
+
*/
|
|
1001
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1002
|
+
/** If present, indicates the action that triggered the event. */
|
|
1003
|
+
originatedFrom?: string | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1006
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1007
|
+
*/
|
|
1008
|
+
entityEventSequence?: string | null;
|
|
1009
|
+
}
|
|
1010
|
+
/** @oneof */
|
|
1011
|
+
interface DomainEventBodyOneOf {
|
|
1012
|
+
createdEvent?: EntityCreatedEvent;
|
|
1013
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1014
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1015
|
+
actionEvent?: ActionEvent;
|
|
1016
|
+
}
|
|
1017
|
+
interface EntityCreatedEvent {
|
|
1018
|
+
entity?: string;
|
|
1019
|
+
}
|
|
1020
|
+
interface RestoreInfo {
|
|
1021
|
+
deletedDate?: Date | null;
|
|
1022
|
+
}
|
|
1023
|
+
interface EntityUpdatedEvent {
|
|
1024
|
+
/**
|
|
1025
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1026
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1027
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1028
|
+
*/
|
|
1029
|
+
currentEntity?: string;
|
|
1030
|
+
}
|
|
1031
|
+
interface EntityDeletedEvent {
|
|
1032
|
+
/** Entity that was deleted. */
|
|
1033
|
+
deletedEntity?: string | null;
|
|
1034
|
+
}
|
|
1035
|
+
interface ActionEvent {
|
|
1036
|
+
body?: string;
|
|
1037
|
+
}
|
|
1038
|
+
interface MessageEnvelope {
|
|
1039
|
+
/**
|
|
1040
|
+
* App instance ID.
|
|
1041
|
+
* @format GUID
|
|
1042
|
+
*/
|
|
1043
|
+
instanceId?: string | null;
|
|
1044
|
+
/**
|
|
1045
|
+
* Event type.
|
|
1046
|
+
* @maxLength 150
|
|
1047
|
+
*/
|
|
1048
|
+
eventType?: string;
|
|
1049
|
+
/** The identification type and identity data. */
|
|
1050
|
+
identity?: WebhooksIdentificationData;
|
|
1051
|
+
/** Stringify payload. */
|
|
1052
|
+
data?: string;
|
|
1053
|
+
}
|
|
1054
|
+
interface WebhooksIdentificationData extends WebhooksIdentificationDataIdOneOf {
|
|
1055
|
+
/**
|
|
1056
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1057
|
+
* @format GUID
|
|
1058
|
+
*/
|
|
1059
|
+
anonymousVisitorId?: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* ID of a site visitor that has logged in to the site.
|
|
1062
|
+
* @format GUID
|
|
1063
|
+
*/
|
|
1064
|
+
memberId?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1067
|
+
* @format GUID
|
|
1068
|
+
*/
|
|
1069
|
+
wixUserId?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* ID of an app.
|
|
1072
|
+
* @format GUID
|
|
1073
|
+
*/
|
|
1074
|
+
appId?: string;
|
|
1075
|
+
/** @readonly */
|
|
1076
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1077
|
+
}
|
|
1078
|
+
/** @oneof */
|
|
1079
|
+
interface WebhooksIdentificationDataIdOneOf {
|
|
1080
|
+
/**
|
|
1081
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1082
|
+
* @format GUID
|
|
1083
|
+
*/
|
|
1084
|
+
anonymousVisitorId?: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* ID of a site visitor that has logged in to the site.
|
|
1087
|
+
* @format GUID
|
|
1088
|
+
*/
|
|
1089
|
+
memberId?: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1092
|
+
* @format GUID
|
|
1093
|
+
*/
|
|
1094
|
+
wixUserId?: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* ID of an app.
|
|
1097
|
+
* @format GUID
|
|
1098
|
+
*/
|
|
1099
|
+
appId?: string;
|
|
1100
|
+
}
|
|
1101
|
+
declare enum WebhookIdentityType {
|
|
1102
|
+
UNKNOWN = "UNKNOWN",
|
|
1103
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1104
|
+
MEMBER = "MEMBER",
|
|
1105
|
+
WIX_USER = "WIX_USER",
|
|
1106
|
+
APP = "APP"
|
|
1107
|
+
}
|
|
1108
|
+
/** @enumType */
|
|
1109
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1110
|
+
interface AccountInfo {
|
|
1111
|
+
/**
|
|
1112
|
+
* ID of the Wix account associated with the event.
|
|
1113
|
+
* @format GUID
|
|
1114
|
+
*/
|
|
1115
|
+
accountId?: string | null;
|
|
1116
|
+
/**
|
|
1117
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
1118
|
+
* @format GUID
|
|
1119
|
+
*/
|
|
1120
|
+
parentAccountId?: string | null;
|
|
1121
|
+
/**
|
|
1122
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
1123
|
+
* @format GUID
|
|
1124
|
+
*/
|
|
1125
|
+
siteId?: string | null;
|
|
1126
|
+
}
|
|
887
1127
|
interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
|
|
888
1128
|
/**
|
|
889
1129
|
* Information about the slot to create a booking for.
|
|
@@ -1267,157 +1507,6 @@ interface V2UpdateNumberOfParticipantsResponse {
|
|
|
1267
1507
|
/** Booking with updated number of participants. */
|
|
1268
1508
|
booking?: Booking;
|
|
1269
1509
|
}
|
|
1270
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1271
|
-
createdEvent?: EntityCreatedEvent;
|
|
1272
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1273
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1274
|
-
actionEvent?: ActionEvent;
|
|
1275
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1276
|
-
_id?: string;
|
|
1277
|
-
/**
|
|
1278
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1279
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1280
|
-
*/
|
|
1281
|
-
entityFqdn?: string;
|
|
1282
|
-
/**
|
|
1283
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1284
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1285
|
-
*/
|
|
1286
|
-
slug?: string;
|
|
1287
|
-
/** ID of the entity associated with the event. */
|
|
1288
|
-
entityId?: string;
|
|
1289
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1290
|
-
eventTime?: Date | null;
|
|
1291
|
-
/**
|
|
1292
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1293
|
-
* (for example, GDPR).
|
|
1294
|
-
*/
|
|
1295
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1296
|
-
/** If present, indicates the action that triggered the event. */
|
|
1297
|
-
originatedFrom?: string | null;
|
|
1298
|
-
/**
|
|
1299
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1300
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1301
|
-
*/
|
|
1302
|
-
entityEventSequence?: string | null;
|
|
1303
|
-
}
|
|
1304
|
-
/** @oneof */
|
|
1305
|
-
interface DomainEventBodyOneOf {
|
|
1306
|
-
createdEvent?: EntityCreatedEvent;
|
|
1307
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1308
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1309
|
-
actionEvent?: ActionEvent;
|
|
1310
|
-
}
|
|
1311
|
-
interface EntityCreatedEvent {
|
|
1312
|
-
entity?: string;
|
|
1313
|
-
}
|
|
1314
|
-
interface RestoreInfo {
|
|
1315
|
-
deletedDate?: Date | null;
|
|
1316
|
-
}
|
|
1317
|
-
interface EntityUpdatedEvent {
|
|
1318
|
-
/**
|
|
1319
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1320
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1321
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1322
|
-
*/
|
|
1323
|
-
currentEntity?: string;
|
|
1324
|
-
}
|
|
1325
|
-
interface EntityDeletedEvent {
|
|
1326
|
-
/** Entity that was deleted. */
|
|
1327
|
-
deletedEntity?: string | null;
|
|
1328
|
-
}
|
|
1329
|
-
interface ActionEvent {
|
|
1330
|
-
body?: string;
|
|
1331
|
-
}
|
|
1332
|
-
interface MessageEnvelope {
|
|
1333
|
-
/**
|
|
1334
|
-
* App instance ID.
|
|
1335
|
-
* @format GUID
|
|
1336
|
-
*/
|
|
1337
|
-
instanceId?: string | null;
|
|
1338
|
-
/**
|
|
1339
|
-
* Event type.
|
|
1340
|
-
* @maxLength 150
|
|
1341
|
-
*/
|
|
1342
|
-
eventType?: string;
|
|
1343
|
-
/** The identification type and identity data. */
|
|
1344
|
-
identity?: WebhooksIdentificationData;
|
|
1345
|
-
/** Stringify payload. */
|
|
1346
|
-
data?: string;
|
|
1347
|
-
}
|
|
1348
|
-
interface WebhooksIdentificationData extends WebhooksIdentificationDataIdOneOf {
|
|
1349
|
-
/**
|
|
1350
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1351
|
-
* @format GUID
|
|
1352
|
-
*/
|
|
1353
|
-
anonymousVisitorId?: string;
|
|
1354
|
-
/**
|
|
1355
|
-
* ID of a site visitor that has logged in to the site.
|
|
1356
|
-
* @format GUID
|
|
1357
|
-
*/
|
|
1358
|
-
memberId?: string;
|
|
1359
|
-
/**
|
|
1360
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1361
|
-
* @format GUID
|
|
1362
|
-
*/
|
|
1363
|
-
wixUserId?: string;
|
|
1364
|
-
/**
|
|
1365
|
-
* ID of an app.
|
|
1366
|
-
* @format GUID
|
|
1367
|
-
*/
|
|
1368
|
-
appId?: string;
|
|
1369
|
-
/** @readonly */
|
|
1370
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1371
|
-
}
|
|
1372
|
-
/** @oneof */
|
|
1373
|
-
interface WebhooksIdentificationDataIdOneOf {
|
|
1374
|
-
/**
|
|
1375
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1376
|
-
* @format GUID
|
|
1377
|
-
*/
|
|
1378
|
-
anonymousVisitorId?: string;
|
|
1379
|
-
/**
|
|
1380
|
-
* ID of a site visitor that has logged in to the site.
|
|
1381
|
-
* @format GUID
|
|
1382
|
-
*/
|
|
1383
|
-
memberId?: string;
|
|
1384
|
-
/**
|
|
1385
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1386
|
-
* @format GUID
|
|
1387
|
-
*/
|
|
1388
|
-
wixUserId?: string;
|
|
1389
|
-
/**
|
|
1390
|
-
* ID of an app.
|
|
1391
|
-
* @format GUID
|
|
1392
|
-
*/
|
|
1393
|
-
appId?: string;
|
|
1394
|
-
}
|
|
1395
|
-
declare enum WebhookIdentityType {
|
|
1396
|
-
UNKNOWN = "UNKNOWN",
|
|
1397
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1398
|
-
MEMBER = "MEMBER",
|
|
1399
|
-
WIX_USER = "WIX_USER",
|
|
1400
|
-
APP = "APP"
|
|
1401
|
-
}
|
|
1402
|
-
/** @enumType */
|
|
1403
|
-
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1404
|
-
interface AccountInfo {
|
|
1405
|
-
/**
|
|
1406
|
-
* ID of the Wix account associated with the event.
|
|
1407
|
-
* @format GUID
|
|
1408
|
-
*/
|
|
1409
|
-
accountId?: string | null;
|
|
1410
|
-
/**
|
|
1411
|
-
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
1412
|
-
* @format GUID
|
|
1413
|
-
*/
|
|
1414
|
-
parentAccountId?: string | null;
|
|
1415
|
-
/**
|
|
1416
|
-
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
1417
|
-
* @format GUID
|
|
1418
|
-
*/
|
|
1419
|
-
siteId?: string | null;
|
|
1420
|
-
}
|
|
1421
1510
|
interface CreateMultiServiceBookingRequest {
|
|
1422
1511
|
/**
|
|
1423
1512
|
* Between 2 to 8 new single-service booking specifications to create and combine in a multi-service booking.
|
|
@@ -2141,24 +2230,6 @@ interface BulkCalculateAllowedActionsResult {
|
|
|
2141
2230
|
/** Booking entity. */
|
|
2142
2231
|
item?: AllowedActions;
|
|
2143
2232
|
}
|
|
2144
|
-
interface ItemMetadata {
|
|
2145
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
2146
|
-
_id?: string | null;
|
|
2147
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
2148
|
-
originalIndex?: number;
|
|
2149
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
2150
|
-
success?: boolean;
|
|
2151
|
-
/** Details about the error in case of failure. */
|
|
2152
|
-
error?: ApplicationError;
|
|
2153
|
-
}
|
|
2154
|
-
interface ApplicationError {
|
|
2155
|
-
/** Error code. */
|
|
2156
|
-
code?: string;
|
|
2157
|
-
/** Description of the error. */
|
|
2158
|
-
description?: string;
|
|
2159
|
-
/** Data related to the error. */
|
|
2160
|
-
data?: Record<string, any> | null;
|
|
2161
|
-
}
|
|
2162
2233
|
/** Possible actions allowed for the booking. */
|
|
2163
2234
|
interface AllowedActions {
|
|
2164
2235
|
/** Whether canceling the booking is allowed. */
|
|
@@ -2166,14 +2237,6 @@ interface AllowedActions {
|
|
|
2166
2237
|
/** Whether rescheduling the booking is allowed. */
|
|
2167
2238
|
reschedule?: boolean;
|
|
2168
2239
|
}
|
|
2169
|
-
interface BulkActionMetadata {
|
|
2170
|
-
/** Number of items that were successfully processed. */
|
|
2171
|
-
totalSuccesses?: number;
|
|
2172
|
-
/** Number of items that couldn't be processed. */
|
|
2173
|
-
totalFailures?: number;
|
|
2174
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
2175
|
-
undetailedFailures?: number;
|
|
2176
|
-
}
|
|
2177
2240
|
interface GetMultiServiceBookingRequest {
|
|
2178
2241
|
/**
|
|
2179
2242
|
* ID of the multi-service booking.
|
|
@@ -2212,106 +2275,43 @@ interface AddBookingsToMultiServiceBookingRequest {
|
|
|
2212
2275
|
*/
|
|
2213
2276
|
returnFullEntity?: boolean;
|
|
2214
2277
|
}
|
|
2215
|
-
interface BookingIdAndRevision {
|
|
2216
|
-
/**
|
|
2217
|
-
* ID of the single-service booking.
|
|
2218
|
-
* @format GUID
|
|
2219
|
-
*/
|
|
2220
|
-
bookingId?: string | null;
|
|
2221
|
-
/**
|
|
2222
|
-
* Revision number, which increments by 1 each time the booking is updated.
|
|
2223
|
-
* To prevent conflicting changes, the current revision must be specified when managing the booking.
|
|
2224
|
-
*/
|
|
2225
|
-
revision?: string | null;
|
|
2226
|
-
}
|
|
2227
|
-
interface AddBookingsToMultiServiceBookingResponse {
|
|
2228
|
-
/** Single-service bookings that were added to the multi-service booking. */
|
|
2229
|
-
bookings?: BookingResult[];
|
|
2230
|
-
}
|
|
2231
|
-
interface RemoveBookingsFromMultiServiceBookingRequest {
|
|
2232
|
-
/**
|
|
2233
|
-
* ID of the multi-service booking.
|
|
2234
|
-
* @format GUID
|
|
2235
|
-
*/
|
|
2236
|
-
multiServiceBookingId: string | null;
|
|
2237
|
-
/**
|
|
2238
|
-
* List of single-service booking IDs and their revision.
|
|
2239
|
-
* @maxSize 8
|
|
2240
|
-
*/
|
|
2241
|
-
bookings?: BookingIdAndRevision[];
|
|
2242
|
-
/**
|
|
2243
|
-
* Whether to return the single-service bookings.
|
|
2244
|
-
*
|
|
2245
|
-
* Default: `false`
|
|
2246
|
-
*/
|
|
2247
|
-
returnFullEntity?: boolean;
|
|
2248
|
-
}
|
|
2249
|
-
interface RemoveBookingsFromMultiServiceBookingResponse {
|
|
2250
|
-
/** Single-service bookings that were removed from the multi-service booking. */
|
|
2251
|
-
bookings?: BookingResult[];
|
|
2252
|
-
}
|
|
2253
|
-
interface ConfirmOrDeclineBookingRequest {
|
|
2254
|
-
/**
|
|
2255
|
-
* ID of the booking to confirm or decline.
|
|
2256
|
-
* @format GUID
|
|
2257
|
-
*/
|
|
2258
|
-
bookingId: string;
|
|
2259
|
-
/**
|
|
2260
|
-
* Current payment status of the booking when using a custom checkout page and
|
|
2261
|
-
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
2262
|
-
*
|
|
2263
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
2264
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
2265
|
-
*/
|
|
2266
|
-
paymentStatus?: PaymentStatusWithLiterals;
|
|
2267
|
-
}
|
|
2268
|
-
interface ConfirmOrDeclineBookingResponse {
|
|
2269
|
-
/** Updated booking. */
|
|
2270
|
-
booking?: Booking;
|
|
2271
|
-
}
|
|
2272
|
-
interface BulkConfirmOrDeclineBookingRequest {
|
|
2273
|
-
/**
|
|
2274
|
-
* Bookings to confirm or decline.
|
|
2275
|
-
* @minSize 1
|
|
2276
|
-
* @maxSize 300
|
|
2277
|
-
*/
|
|
2278
|
-
details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
|
|
2279
|
-
/** Whether to return the confirmed or declined booking objects. */
|
|
2280
|
-
returnEntity?: boolean;
|
|
2281
|
-
}
|
|
2282
|
-
interface BulkConfirmOrDeclineBookingRequestBookingDetails {
|
|
2278
|
+
interface BookingIdAndRevision {
|
|
2283
2279
|
/**
|
|
2284
|
-
* ID of the booking
|
|
2280
|
+
* ID of the single-service booking.
|
|
2285
2281
|
* @format GUID
|
|
2286
2282
|
*/
|
|
2287
|
-
bookingId?: string;
|
|
2283
|
+
bookingId?: string | null;
|
|
2288
2284
|
/**
|
|
2289
|
-
*
|
|
2290
|
-
*
|
|
2291
|
-
*
|
|
2292
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
2293
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
2285
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
2286
|
+
* To prevent conflicting changes, the current revision must be specified when managing the booking.
|
|
2294
2287
|
*/
|
|
2295
|
-
|
|
2288
|
+
revision?: string | null;
|
|
2296
2289
|
}
|
|
2297
|
-
interface
|
|
2298
|
-
/**
|
|
2299
|
-
|
|
2300
|
-
/** Total successes and failures of the Bulk Confirm Or Decline call. */
|
|
2301
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
2290
|
+
interface AddBookingsToMultiServiceBookingResponse {
|
|
2291
|
+
/** Single-service bookings that were added to the multi-service booking. */
|
|
2292
|
+
bookings?: BookingResult[];
|
|
2302
2293
|
}
|
|
2303
|
-
interface
|
|
2294
|
+
interface RemoveBookingsFromMultiServiceBookingRequest {
|
|
2304
2295
|
/**
|
|
2305
|
-
*
|
|
2306
|
-
*
|
|
2307
|
-
* successfully created or updated.
|
|
2296
|
+
* ID of the multi-service booking.
|
|
2297
|
+
* @format GUID
|
|
2308
2298
|
*/
|
|
2309
|
-
|
|
2299
|
+
multiServiceBookingId: string | null;
|
|
2310
2300
|
/**
|
|
2311
|
-
*
|
|
2312
|
-
*
|
|
2301
|
+
* List of single-service booking IDs and their revision.
|
|
2302
|
+
* @maxSize 8
|
|
2313
2303
|
*/
|
|
2314
|
-
|
|
2304
|
+
bookings?: BookingIdAndRevision[];
|
|
2305
|
+
/**
|
|
2306
|
+
* Whether to return the single-service bookings.
|
|
2307
|
+
*
|
|
2308
|
+
* Default: `false`
|
|
2309
|
+
*/
|
|
2310
|
+
returnFullEntity?: boolean;
|
|
2311
|
+
}
|
|
2312
|
+
interface RemoveBookingsFromMultiServiceBookingResponse {
|
|
2313
|
+
/** Single-service bookings that were removed from the multi-service booking. */
|
|
2314
|
+
bookings?: BookingResult[];
|
|
2315
2315
|
}
|
|
2316
2316
|
interface BookingChanged {
|
|
2317
2317
|
/** The booking before the changes. */
|
|
@@ -3228,6 +3228,22 @@ interface GetSchedulingUrlResponse {
|
|
|
3228
3228
|
schedulingUrl?: string | null;
|
|
3229
3229
|
}
|
|
3230
3230
|
/** @docsIgnore */
|
|
3231
|
+
type ConfirmOrDeclineBookingApplicationErrors = {
|
|
3232
|
+
code?: 'INVALID_BOOKING_STATUS';
|
|
3233
|
+
description?: string;
|
|
3234
|
+
data?: Record<string, any>;
|
|
3235
|
+
} | {
|
|
3236
|
+
code?: 'BOOKING_NOT_FOUND';
|
|
3237
|
+
description?: string;
|
|
3238
|
+
data?: Record<string, any>;
|
|
3239
|
+
};
|
|
3240
|
+
/** @docsIgnore */
|
|
3241
|
+
type BulkConfirmOrDeclineBookingApplicationErrors = {
|
|
3242
|
+
code?: 'DUPLICATED_BOOKINGS';
|
|
3243
|
+
description?: string;
|
|
3244
|
+
data?: Record<string, any>;
|
|
3245
|
+
};
|
|
3246
|
+
/** @docsIgnore */
|
|
3231
3247
|
type CreateMultiServiceBookingApplicationErrors = {
|
|
3232
3248
|
code?: 'VALIDATION_FAILURE';
|
|
3233
3249
|
description?: string;
|
|
@@ -3498,22 +3514,6 @@ type RemoveBookingsFromMultiServiceBookingApplicationErrors = {
|
|
|
3498
3514
|
data?: Record<string, any>;
|
|
3499
3515
|
};
|
|
3500
3516
|
/** @docsIgnore */
|
|
3501
|
-
type ConfirmOrDeclineBookingApplicationErrors = {
|
|
3502
|
-
code?: 'INVALID_BOOKING_STATUS';
|
|
3503
|
-
description?: string;
|
|
3504
|
-
data?: Record<string, any>;
|
|
3505
|
-
} | {
|
|
3506
|
-
code?: 'BOOKING_NOT_FOUND';
|
|
3507
|
-
description?: string;
|
|
3508
|
-
data?: Record<string, any>;
|
|
3509
|
-
};
|
|
3510
|
-
/** @docsIgnore */
|
|
3511
|
-
type BulkConfirmOrDeclineBookingApplicationErrors = {
|
|
3512
|
-
code?: 'DUPLICATED_BOOKINGS';
|
|
3513
|
-
description?: string;
|
|
3514
|
-
data?: Record<string, any>;
|
|
3515
|
-
};
|
|
3516
|
-
/** @docsIgnore */
|
|
3517
3517
|
type CreateBookingApplicationErrors = {
|
|
3518
3518
|
code?: 'SESSION_NOT_FOUND';
|
|
3519
3519
|
description?: string;
|
|
@@ -3848,6 +3848,15 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
3848
3848
|
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
3849
3849
|
*/
|
|
3850
3850
|
entityEventSequence?: string | null;
|
|
3851
|
+
accountInfo?: AccountInfoMetadata;
|
|
3852
|
+
}
|
|
3853
|
+
interface AccountInfoMetadata {
|
|
3854
|
+
/** ID of the Wix account associated with the event */
|
|
3855
|
+
accountId: string;
|
|
3856
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
3857
|
+
siteId?: string;
|
|
3858
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
3859
|
+
parentAccountId?: string;
|
|
3851
3860
|
}
|
|
3852
3861
|
interface BookingCanceledEnvelope {
|
|
3853
3862
|
data: BookingCanceled;
|
|
@@ -4034,6 +4043,94 @@ interface BookingNumberOfParticipantsUpdatedEnvelope {
|
|
|
4034
4043
|
* @slug number_of_participants_updated
|
|
4035
4044
|
*/
|
|
4036
4045
|
declare function onBookingNumberOfParticipantsUpdated(handler: (event: BookingNumberOfParticipantsUpdatedEnvelope) => void | Promise<void>): void;
|
|
4046
|
+
/**
|
|
4047
|
+
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
4048
|
+
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
4049
|
+
* the service requires business approval.
|
|
4050
|
+
*
|
|
4051
|
+
* ### eCommerce checkout restriction
|
|
4052
|
+
*
|
|
4053
|
+
* Call this method only when using a custom checkout page.
|
|
4054
|
+
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4055
|
+
* In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction).
|
|
4056
|
+
*
|
|
4057
|
+
* ### When to call Confirm Booking or Decline Booking instead
|
|
4058
|
+
*
|
|
4059
|
+
* This method has specific limitations based on payment status and double booking conflicts.
|
|
4060
|
+
* Use the alternative methods in these scenarios:
|
|
4061
|
+
* + **To force confirm double-booked free bookings:** Call [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking).
|
|
4062
|
+
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
4063
|
+
* + **To decline bookings without double booking conflicts:** Call [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking).
|
|
4064
|
+
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
4065
|
+
*
|
|
4066
|
+
* ### New booking status
|
|
4067
|
+
*
|
|
4068
|
+
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
4069
|
+
* are met:
|
|
4070
|
+
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
4071
|
+
* + There is a double booking conflict.
|
|
4072
|
+
*
|
|
4073
|
+
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
4074
|
+
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
4075
|
+
*
|
|
4076
|
+
* ### Double bookings
|
|
4077
|
+
*
|
|
4078
|
+
* If there is a double booking conflict, but the booking has already been at least
|
|
4079
|
+
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
4080
|
+
* Then, it also sets `doubleBooked` to `true`.
|
|
4081
|
+
*
|
|
4082
|
+
* ### Admin overwrites
|
|
4083
|
+
*
|
|
4084
|
+
* There are small but important differences in confirmation behavior if the
|
|
4085
|
+
* booking was created with special `flowControlSettings`:
|
|
4086
|
+
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
4087
|
+
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
4088
|
+
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
4089
|
+
* service requires business approval.
|
|
4090
|
+
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
4091
|
+
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
4092
|
+
* immediately.
|
|
4093
|
+
* @param bookingId - ID of the booking to confirm or decline.
|
|
4094
|
+
* @public
|
|
4095
|
+
* @requiredField bookingId
|
|
4096
|
+
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4097
|
+
* @applicableIdentity APP
|
|
4098
|
+
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking
|
|
4099
|
+
*/
|
|
4100
|
+
declare function confirmOrDeclineBooking(bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<ConfirmOrDeclineBookingResponse, `booking.totalParticipants` | `booking.participantsChoices.serviceChoices` | `booking.bookedEntity.slot.serviceId` | `booking.bookedEntity.slot.scheduleId` | `booking.bookedEntity.slot.resource._id` | `booking.bookedEntity.slot.location.locationType` | `booking.bookedEntity.slot.resourceSelections` | `booking.bookedEntity.slot.resourceSelections.${number}.selectionMethod` | `booking.bookedEntity.schedule.scheduleId` | `booking.bookedEntity.tags` | `booking.contactDetails.fullAddress.streetAddress.number` | `booking.contactDetails.fullAddress.streetAddress.name` | `booking.contactDetails.fullAddress.streetAddress.apt` | `booking.contactDetails.fullAddress.subdivisions` | `booking.contactDetails.fullAddress.subdivisions.${number}.code` | `booking.contactDetails.fullAddress.subdivisions.${number}.name` | `booking.additionalFields` | `booking.additionalFields.${number}._id` | `booking.additionalFields.${number}.valueType` | `booking.status` | `booking.paymentStatus` | `booking.selectedPaymentOption` | `booking.createdBy.anonymousVisitorId` | `booking.createdBy.memberId` | `booking.createdBy.wixUserId` | `booking.createdBy.appId` | `booking.bookedAddOns` | `booking.bookedAddOns.${number}._id` | `booking.bookedAddOns.${number}.groupId`, 7> & {
|
|
4101
|
+
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
4102
|
+
}>;
|
|
4103
|
+
interface ConfirmOrDeclineBookingOptions {
|
|
4104
|
+
/**
|
|
4105
|
+
* Current payment status of the booking when using a custom checkout page and
|
|
4106
|
+
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4107
|
+
*
|
|
4108
|
+
* The booking is declined if there is a double booking conflict and you provide
|
|
4109
|
+
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
4110
|
+
*/
|
|
4111
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
4112
|
+
}
|
|
4113
|
+
/**
|
|
4114
|
+
* Confirms or declines up to 300 bookings.
|
|
4115
|
+
*
|
|
4116
|
+
*
|
|
4117
|
+
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
4118
|
+
* for details about when a booking is confirmed or declined.
|
|
4119
|
+
* @param details - Bookings to confirm or decline.
|
|
4120
|
+
* @public
|
|
4121
|
+
* @requiredField details
|
|
4122
|
+
* @requiredField details.bookingId
|
|
4123
|
+
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4124
|
+
* @applicableIdentity APP
|
|
4125
|
+
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking
|
|
4126
|
+
*/
|
|
4127
|
+
declare function bulkConfirmOrDeclineBooking(details: NonNullablePaths<BulkConfirmOrDeclineBookingRequestBookingDetails, `bookingId`, 2>[], options?: BulkConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<BulkConfirmOrDeclineBookingResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.totalParticipants` | `results.${number}.item.status` | `results.${number}.item.paymentStatus` | `results.${number}.item.selectedPaymentOption` | `results.${number}.item.createdBy.anonymousVisitorId` | `results.${number}.item.createdBy.memberId` | `results.${number}.item.createdBy.wixUserId` | `results.${number}.item.createdBy.appId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
4128
|
+
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
4129
|
+
}>;
|
|
4130
|
+
interface BulkConfirmOrDeclineBookingOptions {
|
|
4131
|
+
/** Whether to return the confirmed or declined booking objects. */
|
|
4132
|
+
returnEntity?: boolean;
|
|
4133
|
+
}
|
|
4037
4134
|
/**
|
|
4038
4135
|
* Creates a multi-service booking and all included single-service bookings simultaneously.
|
|
4039
4136
|
*
|
|
@@ -4497,94 +4594,6 @@ interface RemoveBookingsFromMultiServiceBookingOptions {
|
|
|
4497
4594
|
*/
|
|
4498
4595
|
returnFullEntity?: boolean;
|
|
4499
4596
|
}
|
|
4500
|
-
/**
|
|
4501
|
-
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
4502
|
-
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
4503
|
-
* the service requires business approval.
|
|
4504
|
-
*
|
|
4505
|
-
* ### eCommerce checkout restriction
|
|
4506
|
-
*
|
|
4507
|
-
* Call this method only when using a custom checkout page.
|
|
4508
|
-
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4509
|
-
* In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction).
|
|
4510
|
-
*
|
|
4511
|
-
* ### When to call Confirm Booking or Decline Booking instead
|
|
4512
|
-
*
|
|
4513
|
-
* This method has specific limitations based on payment status and double booking conflicts.
|
|
4514
|
-
* Use the alternative methods in these scenarios:
|
|
4515
|
-
* + **To force confirm double-booked free bookings:** Call [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking).
|
|
4516
|
-
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
4517
|
-
* + **To decline bookings without double booking conflicts:** Call [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking).
|
|
4518
|
-
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
4519
|
-
*
|
|
4520
|
-
* ### New booking status
|
|
4521
|
-
*
|
|
4522
|
-
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
4523
|
-
* are met:
|
|
4524
|
-
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
4525
|
-
* + There is a double booking conflict.
|
|
4526
|
-
*
|
|
4527
|
-
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
4528
|
-
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
4529
|
-
*
|
|
4530
|
-
* ### Double bookings
|
|
4531
|
-
*
|
|
4532
|
-
* If there is a double booking conflict, but the booking has already been at least
|
|
4533
|
-
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
4534
|
-
* Then, it also sets `doubleBooked` to `true`.
|
|
4535
|
-
*
|
|
4536
|
-
* ### Admin overwrites
|
|
4537
|
-
*
|
|
4538
|
-
* There are small but important differences in confirmation behavior if the
|
|
4539
|
-
* booking was created with special `flowControlSettings`:
|
|
4540
|
-
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
4541
|
-
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
4542
|
-
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
4543
|
-
* service requires business approval.
|
|
4544
|
-
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
4545
|
-
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
4546
|
-
* immediately.
|
|
4547
|
-
* @param bookingId - ID of the booking to confirm or decline.
|
|
4548
|
-
* @public
|
|
4549
|
-
* @requiredField bookingId
|
|
4550
|
-
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4551
|
-
* @applicableIdentity APP
|
|
4552
|
-
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking
|
|
4553
|
-
*/
|
|
4554
|
-
declare function confirmOrDeclineBooking(bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<ConfirmOrDeclineBookingResponse, `booking.totalParticipants` | `booking.participantsChoices.serviceChoices` | `booking.bookedEntity.slot.serviceId` | `booking.bookedEntity.slot.scheduleId` | `booking.bookedEntity.slot.resource._id` | `booking.bookedEntity.slot.location.locationType` | `booking.bookedEntity.slot.resourceSelections` | `booking.bookedEntity.slot.resourceSelections.${number}.selectionMethod` | `booking.bookedEntity.schedule.scheduleId` | `booking.bookedEntity.tags` | `booking.contactDetails.fullAddress.streetAddress.number` | `booking.contactDetails.fullAddress.streetAddress.name` | `booking.contactDetails.fullAddress.streetAddress.apt` | `booking.contactDetails.fullAddress.subdivisions` | `booking.contactDetails.fullAddress.subdivisions.${number}.code` | `booking.contactDetails.fullAddress.subdivisions.${number}.name` | `booking.additionalFields` | `booking.additionalFields.${number}._id` | `booking.additionalFields.${number}.valueType` | `booking.status` | `booking.paymentStatus` | `booking.selectedPaymentOption` | `booking.createdBy.anonymousVisitorId` | `booking.createdBy.memberId` | `booking.createdBy.wixUserId` | `booking.createdBy.appId` | `booking.bookedAddOns` | `booking.bookedAddOns.${number}._id` | `booking.bookedAddOns.${number}.groupId`, 7> & {
|
|
4555
|
-
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
4556
|
-
}>;
|
|
4557
|
-
interface ConfirmOrDeclineBookingOptions {
|
|
4558
|
-
/**
|
|
4559
|
-
* Current payment status of the booking when using a custom checkout page and
|
|
4560
|
-
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4561
|
-
*
|
|
4562
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
4563
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
4564
|
-
*/
|
|
4565
|
-
paymentStatus?: PaymentStatusWithLiterals;
|
|
4566
|
-
}
|
|
4567
|
-
/**
|
|
4568
|
-
* Confirms or declines up to 300 bookings.
|
|
4569
|
-
*
|
|
4570
|
-
*
|
|
4571
|
-
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
4572
|
-
* for details about when a booking is confirmed or declined.
|
|
4573
|
-
* @param details - Bookings to confirm or decline.
|
|
4574
|
-
* @public
|
|
4575
|
-
* @requiredField details
|
|
4576
|
-
* @requiredField details.bookingId
|
|
4577
|
-
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4578
|
-
* @applicableIdentity APP
|
|
4579
|
-
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking
|
|
4580
|
-
*/
|
|
4581
|
-
declare function bulkConfirmOrDeclineBooking(details: NonNullablePaths<BulkConfirmOrDeclineBookingRequestBookingDetails, `bookingId`, 2>[], options?: BulkConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<BulkConfirmOrDeclineBookingResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.totalParticipants` | `results.${number}.item.status` | `results.${number}.item.paymentStatus` | `results.${number}.item.selectedPaymentOption` | `results.${number}.item.createdBy.anonymousVisitorId` | `results.${number}.item.createdBy.memberId` | `results.${number}.item.createdBy.wixUserId` | `results.${number}.item.createdBy.appId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
4582
|
-
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
4583
|
-
}>;
|
|
4584
|
-
interface BulkConfirmOrDeclineBookingOptions {
|
|
4585
|
-
/** Whether to return the confirmed or declined booking objects. */
|
|
4586
|
-
returnEntity?: boolean;
|
|
4587
|
-
}
|
|
4588
4597
|
/**
|
|
4589
4598
|
* Creates a booking.
|
|
4590
4599
|
*
|