@wix/auto_sdk_calendar_participations 1.0.49 → 1.0.50
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/package.json +4 -11
- package/build/cjs/schemas.d.ts +0 -237
- package/build/cjs/schemas.js +0 -556
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -237
- package/build/es/schemas.mjs +0 -510
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -601
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -466
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -373
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -237
- package/build/internal/cjs/schemas.js +0 -556
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -563
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -430
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -336
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -237
- package/build/internal/es/schemas.mjs +0 -510
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
|
@@ -1,601 +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
|
-
AggregationType: () => AggregationType,
|
|
24
|
-
Mode: () => Mode,
|
|
25
|
-
ScalarType: () => ScalarType,
|
|
26
|
-
SortOrder: () => SortOrder,
|
|
27
|
-
Status: () => Status,
|
|
28
|
-
WebhookIdentityType: () => WebhookIdentityType,
|
|
29
|
-
createParticipation: () => createParticipation4,
|
|
30
|
-
deleteParticipation: () => deleteParticipation4,
|
|
31
|
-
getParticipation: () => getParticipation4,
|
|
32
|
-
onParticipationCreated: () => onParticipationCreated2,
|
|
33
|
-
onParticipationDeleted: () => onParticipationDeleted2,
|
|
34
|
-
onParticipationUpdated: () => onParticipationUpdated2,
|
|
35
|
-
queryParticipations: () => queryParticipations4,
|
|
36
|
-
updateParticipation: () => updateParticipation4,
|
|
37
|
-
utils: () => utils
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(index_exports);
|
|
40
|
-
|
|
41
|
-
// src/calendar-v3-participation-participations.public.ts
|
|
42
|
-
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
43
|
-
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
44
|
-
var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
45
|
-
var import_sdk_types = require("@wix/sdk-types");
|
|
46
|
-
|
|
47
|
-
// src/calendar-v3-participation-participations.universal.ts
|
|
48
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
49
|
-
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
50
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
51
|
-
|
|
52
|
-
// src/calendar-v3-participation-participations.http.ts
|
|
53
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
54
|
-
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
55
|
-
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
56
|
-
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
57
|
-
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
58
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
59
|
-
function resolveWixCalendarParticipationsV3ParticipationsServiceUrl(opts) {
|
|
60
|
-
const domainToMappings = {
|
|
61
|
-
"manage._base_domain_": [
|
|
62
|
-
{
|
|
63
|
-
srcPath: "/_api/calendar/v3/participations",
|
|
64
|
-
destPath: "/v3/participations"
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"www.wixapis.com": [
|
|
68
|
-
{
|
|
69
|
-
srcPath: "/calendar/v3/participations",
|
|
70
|
-
destPath: "/v3/participations"
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
};
|
|
74
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
75
|
-
}
|
|
76
|
-
var PACKAGE_NAME = "@wix/auto_sdk_calendar_participations";
|
|
77
|
-
function getParticipation(payload) {
|
|
78
|
-
function __getParticipation({ host }) {
|
|
79
|
-
const metadata = {
|
|
80
|
-
entityFqdn: "wix.calendar.v3.participation",
|
|
81
|
-
method: "GET",
|
|
82
|
-
methodFqn: "wix.calendar.participations.v3.ParticipationsService.GetParticipation",
|
|
83
|
-
packageName: PACKAGE_NAME,
|
|
84
|
-
migrationOptions: {
|
|
85
|
-
optInTransformResponse: true
|
|
86
|
-
},
|
|
87
|
-
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
88
|
-
protoPath: "/v3/participations/{participationId}",
|
|
89
|
-
data: payload,
|
|
90
|
-
host
|
|
91
|
-
}),
|
|
92
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
93
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
94
|
-
{
|
|
95
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
96
|
-
paths: [
|
|
97
|
-
{ path: "participation.createdDate" },
|
|
98
|
-
{ path: "participation.updatedDate" }
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
])
|
|
102
|
-
};
|
|
103
|
-
return metadata;
|
|
104
|
-
}
|
|
105
|
-
return __getParticipation;
|
|
106
|
-
}
|
|
107
|
-
function queryParticipations(payload) {
|
|
108
|
-
function __queryParticipations({ host }) {
|
|
109
|
-
const metadata = {
|
|
110
|
-
entityFqdn: "wix.calendar.v3.participation",
|
|
111
|
-
method: "POST",
|
|
112
|
-
methodFqn: "wix.calendar.participations.v3.ParticipationsService.QueryParticipations",
|
|
113
|
-
packageName: PACKAGE_NAME,
|
|
114
|
-
migrationOptions: {
|
|
115
|
-
optInTransformResponse: true
|
|
116
|
-
},
|
|
117
|
-
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
118
|
-
protoPath: "/v3/participations/query",
|
|
119
|
-
data: payload,
|
|
120
|
-
host
|
|
121
|
-
}),
|
|
122
|
-
data: payload,
|
|
123
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
124
|
-
{
|
|
125
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
126
|
-
paths: [
|
|
127
|
-
{ path: "participations.createdDate" },
|
|
128
|
-
{ path: "participations.updatedDate" }
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
])
|
|
132
|
-
};
|
|
133
|
-
return metadata;
|
|
134
|
-
}
|
|
135
|
-
return __queryParticipations;
|
|
136
|
-
}
|
|
137
|
-
function createParticipation(payload) {
|
|
138
|
-
function __createParticipation({ host }) {
|
|
139
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
140
|
-
{
|
|
141
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
142
|
-
paths: [
|
|
143
|
-
{ path: "participation.createdDate" },
|
|
144
|
-
{ path: "participation.updatedDate" }
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
]);
|
|
148
|
-
const metadata = {
|
|
149
|
-
entityFqdn: "wix.calendar.v3.participation",
|
|
150
|
-
method: "POST",
|
|
151
|
-
methodFqn: "wix.calendar.participations.v3.ParticipationsService.CreateParticipation",
|
|
152
|
-
packageName: PACKAGE_NAME,
|
|
153
|
-
migrationOptions: {
|
|
154
|
-
optInTransformResponse: true
|
|
155
|
-
},
|
|
156
|
-
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
157
|
-
protoPath: "/v3/participations",
|
|
158
|
-
data: serializedData,
|
|
159
|
-
host
|
|
160
|
-
}),
|
|
161
|
-
data: serializedData,
|
|
162
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
163
|
-
{
|
|
164
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
165
|
-
paths: [
|
|
166
|
-
{ path: "participation.createdDate" },
|
|
167
|
-
{ path: "participation.updatedDate" }
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
])
|
|
171
|
-
};
|
|
172
|
-
return metadata;
|
|
173
|
-
}
|
|
174
|
-
return __createParticipation;
|
|
175
|
-
}
|
|
176
|
-
function updateParticipation(payload) {
|
|
177
|
-
function __updateParticipation({ host }) {
|
|
178
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
179
|
-
{
|
|
180
|
-
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
181
|
-
paths: [{ path: "fieldmask" }]
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
185
|
-
paths: [
|
|
186
|
-
{ path: "participation.createdDate" },
|
|
187
|
-
{ path: "participation.updatedDate" }
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
]);
|
|
191
|
-
const metadata = {
|
|
192
|
-
entityFqdn: "wix.calendar.v3.participation",
|
|
193
|
-
method: "PATCH",
|
|
194
|
-
methodFqn: "wix.calendar.participations.v3.ParticipationsService.UpdateParticipation",
|
|
195
|
-
packageName: PACKAGE_NAME,
|
|
196
|
-
migrationOptions: {
|
|
197
|
-
optInTransformResponse: true
|
|
198
|
-
},
|
|
199
|
-
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
200
|
-
protoPath: "/v3/participations/{participation.id}",
|
|
201
|
-
data: serializedData,
|
|
202
|
-
host
|
|
203
|
-
}),
|
|
204
|
-
data: serializedData,
|
|
205
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
206
|
-
{
|
|
207
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
208
|
-
paths: [
|
|
209
|
-
{ path: "participation.createdDate" },
|
|
210
|
-
{ path: "participation.updatedDate" }
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
])
|
|
214
|
-
};
|
|
215
|
-
return metadata;
|
|
216
|
-
}
|
|
217
|
-
return __updateParticipation;
|
|
218
|
-
}
|
|
219
|
-
function deleteParticipation(payload) {
|
|
220
|
-
function __deleteParticipation({ host }) {
|
|
221
|
-
const metadata = {
|
|
222
|
-
entityFqdn: "wix.calendar.v3.participation",
|
|
223
|
-
method: "DELETE",
|
|
224
|
-
methodFqn: "wix.calendar.participations.v3.ParticipationsService.DeleteParticipation",
|
|
225
|
-
packageName: PACKAGE_NAME,
|
|
226
|
-
migrationOptions: {
|
|
227
|
-
optInTransformResponse: true
|
|
228
|
-
},
|
|
229
|
-
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
230
|
-
protoPath: "/v3/participations/{participationId}",
|
|
231
|
-
data: payload,
|
|
232
|
-
host
|
|
233
|
-
}),
|
|
234
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
235
|
-
};
|
|
236
|
-
return metadata;
|
|
237
|
-
}
|
|
238
|
-
return __deleteParticipation;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// src/calendar-v3-participation-participations.universal.ts
|
|
242
|
-
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
243
|
-
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
244
|
-
var Status = /* @__PURE__ */ ((Status2) => {
|
|
245
|
-
Status2["CONFIRMED"] = "CONFIRMED";
|
|
246
|
-
Status2["PENDING_CONFIRMATION"] = "PENDING_CONFIRMATION";
|
|
247
|
-
return Status2;
|
|
248
|
-
})(Status || {});
|
|
249
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
250
|
-
SortOrder2["ASC"] = "ASC";
|
|
251
|
-
SortOrder2["DESC"] = "DESC";
|
|
252
|
-
return SortOrder2;
|
|
253
|
-
})(SortOrder || {});
|
|
254
|
-
var Mode = /* @__PURE__ */ ((Mode2) => {
|
|
255
|
-
Mode2["OR"] = "OR";
|
|
256
|
-
Mode2["AND"] = "AND";
|
|
257
|
-
return Mode2;
|
|
258
|
-
})(Mode || {});
|
|
259
|
-
var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
|
|
260
|
-
ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
|
|
261
|
-
ScalarType2["MIN"] = "MIN";
|
|
262
|
-
ScalarType2["MAX"] = "MAX";
|
|
263
|
-
ScalarType2["SUM"] = "SUM";
|
|
264
|
-
ScalarType2["AVG"] = "AVG";
|
|
265
|
-
return ScalarType2;
|
|
266
|
-
})(ScalarType || {});
|
|
267
|
-
var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
|
|
268
|
-
AggregationType2["VALUE"] = "VALUE";
|
|
269
|
-
AggregationType2["RANGE"] = "RANGE";
|
|
270
|
-
AggregationType2["SCALAR"] = "SCALAR";
|
|
271
|
-
AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
|
|
272
|
-
AggregationType2["NESTED"] = "NESTED";
|
|
273
|
-
AggregationType2["GEOTILE_GRID"] = "GEOTILE_GRID";
|
|
274
|
-
return AggregationType2;
|
|
275
|
-
})(AggregationType || {});
|
|
276
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
277
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
278
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
279
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
280
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
281
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
282
|
-
return WebhookIdentityType2;
|
|
283
|
-
})(WebhookIdentityType || {});
|
|
284
|
-
async function getParticipation2(participationId) {
|
|
285
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
286
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
287
|
-
participationId
|
|
288
|
-
});
|
|
289
|
-
const reqOpts = getParticipation(payload);
|
|
290
|
-
sideEffects?.onSiteCall?.();
|
|
291
|
-
try {
|
|
292
|
-
const result = await httpClient.request(reqOpts);
|
|
293
|
-
sideEffects?.onSuccess?.(result);
|
|
294
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
295
|
-
} catch (err) {
|
|
296
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
297
|
-
err,
|
|
298
|
-
{
|
|
299
|
-
spreadPathsToArguments: {},
|
|
300
|
-
explicitPathsToArguments: { participationId: "$[0]" },
|
|
301
|
-
singleArgumentUnchanged: false
|
|
302
|
-
},
|
|
303
|
-
["participationId"]
|
|
304
|
-
);
|
|
305
|
-
sideEffects?.onError?.(err);
|
|
306
|
-
throw transformedError;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
function queryParticipations2() {
|
|
310
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
311
|
-
return (0, import_query_builder.queryBuilder)({
|
|
312
|
-
func: async (payload) => {
|
|
313
|
-
const reqOpts = queryParticipations(payload);
|
|
314
|
-
sideEffects?.onSiteCall?.();
|
|
315
|
-
try {
|
|
316
|
-
const result = await httpClient.request(reqOpts);
|
|
317
|
-
sideEffects?.onSuccess?.(result);
|
|
318
|
-
return result;
|
|
319
|
-
} catch (err) {
|
|
320
|
-
sideEffects?.onError?.(err);
|
|
321
|
-
throw err;
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
requestTransformer: (query) => {
|
|
325
|
-
const args = [query, {}];
|
|
326
|
-
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
327
|
-
...args?.[1],
|
|
328
|
-
query: args?.[0]
|
|
329
|
-
});
|
|
330
|
-
},
|
|
331
|
-
responseTransformer: ({
|
|
332
|
-
data
|
|
333
|
-
}) => {
|
|
334
|
-
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
335
|
-
(0, import_transform_paths2.transformPaths)(data, [])
|
|
336
|
-
);
|
|
337
|
-
return {
|
|
338
|
-
items: transformedData?.participations,
|
|
339
|
-
pagingMetadata: transformedData?.pagingMetadata
|
|
340
|
-
};
|
|
341
|
-
},
|
|
342
|
-
errorTransformer: (err) => {
|
|
343
|
-
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
344
|
-
spreadPathsToArguments: {},
|
|
345
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
346
|
-
singleArgumentUnchanged: false
|
|
347
|
-
});
|
|
348
|
-
throw transformedError;
|
|
349
|
-
},
|
|
350
|
-
pagingMethod: "CURSOR",
|
|
351
|
-
transformationPaths: {}
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
async function typedQueryParticipations(query) {
|
|
355
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
356
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
357
|
-
const reqOpts = queryParticipations(payload);
|
|
358
|
-
sideEffects?.onSiteCall?.();
|
|
359
|
-
try {
|
|
360
|
-
const result = await httpClient.request(reqOpts);
|
|
361
|
-
sideEffects?.onSuccess?.(result);
|
|
362
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
363
|
-
} catch (err) {
|
|
364
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
365
|
-
err,
|
|
366
|
-
{
|
|
367
|
-
spreadPathsToArguments: {},
|
|
368
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
369
|
-
singleArgumentUnchanged: false
|
|
370
|
-
},
|
|
371
|
-
["query"]
|
|
372
|
-
);
|
|
373
|
-
sideEffects?.onError?.(err);
|
|
374
|
-
throw transformedError;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
var utils = {
|
|
378
|
-
query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
|
|
379
|
-
};
|
|
380
|
-
async function createParticipation2(participation, options) {
|
|
381
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
382
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
383
|
-
participation,
|
|
384
|
-
idempotencyKey: options?.idempotencyKey
|
|
385
|
-
});
|
|
386
|
-
const reqOpts = createParticipation(payload);
|
|
387
|
-
sideEffects?.onSiteCall?.();
|
|
388
|
-
try {
|
|
389
|
-
const result = await httpClient.request(reqOpts);
|
|
390
|
-
sideEffects?.onSuccess?.(result);
|
|
391
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
392
|
-
} catch (err) {
|
|
393
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
394
|
-
err,
|
|
395
|
-
{
|
|
396
|
-
spreadPathsToArguments: {},
|
|
397
|
-
explicitPathsToArguments: {
|
|
398
|
-
participation: "$[0]",
|
|
399
|
-
idempotencyKey: "$[1].idempotencyKey"
|
|
400
|
-
},
|
|
401
|
-
singleArgumentUnchanged: false
|
|
402
|
-
},
|
|
403
|
-
["participation", "options"]
|
|
404
|
-
);
|
|
405
|
-
sideEffects?.onError?.(err);
|
|
406
|
-
throw transformedError;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
async function updateParticipation2(_id, participation) {
|
|
410
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
411
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
412
|
-
participation: { ...participation, id: _id }
|
|
413
|
-
});
|
|
414
|
-
const reqOpts = updateParticipation(payload);
|
|
415
|
-
sideEffects?.onSiteCall?.();
|
|
416
|
-
try {
|
|
417
|
-
const result = await httpClient.request(reqOpts);
|
|
418
|
-
sideEffects?.onSuccess?.(result);
|
|
419
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
420
|
-
} catch (err) {
|
|
421
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
422
|
-
err,
|
|
423
|
-
{
|
|
424
|
-
spreadPathsToArguments: { participation: "$[1]" },
|
|
425
|
-
explicitPathsToArguments: { "participation.id": "$[0]" },
|
|
426
|
-
singleArgumentUnchanged: false
|
|
427
|
-
},
|
|
428
|
-
["_id", "participation"]
|
|
429
|
-
);
|
|
430
|
-
sideEffects?.onError?.(err);
|
|
431
|
-
throw transformedError;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
async function deleteParticipation2(participationId) {
|
|
435
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
436
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
437
|
-
participationId
|
|
438
|
-
});
|
|
439
|
-
const reqOpts = deleteParticipation(payload);
|
|
440
|
-
sideEffects?.onSiteCall?.();
|
|
441
|
-
try {
|
|
442
|
-
const result = await httpClient.request(reqOpts);
|
|
443
|
-
sideEffects?.onSuccess?.(result);
|
|
444
|
-
} catch (err) {
|
|
445
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
446
|
-
err,
|
|
447
|
-
{
|
|
448
|
-
spreadPathsToArguments: {},
|
|
449
|
-
explicitPathsToArguments: { participationId: "$[0]" },
|
|
450
|
-
singleArgumentUnchanged: false
|
|
451
|
-
},
|
|
452
|
-
["participationId"]
|
|
453
|
-
);
|
|
454
|
-
sideEffects?.onError?.(err);
|
|
455
|
-
throw transformedError;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
// src/calendar-v3-participation-participations.public.ts
|
|
460
|
-
function getParticipation3(httpClient) {
|
|
461
|
-
return (participationId) => getParticipation2(
|
|
462
|
-
participationId,
|
|
463
|
-
// @ts-ignore
|
|
464
|
-
{ httpClient }
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
function queryParticipations3(httpClient) {
|
|
468
|
-
return () => queryParticipations2(
|
|
469
|
-
// @ts-ignore
|
|
470
|
-
{ httpClient }
|
|
471
|
-
);
|
|
472
|
-
}
|
|
473
|
-
function typedQueryParticipations2(httpClient) {
|
|
474
|
-
return (query) => typedQueryParticipations(
|
|
475
|
-
query,
|
|
476
|
-
// @ts-ignore
|
|
477
|
-
{ httpClient }
|
|
478
|
-
);
|
|
479
|
-
}
|
|
480
|
-
function createParticipation3(httpClient) {
|
|
481
|
-
return (participation, options) => createParticipation2(
|
|
482
|
-
participation,
|
|
483
|
-
options,
|
|
484
|
-
// @ts-ignore
|
|
485
|
-
{ httpClient }
|
|
486
|
-
);
|
|
487
|
-
}
|
|
488
|
-
function updateParticipation3(httpClient) {
|
|
489
|
-
return (_id, participation) => updateParticipation2(
|
|
490
|
-
_id,
|
|
491
|
-
participation,
|
|
492
|
-
// @ts-ignore
|
|
493
|
-
{ httpClient }
|
|
494
|
-
);
|
|
495
|
-
}
|
|
496
|
-
function deleteParticipation3(httpClient) {
|
|
497
|
-
return (participationId) => deleteParticipation2(
|
|
498
|
-
participationId,
|
|
499
|
-
// @ts-ignore
|
|
500
|
-
{ httpClient }
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
var onParticipationCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
504
|
-
"wix.calendar.v3.participation_created",
|
|
505
|
-
true,
|
|
506
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
507
|
-
(0, import_transform_paths3.transformPaths)(event, [
|
|
508
|
-
{
|
|
509
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
510
|
-
paths: [
|
|
511
|
-
{ path: "entity.createdDate" },
|
|
512
|
-
{ path: "entity.updatedDate" },
|
|
513
|
-
{ path: "metadata.eventTime" }
|
|
514
|
-
]
|
|
515
|
-
}
|
|
516
|
-
])
|
|
517
|
-
)
|
|
518
|
-
)();
|
|
519
|
-
var onParticipationDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
520
|
-
"wix.calendar.v3.participation_deleted",
|
|
521
|
-
true,
|
|
522
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
523
|
-
(0, import_transform_paths3.transformPaths)(event, [
|
|
524
|
-
{
|
|
525
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
526
|
-
paths: [
|
|
527
|
-
{ path: "undefined.createdDate" },
|
|
528
|
-
{ path: "undefined.updatedDate" },
|
|
529
|
-
{ path: "metadata.eventTime" }
|
|
530
|
-
]
|
|
531
|
-
}
|
|
532
|
-
])
|
|
533
|
-
)
|
|
534
|
-
)();
|
|
535
|
-
var onParticipationUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
536
|
-
"wix.calendar.v3.participation_updated",
|
|
537
|
-
true,
|
|
538
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
539
|
-
(0, import_transform_paths3.transformPaths)(event, [
|
|
540
|
-
{
|
|
541
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
542
|
-
paths: [
|
|
543
|
-
{ path: "entity.createdDate" },
|
|
544
|
-
{ path: "entity.updatedDate" },
|
|
545
|
-
{ path: "metadata.eventTime" },
|
|
546
|
-
{ path: "modifiedFields.createdDate" },
|
|
547
|
-
{ path: "modifiedFields.updatedDate" }
|
|
548
|
-
]
|
|
549
|
-
}
|
|
550
|
-
])
|
|
551
|
-
)
|
|
552
|
-
)();
|
|
553
|
-
|
|
554
|
-
// src/calendar-v3-participation-participations.context.ts
|
|
555
|
-
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
556
|
-
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
557
|
-
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
558
|
-
function customQueryParticipations(httpClient) {
|
|
559
|
-
const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
|
|
560
|
-
builderQueryFunction: () => queryParticipations3(httpClient)(),
|
|
561
|
-
typedQueryFunction: (query) => typedQueryParticipations2(httpClient)(query),
|
|
562
|
-
hasOptionsParameter: false
|
|
563
|
-
});
|
|
564
|
-
function overloadedQuery(query) {
|
|
565
|
-
return router(...arguments);
|
|
566
|
-
}
|
|
567
|
-
return overloadedQuery;
|
|
568
|
-
}
|
|
569
|
-
var getParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getParticipation3);
|
|
570
|
-
var createParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createParticipation3);
|
|
571
|
-
var updateParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateParticipation3);
|
|
572
|
-
var deleteParticipation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteParticipation3);
|
|
573
|
-
var queryParticipations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryParticipations);
|
|
574
|
-
var onParticipationCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
575
|
-
onParticipationCreated
|
|
576
|
-
);
|
|
577
|
-
var onParticipationDeleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
578
|
-
onParticipationDeleted
|
|
579
|
-
);
|
|
580
|
-
var onParticipationUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
581
|
-
onParticipationUpdated
|
|
582
|
-
);
|
|
583
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
584
|
-
0 && (module.exports = {
|
|
585
|
-
AggregationType,
|
|
586
|
-
Mode,
|
|
587
|
-
ScalarType,
|
|
588
|
-
SortOrder,
|
|
589
|
-
Status,
|
|
590
|
-
WebhookIdentityType,
|
|
591
|
-
createParticipation,
|
|
592
|
-
deleteParticipation,
|
|
593
|
-
getParticipation,
|
|
594
|
-
onParticipationCreated,
|
|
595
|
-
onParticipationDeleted,
|
|
596
|
-
onParticipationUpdated,
|
|
597
|
-
queryParticipations,
|
|
598
|
-
updateParticipation,
|
|
599
|
-
utils
|
|
600
|
-
});
|
|
601
|
-
//# sourceMappingURL=index.js.map
|