@wix/auto_sdk_calendar_participations 1.0.0
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/calendar-v3-participation-participations.context.d.ts +25 -0
- package/build/cjs/src/calendar-v3-participation-participations.context.js +30 -0
- package/build/cjs/src/calendar-v3-participation-participations.context.js.map +1 -0
- package/build/cjs/src/calendar-v3-participation-participations.http.d.ts +29 -0
- package/build/cjs/src/calendar-v3-participation-participations.http.js +204 -0
- package/build/cjs/src/calendar-v3-participation-participations.http.js.map +1 -0
- package/build/cjs/src/calendar-v3-participation-participations.meta.d.ts +23 -0
- package/build/cjs/src/calendar-v3-participation-participations.meta.js +123 -0
- package/build/cjs/src/calendar-v3-participation-participations.meta.js.map +1 -0
- package/build/cjs/src/calendar-v3-participation-participations.public.d.ts +67 -0
- package/build/cjs/src/calendar-v3-participation-participations.public.js +73 -0
- package/build/cjs/src/calendar-v3-participation-participations.public.js.map +1 -0
- package/build/cjs/src/calendar-v3-participation-participations.types.d.ts +364 -0
- package/build/cjs/src/calendar-v3-participation-participations.types.js +19 -0
- package/build/cjs/src/calendar-v3-participation-participations.types.js.map +1 -0
- package/build/cjs/src/calendar-v3-participation-participations.universal.d.ts +674 -0
- package/build/cjs/src/calendar-v3-participation-participations.universal.js +291 -0
- package/build/cjs/src/calendar-v3-participation-participations.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/calendar-v3-participation-participations.context.d.ts +25 -0
- package/build/es/src/calendar-v3-participation-participations.context.js +25 -0
- package/build/es/src/calendar-v3-participation-participations.context.js.map +1 -0
- package/build/es/src/calendar-v3-participation-participations.http.d.ts +29 -0
- package/build/es/src/calendar-v3-participation-participations.http.js +196 -0
- package/build/es/src/calendar-v3-participation-participations.http.js.map +1 -0
- package/build/es/src/calendar-v3-participation-participations.meta.d.ts +23 -0
- package/build/es/src/calendar-v3-participation-participations.meta.js +92 -0
- package/build/es/src/calendar-v3-participation-participations.meta.js.map +1 -0
- package/build/es/src/calendar-v3-participation-participations.public.d.ts +67 -0
- package/build/es/src/calendar-v3-participation-participations.public.js +63 -0
- package/build/es/src/calendar-v3-participation-participations.public.js.map +1 -0
- package/build/es/src/calendar-v3-participation-participations.types.d.ts +364 -0
- package/build/es/src/calendar-v3-participation-participations.types.js +16 -0
- package/build/es/src/calendar-v3-participation-participations.types.js.map +1 -0
- package/build/es/src/calendar-v3-participation-participations.universal.d.ts +674 -0
- package/build/es/src/calendar-v3-participation-participations.universal.js +260 -0
- package/build/es/src/calendar-v3-participation-participations.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/calendar-v3-participation-participations.context.d.ts +25 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.context.js +30 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.context.js.map +1 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.http.d.ts +29 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.http.js +204 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.http.js.map +1 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.meta.d.ts +23 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.meta.js +123 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.meta.js.map +1 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.public.d.ts +67 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.public.js +73 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.public.js.map +1 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.types.d.ts +364 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.types.js +19 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.types.js.map +1 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.universal.d.ts +674 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.universal.js +291 -0
- package/build/internal/cjs/src/calendar-v3-participation-participations.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/calendar-v3-participation-participations.context.d.ts +25 -0
- package/build/internal/es/src/calendar-v3-participation-participations.context.js +25 -0
- package/build/internal/es/src/calendar-v3-participation-participations.context.js.map +1 -0
- package/build/internal/es/src/calendar-v3-participation-participations.http.d.ts +29 -0
- package/build/internal/es/src/calendar-v3-participation-participations.http.js +196 -0
- package/build/internal/es/src/calendar-v3-participation-participations.http.js.map +1 -0
- package/build/internal/es/src/calendar-v3-participation-participations.meta.d.ts +23 -0
- package/build/internal/es/src/calendar-v3-participation-participations.meta.js +92 -0
- package/build/internal/es/src/calendar-v3-participation-participations.meta.js.map +1 -0
- package/build/internal/es/src/calendar-v3-participation-participations.public.d.ts +67 -0
- package/build/internal/es/src/calendar-v3-participation-participations.public.js +63 -0
- package/build/internal/es/src/calendar-v3-participation-participations.public.js.map +1 -0
- package/build/internal/es/src/calendar-v3-participation-participations.types.d.ts +364 -0
- package/build/internal/es/src/calendar-v3-participation-participations.types.js +16 -0
- package/build/internal/es/src/calendar-v3-participation-participations.types.js.map +1 -0
- package/build/internal/es/src/calendar-v3-participation-participations.universal.d.ts +674 -0
- package/build/internal/es/src/calendar-v3-participation-participations.universal.js +260 -0
- package/build/internal/es/src/calendar-v3-participation-participations.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.deleteParticipation = exports.updateParticipation = exports.createParticipation = exports.queryParticipations = exports.getParticipation = exports.WebhookIdentityType = exports.Status = void 0;
|
|
27
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
+
const query_builder_1 = require("@wix/sdk-runtime/query-builder");
|
|
29
|
+
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
30
|
+
const ambassadorWixCalendarV3Participation = __importStar(require("./calendar-v3-participation-participations.http.js"));
|
|
31
|
+
var Status;
|
|
32
|
+
(function (Status) {
|
|
33
|
+
/** The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */
|
|
34
|
+
Status["CONFIRMED"] = "CONFIRMED";
|
|
35
|
+
/** The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */
|
|
36
|
+
Status["PENDING_CONFIRMATION"] = "PENDING_CONFIRMATION";
|
|
37
|
+
})(Status || (exports.Status = Status = {}));
|
|
38
|
+
var WebhookIdentityType;
|
|
39
|
+
(function (WebhookIdentityType) {
|
|
40
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
41
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
42
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
43
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
44
|
+
WebhookIdentityType["APP"] = "APP";
|
|
45
|
+
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves a `participation` object.
|
|
48
|
+
* @param participationId - ID of the `participation` object to retrieve.
|
|
49
|
+
* @public
|
|
50
|
+
* @documentationMaturity preview
|
|
51
|
+
* @requiredField participationId
|
|
52
|
+
* @permissionId CALENDAR.PARTICIPATION_READ
|
|
53
|
+
* @permissionScope Manage Calendars
|
|
54
|
+
* @permissionScopeId SCOPE.DC-CALENDAR.MANAGE
|
|
55
|
+
* @permissionScope Manage Bookings
|
|
56
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
57
|
+
* @permissionScope Manage Bookings - all permissions
|
|
58
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
59
|
+
* @applicableIdentity APP
|
|
60
|
+
* @returns Retrieved `participation` object.
|
|
61
|
+
* @fqn wix.calendar.participations.v3.ParticipationsService.GetParticipation
|
|
62
|
+
*/
|
|
63
|
+
async function getParticipation(participationId) {
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
66
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
67
|
+
participationId: participationId,
|
|
68
|
+
});
|
|
69
|
+
const reqOpts = ambassadorWixCalendarV3Participation.getParticipation(payload);
|
|
70
|
+
sideEffects?.onSiteCall?.();
|
|
71
|
+
try {
|
|
72
|
+
const result = await httpClient.request(reqOpts);
|
|
73
|
+
sideEffects?.onSuccess?.(result);
|
|
74
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
78
|
+
spreadPathsToArguments: {},
|
|
79
|
+
explicitPathsToArguments: { participationId: '$[0]' },
|
|
80
|
+
singleArgumentUnchanged: false,
|
|
81
|
+
}, ['participationId']);
|
|
82
|
+
sideEffects?.onError?.(err);
|
|
83
|
+
throw transformedError;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.getParticipation = getParticipation;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a query to retrieve a list of participations.
|
|
89
|
+
*
|
|
90
|
+
* The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.
|
|
91
|
+
*
|
|
92
|
+
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-builder/find) function.
|
|
93
|
+
*
|
|
94
|
+
* You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.
|
|
95
|
+
*
|
|
96
|
+
* `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:
|
|
97
|
+
*
|
|
98
|
+
* + `limit` is `50`.
|
|
99
|
+
* + Sorted by `createdDate` in ascending order.
|
|
100
|
+
*
|
|
101
|
+
* The functions that are chained to `queryParticipations()` are applied in the order they are called.
|
|
102
|
+
*
|
|
103
|
+
* The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
* @documentationMaturity preview
|
|
107
|
+
* @permissionScope Manage Calendars
|
|
108
|
+
* @permissionScopeId SCOPE.DC-CALENDAR.MANAGE
|
|
109
|
+
* @permissionScope Manage Bookings
|
|
110
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
111
|
+
* @permissionScope Manage Bookings - all permissions
|
|
112
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
113
|
+
* @permissionId CALENDAR.PARTICIPATION_READ
|
|
114
|
+
* @applicableIdentity APP
|
|
115
|
+
* @fqn wix.calendar.participations.v3.ParticipationsService.QueryParticipations
|
|
116
|
+
*/
|
|
117
|
+
function queryParticipations() {
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
120
|
+
return (0, query_builder_1.queryBuilder)({
|
|
121
|
+
func: async (payload) => {
|
|
122
|
+
const reqOpts = ambassadorWixCalendarV3Participation.queryParticipations(payload);
|
|
123
|
+
sideEffects?.onSiteCall?.();
|
|
124
|
+
try {
|
|
125
|
+
const result = await httpClient.request(reqOpts);
|
|
126
|
+
sideEffects?.onSuccess?.(result);
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
sideEffects?.onError?.(err);
|
|
131
|
+
throw err;
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
requestTransformer: (query) => {
|
|
135
|
+
const args = [query, {}];
|
|
136
|
+
return (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
137
|
+
...args?.[1],
|
|
138
|
+
query: args?.[0],
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
responseTransformer: ({ data, }) => {
|
|
142
|
+
const transformedData = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(data);
|
|
143
|
+
return {
|
|
144
|
+
items: transformedData?.participations,
|
|
145
|
+
pagingMetadata: transformedData?.pagingMetadata,
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
errorTransformer: (err) => {
|
|
149
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
150
|
+
spreadPathsToArguments: {},
|
|
151
|
+
explicitPathsToArguments: { query: '$[0]' },
|
|
152
|
+
singleArgumentUnchanged: false,
|
|
153
|
+
});
|
|
154
|
+
throw transformedError;
|
|
155
|
+
},
|
|
156
|
+
pagingMethod: 'CURSOR',
|
|
157
|
+
transformationPaths: {},
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
exports.queryParticipations = queryParticipations;
|
|
161
|
+
/**
|
|
162
|
+
* Creates a `participation` object for a schedule or event.
|
|
163
|
+
* @param participation - `participation` object to create.
|
|
164
|
+
* @public
|
|
165
|
+
* @documentationMaturity preview
|
|
166
|
+
* @requiredField participation
|
|
167
|
+
* @requiredField participation.participant
|
|
168
|
+
* @requiredField participation.participant.name
|
|
169
|
+
* @requiredField participation.partySize
|
|
170
|
+
* @permissionId CALENDAR.PARTICIPATION_CREATE
|
|
171
|
+
* @permissionScope Manage Calendars
|
|
172
|
+
* @permissionScopeId SCOPE.DC-CALENDAR.MANAGE
|
|
173
|
+
* @permissionScope Manage Bookings
|
|
174
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
175
|
+
* @permissionScope Manage Bookings - all permissions
|
|
176
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
177
|
+
* @applicableIdentity APP
|
|
178
|
+
* @returns Created `participation` object.
|
|
179
|
+
* @fqn wix.calendar.participations.v3.ParticipationsService.CreateParticipation
|
|
180
|
+
*/
|
|
181
|
+
async function createParticipation(participation, options) {
|
|
182
|
+
// @ts-ignore
|
|
183
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
184
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
185
|
+
participation: participation,
|
|
186
|
+
idempotencyKey: options?.idempotencyKey,
|
|
187
|
+
});
|
|
188
|
+
const reqOpts = ambassadorWixCalendarV3Participation.createParticipation(payload);
|
|
189
|
+
sideEffects?.onSiteCall?.();
|
|
190
|
+
try {
|
|
191
|
+
const result = await httpClient.request(reqOpts);
|
|
192
|
+
sideEffects?.onSuccess?.(result);
|
|
193
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
197
|
+
spreadPathsToArguments: {},
|
|
198
|
+
explicitPathsToArguments: {
|
|
199
|
+
participation: '$[0]',
|
|
200
|
+
idempotencyKey: '$[1].idempotencyKey',
|
|
201
|
+
},
|
|
202
|
+
singleArgumentUnchanged: false,
|
|
203
|
+
}, ['participation', 'options']);
|
|
204
|
+
sideEffects?.onError?.(err);
|
|
205
|
+
throw transformedError;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.createParticipation = createParticipation;
|
|
209
|
+
/**
|
|
210
|
+
* Updates a `participation` object.
|
|
211
|
+
* @param _id - Participation ID.
|
|
212
|
+
* @public
|
|
213
|
+
* @documentationMaturity preview
|
|
214
|
+
* @requiredField _id
|
|
215
|
+
* @requiredField participation
|
|
216
|
+
* @requiredField participation.revision
|
|
217
|
+
* @permissionId CALENDAR.PARTICIPATION_UPDATE
|
|
218
|
+
* @permissionScope Manage Calendars
|
|
219
|
+
* @permissionScopeId SCOPE.DC-CALENDAR.MANAGE
|
|
220
|
+
* @permissionScope Manage Bookings
|
|
221
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
222
|
+
* @permissionScope Manage Bookings - all permissions
|
|
223
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
224
|
+
* @applicableIdentity APP
|
|
225
|
+
* @returns Updated `participation` object.
|
|
226
|
+
* @fqn wix.calendar.participations.v3.ParticipationsService.UpdateParticipation
|
|
227
|
+
*/
|
|
228
|
+
async function updateParticipation(_id, participation) {
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
231
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
232
|
+
participation: { ...participation, id: _id },
|
|
233
|
+
});
|
|
234
|
+
const reqOpts = ambassadorWixCalendarV3Participation.updateParticipation(payload);
|
|
235
|
+
sideEffects?.onSiteCall?.();
|
|
236
|
+
try {
|
|
237
|
+
const result = await httpClient.request(reqOpts);
|
|
238
|
+
sideEffects?.onSuccess?.(result);
|
|
239
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participation;
|
|
240
|
+
}
|
|
241
|
+
catch (err) {
|
|
242
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
243
|
+
spreadPathsToArguments: { participation: '$[1]' },
|
|
244
|
+
explicitPathsToArguments: { 'participation.id': '$[0]' },
|
|
245
|
+
singleArgumentUnchanged: false,
|
|
246
|
+
}, ['_id', 'participation']);
|
|
247
|
+
sideEffects?.onError?.(err);
|
|
248
|
+
throw transformedError;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
exports.updateParticipation = updateParticipation;
|
|
252
|
+
/**
|
|
253
|
+
* Deletes a `participation` object.
|
|
254
|
+
* @param participationId - ID of `participation` object to delete.
|
|
255
|
+
* @public
|
|
256
|
+
* @documentationMaturity preview
|
|
257
|
+
* @requiredField participationId
|
|
258
|
+
* @permissionId CALENDAR.PARTICIPATION_DELETE
|
|
259
|
+
* @permissionScope Manage Calendars
|
|
260
|
+
* @permissionScopeId SCOPE.DC-CALENDAR.MANAGE
|
|
261
|
+
* @permissionScope Manage Bookings
|
|
262
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
263
|
+
* @permissionScope Manage Bookings - all permissions
|
|
264
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
265
|
+
* @applicableIdentity APP
|
|
266
|
+
* @fqn wix.calendar.participations.v3.ParticipationsService.DeleteParticipation
|
|
267
|
+
*/
|
|
268
|
+
async function deleteParticipation(participationId) {
|
|
269
|
+
// @ts-ignore
|
|
270
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
271
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
272
|
+
participationId: participationId,
|
|
273
|
+
});
|
|
274
|
+
const reqOpts = ambassadorWixCalendarV3Participation.deleteParticipation(payload);
|
|
275
|
+
sideEffects?.onSiteCall?.();
|
|
276
|
+
try {
|
|
277
|
+
const result = await httpClient.request(reqOpts);
|
|
278
|
+
sideEffects?.onSuccess?.(result);
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
282
|
+
spreadPathsToArguments: {},
|
|
283
|
+
explicitPathsToArguments: { participationId: '$[0]' },
|
|
284
|
+
singleArgumentUnchanged: false,
|
|
285
|
+
}, ['participationId']);
|
|
286
|
+
sideEffects?.onError?.(err);
|
|
287
|
+
throw transformedError;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
exports.deleteParticipation = deleteParticipation;
|
|
291
|
+
//# sourceMappingURL=calendar-v3-participation-participations.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-v3-participation-participations.universal.js","sourceRoot":"","sources":["../../../src/calendar-v3-participation-participations.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,kEAA8D;AAC9D,oFAGiD;AAEjD,yHAA2G;AA+G3G,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,uLAAuL;IACvL,iCAAuB,CAAA;IACvB,8MAA8M;IAC9M,uDAA6C,CAAA;AAC/C,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AAmQD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B;AAuID;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,UAAU,gBAAgB,CACpC,eAA8B;IAE9B,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,e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CAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE;YACrD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,iBAAiB,CAAC,CACpB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAlCD,kDAkCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/calendar-v3-participation-participations.context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,2DAA2D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/calendar-v3-participation-participations.universal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,6DAA6D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/calendar-v3-participation-participations.meta.js';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,wDAAwD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getParticipation as publicGetParticipation, queryParticipations as publicQueryParticipations, createParticipation as publicCreateParticipation, updateParticipation as publicUpdateParticipation, deleteParticipation as publicDeleteParticipation } from './calendar-v3-participation-participations.public.js';
|
|
2
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
3
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
4
|
+
import { onParticipationCreated as publicOnParticipationCreated } from './calendar-v3-participation-participations.public.js';
|
|
5
|
+
import { onParticipationDeleted as publicOnParticipationDeleted } from './calendar-v3-participation-participations.public.js';
|
|
6
|
+
import { onParticipationUpdated as publicOnParticipationUpdated } from './calendar-v3-participation-participations.public.js';
|
|
7
|
+
export declare const getParticipation: MaybeContext<BuildRESTFunction<typeof publicGetParticipation> & typeof publicGetParticipation>;
|
|
8
|
+
export declare const queryParticipations: MaybeContext<BuildRESTFunction<typeof publicQueryParticipations> & typeof publicQueryParticipations>;
|
|
9
|
+
export declare const createParticipation: MaybeContext<BuildRESTFunction<typeof publicCreateParticipation> & typeof publicCreateParticipation>;
|
|
10
|
+
export declare const updateParticipation: MaybeContext<BuildRESTFunction<typeof publicUpdateParticipation> & typeof publicUpdateParticipation>;
|
|
11
|
+
export declare const deleteParticipation: MaybeContext<BuildRESTFunction<typeof publicDeleteParticipation> & typeof publicDeleteParticipation>;
|
|
12
|
+
/**
|
|
13
|
+
* Triggered when a `participation` object is created.
|
|
14
|
+
*/
|
|
15
|
+
export declare const onParticipationCreated: ReturnType<typeof createEventModule<typeof publicOnParticipationCreated>>;
|
|
16
|
+
/**
|
|
17
|
+
* Triggered when a `participation` object is deleted.
|
|
18
|
+
*/
|
|
19
|
+
export declare const onParticipationDeleted: ReturnType<typeof createEventModule<typeof publicOnParticipationDeleted>>;
|
|
20
|
+
/**
|
|
21
|
+
* Triggered when a `participation` object is updated.
|
|
22
|
+
*/
|
|
23
|
+
export declare const onParticipationUpdated: ReturnType<typeof createEventModule<typeof publicOnParticipationUpdated>>;
|
|
24
|
+
export { Status, WebhookIdentityType, } from './calendar-v3-participation-participations.universal.js';
|
|
25
|
+
export { Participation, ParticipationParticipatedItemOneOf, Participant, ExtendedFields, GetParticipationRequest, GetParticipationResponse, QueryParticipationsRequest, CursorQuery, CursorQueryPagingMethodOneOf, CursorPaging, QueryParticipationsResponse, CursorPagingMetadata, Cursors, CreateParticipationRequest, CreateParticipationResponse, UpdateParticipationRequest, UpdateParticipationResponse, ParticipationUpdatedWithMetadata, DeleteParticipationRequest, DeleteParticipationResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, Empty, SumParticipationsPartySizeByScheduleIdRequest, SumParticipationsPartySizeByScheduleIdResponse, PartySizeSumByScheduleId, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, ParticipationNonNullableFields, GetParticipationResponseNonNullableFields, QueryParticipationsResponseNonNullableFields, CreateParticipationResponseNonNullableFields, UpdateParticipationResponseNonNullableFields, BaseEventMetadata, EventMetadata, ParticipationCreatedEnvelope, ParticipationDeletedEnvelope, ParticipationUpdatedEnvelope, ParticipationsQueryResult, ParticipationsQueryBuilder, CreateParticipationOptions, UpdateParticipation, } from './calendar-v3-participation-participations.universal.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getParticipation as publicGetParticipation, queryParticipations as publicQueryParticipations, createParticipation as publicCreateParticipation, updateParticipation as publicUpdateParticipation, deleteParticipation as publicDeleteParticipation, } from './calendar-v3-participation-participations.public.js';
|
|
2
|
+
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
4
|
+
import { onParticipationCreated as publicOnParticipationCreated } from './calendar-v3-participation-participations.public.js';
|
|
5
|
+
import { onParticipationDeleted as publicOnParticipationDeleted } from './calendar-v3-participation-participations.public.js';
|
|
6
|
+
import { onParticipationUpdated as publicOnParticipationUpdated } from './calendar-v3-participation-participations.public.js';
|
|
7
|
+
export const getParticipation = /*#__PURE__*/ createRESTModule(publicGetParticipation);
|
|
8
|
+
export const queryParticipations = /*#__PURE__*/ createRESTModule(publicQueryParticipations);
|
|
9
|
+
export const createParticipation = /*#__PURE__*/ createRESTModule(publicCreateParticipation);
|
|
10
|
+
export const updateParticipation = /*#__PURE__*/ createRESTModule(publicUpdateParticipation);
|
|
11
|
+
export const deleteParticipation = /*#__PURE__*/ createRESTModule(publicDeleteParticipation);
|
|
12
|
+
/**
|
|
13
|
+
* Triggered when a `participation` object is created.
|
|
14
|
+
*/
|
|
15
|
+
export const onParticipationCreated = createEventModule(publicOnParticipationCreated);
|
|
16
|
+
/**
|
|
17
|
+
* Triggered when a `participation` object is deleted.
|
|
18
|
+
*/
|
|
19
|
+
export const onParticipationDeleted = createEventModule(publicOnParticipationDeleted);
|
|
20
|
+
/**
|
|
21
|
+
* Triggered when a `participation` object is updated.
|
|
22
|
+
*/
|
|
23
|
+
export const onParticipationUpdated = createEventModule(publicOnParticipationUpdated);
|
|
24
|
+
export { Status, WebhookIdentityType, } from './calendar-v3-participation-participations.universal.js';
|
|
25
|
+
//# sourceMappingURL=calendar-v3-participation-participations.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-v3-participation-participations.context.js","sourceRoot":"","sources":["../../../src/calendar-v3-participation-participations.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,mBAAmB,IAAI,yBAAyB,EAChD,mBAAmB,IAAI,yBAAyB,EAChD,mBAAmB,IAAI,yBAAyB,EAChD,mBAAmB,IAAI,yBAAyB,GACjD,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,sBAAsB,IAAI,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AAC9H,OAAO,EAAE,sBAAsB,IAAI,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AAC9H,OAAO,EAAE,sBAAsB,IAAI,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AAE9H,MAAM,CAAC,MAAM,gBAAgB,GAGzB,aAAa,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAG5B,aAAa,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;AAC9D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAE/B,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AACpD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAE/B,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AACpD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAE/B,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;AAEpD,OAAO,EACL,MAAM,EACN,mBAAmB,GACpB,MAAM,yDAAyD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/** Retrieves a `participation` object. */
|
|
3
|
+
export declare function getParticipation(payload: object): RequestOptionsFactory<any>;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a query to retrieve a list of participations.
|
|
6
|
+
*
|
|
7
|
+
* The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.
|
|
8
|
+
*
|
|
9
|
+
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-builder/find) function.
|
|
10
|
+
*
|
|
11
|
+
* You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.
|
|
12
|
+
*
|
|
13
|
+
* `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:
|
|
14
|
+
*
|
|
15
|
+
* + `limit` is `50`.
|
|
16
|
+
* + Sorted by `createdDate` in ascending order.
|
|
17
|
+
*
|
|
18
|
+
* The functions that are chained to `queryParticipations()` are applied in the order they are called.
|
|
19
|
+
*
|
|
20
|
+
* The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare function queryParticipations(payload: object): RequestOptionsFactory<any>;
|
|
24
|
+
/** Creates a `participation` object for a schedule or event. */
|
|
25
|
+
export declare function createParticipation(payload: object): RequestOptionsFactory<any>;
|
|
26
|
+
/** Updates a `participation` object. */
|
|
27
|
+
export declare function updateParticipation(payload: object): RequestOptionsFactory<any>;
|
|
28
|
+
/** Deletes a `participation` object. */
|
|
29
|
+
export declare function deleteParticipation(payload: object): RequestOptionsFactory<any>;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
|
|
2
|
+
import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
3
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
4
|
+
import { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';
|
|
5
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
6
|
+
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
7
|
+
function resolveWixCalendarParticipationsV3ParticipationsServiceUrl(opts) {
|
|
8
|
+
const domainToMappings = {
|
|
9
|
+
'manage._base_domain_': [
|
|
10
|
+
{
|
|
11
|
+
srcPath: '/_api/calendar/v3/participations',
|
|
12
|
+
destPath: '/v3/participations',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
'www.wixapis.com': [
|
|
16
|
+
{
|
|
17
|
+
srcPath: '/calendar/v3/participations',
|
|
18
|
+
destPath: '/v3/participations',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
23
|
+
}
|
|
24
|
+
const PACKAGE_NAME = '@wix/auto_sdk_calendar_participations';
|
|
25
|
+
/** Retrieves a `participation` object. */
|
|
26
|
+
export function getParticipation(payload) {
|
|
27
|
+
function __getParticipation({ host }) {
|
|
28
|
+
const metadata = {
|
|
29
|
+
entityFqdn: 'wix.calendar.v3.participation',
|
|
30
|
+
method: 'GET',
|
|
31
|
+
methodFqn: 'wix.calendar.participations.v3.ParticipationsService.GetParticipation',
|
|
32
|
+
packageName: PACKAGE_NAME,
|
|
33
|
+
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
34
|
+
protoPath: '/v3/participations/{participationId}',
|
|
35
|
+
data: payload,
|
|
36
|
+
host,
|
|
37
|
+
}),
|
|
38
|
+
params: toURLSearchParams(payload),
|
|
39
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
40
|
+
{
|
|
41
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
42
|
+
paths: [
|
|
43
|
+
{ path: 'participation.createdDate' },
|
|
44
|
+
{ path: 'participation.updatedDate' },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
]),
|
|
48
|
+
};
|
|
49
|
+
return metadata;
|
|
50
|
+
}
|
|
51
|
+
return __getParticipation;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates a query to retrieve a list of participations.
|
|
55
|
+
*
|
|
56
|
+
* The `queryParticipations()` function builds a query to retrieve a list of participations and returns a `ParticipationsQueryBuilder` object.
|
|
57
|
+
*
|
|
58
|
+
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-builder/find) function.
|
|
59
|
+
*
|
|
60
|
+
* You can refine the query by chaining `ParticipationsQueryBuilder` functions onto the query. `ParticipationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryParticipations()` returns.
|
|
61
|
+
*
|
|
62
|
+
* `queryParticipations()` runs with the following `ParticipationsQueryBuilder` default that you can override:
|
|
63
|
+
*
|
|
64
|
+
* + `limit` is `50`.
|
|
65
|
+
* + Sorted by `createdDate` in ascending order.
|
|
66
|
+
*
|
|
67
|
+
* The functions that are chained to `queryParticipations()` are applied in the order they are called.
|
|
68
|
+
*
|
|
69
|
+
* The following `ParticipationsQueryBuilder` functions are supported for the `queryParticipations()` function. For a full description of the participations object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/participations/participations-query-result/items) property in `ParticipationsQueryResult`.
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
export function queryParticipations(payload) {
|
|
73
|
+
function __queryParticipations({ host }) {
|
|
74
|
+
const metadata = {
|
|
75
|
+
entityFqdn: 'wix.calendar.v3.participation',
|
|
76
|
+
method: 'POST',
|
|
77
|
+
methodFqn: 'wix.calendar.participations.v3.ParticipationsService.QueryParticipations',
|
|
78
|
+
packageName: PACKAGE_NAME,
|
|
79
|
+
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
80
|
+
protoPath: '/v3/participations/query',
|
|
81
|
+
data: payload,
|
|
82
|
+
host,
|
|
83
|
+
}),
|
|
84
|
+
data: payload,
|
|
85
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
86
|
+
{
|
|
87
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
88
|
+
paths: [
|
|
89
|
+
{ path: 'participations.createdDate' },
|
|
90
|
+
{ path: 'participations.updatedDate' },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
]),
|
|
94
|
+
};
|
|
95
|
+
return metadata;
|
|
96
|
+
}
|
|
97
|
+
return __queryParticipations;
|
|
98
|
+
}
|
|
99
|
+
/** Creates a `participation` object for a schedule or event. */
|
|
100
|
+
export function createParticipation(payload) {
|
|
101
|
+
function __createParticipation({ host }) {
|
|
102
|
+
const serializedData = transformPaths(payload, [
|
|
103
|
+
{
|
|
104
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
105
|
+
paths: [
|
|
106
|
+
{ path: 'participation.createdDate' },
|
|
107
|
+
{ path: 'participation.updatedDate' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
]);
|
|
111
|
+
const metadata = {
|
|
112
|
+
entityFqdn: 'wix.calendar.v3.participation',
|
|
113
|
+
method: 'POST',
|
|
114
|
+
methodFqn: 'wix.calendar.participations.v3.ParticipationsService.CreateParticipation',
|
|
115
|
+
packageName: PACKAGE_NAME,
|
|
116
|
+
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
117
|
+
protoPath: '/v3/participations',
|
|
118
|
+
data: serializedData,
|
|
119
|
+
host,
|
|
120
|
+
}),
|
|
121
|
+
data: serializedData,
|
|
122
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
123
|
+
{
|
|
124
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
125
|
+
paths: [
|
|
126
|
+
{ path: 'participation.createdDate' },
|
|
127
|
+
{ path: 'participation.updatedDate' },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
]),
|
|
131
|
+
};
|
|
132
|
+
return metadata;
|
|
133
|
+
}
|
|
134
|
+
return __createParticipation;
|
|
135
|
+
}
|
|
136
|
+
/** Updates a `participation` object. */
|
|
137
|
+
export function updateParticipation(payload) {
|
|
138
|
+
function __updateParticipation({ host }) {
|
|
139
|
+
const serializedData = transformPaths(payload, [
|
|
140
|
+
{
|
|
141
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
142
|
+
paths: [{ path: 'fieldmask' }],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
146
|
+
paths: [
|
|
147
|
+
{ path: 'participation.createdDate' },
|
|
148
|
+
{ path: 'participation.updatedDate' },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
]);
|
|
152
|
+
const metadata = {
|
|
153
|
+
entityFqdn: 'wix.calendar.v3.participation',
|
|
154
|
+
method: 'PATCH',
|
|
155
|
+
methodFqn: 'wix.calendar.participations.v3.ParticipationsService.UpdateParticipation',
|
|
156
|
+
packageName: PACKAGE_NAME,
|
|
157
|
+
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
158
|
+
protoPath: '/v3/participations/{participation.id}',
|
|
159
|
+
data: serializedData,
|
|
160
|
+
host,
|
|
161
|
+
}),
|
|
162
|
+
data: serializedData,
|
|
163
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
164
|
+
{
|
|
165
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
166
|
+
paths: [
|
|
167
|
+
{ path: 'participation.createdDate' },
|
|
168
|
+
{ path: 'participation.updatedDate' },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
]),
|
|
172
|
+
};
|
|
173
|
+
return metadata;
|
|
174
|
+
}
|
|
175
|
+
return __updateParticipation;
|
|
176
|
+
}
|
|
177
|
+
/** Deletes a `participation` object. */
|
|
178
|
+
export function deleteParticipation(payload) {
|
|
179
|
+
function __deleteParticipation({ host }) {
|
|
180
|
+
const metadata = {
|
|
181
|
+
entityFqdn: 'wix.calendar.v3.participation',
|
|
182
|
+
method: 'DELETE',
|
|
183
|
+
methodFqn: 'wix.calendar.participations.v3.ParticipationsService.DeleteParticipation',
|
|
184
|
+
packageName: PACKAGE_NAME,
|
|
185
|
+
url: resolveWixCalendarParticipationsV3ParticipationsServiceUrl({
|
|
186
|
+
protoPath: '/v3/participations/{participationId}',
|
|
187
|
+
data: payload,
|
|
188
|
+
host,
|
|
189
|
+
}),
|
|
190
|
+
params: toURLSearchParams(payload),
|
|
191
|
+
};
|
|
192
|
+
return metadata;
|
|
193
|
+
}
|
|
194
|
+
return __deleteParticipation;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=calendar-v3-participation-participations.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-v3-participation-participations.http.js","sourceRoot":"","sources":["../../../src/calendar-v3-participation-participations.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,0DAA0D,CACjE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,oBAAoB;aAC/B;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,6BAA6B;gBACtC,QAAQ,EAAE,oBAAoB;aAC/B;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,uCAAuC,CAAC;AAE7D,0CAA0C;AAC1C,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,SAAS,kBAAkB,CAAC,EAAE,IAAI,EAAO;QACvC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,+BAA+B;YAC3C,MAAM,EAAE,KAAY;YACpB,SAAS,EACP,uEAAuE;YACzE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,0DAA0D,CAAC;gBAC9D,SAAS,EAAE,sCAAsC;gBACjD,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC;YAClC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