@wix/auto_sdk_bookings_bookings 1.0.118 → 1.0.119
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 +353 -353
- package/build/cjs/index.typings.js +193 -193
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +246 -246
- 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 +353 -353
- package/build/es/index.typings.mjs +193 -193
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +246 -246
- 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 +353 -353
- 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 +246 -246
- 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 +353 -353
- 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 +246 -246
- 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,229 @@ 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';
|
|
887
1110
|
interface V2CreateBookingRequest extends V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf {
|
|
888
1111
|
/**
|
|
889
1112
|
* Information about the slot to create a booking for.
|
|
@@ -1267,140 +1490,6 @@ interface V2UpdateNumberOfParticipantsResponse {
|
|
|
1267
1490
|
/** Booking with updated number of participants. */
|
|
1268
1491
|
booking?: Booking;
|
|
1269
1492
|
}
|
|
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
1493
|
interface CreateMultiServiceBookingRequest {
|
|
1405
1494
|
/**
|
|
1406
1495
|
* Between 2 to 8 new single-service booking specifications to create and combine in a multi-service booking.
|
|
@@ -2124,24 +2213,6 @@ interface BulkCalculateAllowedActionsResult {
|
|
|
2124
2213
|
/** Booking entity. */
|
|
2125
2214
|
item?: AllowedActions;
|
|
2126
2215
|
}
|
|
2127
|
-
interface ItemMetadata {
|
|
2128
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
2129
|
-
_id?: string | null;
|
|
2130
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
2131
|
-
originalIndex?: number;
|
|
2132
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
2133
|
-
success?: boolean;
|
|
2134
|
-
/** Details about the error in case of failure. */
|
|
2135
|
-
error?: ApplicationError;
|
|
2136
|
-
}
|
|
2137
|
-
interface ApplicationError {
|
|
2138
|
-
/** Error code. */
|
|
2139
|
-
code?: string;
|
|
2140
|
-
/** Description of the error. */
|
|
2141
|
-
description?: string;
|
|
2142
|
-
/** Data related to the error. */
|
|
2143
|
-
data?: Record<string, any> | null;
|
|
2144
|
-
}
|
|
2145
2216
|
/** Possible actions allowed for the booking. */
|
|
2146
2217
|
interface AllowedActions {
|
|
2147
2218
|
/** Whether canceling the booking is allowed. */
|
|
@@ -2149,14 +2220,6 @@ interface AllowedActions {
|
|
|
2149
2220
|
/** Whether rescheduling the booking is allowed. */
|
|
2150
2221
|
reschedule?: boolean;
|
|
2151
2222
|
}
|
|
2152
|
-
interface BulkActionMetadata {
|
|
2153
|
-
/** Number of items that were successfully processed. */
|
|
2154
|
-
totalSuccesses?: number;
|
|
2155
|
-
/** Number of items that couldn't be processed. */
|
|
2156
|
-
totalFailures?: number;
|
|
2157
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
2158
|
-
undetailedFailures?: number;
|
|
2159
|
-
}
|
|
2160
2223
|
interface GetMultiServiceBookingRequest {
|
|
2161
2224
|
/**
|
|
2162
2225
|
* ID of the multi-service booking.
|
|
@@ -2195,106 +2258,43 @@ interface AddBookingsToMultiServiceBookingRequest {
|
|
|
2195
2258
|
*/
|
|
2196
2259
|
returnFullEntity?: boolean;
|
|
2197
2260
|
}
|
|
2198
|
-
interface BookingIdAndRevision {
|
|
2199
|
-
/**
|
|
2200
|
-
* ID of the single-service booking.
|
|
2201
|
-
* @format GUID
|
|
2202
|
-
*/
|
|
2203
|
-
bookingId?: string | null;
|
|
2204
|
-
/**
|
|
2205
|
-
* Revision number, which increments by 1 each time the booking is updated.
|
|
2206
|
-
* To prevent conflicting changes, the current revision must be specified when managing the booking.
|
|
2207
|
-
*/
|
|
2208
|
-
revision?: string | null;
|
|
2209
|
-
}
|
|
2210
|
-
interface AddBookingsToMultiServiceBookingResponse {
|
|
2211
|
-
/** Single-service bookings that were added to the multi-service booking. */
|
|
2212
|
-
bookings?: BookingResult[];
|
|
2213
|
-
}
|
|
2214
|
-
interface RemoveBookingsFromMultiServiceBookingRequest {
|
|
2215
|
-
/**
|
|
2216
|
-
* ID of the multi-service booking.
|
|
2217
|
-
* @format GUID
|
|
2218
|
-
*/
|
|
2219
|
-
multiServiceBookingId: string | null;
|
|
2220
|
-
/**
|
|
2221
|
-
* List of single-service booking IDs and their revision.
|
|
2222
|
-
* @maxSize 8
|
|
2223
|
-
*/
|
|
2224
|
-
bookings?: BookingIdAndRevision[];
|
|
2225
|
-
/**
|
|
2226
|
-
* Whether to return the single-service bookings.
|
|
2227
|
-
*
|
|
2228
|
-
* Default: `false`
|
|
2229
|
-
*/
|
|
2230
|
-
returnFullEntity?: boolean;
|
|
2231
|
-
}
|
|
2232
|
-
interface RemoveBookingsFromMultiServiceBookingResponse {
|
|
2233
|
-
/** Single-service bookings that were removed from the multi-service booking. */
|
|
2234
|
-
bookings?: BookingResult[];
|
|
2235
|
-
}
|
|
2236
|
-
interface ConfirmOrDeclineBookingRequest {
|
|
2237
|
-
/**
|
|
2238
|
-
* ID of the booking to confirm or decline.
|
|
2239
|
-
* @format GUID
|
|
2240
|
-
*/
|
|
2241
|
-
bookingId: string;
|
|
2242
|
-
/**
|
|
2243
|
-
* Current payment status of the booking when using a custom checkout page and
|
|
2244
|
-
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
2245
|
-
*
|
|
2246
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
2247
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
2248
|
-
*/
|
|
2249
|
-
paymentStatus?: PaymentStatusWithLiterals;
|
|
2250
|
-
}
|
|
2251
|
-
interface ConfirmOrDeclineBookingResponse {
|
|
2252
|
-
/** Updated booking. */
|
|
2253
|
-
booking?: Booking;
|
|
2254
|
-
}
|
|
2255
|
-
interface BulkConfirmOrDeclineBookingRequest {
|
|
2256
|
-
/**
|
|
2257
|
-
* Bookings to confirm or decline.
|
|
2258
|
-
* @minSize 1
|
|
2259
|
-
* @maxSize 300
|
|
2260
|
-
*/
|
|
2261
|
-
details: BulkConfirmOrDeclineBookingRequestBookingDetails[];
|
|
2262
|
-
/** Whether to return the confirmed or declined booking objects. */
|
|
2263
|
-
returnEntity?: boolean;
|
|
2264
|
-
}
|
|
2265
|
-
interface BulkConfirmOrDeclineBookingRequestBookingDetails {
|
|
2261
|
+
interface BookingIdAndRevision {
|
|
2266
2262
|
/**
|
|
2267
|
-
* ID of the booking
|
|
2263
|
+
* ID of the single-service booking.
|
|
2268
2264
|
* @format GUID
|
|
2269
2265
|
*/
|
|
2270
|
-
bookingId?: string;
|
|
2266
|
+
bookingId?: string | null;
|
|
2271
2267
|
/**
|
|
2272
|
-
*
|
|
2273
|
-
*
|
|
2274
|
-
*
|
|
2275
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
2276
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
2268
|
+
* Revision number, which increments by 1 each time the booking is updated.
|
|
2269
|
+
* To prevent conflicting changes, the current revision must be specified when managing the booking.
|
|
2277
2270
|
*/
|
|
2278
|
-
|
|
2271
|
+
revision?: string | null;
|
|
2279
2272
|
}
|
|
2280
|
-
interface
|
|
2281
|
-
/**
|
|
2282
|
-
|
|
2283
|
-
/** Total successes and failures of the Bulk Confirm Or Decline call. */
|
|
2284
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
2273
|
+
interface AddBookingsToMultiServiceBookingResponse {
|
|
2274
|
+
/** Single-service bookings that were added to the multi-service booking. */
|
|
2275
|
+
bookings?: BookingResult[];
|
|
2285
2276
|
}
|
|
2286
|
-
interface
|
|
2277
|
+
interface RemoveBookingsFromMultiServiceBookingRequest {
|
|
2287
2278
|
/**
|
|
2288
|
-
*
|
|
2289
|
-
*
|
|
2290
|
-
* successfully created or updated.
|
|
2279
|
+
* ID of the multi-service booking.
|
|
2280
|
+
* @format GUID
|
|
2291
2281
|
*/
|
|
2292
|
-
|
|
2282
|
+
multiServiceBookingId: string | null;
|
|
2293
2283
|
/**
|
|
2294
|
-
*
|
|
2295
|
-
*
|
|
2284
|
+
* List of single-service booking IDs and their revision.
|
|
2285
|
+
* @maxSize 8
|
|
2296
2286
|
*/
|
|
2297
|
-
|
|
2287
|
+
bookings?: BookingIdAndRevision[];
|
|
2288
|
+
/**
|
|
2289
|
+
* Whether to return the single-service bookings.
|
|
2290
|
+
*
|
|
2291
|
+
* Default: `false`
|
|
2292
|
+
*/
|
|
2293
|
+
returnFullEntity?: boolean;
|
|
2294
|
+
}
|
|
2295
|
+
interface RemoveBookingsFromMultiServiceBookingResponse {
|
|
2296
|
+
/** Single-service bookings that were removed from the multi-service booking. */
|
|
2297
|
+
bookings?: BookingResult[];
|
|
2298
2298
|
}
|
|
2299
2299
|
interface BookingChanged {
|
|
2300
2300
|
/** The booking before the changes. */
|
|
@@ -3211,6 +3211,22 @@ interface GetSchedulingUrlResponse {
|
|
|
3211
3211
|
schedulingUrl?: string | null;
|
|
3212
3212
|
}
|
|
3213
3213
|
/** @docsIgnore */
|
|
3214
|
+
type ConfirmOrDeclineBookingApplicationErrors = {
|
|
3215
|
+
code?: 'INVALID_BOOKING_STATUS';
|
|
3216
|
+
description?: string;
|
|
3217
|
+
data?: Record<string, any>;
|
|
3218
|
+
} | {
|
|
3219
|
+
code?: 'BOOKING_NOT_FOUND';
|
|
3220
|
+
description?: string;
|
|
3221
|
+
data?: Record<string, any>;
|
|
3222
|
+
};
|
|
3223
|
+
/** @docsIgnore */
|
|
3224
|
+
type BulkConfirmOrDeclineBookingApplicationErrors = {
|
|
3225
|
+
code?: 'DUPLICATED_BOOKINGS';
|
|
3226
|
+
description?: string;
|
|
3227
|
+
data?: Record<string, any>;
|
|
3228
|
+
};
|
|
3229
|
+
/** @docsIgnore */
|
|
3214
3230
|
type CreateMultiServiceBookingApplicationErrors = {
|
|
3215
3231
|
code?: 'VALIDATION_FAILURE';
|
|
3216
3232
|
description?: string;
|
|
@@ -3481,22 +3497,6 @@ type RemoveBookingsFromMultiServiceBookingApplicationErrors = {
|
|
|
3481
3497
|
data?: Record<string, any>;
|
|
3482
3498
|
};
|
|
3483
3499
|
/** @docsIgnore */
|
|
3484
|
-
type ConfirmOrDeclineBookingApplicationErrors = {
|
|
3485
|
-
code?: 'INVALID_BOOKING_STATUS';
|
|
3486
|
-
description?: string;
|
|
3487
|
-
data?: Record<string, any>;
|
|
3488
|
-
} | {
|
|
3489
|
-
code?: 'BOOKING_NOT_FOUND';
|
|
3490
|
-
description?: string;
|
|
3491
|
-
data?: Record<string, any>;
|
|
3492
|
-
};
|
|
3493
|
-
/** @docsIgnore */
|
|
3494
|
-
type BulkConfirmOrDeclineBookingApplicationErrors = {
|
|
3495
|
-
code?: 'DUPLICATED_BOOKINGS';
|
|
3496
|
-
description?: string;
|
|
3497
|
-
data?: Record<string, any>;
|
|
3498
|
-
};
|
|
3499
|
-
/** @docsIgnore */
|
|
3500
3500
|
type CreateBookingApplicationErrors = {
|
|
3501
3501
|
code?: 'SESSION_NOT_FOUND';
|
|
3502
3502
|
description?: string;
|
|
@@ -4017,6 +4017,94 @@ interface BookingNumberOfParticipantsUpdatedEnvelope {
|
|
|
4017
4017
|
* @slug number_of_participants_updated
|
|
4018
4018
|
*/
|
|
4019
4019
|
declare function onBookingNumberOfParticipantsUpdated(handler: (event: BookingNumberOfParticipantsUpdatedEnvelope) => void | Promise<void>): void;
|
|
4020
|
+
/**
|
|
4021
|
+
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
4022
|
+
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
4023
|
+
* the service requires business approval.
|
|
4024
|
+
*
|
|
4025
|
+
* ### eCommerce checkout restriction
|
|
4026
|
+
*
|
|
4027
|
+
* Call this method only when using a custom checkout page.
|
|
4028
|
+
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4029
|
+
* 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).
|
|
4030
|
+
*
|
|
4031
|
+
* ### When to call Confirm Booking or Decline Booking instead
|
|
4032
|
+
*
|
|
4033
|
+
* This method has specific limitations based on payment status and double booking conflicts.
|
|
4034
|
+
* Use the alternative methods in these scenarios:
|
|
4035
|
+
* + **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).
|
|
4036
|
+
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
4037
|
+
* + **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).
|
|
4038
|
+
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
4039
|
+
*
|
|
4040
|
+
* ### New booking status
|
|
4041
|
+
*
|
|
4042
|
+
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
4043
|
+
* are met:
|
|
4044
|
+
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
4045
|
+
* + There is a double booking conflict.
|
|
4046
|
+
*
|
|
4047
|
+
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
4048
|
+
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
4049
|
+
*
|
|
4050
|
+
* ### Double bookings
|
|
4051
|
+
*
|
|
4052
|
+
* If there is a double booking conflict, but the booking has already been at least
|
|
4053
|
+
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
4054
|
+
* Then, it also sets `doubleBooked` to `true`.
|
|
4055
|
+
*
|
|
4056
|
+
* ### Admin overwrites
|
|
4057
|
+
*
|
|
4058
|
+
* There are small but important differences in confirmation behavior if the
|
|
4059
|
+
* booking was created with special `flowControlSettings`:
|
|
4060
|
+
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
4061
|
+
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
4062
|
+
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
4063
|
+
* service requires business approval.
|
|
4064
|
+
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
4065
|
+
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
4066
|
+
* immediately.
|
|
4067
|
+
* @param bookingId - ID of the booking to confirm or decline.
|
|
4068
|
+
* @public
|
|
4069
|
+
* @requiredField bookingId
|
|
4070
|
+
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4071
|
+
* @applicableIdentity APP
|
|
4072
|
+
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking
|
|
4073
|
+
*/
|
|
4074
|
+
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> & {
|
|
4075
|
+
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
4076
|
+
}>;
|
|
4077
|
+
interface ConfirmOrDeclineBookingOptions {
|
|
4078
|
+
/**
|
|
4079
|
+
* Current payment status of the booking when using a custom checkout page and
|
|
4080
|
+
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4081
|
+
*
|
|
4082
|
+
* The booking is declined if there is a double booking conflict and you provide
|
|
4083
|
+
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
4084
|
+
*/
|
|
4085
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
4086
|
+
}
|
|
4087
|
+
/**
|
|
4088
|
+
* Confirms or declines up to 300 bookings.
|
|
4089
|
+
*
|
|
4090
|
+
*
|
|
4091
|
+
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
4092
|
+
* for details about when a booking is confirmed or declined.
|
|
4093
|
+
* @param details - Bookings to confirm or decline.
|
|
4094
|
+
* @public
|
|
4095
|
+
* @requiredField details
|
|
4096
|
+
* @requiredField details.bookingId
|
|
4097
|
+
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4098
|
+
* @applicableIdentity APP
|
|
4099
|
+
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking
|
|
4100
|
+
*/
|
|
4101
|
+
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> & {
|
|
4102
|
+
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
4103
|
+
}>;
|
|
4104
|
+
interface BulkConfirmOrDeclineBookingOptions {
|
|
4105
|
+
/** Whether to return the confirmed or declined booking objects. */
|
|
4106
|
+
returnEntity?: boolean;
|
|
4107
|
+
}
|
|
4020
4108
|
/**
|
|
4021
4109
|
* Creates a multi-service booking and all included single-service bookings simultaneously.
|
|
4022
4110
|
*
|
|
@@ -4480,94 +4568,6 @@ interface RemoveBookingsFromMultiServiceBookingOptions {
|
|
|
4480
4568
|
*/
|
|
4481
4569
|
returnFullEntity?: boolean;
|
|
4482
4570
|
}
|
|
4483
|
-
/**
|
|
4484
|
-
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
4485
|
-
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
4486
|
-
* the service requires business approval.
|
|
4487
|
-
*
|
|
4488
|
-
* ### eCommerce checkout restriction
|
|
4489
|
-
*
|
|
4490
|
-
* Call this method only when using a custom checkout page.
|
|
4491
|
-
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4492
|
-
* 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).
|
|
4493
|
-
*
|
|
4494
|
-
* ### When to call Confirm Booking or Decline Booking instead
|
|
4495
|
-
*
|
|
4496
|
-
* This method has specific limitations based on payment status and double booking conflicts.
|
|
4497
|
-
* Use the alternative methods in these scenarios:
|
|
4498
|
-
* + **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).
|
|
4499
|
-
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
4500
|
-
* + **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).
|
|
4501
|
-
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
4502
|
-
*
|
|
4503
|
-
* ### New booking status
|
|
4504
|
-
*
|
|
4505
|
-
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
4506
|
-
* are met:
|
|
4507
|
-
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
4508
|
-
* + There is a double booking conflict.
|
|
4509
|
-
*
|
|
4510
|
-
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
4511
|
-
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
4512
|
-
*
|
|
4513
|
-
* ### Double bookings
|
|
4514
|
-
*
|
|
4515
|
-
* If there is a double booking conflict, but the booking has already been at least
|
|
4516
|
-
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
4517
|
-
* Then, it also sets `doubleBooked` to `true`.
|
|
4518
|
-
*
|
|
4519
|
-
* ### Admin overwrites
|
|
4520
|
-
*
|
|
4521
|
-
* There are small but important differences in confirmation behavior if the
|
|
4522
|
-
* booking was created with special `flowControlSettings`:
|
|
4523
|
-
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
4524
|
-
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
4525
|
-
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
4526
|
-
* service requires business approval.
|
|
4527
|
-
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
4528
|
-
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
4529
|
-
* immediately.
|
|
4530
|
-
* @param bookingId - ID of the booking to confirm or decline.
|
|
4531
|
-
* @public
|
|
4532
|
-
* @requiredField bookingId
|
|
4533
|
-
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4534
|
-
* @applicableIdentity APP
|
|
4535
|
-
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking
|
|
4536
|
-
*/
|
|
4537
|
-
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> & {
|
|
4538
|
-
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
4539
|
-
}>;
|
|
4540
|
-
interface ConfirmOrDeclineBookingOptions {
|
|
4541
|
-
/**
|
|
4542
|
-
* Current payment status of the booking when using a custom checkout page and
|
|
4543
|
-
* not the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
4544
|
-
*
|
|
4545
|
-
* The booking is declined if there is a double booking conflict and you provide
|
|
4546
|
-
* one of these payment statuses: `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT`.
|
|
4547
|
-
*/
|
|
4548
|
-
paymentStatus?: PaymentStatusWithLiterals;
|
|
4549
|
-
}
|
|
4550
|
-
/**
|
|
4551
|
-
* Confirms or declines up to 300 bookings.
|
|
4552
|
-
*
|
|
4553
|
-
*
|
|
4554
|
-
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
4555
|
-
* for details about when a booking is confirmed or declined.
|
|
4556
|
-
* @param details - Bookings to confirm or decline.
|
|
4557
|
-
* @public
|
|
4558
|
-
* @requiredField details
|
|
4559
|
-
* @requiredField details.bookingId
|
|
4560
|
-
* @permissionId BOOKINGS.BOOKING_CONFIRM_OR_DECLINE
|
|
4561
|
-
* @applicableIdentity APP
|
|
4562
|
-
* @fqn com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking
|
|
4563
|
-
*/
|
|
4564
|
-
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> & {
|
|
4565
|
-
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
4566
|
-
}>;
|
|
4567
|
-
interface BulkConfirmOrDeclineBookingOptions {
|
|
4568
|
-
/** Whether to return the confirmed or declined booking objects. */
|
|
4569
|
-
returnEntity?: boolean;
|
|
4570
|
-
}
|
|
4571
4571
|
/**
|
|
4572
4572
|
* Creates a booking.
|
|
4573
4573
|
*
|