@wix/auto_sdk_calendar_schedules 1.0.54 → 1.0.55
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 +15 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{calendar-v3-schedule-schedules.universal-Cy_4Hg5X.d.ts → index.typings.d.ts} +213 -1
- package/build/cjs/index.typings.js +570 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +15 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/{calendar-v3-schedule-schedules.universal-Cy_4Hg5X.d.mts → index.typings.d.mts} +213 -1
- package/build/es/index.typings.mjs +527 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +15 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{calendar-v3-schedule-schedules.universal-Cy_4Hg5X.d.ts → index.typings.d.ts} +213 -1
- package/build/internal/cjs/index.typings.js +570 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +15 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{calendar-v3-schedule-schedules.universal-Cy_4Hg5X.d.mts → index.typings.d.mts} +213 -1
- package/build/internal/es/index.typings.mjs +527 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +3 -3
|
@@ -0,0 +1,570 @@
|
|
|
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.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
DayOfWeek: () => DayOfWeek,
|
|
24
|
+
DeleteStatus: () => DeleteStatus,
|
|
25
|
+
IdentityType: () => IdentityType,
|
|
26
|
+
LocationType: () => LocationType,
|
|
27
|
+
Namespace: () => Namespace,
|
|
28
|
+
PlacementType: () => PlacementType,
|
|
29
|
+
RequestedFields: () => RequestedFields,
|
|
30
|
+
ResolutionMethod: () => ResolutionMethod,
|
|
31
|
+
Role: () => Role,
|
|
32
|
+
SiteCreatedContext: () => SiteCreatedContext,
|
|
33
|
+
State: () => State,
|
|
34
|
+
Status: () => Status,
|
|
35
|
+
Trigger: () => Trigger,
|
|
36
|
+
Type: () => Type,
|
|
37
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
38
|
+
cancelSchedule: () => cancelSchedule2,
|
|
39
|
+
createSchedule: () => createSchedule2,
|
|
40
|
+
getSchedule: () => getSchedule2,
|
|
41
|
+
querySchedules: () => querySchedules2,
|
|
42
|
+
updateSchedule: () => updateSchedule2
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
45
|
+
|
|
46
|
+
// src/calendar-v3-schedule-schedules.universal.ts
|
|
47
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
48
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
49
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
50
|
+
|
|
51
|
+
// src/calendar-v3-schedule-schedules.http.ts
|
|
52
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
53
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
54
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
55
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
56
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
57
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
58
|
+
function resolveWixCalendarSchedulesV3SchedulesServiceUrl(opts) {
|
|
59
|
+
const domainToMappings = {
|
|
60
|
+
"api._api_base_domain_": [
|
|
61
|
+
{
|
|
62
|
+
srcPath: "/schedules-3",
|
|
63
|
+
destPath: ""
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"manage._base_domain_": [
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/_api/calendar/v3/schedules",
|
|
69
|
+
destPath: "/v3/schedules"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"www.wixapis.com": [
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/calendar/v3/schedules",
|
|
75
|
+
destPath: "/v3/schedules"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
_: [
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/calendar/v3/schedules",
|
|
81
|
+
destPath: "/v3/schedules"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"*.dev.wix-code.com": [
|
|
85
|
+
{
|
|
86
|
+
srcPath: "/_api/calendar/v3/schedules",
|
|
87
|
+
destPath: "/v3/schedules"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
92
|
+
}
|
|
93
|
+
var PACKAGE_NAME = "@wix/auto_sdk_calendar_schedules";
|
|
94
|
+
function getSchedule(payload) {
|
|
95
|
+
function __getSchedule({ host }) {
|
|
96
|
+
const metadata = {
|
|
97
|
+
entityFqdn: "wix.calendar.v3.schedule",
|
|
98
|
+
method: "GET",
|
|
99
|
+
methodFqn: "wix.calendar.schedules.v3.SchedulesService.GetSchedule",
|
|
100
|
+
packageName: PACKAGE_NAME,
|
|
101
|
+
url: resolveWixCalendarSchedulesV3SchedulesServiceUrl({
|
|
102
|
+
protoPath: "/v3/schedules/{scheduleId}",
|
|
103
|
+
data: payload,
|
|
104
|
+
host
|
|
105
|
+
}),
|
|
106
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
107
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
108
|
+
{
|
|
109
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
110
|
+
paths: [
|
|
111
|
+
{ path: "schedule.createdDate" },
|
|
112
|
+
{ path: "schedule.updatedDate" }
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
])
|
|
116
|
+
};
|
|
117
|
+
return metadata;
|
|
118
|
+
}
|
|
119
|
+
return __getSchedule;
|
|
120
|
+
}
|
|
121
|
+
function querySchedules(payload) {
|
|
122
|
+
function __querySchedules({ host }) {
|
|
123
|
+
const metadata = {
|
|
124
|
+
entityFqdn: "wix.calendar.v3.schedule",
|
|
125
|
+
method: "POST",
|
|
126
|
+
methodFqn: "wix.calendar.schedules.v3.SchedulesService.QuerySchedules",
|
|
127
|
+
packageName: PACKAGE_NAME,
|
|
128
|
+
url: resolveWixCalendarSchedulesV3SchedulesServiceUrl({
|
|
129
|
+
protoPath: "/v3/schedules/query",
|
|
130
|
+
data: payload,
|
|
131
|
+
host
|
|
132
|
+
}),
|
|
133
|
+
data: payload,
|
|
134
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
135
|
+
{
|
|
136
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
137
|
+
paths: [
|
|
138
|
+
{ path: "schedules.createdDate" },
|
|
139
|
+
{ path: "schedules.updatedDate" }
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
])
|
|
143
|
+
};
|
|
144
|
+
return metadata;
|
|
145
|
+
}
|
|
146
|
+
return __querySchedules;
|
|
147
|
+
}
|
|
148
|
+
function createSchedule(payload) {
|
|
149
|
+
function __createSchedule({ host }) {
|
|
150
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
151
|
+
{
|
|
152
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
153
|
+
paths: [
|
|
154
|
+
{ path: "schedule.createdDate" },
|
|
155
|
+
{ path: "schedule.updatedDate" }
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
]);
|
|
159
|
+
const metadata = {
|
|
160
|
+
entityFqdn: "wix.calendar.v3.schedule",
|
|
161
|
+
method: "POST",
|
|
162
|
+
methodFqn: "wix.calendar.schedules.v3.SchedulesService.CreateSchedule",
|
|
163
|
+
packageName: PACKAGE_NAME,
|
|
164
|
+
url: resolveWixCalendarSchedulesV3SchedulesServiceUrl({
|
|
165
|
+
protoPath: "/v3/schedules",
|
|
166
|
+
data: serializedData,
|
|
167
|
+
host
|
|
168
|
+
}),
|
|
169
|
+
data: serializedData,
|
|
170
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
171
|
+
{
|
|
172
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
173
|
+
paths: [
|
|
174
|
+
{ path: "schedule.createdDate" },
|
|
175
|
+
{ path: "schedule.updatedDate" }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
])
|
|
179
|
+
};
|
|
180
|
+
return metadata;
|
|
181
|
+
}
|
|
182
|
+
return __createSchedule;
|
|
183
|
+
}
|
|
184
|
+
function updateSchedule(payload) {
|
|
185
|
+
function __updateSchedule({ host }) {
|
|
186
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
187
|
+
{
|
|
188
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
189
|
+
paths: [{ path: "fieldmask" }]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
193
|
+
paths: [
|
|
194
|
+
{ path: "schedule.createdDate" },
|
|
195
|
+
{ path: "schedule.updatedDate" }
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
]);
|
|
199
|
+
const metadata = {
|
|
200
|
+
entityFqdn: "wix.calendar.v3.schedule",
|
|
201
|
+
method: "PATCH",
|
|
202
|
+
methodFqn: "wix.calendar.schedules.v3.SchedulesService.UpdateSchedule",
|
|
203
|
+
packageName: PACKAGE_NAME,
|
|
204
|
+
url: resolveWixCalendarSchedulesV3SchedulesServiceUrl({
|
|
205
|
+
protoPath: "/v3/schedules/{schedule.id}",
|
|
206
|
+
data: serializedData,
|
|
207
|
+
host
|
|
208
|
+
}),
|
|
209
|
+
data: serializedData,
|
|
210
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
211
|
+
{
|
|
212
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
213
|
+
paths: [
|
|
214
|
+
{ path: "schedule.createdDate" },
|
|
215
|
+
{ path: "schedule.updatedDate" }
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
])
|
|
219
|
+
};
|
|
220
|
+
return metadata;
|
|
221
|
+
}
|
|
222
|
+
return __updateSchedule;
|
|
223
|
+
}
|
|
224
|
+
function cancelSchedule(payload) {
|
|
225
|
+
function __cancelSchedule({ host }) {
|
|
226
|
+
const metadata = {
|
|
227
|
+
entityFqdn: "wix.calendar.v3.schedule",
|
|
228
|
+
method: "POST",
|
|
229
|
+
methodFqn: "wix.calendar.schedules.v3.SchedulesService.CancelSchedule",
|
|
230
|
+
packageName: PACKAGE_NAME,
|
|
231
|
+
url: resolveWixCalendarSchedulesV3SchedulesServiceUrl({
|
|
232
|
+
protoPath: "/v3/schedules/{scheduleId}/cancel",
|
|
233
|
+
data: payload,
|
|
234
|
+
host
|
|
235
|
+
}),
|
|
236
|
+
data: payload,
|
|
237
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
238
|
+
{
|
|
239
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
240
|
+
paths: [
|
|
241
|
+
{ path: "schedule.createdDate" },
|
|
242
|
+
{ path: "schedule.updatedDate" }
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
])
|
|
246
|
+
};
|
|
247
|
+
return metadata;
|
|
248
|
+
}
|
|
249
|
+
return __cancelSchedule;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/calendar-v3-schedule-schedules.universal.ts
|
|
253
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
254
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
255
|
+
Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
256
|
+
Status2["ACTIVE"] = "ACTIVE";
|
|
257
|
+
Status2["CANCELLED"] = "CANCELLED";
|
|
258
|
+
return Status2;
|
|
259
|
+
})(Status || {});
|
|
260
|
+
var LocationType = /* @__PURE__ */ ((LocationType2) => {
|
|
261
|
+
LocationType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
262
|
+
LocationType2["BUSINESS"] = "BUSINESS";
|
|
263
|
+
LocationType2["CUSTOMER"] = "CUSTOMER";
|
|
264
|
+
LocationType2["CUSTOM"] = "CUSTOM";
|
|
265
|
+
return LocationType2;
|
|
266
|
+
})(LocationType || {});
|
|
267
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
268
|
+
Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
269
|
+
Type2["ZOOM"] = "ZOOM";
|
|
270
|
+
Type2["CUSTOM"] = "CUSTOM";
|
|
271
|
+
return Type2;
|
|
272
|
+
})(Type || {});
|
|
273
|
+
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
274
|
+
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
275
|
+
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
276
|
+
return IdentityType2;
|
|
277
|
+
})(IdentityType || {});
|
|
278
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
279
|
+
Role2["UNKNOWN_ROLE"] = "UNKNOWN_ROLE";
|
|
280
|
+
Role2["WRITER"] = "WRITER";
|
|
281
|
+
Role2["COMMENTER"] = "COMMENTER";
|
|
282
|
+
return Role2;
|
|
283
|
+
})(Role || {});
|
|
284
|
+
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
285
|
+
RequestedFields2["UNKNOWN_REQUESTED_FIELDS"] = "UNKNOWN_REQUESTED_FIELDS";
|
|
286
|
+
RequestedFields2["PI_FIELDS"] = "PI_FIELDS";
|
|
287
|
+
RequestedFields2["OWN_PI_FIELDS"] = "OWN_PI_FIELDS";
|
|
288
|
+
return RequestedFields2;
|
|
289
|
+
})(RequestedFields || {});
|
|
290
|
+
var Trigger = /* @__PURE__ */ ((Trigger2) => {
|
|
291
|
+
Trigger2["SCHEDULE_CLONED"] = "SCHEDULE_CLONED";
|
|
292
|
+
Trigger2["SITE_DUPLICATED_FROM_SAME_ACCOUNT"] = "SITE_DUPLICATED_FROM_SAME_ACCOUNT";
|
|
293
|
+
Trigger2["SITE_DUPLICATED_FROM_DIFFERENT_ACCOUNT"] = "SITE_DUPLICATED_FROM_DIFFERENT_ACCOUNT";
|
|
294
|
+
Trigger2["SITE_CREATED_FROM_TEMPLATE"] = "SITE_CREATED_FROM_TEMPLATE";
|
|
295
|
+
Trigger2["OTHER"] = "OTHER";
|
|
296
|
+
return Trigger2;
|
|
297
|
+
})(Trigger || {});
|
|
298
|
+
var State = /* @__PURE__ */ ((State2) => {
|
|
299
|
+
State2["UNKNOWN"] = "UNKNOWN";
|
|
300
|
+
State2["ENABLED"] = "ENABLED";
|
|
301
|
+
State2["DISABLED"] = "DISABLED";
|
|
302
|
+
State2["PENDING"] = "PENDING";
|
|
303
|
+
State2["DEMO"] = "DEMO";
|
|
304
|
+
return State2;
|
|
305
|
+
})(State || {});
|
|
306
|
+
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
307
|
+
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
308
|
+
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
309
|
+
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
310
|
+
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
311
|
+
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
312
|
+
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
313
|
+
return SiteCreatedContext2;
|
|
314
|
+
})(SiteCreatedContext || {});
|
|
315
|
+
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
316
|
+
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
317
|
+
Namespace2["WIX"] = "WIX";
|
|
318
|
+
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
319
|
+
Namespace2["ALBUMS"] = "ALBUMS";
|
|
320
|
+
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
321
|
+
Namespace2["HOTELS"] = "HOTELS";
|
|
322
|
+
Namespace2["CLUBS"] = "CLUBS";
|
|
323
|
+
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
324
|
+
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
325
|
+
Namespace2["LOGOS"] = "LOGOS";
|
|
326
|
+
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
327
|
+
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
328
|
+
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
329
|
+
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
330
|
+
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
331
|
+
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
332
|
+
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
333
|
+
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
334
|
+
Namespace2["HEADLESS"] = "HEADLESS";
|
|
335
|
+
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
336
|
+
Namespace2["RISE"] = "RISE";
|
|
337
|
+
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
338
|
+
Namespace2["NOWNIA"] = "NOWNIA";
|
|
339
|
+
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
340
|
+
Namespace2["CODUX"] = "CODUX";
|
|
341
|
+
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
342
|
+
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
343
|
+
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
344
|
+
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
345
|
+
Namespace2["MIMIR"] = "MIMIR";
|
|
346
|
+
return Namespace2;
|
|
347
|
+
})(Namespace || {});
|
|
348
|
+
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
349
|
+
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
350
|
+
DeleteStatus2["TRASH"] = "TRASH";
|
|
351
|
+
DeleteStatus2["DELETED"] = "DELETED";
|
|
352
|
+
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
353
|
+
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
354
|
+
return DeleteStatus2;
|
|
355
|
+
})(DeleteStatus || {});
|
|
356
|
+
var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
|
|
357
|
+
PlacementType2["BEFORE"] = "BEFORE";
|
|
358
|
+
PlacementType2["AFTER"] = "AFTER";
|
|
359
|
+
PlacementType2["REPLACE"] = "REPLACE";
|
|
360
|
+
return PlacementType2;
|
|
361
|
+
})(PlacementType || {});
|
|
362
|
+
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
363
|
+
DayOfWeek2["MONDAY"] = "MONDAY";
|
|
364
|
+
DayOfWeek2["TUESDAY"] = "TUESDAY";
|
|
365
|
+
DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
|
|
366
|
+
DayOfWeek2["THURSDAY"] = "THURSDAY";
|
|
367
|
+
DayOfWeek2["FRIDAY"] = "FRIDAY";
|
|
368
|
+
DayOfWeek2["SATURDAY"] = "SATURDAY";
|
|
369
|
+
DayOfWeek2["SUNDAY"] = "SUNDAY";
|
|
370
|
+
return DayOfWeek2;
|
|
371
|
+
})(DayOfWeek || {});
|
|
372
|
+
var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
|
|
373
|
+
ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
374
|
+
ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
375
|
+
ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
376
|
+
return ResolutionMethod2;
|
|
377
|
+
})(ResolutionMethod || {});
|
|
378
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
379
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
380
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
381
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
382
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
383
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
384
|
+
return WebhookIdentityType2;
|
|
385
|
+
})(WebhookIdentityType || {});
|
|
386
|
+
async function getSchedule2(scheduleId, options) {
|
|
387
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
388
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
389
|
+
scheduleId,
|
|
390
|
+
fields: options?.fields
|
|
391
|
+
});
|
|
392
|
+
const reqOpts = getSchedule(payload);
|
|
393
|
+
sideEffects?.onSiteCall?.();
|
|
394
|
+
try {
|
|
395
|
+
const result = await httpClient.request(reqOpts);
|
|
396
|
+
sideEffects?.onSuccess?.(result);
|
|
397
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.schedule;
|
|
398
|
+
} catch (err) {
|
|
399
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
400
|
+
err,
|
|
401
|
+
{
|
|
402
|
+
spreadPathsToArguments: {},
|
|
403
|
+
explicitPathsToArguments: { scheduleId: "$[0]", fields: "$[1].fields" },
|
|
404
|
+
singleArgumentUnchanged: false
|
|
405
|
+
},
|
|
406
|
+
["scheduleId", "options"]
|
|
407
|
+
);
|
|
408
|
+
sideEffects?.onError?.(err);
|
|
409
|
+
throw transformedError;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function querySchedules2(options) {
|
|
413
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
414
|
+
return (0, import_query_builder.queryBuilder)({
|
|
415
|
+
func: async (payload) => {
|
|
416
|
+
const reqOpts = querySchedules({
|
|
417
|
+
...payload,
|
|
418
|
+
...options ?? {}
|
|
419
|
+
});
|
|
420
|
+
sideEffects?.onSiteCall?.();
|
|
421
|
+
try {
|
|
422
|
+
const result = await httpClient.request(reqOpts);
|
|
423
|
+
sideEffects?.onSuccess?.(result);
|
|
424
|
+
return result;
|
|
425
|
+
} catch (err) {
|
|
426
|
+
sideEffects?.onError?.(err);
|
|
427
|
+
throw err;
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
requestTransformer: (query) => {
|
|
431
|
+
const args = [query, options];
|
|
432
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
433
|
+
...args?.[1],
|
|
434
|
+
query: args?.[0]
|
|
435
|
+
});
|
|
436
|
+
},
|
|
437
|
+
responseTransformer: ({ data }) => {
|
|
438
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
439
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
440
|
+
);
|
|
441
|
+
return {
|
|
442
|
+
items: transformedData?.schedules,
|
|
443
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
444
|
+
};
|
|
445
|
+
},
|
|
446
|
+
errorTransformer: (err) => {
|
|
447
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
448
|
+
spreadPathsToArguments: {},
|
|
449
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
450
|
+
singleArgumentUnchanged: false
|
|
451
|
+
});
|
|
452
|
+
throw transformedError;
|
|
453
|
+
},
|
|
454
|
+
pagingMethod: "CURSOR",
|
|
455
|
+
transformationPaths: {}
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
async function createSchedule2(schedule, options) {
|
|
459
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
460
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
461
|
+
schedule,
|
|
462
|
+
idempotencyKey: options?.idempotencyKey
|
|
463
|
+
});
|
|
464
|
+
const reqOpts = createSchedule(payload);
|
|
465
|
+
sideEffects?.onSiteCall?.();
|
|
466
|
+
try {
|
|
467
|
+
const result = await httpClient.request(reqOpts);
|
|
468
|
+
sideEffects?.onSuccess?.(result);
|
|
469
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.schedule;
|
|
470
|
+
} catch (err) {
|
|
471
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
472
|
+
err,
|
|
473
|
+
{
|
|
474
|
+
spreadPathsToArguments: {},
|
|
475
|
+
explicitPathsToArguments: {
|
|
476
|
+
schedule: "$[0]",
|
|
477
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
478
|
+
},
|
|
479
|
+
singleArgumentUnchanged: false
|
|
480
|
+
},
|
|
481
|
+
["schedule", "options"]
|
|
482
|
+
);
|
|
483
|
+
sideEffects?.onError?.(err);
|
|
484
|
+
throw transformedError;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
async function updateSchedule2(_id, schedule, options) {
|
|
488
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
489
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
490
|
+
schedule: { ...schedule, id: _id },
|
|
491
|
+
participantNotification: options?.participantNotification
|
|
492
|
+
});
|
|
493
|
+
const reqOpts = updateSchedule(payload);
|
|
494
|
+
sideEffects?.onSiteCall?.();
|
|
495
|
+
try {
|
|
496
|
+
const result = await httpClient.request(reqOpts);
|
|
497
|
+
sideEffects?.onSuccess?.(result);
|
|
498
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.schedule;
|
|
499
|
+
} catch (err) {
|
|
500
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
501
|
+
err,
|
|
502
|
+
{
|
|
503
|
+
spreadPathsToArguments: { schedule: "$[1]" },
|
|
504
|
+
explicitPathsToArguments: {
|
|
505
|
+
"schedule.id": "$[0]",
|
|
506
|
+
participantNotification: "$[2].participantNotification"
|
|
507
|
+
},
|
|
508
|
+
singleArgumentUnchanged: false
|
|
509
|
+
},
|
|
510
|
+
["_id", "schedule", "options"]
|
|
511
|
+
);
|
|
512
|
+
sideEffects?.onError?.(err);
|
|
513
|
+
throw transformedError;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
async function cancelSchedule2(scheduleId, options) {
|
|
517
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
518
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
519
|
+
scheduleId,
|
|
520
|
+
preserveFutureEventsWithParticipants: options?.preserveFutureEventsWithParticipants,
|
|
521
|
+
participantNotification: options?.participantNotification
|
|
522
|
+
});
|
|
523
|
+
const reqOpts = cancelSchedule(payload);
|
|
524
|
+
sideEffects?.onSiteCall?.();
|
|
525
|
+
try {
|
|
526
|
+
const result = await httpClient.request(reqOpts);
|
|
527
|
+
sideEffects?.onSuccess?.(result);
|
|
528
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
529
|
+
} catch (err) {
|
|
530
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
531
|
+
err,
|
|
532
|
+
{
|
|
533
|
+
spreadPathsToArguments: {},
|
|
534
|
+
explicitPathsToArguments: {
|
|
535
|
+
scheduleId: "$[0]",
|
|
536
|
+
preserveFutureEventsWithParticipants: "$[1].preserveFutureEventsWithParticipants",
|
|
537
|
+
participantNotification: "$[1].participantNotification"
|
|
538
|
+
},
|
|
539
|
+
singleArgumentUnchanged: false
|
|
540
|
+
},
|
|
541
|
+
["scheduleId", "options"]
|
|
542
|
+
);
|
|
543
|
+
sideEffects?.onError?.(err);
|
|
544
|
+
throw transformedError;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
548
|
+
0 && (module.exports = {
|
|
549
|
+
DayOfWeek,
|
|
550
|
+
DeleteStatus,
|
|
551
|
+
IdentityType,
|
|
552
|
+
LocationType,
|
|
553
|
+
Namespace,
|
|
554
|
+
PlacementType,
|
|
555
|
+
RequestedFields,
|
|
556
|
+
ResolutionMethod,
|
|
557
|
+
Role,
|
|
558
|
+
SiteCreatedContext,
|
|
559
|
+
State,
|
|
560
|
+
Status,
|
|
561
|
+
Trigger,
|
|
562
|
+
Type,
|
|
563
|
+
WebhookIdentityType,
|
|
564
|
+
cancelSchedule,
|
|
565
|
+
createSchedule,
|
|
566
|
+
getSchedule,
|
|
567
|
+
querySchedules,
|
|
568
|
+
updateSchedule
|
|
569
|
+
});
|
|
570
|
+
//# sourceMappingURL=index.typings.js.map
|