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