@wix/auto_sdk_bookings_booking-policies 1.0.17 → 1.0.19
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +330 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +155 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.mts → cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +584 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js +319 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js +152 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.ts → es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js +550 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +330 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +155 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/internal/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.ts → cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +584 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js +319 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js +152 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/internal/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.mts → es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js +550 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -143
- package/build/index.d.ts +0 -143
- package/build/index.js +0 -791
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -747
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -143
- package/build/internal/index.d.ts +0 -143
- package/build/internal/index.js +0 -791
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -747
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -543
- package/build/internal/meta.d.ts +0 -543
- package/build/internal/meta.js +0 -448
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -414
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -543
- package/build/meta.d.ts +0 -543
- package/build/meta.js +0 -448
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -414
- package/build/meta.mjs.map +0 -1
package/build/index.js
DELETED
|
@@ -1,791 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
DayOfWeek: () => DayOfWeek,
|
|
24
|
-
DeleteStatus: () => DeleteStatus,
|
|
25
|
-
Namespace: () => Namespace,
|
|
26
|
-
PlacementType: () => PlacementType,
|
|
27
|
-
ResolutionMethod: () => ResolutionMethod,
|
|
28
|
-
SiteCreatedContext: () => SiteCreatedContext,
|
|
29
|
-
SortOrder: () => SortOrder,
|
|
30
|
-
State: () => State,
|
|
31
|
-
WebhookIdentityType: () => WebhookIdentityType,
|
|
32
|
-
countBookingPolicies: () => countBookingPolicies4,
|
|
33
|
-
createBookingPolicy: () => createBookingPolicy4,
|
|
34
|
-
deleteBookingPolicy: () => deleteBookingPolicy4,
|
|
35
|
-
getBookingPolicy: () => getBookingPolicy4,
|
|
36
|
-
getStrictestBookingPolicy: () => getStrictestBookingPolicy4,
|
|
37
|
-
onBookingPolicyCreated: () => onBookingPolicyCreated2,
|
|
38
|
-
onBookingPolicyDefaultBookingPolicySet: () => onBookingPolicyDefaultBookingPolicySet2,
|
|
39
|
-
onBookingPolicyDeleted: () => onBookingPolicyDeleted2,
|
|
40
|
-
onBookingPolicyUpdated: () => onBookingPolicyUpdated2,
|
|
41
|
-
queryBookingPolicies: () => queryBookingPolicies4,
|
|
42
|
-
setDefaultBookingPolicy: () => setDefaultBookingPolicy4,
|
|
43
|
-
updateBookingPolicy: () => updateBookingPolicy4
|
|
44
|
-
});
|
|
45
|
-
module.exports = __toCommonJS(index_exports);
|
|
46
|
-
|
|
47
|
-
// src/bookings-v1-booking-policy-booking-policies.public.ts
|
|
48
|
-
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
49
|
-
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
50
|
-
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
51
|
-
var import_sdk_types = require("@wix/sdk-types");
|
|
52
|
-
|
|
53
|
-
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
54
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
55
|
-
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
56
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
57
|
-
|
|
58
|
-
// src/bookings-v1-booking-policy-booking-policies.http.ts
|
|
59
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
60
|
-
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
61
|
-
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
62
|
-
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
63
|
-
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
64
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
65
|
-
function resolveWixBookingsV1BookingPoliciesServiceUrl(opts) {
|
|
66
|
-
const domainToMappings = {
|
|
67
|
-
"manage._base_domain_": [
|
|
68
|
-
{
|
|
69
|
-
srcPath: "/_api/bookings/v1/booking-policies",
|
|
70
|
-
destPath: "/v1/booking-policies"
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"www.wixapis.com": [
|
|
74
|
-
{
|
|
75
|
-
srcPath: "/bookings/v1/booking-policies",
|
|
76
|
-
destPath: "/v1/booking-policies"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
_: [
|
|
80
|
-
{
|
|
81
|
-
srcPath: "/_api/bookings/v1/booking-policies/strictest",
|
|
82
|
-
destPath: "/v1/booking-policies/strictest"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
srcPath: "/_api/bookings/v1/booking-policies/query",
|
|
86
|
-
destPath: "/v1/booking-policies/query"
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
};
|
|
90
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
91
|
-
}
|
|
92
|
-
var PACKAGE_NAME = "@wix/auto_sdk_bookings_booking-policies";
|
|
93
|
-
function createBookingPolicy(payload) {
|
|
94
|
-
function __createBookingPolicy({ host }) {
|
|
95
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
96
|
-
{
|
|
97
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
98
|
-
paths: [
|
|
99
|
-
{ path: "bookingPolicy.createdDate" },
|
|
100
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
]);
|
|
104
|
-
const metadata = {
|
|
105
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
106
|
-
method: "POST",
|
|
107
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.CreateBookingPolicy",
|
|
108
|
-
packageName: PACKAGE_NAME,
|
|
109
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
110
|
-
protoPath: "/v1/booking-policies",
|
|
111
|
-
data: serializedData,
|
|
112
|
-
host
|
|
113
|
-
}),
|
|
114
|
-
data: serializedData,
|
|
115
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
116
|
-
{
|
|
117
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
118
|
-
paths: [
|
|
119
|
-
{ path: "bookingPolicy.createdDate" },
|
|
120
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
])
|
|
124
|
-
};
|
|
125
|
-
return metadata;
|
|
126
|
-
}
|
|
127
|
-
return __createBookingPolicy;
|
|
128
|
-
}
|
|
129
|
-
function getBookingPolicy(payload) {
|
|
130
|
-
function __getBookingPolicy({ host }) {
|
|
131
|
-
const metadata = {
|
|
132
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
133
|
-
method: "GET",
|
|
134
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetBookingPolicy",
|
|
135
|
-
packageName: PACKAGE_NAME,
|
|
136
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
137
|
-
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
138
|
-
data: payload,
|
|
139
|
-
host
|
|
140
|
-
}),
|
|
141
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
142
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
143
|
-
{
|
|
144
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
145
|
-
paths: [
|
|
146
|
-
{ path: "bookingPolicy.createdDate" },
|
|
147
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
])
|
|
151
|
-
};
|
|
152
|
-
return metadata;
|
|
153
|
-
}
|
|
154
|
-
return __getBookingPolicy;
|
|
155
|
-
}
|
|
156
|
-
function getStrictestBookingPolicy(payload) {
|
|
157
|
-
function __getStrictestBookingPolicy({ host }) {
|
|
158
|
-
const metadata = {
|
|
159
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
160
|
-
method: "POST",
|
|
161
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.GetStrictestBookingPolicy",
|
|
162
|
-
packageName: PACKAGE_NAME,
|
|
163
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
164
|
-
protoPath: "/v1/booking-policies/strictest",
|
|
165
|
-
data: payload,
|
|
166
|
-
host
|
|
167
|
-
}),
|
|
168
|
-
data: payload,
|
|
169
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
170
|
-
{
|
|
171
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
172
|
-
paths: [
|
|
173
|
-
{ path: "bookingPolicy.createdDate" },
|
|
174
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
])
|
|
178
|
-
};
|
|
179
|
-
return metadata;
|
|
180
|
-
}
|
|
181
|
-
return __getStrictestBookingPolicy;
|
|
182
|
-
}
|
|
183
|
-
function updateBookingPolicy(payload) {
|
|
184
|
-
function __updateBookingPolicy({ host }) {
|
|
185
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
186
|
-
{
|
|
187
|
-
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
188
|
-
paths: [{ path: "mask" }]
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
192
|
-
paths: [
|
|
193
|
-
{ path: "bookingPolicy.createdDate" },
|
|
194
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
]);
|
|
198
|
-
const metadata = {
|
|
199
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
200
|
-
method: "PATCH",
|
|
201
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.UpdateBookingPolicy",
|
|
202
|
-
packageName: PACKAGE_NAME,
|
|
203
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
204
|
-
protoPath: "/v1/booking-policies/{bookingPolicy.id}",
|
|
205
|
-
data: serializedData,
|
|
206
|
-
host
|
|
207
|
-
}),
|
|
208
|
-
data: serializedData,
|
|
209
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
210
|
-
{
|
|
211
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
212
|
-
paths: [
|
|
213
|
-
{ path: "bookingPolicy.createdDate" },
|
|
214
|
-
{ path: "bookingPolicy.updatedDate" }
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
])
|
|
218
|
-
};
|
|
219
|
-
return metadata;
|
|
220
|
-
}
|
|
221
|
-
return __updateBookingPolicy;
|
|
222
|
-
}
|
|
223
|
-
function setDefaultBookingPolicy(payload) {
|
|
224
|
-
function __setDefaultBookingPolicy({ host }) {
|
|
225
|
-
const metadata = {
|
|
226
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
227
|
-
method: "POST",
|
|
228
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.SetDefaultBookingPolicy",
|
|
229
|
-
packageName: PACKAGE_NAME,
|
|
230
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
231
|
-
protoPath: "/v1/booking-policies/{bookingPolicyId}:setDefault",
|
|
232
|
-
data: payload,
|
|
233
|
-
host
|
|
234
|
-
}),
|
|
235
|
-
data: payload,
|
|
236
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
237
|
-
{
|
|
238
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
239
|
-
paths: [
|
|
240
|
-
{ path: "currentDefaultBookingPolicy.createdDate" },
|
|
241
|
-
{ path: "currentDefaultBookingPolicy.updatedDate" },
|
|
242
|
-
{ path: "previousDefaultBookingPolicy.createdDate" },
|
|
243
|
-
{ path: "previousDefaultBookingPolicy.updatedDate" }
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
])
|
|
247
|
-
};
|
|
248
|
-
return metadata;
|
|
249
|
-
}
|
|
250
|
-
return __setDefaultBookingPolicy;
|
|
251
|
-
}
|
|
252
|
-
function deleteBookingPolicy(payload) {
|
|
253
|
-
function __deleteBookingPolicy({ host }) {
|
|
254
|
-
const metadata = {
|
|
255
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
256
|
-
method: "DELETE",
|
|
257
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.DeleteBookingPolicy",
|
|
258
|
-
packageName: PACKAGE_NAME,
|
|
259
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
260
|
-
protoPath: "/v1/booking-policies/{bookingPolicyId}",
|
|
261
|
-
data: payload,
|
|
262
|
-
host
|
|
263
|
-
}),
|
|
264
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
265
|
-
};
|
|
266
|
-
return metadata;
|
|
267
|
-
}
|
|
268
|
-
return __deleteBookingPolicy;
|
|
269
|
-
}
|
|
270
|
-
function queryBookingPolicies(payload) {
|
|
271
|
-
function __queryBookingPolicies({ host }) {
|
|
272
|
-
const metadata = {
|
|
273
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
274
|
-
method: "POST",
|
|
275
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies",
|
|
276
|
-
packageName: PACKAGE_NAME,
|
|
277
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
278
|
-
protoPath: "/v1/booking-policies/query",
|
|
279
|
-
data: payload,
|
|
280
|
-
host
|
|
281
|
-
}),
|
|
282
|
-
data: payload,
|
|
283
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
284
|
-
{
|
|
285
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
286
|
-
paths: [
|
|
287
|
-
{ path: "bookingPolicies.createdDate" },
|
|
288
|
-
{ path: "bookingPolicies.updatedDate" }
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
])
|
|
292
|
-
};
|
|
293
|
-
return metadata;
|
|
294
|
-
}
|
|
295
|
-
return __queryBookingPolicies;
|
|
296
|
-
}
|
|
297
|
-
function countBookingPolicies(payload) {
|
|
298
|
-
function __countBookingPolicies({ host }) {
|
|
299
|
-
const metadata = {
|
|
300
|
-
entityFqdn: "wix.bookings.v1.booking_policy",
|
|
301
|
-
method: "POST",
|
|
302
|
-
methodFqn: "wix.bookings.v1.BookingPoliciesService.CountBookingPolicies",
|
|
303
|
-
packageName: PACKAGE_NAME,
|
|
304
|
-
url: resolveWixBookingsV1BookingPoliciesServiceUrl({
|
|
305
|
-
protoPath: "/v1/booking-policies/count",
|
|
306
|
-
data: payload,
|
|
307
|
-
host
|
|
308
|
-
}),
|
|
309
|
-
data: payload
|
|
310
|
-
};
|
|
311
|
-
return metadata;
|
|
312
|
-
}
|
|
313
|
-
return __countBookingPolicies;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// src/bookings-v1-booking-policy-booking-policies.universal.ts
|
|
317
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
318
|
-
SortOrder2["ASC"] = "ASC";
|
|
319
|
-
SortOrder2["DESC"] = "DESC";
|
|
320
|
-
return SortOrder2;
|
|
321
|
-
})(SortOrder || {});
|
|
322
|
-
var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
|
|
323
|
-
PlacementType2["BEFORE"] = "BEFORE";
|
|
324
|
-
PlacementType2["AFTER"] = "AFTER";
|
|
325
|
-
PlacementType2["REPLACE"] = "REPLACE";
|
|
326
|
-
return PlacementType2;
|
|
327
|
-
})(PlacementType || {});
|
|
328
|
-
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
329
|
-
DayOfWeek2["MONDAY"] = "MONDAY";
|
|
330
|
-
DayOfWeek2["TUESDAY"] = "TUESDAY";
|
|
331
|
-
DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
|
|
332
|
-
DayOfWeek2["THURSDAY"] = "THURSDAY";
|
|
333
|
-
DayOfWeek2["FRIDAY"] = "FRIDAY";
|
|
334
|
-
DayOfWeek2["SATURDAY"] = "SATURDAY";
|
|
335
|
-
DayOfWeek2["SUNDAY"] = "SUNDAY";
|
|
336
|
-
return DayOfWeek2;
|
|
337
|
-
})(DayOfWeek || {});
|
|
338
|
-
var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
|
|
339
|
-
ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
340
|
-
ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
341
|
-
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
342
|
-
return ResolutionMethod2;
|
|
343
|
-
})(ResolutionMethod || {});
|
|
344
|
-
var State = /* @__PURE__ */ ((State2) => {
|
|
345
|
-
State2["UNKNOWN"] = "UNKNOWN";
|
|
346
|
-
State2["ENABLED"] = "ENABLED";
|
|
347
|
-
State2["DISABLED"] = "DISABLED";
|
|
348
|
-
State2["PENDING"] = "PENDING";
|
|
349
|
-
State2["DEMO"] = "DEMO";
|
|
350
|
-
return State2;
|
|
351
|
-
})(State || {});
|
|
352
|
-
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
353
|
-
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
354
|
-
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
355
|
-
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
356
|
-
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
357
|
-
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
358
|
-
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
359
|
-
return SiteCreatedContext2;
|
|
360
|
-
})(SiteCreatedContext || {});
|
|
361
|
-
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
362
|
-
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
363
|
-
Namespace2["WIX"] = "WIX";
|
|
364
|
-
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
365
|
-
Namespace2["ALBUMS"] = "ALBUMS";
|
|
366
|
-
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
367
|
-
Namespace2["HOTELS"] = "HOTELS";
|
|
368
|
-
Namespace2["CLUBS"] = "CLUBS";
|
|
369
|
-
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
370
|
-
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
371
|
-
Namespace2["LOGOS"] = "LOGOS";
|
|
372
|
-
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
373
|
-
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
374
|
-
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
375
|
-
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
376
|
-
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
377
|
-
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
378
|
-
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
379
|
-
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
380
|
-
Namespace2["HEADLESS"] = "HEADLESS";
|
|
381
|
-
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
382
|
-
Namespace2["RISE"] = "RISE";
|
|
383
|
-
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
384
|
-
Namespace2["NOWNIA"] = "NOWNIA";
|
|
385
|
-
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
386
|
-
Namespace2["CODUX"] = "CODUX";
|
|
387
|
-
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
388
|
-
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
389
|
-
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
390
|
-
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
391
|
-
Namespace2["MIMIR"] = "MIMIR";
|
|
392
|
-
return Namespace2;
|
|
393
|
-
})(Namespace || {});
|
|
394
|
-
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
395
|
-
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
396
|
-
DeleteStatus2["TRASH"] = "TRASH";
|
|
397
|
-
DeleteStatus2["DELETED"] = "DELETED";
|
|
398
|
-
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
399
|
-
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
400
|
-
return DeleteStatus2;
|
|
401
|
-
})(DeleteStatus || {});
|
|
402
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
403
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
404
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
405
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
406
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
407
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
408
|
-
return WebhookIdentityType2;
|
|
409
|
-
})(WebhookIdentityType || {});
|
|
410
|
-
async function createBookingPolicy2(bookingPolicy) {
|
|
411
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
412
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
413
|
-
bookingPolicy
|
|
414
|
-
});
|
|
415
|
-
const reqOpts = createBookingPolicy(payload);
|
|
416
|
-
sideEffects?.onSiteCall?.();
|
|
417
|
-
try {
|
|
418
|
-
const result = await httpClient.request(reqOpts);
|
|
419
|
-
sideEffects?.onSuccess?.(result);
|
|
420
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
421
|
-
} catch (err) {
|
|
422
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
423
|
-
err,
|
|
424
|
-
{
|
|
425
|
-
spreadPathsToArguments: {},
|
|
426
|
-
explicitPathsToArguments: { bookingPolicy: "$[0]" },
|
|
427
|
-
singleArgumentUnchanged: false
|
|
428
|
-
},
|
|
429
|
-
["bookingPolicy"]
|
|
430
|
-
);
|
|
431
|
-
sideEffects?.onError?.(err);
|
|
432
|
-
throw transformedError;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
async function getBookingPolicy2(bookingPolicyId) {
|
|
436
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
437
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
438
|
-
bookingPolicyId
|
|
439
|
-
});
|
|
440
|
-
const reqOpts = getBookingPolicy(payload);
|
|
441
|
-
sideEffects?.onSiteCall?.();
|
|
442
|
-
try {
|
|
443
|
-
const result = await httpClient.request(reqOpts);
|
|
444
|
-
sideEffects?.onSuccess?.(result);
|
|
445
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
446
|
-
} catch (err) {
|
|
447
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
448
|
-
err,
|
|
449
|
-
{
|
|
450
|
-
spreadPathsToArguments: {},
|
|
451
|
-
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
452
|
-
singleArgumentUnchanged: false
|
|
453
|
-
},
|
|
454
|
-
["bookingPolicyId"]
|
|
455
|
-
);
|
|
456
|
-
sideEffects?.onError?.(err);
|
|
457
|
-
throw transformedError;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
async function getStrictestBookingPolicy2(bookingPolicyIds) {
|
|
461
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
462
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
463
|
-
bookingPolicyIds
|
|
464
|
-
});
|
|
465
|
-
const reqOpts = getStrictestBookingPolicy(payload);
|
|
466
|
-
sideEffects?.onSiteCall?.();
|
|
467
|
-
try {
|
|
468
|
-
const result = await httpClient.request(reqOpts);
|
|
469
|
-
sideEffects?.onSuccess?.(result);
|
|
470
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
471
|
-
} catch (err) {
|
|
472
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
473
|
-
err,
|
|
474
|
-
{
|
|
475
|
-
spreadPathsToArguments: {},
|
|
476
|
-
explicitPathsToArguments: { bookingPolicyIds: "$[0]" },
|
|
477
|
-
singleArgumentUnchanged: false
|
|
478
|
-
},
|
|
479
|
-
["bookingPolicyIds"]
|
|
480
|
-
);
|
|
481
|
-
sideEffects?.onError?.(err);
|
|
482
|
-
throw transformedError;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
async function updateBookingPolicy2(_id, bookingPolicy) {
|
|
486
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
487
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
488
|
-
bookingPolicy: { ...bookingPolicy, id: _id }
|
|
489
|
-
});
|
|
490
|
-
const reqOpts = updateBookingPolicy(payload);
|
|
491
|
-
sideEffects?.onSiteCall?.();
|
|
492
|
-
try {
|
|
493
|
-
const result = await httpClient.request(reqOpts);
|
|
494
|
-
sideEffects?.onSuccess?.(result);
|
|
495
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.bookingPolicy;
|
|
496
|
-
} catch (err) {
|
|
497
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
498
|
-
err,
|
|
499
|
-
{
|
|
500
|
-
spreadPathsToArguments: { bookingPolicy: "$[1]" },
|
|
501
|
-
explicitPathsToArguments: { "bookingPolicy.id": "$[0]" },
|
|
502
|
-
singleArgumentUnchanged: false
|
|
503
|
-
},
|
|
504
|
-
["_id", "bookingPolicy"]
|
|
505
|
-
);
|
|
506
|
-
sideEffects?.onError?.(err);
|
|
507
|
-
throw transformedError;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
async function setDefaultBookingPolicy2(bookingPolicyId) {
|
|
511
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
512
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
513
|
-
bookingPolicyId
|
|
514
|
-
});
|
|
515
|
-
const reqOpts = setDefaultBookingPolicy(payload);
|
|
516
|
-
sideEffects?.onSiteCall?.();
|
|
517
|
-
try {
|
|
518
|
-
const result = await httpClient.request(reqOpts);
|
|
519
|
-
sideEffects?.onSuccess?.(result);
|
|
520
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
521
|
-
} catch (err) {
|
|
522
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
523
|
-
err,
|
|
524
|
-
{
|
|
525
|
-
spreadPathsToArguments: {},
|
|
526
|
-
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
527
|
-
singleArgumentUnchanged: false
|
|
528
|
-
},
|
|
529
|
-
["bookingPolicyId"]
|
|
530
|
-
);
|
|
531
|
-
sideEffects?.onError?.(err);
|
|
532
|
-
throw transformedError;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
async function deleteBookingPolicy2(bookingPolicyId) {
|
|
536
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
537
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
538
|
-
bookingPolicyId
|
|
539
|
-
});
|
|
540
|
-
const reqOpts = deleteBookingPolicy(payload);
|
|
541
|
-
sideEffects?.onSiteCall?.();
|
|
542
|
-
try {
|
|
543
|
-
const result = await httpClient.request(reqOpts);
|
|
544
|
-
sideEffects?.onSuccess?.(result);
|
|
545
|
-
} catch (err) {
|
|
546
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
547
|
-
err,
|
|
548
|
-
{
|
|
549
|
-
spreadPathsToArguments: {},
|
|
550
|
-
explicitPathsToArguments: { bookingPolicyId: "$[0]" },
|
|
551
|
-
singleArgumentUnchanged: false
|
|
552
|
-
},
|
|
553
|
-
["bookingPolicyId"]
|
|
554
|
-
);
|
|
555
|
-
sideEffects?.onError?.(err);
|
|
556
|
-
throw transformedError;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
function queryBookingPolicies2() {
|
|
560
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
561
|
-
return (0, import_query_builder.queryBuilder)({
|
|
562
|
-
func: async (payload) => {
|
|
563
|
-
const reqOpts = queryBookingPolicies(payload);
|
|
564
|
-
sideEffects?.onSiteCall?.();
|
|
565
|
-
try {
|
|
566
|
-
const result = await httpClient.request(reqOpts);
|
|
567
|
-
sideEffects?.onSuccess?.(result);
|
|
568
|
-
return result;
|
|
569
|
-
} catch (err) {
|
|
570
|
-
sideEffects?.onError?.(err);
|
|
571
|
-
throw err;
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
requestTransformer: (query) => {
|
|
575
|
-
const args = [query, {}];
|
|
576
|
-
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
577
|
-
...args?.[1],
|
|
578
|
-
query: args?.[0]
|
|
579
|
-
});
|
|
580
|
-
},
|
|
581
|
-
responseTransformer: ({
|
|
582
|
-
data
|
|
583
|
-
}) => {
|
|
584
|
-
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(data);
|
|
585
|
-
return {
|
|
586
|
-
items: transformedData?.bookingPolicies,
|
|
587
|
-
pagingMetadata: transformedData?.pagingMetadata
|
|
588
|
-
};
|
|
589
|
-
},
|
|
590
|
-
errorTransformer: (err) => {
|
|
591
|
-
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
592
|
-
spreadPathsToArguments: {},
|
|
593
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
594
|
-
singleArgumentUnchanged: false
|
|
595
|
-
});
|
|
596
|
-
throw transformedError;
|
|
597
|
-
},
|
|
598
|
-
pagingMethod: "CURSOR",
|
|
599
|
-
transformationPaths: {}
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
async function countBookingPolicies2(options) {
|
|
603
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
604
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
605
|
-
filter: options?.filter
|
|
606
|
-
});
|
|
607
|
-
const reqOpts = countBookingPolicies(payload);
|
|
608
|
-
sideEffects?.onSiteCall?.();
|
|
609
|
-
try {
|
|
610
|
-
const result = await httpClient.request(reqOpts);
|
|
611
|
-
sideEffects?.onSuccess?.(result);
|
|
612
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
613
|
-
} catch (err) {
|
|
614
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
615
|
-
err,
|
|
616
|
-
{
|
|
617
|
-
spreadPathsToArguments: {},
|
|
618
|
-
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
619
|
-
singleArgumentUnchanged: false
|
|
620
|
-
},
|
|
621
|
-
["options"]
|
|
622
|
-
);
|
|
623
|
-
sideEffects?.onError?.(err);
|
|
624
|
-
throw transformedError;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// src/bookings-v1-booking-policy-booking-policies.public.ts
|
|
629
|
-
function createBookingPolicy3(httpClient) {
|
|
630
|
-
return (bookingPolicy) => createBookingPolicy2(
|
|
631
|
-
bookingPolicy,
|
|
632
|
-
// @ts-ignore
|
|
633
|
-
{ httpClient }
|
|
634
|
-
);
|
|
635
|
-
}
|
|
636
|
-
function getBookingPolicy3(httpClient) {
|
|
637
|
-
return (bookingPolicyId) => getBookingPolicy2(
|
|
638
|
-
bookingPolicyId,
|
|
639
|
-
// @ts-ignore
|
|
640
|
-
{ httpClient }
|
|
641
|
-
);
|
|
642
|
-
}
|
|
643
|
-
function getStrictestBookingPolicy3(httpClient) {
|
|
644
|
-
return (bookingPolicyIds) => getStrictestBookingPolicy2(
|
|
645
|
-
bookingPolicyIds,
|
|
646
|
-
// @ts-ignore
|
|
647
|
-
{ httpClient }
|
|
648
|
-
);
|
|
649
|
-
}
|
|
650
|
-
function updateBookingPolicy3(httpClient) {
|
|
651
|
-
return (_id, bookingPolicy) => updateBookingPolicy2(
|
|
652
|
-
_id,
|
|
653
|
-
bookingPolicy,
|
|
654
|
-
// @ts-ignore
|
|
655
|
-
{ httpClient }
|
|
656
|
-
);
|
|
657
|
-
}
|
|
658
|
-
function setDefaultBookingPolicy3(httpClient) {
|
|
659
|
-
return (bookingPolicyId) => setDefaultBookingPolicy2(
|
|
660
|
-
bookingPolicyId,
|
|
661
|
-
// @ts-ignore
|
|
662
|
-
{ httpClient }
|
|
663
|
-
);
|
|
664
|
-
}
|
|
665
|
-
function deleteBookingPolicy3(httpClient) {
|
|
666
|
-
return (bookingPolicyId) => deleteBookingPolicy2(
|
|
667
|
-
bookingPolicyId,
|
|
668
|
-
// @ts-ignore
|
|
669
|
-
{ httpClient }
|
|
670
|
-
);
|
|
671
|
-
}
|
|
672
|
-
function queryBookingPolicies3(httpClient) {
|
|
673
|
-
return () => queryBookingPolicies2(
|
|
674
|
-
// @ts-ignore
|
|
675
|
-
{ httpClient }
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
function countBookingPolicies3(httpClient) {
|
|
679
|
-
return (options) => countBookingPolicies2(
|
|
680
|
-
options,
|
|
681
|
-
// @ts-ignore
|
|
682
|
-
{ httpClient }
|
|
683
|
-
);
|
|
684
|
-
}
|
|
685
|
-
var onBookingPolicyCreated = (0, import_sdk_types.EventDefinition)(
|
|
686
|
-
"wix.bookings.v1.booking_policy_created",
|
|
687
|
-
true,
|
|
688
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
689
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
690
|
-
{
|
|
691
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
692
|
-
paths: [
|
|
693
|
-
{ path: "entity.createdDate" },
|
|
694
|
-
{ path: "entity.updatedDate" },
|
|
695
|
-
{ path: "metadata.eventTime" }
|
|
696
|
-
]
|
|
697
|
-
}
|
|
698
|
-
])
|
|
699
|
-
)
|
|
700
|
-
)();
|
|
701
|
-
var onBookingPolicyDefaultBookingPolicySet = (0, import_sdk_types.EventDefinition)(
|
|
702
|
-
"wix.bookings.v1.booking_policy_default_booking_policy_set",
|
|
703
|
-
true,
|
|
704
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
705
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
706
|
-
{
|
|
707
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
708
|
-
paths: [
|
|
709
|
-
{ path: "data.currentDefaultBookingPolicy.createdDate" },
|
|
710
|
-
{ path: "data.currentDefaultBookingPolicy.updatedDate" },
|
|
711
|
-
{ path: "data.previousDefaultBookingPolicy.createdDate" },
|
|
712
|
-
{ path: "data.previousDefaultBookingPolicy.updatedDate" },
|
|
713
|
-
{ path: "metadata.eventTime" }
|
|
714
|
-
]
|
|
715
|
-
}
|
|
716
|
-
])
|
|
717
|
-
)
|
|
718
|
-
)();
|
|
719
|
-
var onBookingPolicyDeleted = (0, import_sdk_types.EventDefinition)(
|
|
720
|
-
"wix.bookings.v1.booking_policy_deleted",
|
|
721
|
-
true,
|
|
722
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
723
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
724
|
-
{
|
|
725
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
726
|
-
paths: [
|
|
727
|
-
{ path: "undefined.createdDate" },
|
|
728
|
-
{ path: "undefined.updatedDate" },
|
|
729
|
-
{ path: "metadata.eventTime" }
|
|
730
|
-
]
|
|
731
|
-
}
|
|
732
|
-
])
|
|
733
|
-
)
|
|
734
|
-
)();
|
|
735
|
-
var onBookingPolicyUpdated = (0, import_sdk_types.EventDefinition)(
|
|
736
|
-
"wix.bookings.v1.booking_policy_updated",
|
|
737
|
-
true,
|
|
738
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
739
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
740
|
-
{
|
|
741
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
742
|
-
paths: [
|
|
743
|
-
{ path: "entity.createdDate" },
|
|
744
|
-
{ path: "entity.updatedDate" },
|
|
745
|
-
{ path: "metadata.eventTime" }
|
|
746
|
-
]
|
|
747
|
-
}
|
|
748
|
-
])
|
|
749
|
-
)
|
|
750
|
-
)();
|
|
751
|
-
|
|
752
|
-
// src/bookings-v1-booking-policy-booking-policies.context.ts
|
|
753
|
-
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
754
|
-
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
755
|
-
var createBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createBookingPolicy3);
|
|
756
|
-
var getBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBookingPolicy3);
|
|
757
|
-
var getStrictestBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getStrictestBookingPolicy3);
|
|
758
|
-
var updateBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateBookingPolicy3);
|
|
759
|
-
var setDefaultBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setDefaultBookingPolicy3);
|
|
760
|
-
var deleteBookingPolicy4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteBookingPolicy3);
|
|
761
|
-
var queryBookingPolicies4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryBookingPolicies3);
|
|
762
|
-
var countBookingPolicies4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(countBookingPolicies3);
|
|
763
|
-
var onBookingPolicyCreated2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyCreated);
|
|
764
|
-
var onBookingPolicyDefaultBookingPolicySet2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyDefaultBookingPolicySet);
|
|
765
|
-
var onBookingPolicyDeleted2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyDeleted);
|
|
766
|
-
var onBookingPolicyUpdated2 = (0, import_event_definition_modules.createEventModule)(onBookingPolicyUpdated);
|
|
767
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
768
|
-
0 && (module.exports = {
|
|
769
|
-
DayOfWeek,
|
|
770
|
-
DeleteStatus,
|
|
771
|
-
Namespace,
|
|
772
|
-
PlacementType,
|
|
773
|
-
ResolutionMethod,
|
|
774
|
-
SiteCreatedContext,
|
|
775
|
-
SortOrder,
|
|
776
|
-
State,
|
|
777
|
-
WebhookIdentityType,
|
|
778
|
-
countBookingPolicies,
|
|
779
|
-
createBookingPolicy,
|
|
780
|
-
deleteBookingPolicy,
|
|
781
|
-
getBookingPolicy,
|
|
782
|
-
getStrictestBookingPolicy,
|
|
783
|
-
onBookingPolicyCreated,
|
|
784
|
-
onBookingPolicyDefaultBookingPolicySet,
|
|
785
|
-
onBookingPolicyDeleted,
|
|
786
|
-
onBookingPolicyUpdated,
|
|
787
|
-
queryBookingPolicies,
|
|
788
|
-
setDefaultBookingPolicy,
|
|
789
|
-
updateBookingPolicy
|
|
790
|
-
});
|
|
791
|
-
//# sourceMappingURL=index.js.map
|