@wix/bookings 1.0.72 → 1.0.74

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.
Files changed (31) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +2 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.d.ts +121 -0
  5. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js +347 -0
  6. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js.map +1 -0
  7. package/build/cjs/src/bookings-calendar-v2-external-calendar.public.d.ts +13 -0
  8. package/build/cjs/src/bookings-calendar-v2-external-calendar.public.js +79 -0
  9. package/build/cjs/src/bookings-calendar-v2-external-calendar.public.js.map +1 -0
  10. package/build/cjs/src/bookings-calendar-v2-external-calendar.types.d.ts +1445 -0
  11. package/build/cjs/src/bookings-calendar-v2-external-calendar.types.js +209 -0
  12. package/build/cjs/src/bookings-calendar-v2-external-calendar.types.js.map +1 -0
  13. package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.d.ts +1679 -0
  14. package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js +858 -0
  15. package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +1 -0
  18. package/build/es/index.js.map +1 -1
  19. package/build/es/src/bookings-calendar-v2-external-calendar.http.d.ts +121 -0
  20. package/build/es/src/bookings-calendar-v2-external-calendar.http.js +335 -0
  21. package/build/es/src/bookings-calendar-v2-external-calendar.http.js.map +1 -0
  22. package/build/es/src/bookings-calendar-v2-external-calendar.public.d.ts +13 -0
  23. package/build/es/src/bookings-calendar-v2-external-calendar.public.js +48 -0
  24. package/build/es/src/bookings-calendar-v2-external-calendar.public.js.map +1 -0
  25. package/build/es/src/bookings-calendar-v2-external-calendar.types.d.ts +1445 -0
  26. package/build/es/src/bookings-calendar-v2-external-calendar.types.js +206 -0
  27. package/build/es/src/bookings-calendar-v2-external-calendar.types.js.map +1 -0
  28. package/build/es/src/bookings-calendar-v2-external-calendar.universal.d.ts +1679 -0
  29. package/build/es/src/bookings-calendar-v2-external-calendar.universal.js +827 -0
  30. package/build/es/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -0
  31. package/package.json +2 -2
@@ -2,6 +2,7 @@ export * as sessionsFeed from './src/bookings-calendar-v2-session-feed-event.pub
2
2
  export * as resources from './src/bookings-catalog-v1-resource.public';
3
3
  export * as availabilityCalendar from './src/bookings-availability-v1-slot-availability.public';
4
4
  export * as sessions from './src/bookings-calendar-v1-session.public';
5
+ export * as externalCalendars from './src/bookings-calendar-v2-external-calendar.public';
5
6
  export * as sessionsView from './src/bookings-calendar-v2-session-view.public';
6
7
  export * as serviceOptionsAndVariants from './src/bookings-catalog-v1-service-options-and-variants.public';
7
8
  export * as extendedBookings from './src/bookings-reader-v2-extended-booking.public';
@@ -19,11 +19,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.bookingsPricing = exports.bookings = exports.services = exports.extendedBookings = exports.serviceOptionsAndVariants = exports.sessionsView = exports.sessions = exports.availabilityCalendar = exports.resources = exports.sessionsFeed = void 0;
22
+ exports.bookingsPricing = exports.bookings = exports.services = exports.extendedBookings = exports.serviceOptionsAndVariants = exports.sessionsView = exports.externalCalendars = exports.sessions = exports.availabilityCalendar = exports.resources = exports.sessionsFeed = void 0;
23
23
  exports.sessionsFeed = __importStar(require("./src/bookings-calendar-v2-session-feed-event.public"));
24
24
  exports.resources = __importStar(require("./src/bookings-catalog-v1-resource.public"));
25
25
  exports.availabilityCalendar = __importStar(require("./src/bookings-availability-v1-slot-availability.public"));
26
26
  exports.sessions = __importStar(require("./src/bookings-calendar-v1-session.public"));
27
+ exports.externalCalendars = __importStar(require("./src/bookings-calendar-v2-external-calendar.public"));
27
28
  exports.sessionsView = __importStar(require("./src/bookings-calendar-v2-session-view.public"));
28
29
  exports.serviceOptionsAndVariants = __importStar(require("./src/bookings-catalog-v1-service-options-and-variants.public"));
29
30
  exports.extendedBookings = __importStar(require("./src/bookings-reader-v2-extended-booking.public"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF;AACrF,uFAAuE;AACvE,gHAAgG;AAChG,sFAAsE;AACtE,+FAA+E;AAC/E,2HAA2G;AAC3G,qGAAqF;AACrF,sFAAsE;AACtE,6EAA6D;AAC7D,uFAAuE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF;AACrF,uFAAuE;AACvE,gHAAgG;AAChG,sFAAsE;AACtE,yGAAyF;AACzF,+FAA+E;AAC/E,2HAA2G;AAC3G,qGAAqF;AACrF,sFAAsE;AACtE,6EAA6D;AAC7D,uFAAuE"}
@@ -0,0 +1,121 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { ConnectByCredentialsRequest, ConnectByCredentialsResponse, ConnectByOAuthRequest, ConnectByOAuthResponse, DisconnectRequest, DisconnectResponse, GetConnectionRequest, GetConnectionResponse, ListCalendarsRequest, ListCalendarsResponse, ListConnectionsRequest, ListConnectionsResponse, ListEventsRequest, ListEventsResponse, ListProvidersRequest, ListProvidersResponse, UpdateSyncConfigRequest, UpdateSyncConfigResponse } from './bookings-calendar-v2-external-calendar.types';
3
+ /**
4
+ * Retrieves a list of the external calendar providers for which the site supports integration.
5
+ *
6
+ *
7
+ * The list of external calendar providers includes:
8
+ *
9
+ * + External calendar providers that are supported by default, such as Google, Apple, and Microsoft.
10
+ * + External calenders for which the site owner has enabled integration by installing an app.
11
+ *
12
+ * For each external calendar provider, the list contains information about supported connection methods and features.
13
+ * For each provider, check `features.connectMethods` to find out whether to use [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth) to establish a connection.
14
+ */
15
+ export declare function listProviders(payload: ListProvidersRequest): RequestOptionsFactory<ListProvidersResponse>;
16
+ /**
17
+ * Retrieves an external calendar connection by ID.
18
+ *
19
+ *
20
+ * The external calendar connection contains details of the connection between a Wix site's calendar and calendars hosted by an external provider.
21
+ *
22
+ * The `syncConfig` property contains configuration details for importing events from an external calendar, exporting events to an external calendar, or both.
23
+ */
24
+ export declare function getConnection(payload: GetConnectionRequest): RequestOptionsFactory<GetConnectionResponse>;
25
+ /**
26
+ * Retrieves a list of external calendar connections.
27
+ *
28
+ *
29
+ * Each external calendar connections contains details of a connection between a Wix site's calendar and calendars hosted by an external provider.
30
+ *
31
+ * The `syncConfig` property of each connection contains configuration details for importing events from an external calendar, exporting events to an external calendar, or both.
32
+ */
33
+ export declare function listConnections(payload: ListConnectionsRequest): RequestOptionsFactory<ListConnectionsResponse>;
34
+ /**
35
+ * Connects to an external calendar using the OAuth authorization protocol.
36
+ *
37
+ *
38
+ * The authorization flow should take place as follows:
39
+ *
40
+ * 1. Send a request to the endpoint with the appropriate parameters.
41
+ * 2. Redirect the user to the URL received in the response.
42
+ * 3. The user authorizes access.
43
+ * 4. The user is redirected to the URL you provide in the `redirectUrl` body parameter, with a query parameter `connectionId` containing the new connection ID.
44
+ *
45
+ * If the attempt to connect fails, the user is still redirected to the URL you provide in the `redirectUrl` body parameter,
46
+ * but with a query parameter `error` containing one of the following values:
47
+ *
48
+ * - `reject`: The user rejected the authorization request.
49
+ * - `unsupported`: Connecting to the user's external account type is not supported by the provider.
50
+ * - `internal`: An error unrelated to the client or the request that prevents the server from fulfilling the request.
51
+ *
52
+ * Once a connection is successfully created, use [List Events](#list-events) to obtain an up-to-date list of events in the connected external calendars.
53
+ *
54
+ * This endpoint validates that the specified schedule is owned by the Wix user connecting the calendar,
55
+ * or that the caller has the Manage External Calendars or Manage Business Calendar permission scope.
56
+ *
57
+ * If the schedule's ownership changes, the connection to the external calendar is automatically disconnected.
58
+ *
59
+ * > **Note:**
60
+ * > Use [List Providers](#list-providers) to find out whether to connect to a particular provider using this endpoint or [Connect by Credentials](#connect-by-credentials).
61
+ */
62
+ export declare function connectByOAuth(payload: ConnectByOAuthRequest): RequestOptionsFactory<ConnectByOAuthResponse>;
63
+ /**
64
+ * Connects to an external calendar by directly providing the external calendar account credentials.
65
+ *
66
+ *
67
+ * Once a connection is successfully created, use [List Events](#list-events) to obtain an up-to-date list of events in the connected external calendars.
68
+ *
69
+ * This endpoint validates that the specified schedule is owned by the Wix user connecting the calendar,
70
+ * or that the caller has the Manage External Calendars or Manage Business Calendar permission scope.
71
+ *
72
+ * If the schedule's ownership changes, the connection to the external calendar is automatically disconnected.
73
+ *
74
+ * > **Note:**
75
+ * > Use [List Providers](#list-providers) to find out whether to connect to a particular provider using this endpoint or [Connect by OAuth](#connect-by-o-auth).
76
+ */
77
+ export declare function connectByCredentials(payload: ConnectByCredentialsRequest): RequestOptionsFactory<ConnectByCredentialsResponse>;
78
+ /**
79
+ * Retrieves a list of calendars belonging to the connected external calendar account.
80
+ *
81
+ *
82
+ * > **Note:**
83
+ * > Before using this endpoint, establish a connection with an external calendar using [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth).
84
+ */
85
+ export declare function listCalendars(payload: ListCalendarsRequest): RequestOptionsFactory<ListCalendarsResponse>;
86
+ /**
87
+ * Updates the specified external calendar connection's sync configuration.
88
+ *
89
+ *
90
+ * Use Update Sync Config to update a connection's `syncConfig` property.
91
+ * The `syncConfig` property contains settings for enabling, configuring, or disabling functionality, including:
92
+ *
93
+ * + Importing events from one or more specified calendars in the connected external calendar account. If this is enabled, use [List Events](#list-events) to retrieve a list of events from the external calendar.
94
+ * + Exporting events from the Wix site's calendar to an external calendar.
95
+ *
96
+ * To see an external calendar connection's existing sync configuration, use [Get Connection](#get-connection) or [List Connections](#list-connections) and see the `syncConfig` property.
97
+ *
98
+ * > **Note:**
99
+ * > Supported functionality depends on the provider. Use [List Providers](#list-providers) to see details about providers' supported features.
100
+ */
101
+ export declare function updateSyncConfig(payload: UpdateSyncConfigRequest): RequestOptionsFactory<UpdateSyncConfigResponse>;
102
+ /**
103
+ * Disconnects from an external calendar.
104
+ *
105
+ *
106
+ * When an external calendar is disconnected, the external calendar connection's `status` is changed to `DISCONNECTED`.
107
+ *
108
+ * After disconnecting, [List Events](#list-events) no longer returns events from the disconnected external calendar.
109
+ * Exported Wix calendar sessions are deleted from the external calendar.
110
+ */
111
+ export declare function disconnect(payload: DisconnectRequest): RequestOptionsFactory<DisconnectResponse>;
112
+ /**
113
+ * Retrieves a list of events from all connected external calendars, based on the provided filtering and paging.
114
+ *
115
+ *
116
+ * Use List Events to retrieve an aggregated list of events in the connected external calendars for a specified time range, sorted by start date.
117
+ *
118
+ * > **Note:**
119
+ * > Before using this endpoint, establish a connection with an external calendar using [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth).
120
+ */
121
+ export declare function listEvents(payload: ListEventsRequest): RequestOptionsFactory<ListEventsResponse>;
@@ -0,0 +1,347 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listEvents = exports.disconnect = exports.updateSyncConfig = exports.listCalendars = exports.connectByCredentials = exports.connectByOAuth = exports.listConnections = exports.getConnection = exports.listProviders = void 0;
4
+ const metro_runtime_1 = require("@wix/metro-runtime");
5
+ const ambassador_1 = require("@wix/metro-runtime/ambassador");
6
+ const metro_runtime_2 = require("@wix/metro-runtime");
7
+ const _connectByCredentialsRequest = {};
8
+ const _connectByCredentialsResponse = {};
9
+ const _connectByOAuthRequest = {};
10
+ const _connectByOAuthResponse = {};
11
+ const _disconnectRequest = {};
12
+ const _disconnectResponse = {};
13
+ const _getConnectionRequest = {};
14
+ const _getConnectionResponse = {};
15
+ const _listCalendarsRequest = {};
16
+ const _listCalendarsResponse = {};
17
+ const _listConnectionsRequest = {};
18
+ const _listConnectionsResponse = {};
19
+ const _listEventsRequest = {};
20
+ const _listEventsResponse = {};
21
+ const _listProvidersRequest = {};
22
+ const _listProvidersResponse = {};
23
+ const _updateSyncConfigRequest = { fieldMask: 'google.protobuf.FieldMask' };
24
+ const _updateSyncConfigResponse = {};
25
+ function resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl(opts) {
26
+ const domainToMappings = {
27
+ 'api._api_base_domain_': [
28
+ {
29
+ srcPath: '/external-calendar-2',
30
+ destPath: '',
31
+ },
32
+ ],
33
+ 'manage._base_domain_': [
34
+ {
35
+ srcPath: '/_api/bookings/v2/external-calendar',
36
+ destPath: '/v2/external-calendar',
37
+ },
38
+ ],
39
+ 'www.wixapis.com': [
40
+ {
41
+ srcPath: '/bookings/v2/external-calendars',
42
+ destPath: '/v2/external-calendars',
43
+ },
44
+ ],
45
+ };
46
+ return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
47
+ }
48
+ /**
49
+ * Retrieves a list of the external calendar providers for which the site supports integration.
50
+ *
51
+ *
52
+ * The list of external calendar providers includes:
53
+ *
54
+ * + External calendar providers that are supported by default, such as Google, Apple, and Microsoft.
55
+ * + External calenders for which the site owner has enabled integration by installing an app.
56
+ *
57
+ * For each external calendar provider, the list contains information about supported connection methods and features.
58
+ * For each provider, check `features.connectMethods` to find out whether to use [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth) to establish a connection.
59
+ */
60
+ function listProviders(payload) {
61
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listProvidersRequest, {});
62
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listProvidersResponse, {});
63
+ function __listProviders({ host }) {
64
+ const serializedData = toReq(payload);
65
+ const metadata = {
66
+ method: 'GET',
67
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
68
+ protoPath: '/v2/external-calendars/providers',
69
+ data: serializedData,
70
+ host,
71
+ }),
72
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
73
+ transformResponse: fromRes,
74
+ };
75
+ return metadata;
76
+ }
77
+ __listProviders.fromReq = fromReq;
78
+ return __listProviders;
79
+ }
80
+ exports.listProviders = listProviders;
81
+ /**
82
+ * Retrieves an external calendar connection by ID.
83
+ *
84
+ *
85
+ * The external calendar connection contains details of the connection between a Wix site's calendar and calendars hosted by an external provider.
86
+ *
87
+ * The `syncConfig` property contains configuration details for importing events from an external calendar, exporting events to an external calendar, or both.
88
+ */
89
+ function getConnection(payload) {
90
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getConnectionRequest, {});
91
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getConnectionResponse, {});
92
+ function __getConnection({ host }) {
93
+ const serializedData = toReq(payload);
94
+ const metadata = {
95
+ method: 'GET',
96
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
97
+ protoPath: '/v2/external-calendars/connections/{connectionId}',
98
+ data: serializedData,
99
+ host,
100
+ }),
101
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
102
+ transformResponse: fromRes,
103
+ };
104
+ return metadata;
105
+ }
106
+ __getConnection.fromReq = fromReq;
107
+ return __getConnection;
108
+ }
109
+ exports.getConnection = getConnection;
110
+ /**
111
+ * Retrieves a list of external calendar connections.
112
+ *
113
+ *
114
+ * Each external calendar connections contains details of a connection between a Wix site's calendar and calendars hosted by an external provider.
115
+ *
116
+ * The `syncConfig` property of each connection contains configuration details for importing events from an external calendar, exporting events to an external calendar, or both.
117
+ */
118
+ function listConnections(payload) {
119
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listConnectionsRequest, {});
120
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listConnectionsResponse, {});
121
+ function __listConnections({ host }) {
122
+ const serializedData = toReq(payload);
123
+ const metadata = {
124
+ method: 'GET',
125
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
126
+ protoPath: '/v2/external-calendars/connections',
127
+ data: serializedData,
128
+ host,
129
+ }),
130
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
131
+ transformResponse: fromRes,
132
+ };
133
+ return metadata;
134
+ }
135
+ __listConnections.fromReq = fromReq;
136
+ return __listConnections;
137
+ }
138
+ exports.listConnections = listConnections;
139
+ /**
140
+ * Connects to an external calendar using the OAuth authorization protocol.
141
+ *
142
+ *
143
+ * The authorization flow should take place as follows:
144
+ *
145
+ * 1. Send a request to the endpoint with the appropriate parameters.
146
+ * 2. Redirect the user to the URL received in the response.
147
+ * 3. The user authorizes access.
148
+ * 4. The user is redirected to the URL you provide in the `redirectUrl` body parameter, with a query parameter `connectionId` containing the new connection ID.
149
+ *
150
+ * If the attempt to connect fails, the user is still redirected to the URL you provide in the `redirectUrl` body parameter,
151
+ * but with a query parameter `error` containing one of the following values:
152
+ *
153
+ * - `reject`: The user rejected the authorization request.
154
+ * - `unsupported`: Connecting to the user's external account type is not supported by the provider.
155
+ * - `internal`: An error unrelated to the client or the request that prevents the server from fulfilling the request.
156
+ *
157
+ * Once a connection is successfully created, use [List Events](#list-events) to obtain an up-to-date list of events in the connected external calendars.
158
+ *
159
+ * This endpoint validates that the specified schedule is owned by the Wix user connecting the calendar,
160
+ * or that the caller has the Manage External Calendars or Manage Business Calendar permission scope.
161
+ *
162
+ * If the schedule's ownership changes, the connection to the external calendar is automatically disconnected.
163
+ *
164
+ * > **Note:**
165
+ * > Use [List Providers](#list-providers) to find out whether to connect to a particular provider using this endpoint or [Connect by Credentials](#connect-by-credentials).
166
+ */
167
+ function connectByOAuth(payload) {
168
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_connectByOAuthRequest, {});
169
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_connectByOAuthResponse, {});
170
+ function __connectByOAuth({ host }) {
171
+ const serializedData = toReq(payload);
172
+ const metadata = {
173
+ method: 'POST',
174
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
175
+ protoPath: '/v2/external-calendars/connections:connectByOAuth',
176
+ data: serializedData,
177
+ host,
178
+ }),
179
+ data: serializedData,
180
+ transformResponse: fromRes,
181
+ };
182
+ return metadata;
183
+ }
184
+ __connectByOAuth.fromReq = fromReq;
185
+ return __connectByOAuth;
186
+ }
187
+ exports.connectByOAuth = connectByOAuth;
188
+ /**
189
+ * Connects to an external calendar by directly providing the external calendar account credentials.
190
+ *
191
+ *
192
+ * Once a connection is successfully created, use [List Events](#list-events) to obtain an up-to-date list of events in the connected external calendars.
193
+ *
194
+ * This endpoint validates that the specified schedule is owned by the Wix user connecting the calendar,
195
+ * or that the caller has the Manage External Calendars or Manage Business Calendar permission scope.
196
+ *
197
+ * If the schedule's ownership changes, the connection to the external calendar is automatically disconnected.
198
+ *
199
+ * > **Note:**
200
+ * > Use [List Providers](#list-providers) to find out whether to connect to a particular provider using this endpoint or [Connect by OAuth](#connect-by-o-auth).
201
+ */
202
+ function connectByCredentials(payload) {
203
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_connectByCredentialsRequest, {});
204
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_connectByCredentialsResponse, {});
205
+ function __connectByCredentials({ host }) {
206
+ const serializedData = toReq(payload);
207
+ const metadata = {
208
+ method: 'POST',
209
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
210
+ protoPath: '/v2/external-calendars/connections:connectByCredentials',
211
+ data: serializedData,
212
+ host,
213
+ }),
214
+ data: serializedData,
215
+ transformResponse: fromRes,
216
+ };
217
+ return metadata;
218
+ }
219
+ __connectByCredentials.fromReq = fromReq;
220
+ return __connectByCredentials;
221
+ }
222
+ exports.connectByCredentials = connectByCredentials;
223
+ /**
224
+ * Retrieves a list of calendars belonging to the connected external calendar account.
225
+ *
226
+ *
227
+ * > **Note:**
228
+ * > Before using this endpoint, establish a connection with an external calendar using [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth).
229
+ */
230
+ function listCalendars(payload) {
231
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listCalendarsRequest, {});
232
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listCalendarsResponse, {});
233
+ function __listCalendars({ host }) {
234
+ const serializedData = toReq(payload);
235
+ const metadata = {
236
+ method: 'GET',
237
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
238
+ protoPath: '/v2/external-calendars/connections/{connectionId}/calendars',
239
+ data: serializedData,
240
+ host,
241
+ }),
242
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
243
+ transformResponse: fromRes,
244
+ };
245
+ return metadata;
246
+ }
247
+ __listCalendars.fromReq = fromReq;
248
+ return __listCalendars;
249
+ }
250
+ exports.listCalendars = listCalendars;
251
+ /**
252
+ * Updates the specified external calendar connection's sync configuration.
253
+ *
254
+ *
255
+ * Use Update Sync Config to update a connection's `syncConfig` property.
256
+ * The `syncConfig` property contains settings for enabling, configuring, or disabling functionality, including:
257
+ *
258
+ * + Importing events from one or more specified calendars in the connected external calendar account. If this is enabled, use [List Events](#list-events) to retrieve a list of events from the external calendar.
259
+ * + Exporting events from the Wix site's calendar to an external calendar.
260
+ *
261
+ * To see an external calendar connection's existing sync configuration, use [Get Connection](#get-connection) or [List Connections](#list-connections) and see the `syncConfig` property.
262
+ *
263
+ * > **Note:**
264
+ * > Supported functionality depends on the provider. Use [List Providers](#list-providers) to see details about providers' supported features.
265
+ */
266
+ function updateSyncConfig(payload) {
267
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateSyncConfigRequest, {});
268
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateSyncConfigResponse, {});
269
+ function __updateSyncConfig({ host }) {
270
+ const serializedData = toReq(payload);
271
+ const metadata = {
272
+ method: 'PATCH',
273
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
274
+ protoPath: '/v2/external-calendars/connections/{connectionId}/sync-config',
275
+ data: serializedData,
276
+ host,
277
+ }),
278
+ data: serializedData,
279
+ transformResponse: fromRes,
280
+ };
281
+ return metadata;
282
+ }
283
+ __updateSyncConfig.fromReq = fromReq;
284
+ return __updateSyncConfig;
285
+ }
286
+ exports.updateSyncConfig = updateSyncConfig;
287
+ /**
288
+ * Disconnects from an external calendar.
289
+ *
290
+ *
291
+ * When an external calendar is disconnected, the external calendar connection's `status` is changed to `DISCONNECTED`.
292
+ *
293
+ * After disconnecting, [List Events](#list-events) no longer returns events from the disconnected external calendar.
294
+ * Exported Wix calendar sessions are deleted from the external calendar.
295
+ */
296
+ function disconnect(payload) {
297
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_disconnectRequest, {});
298
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_disconnectResponse, {});
299
+ function __disconnect({ host }) {
300
+ const serializedData = toReq(payload);
301
+ const metadata = {
302
+ method: 'POST',
303
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
304
+ protoPath: '/v2/external-calendars/connections/{connectionId}/disconnect',
305
+ data: serializedData,
306
+ host,
307
+ }),
308
+ data: serializedData,
309
+ transformResponse: fromRes,
310
+ };
311
+ return metadata;
312
+ }
313
+ __disconnect.fromReq = fromReq;
314
+ return __disconnect;
315
+ }
316
+ exports.disconnect = disconnect;
317
+ /**
318
+ * Retrieves a list of events from all connected external calendars, based on the provided filtering and paging.
319
+ *
320
+ *
321
+ * Use List Events to retrieve an aggregated list of events in the connected external calendars for a specified time range, sorted by start date.
322
+ *
323
+ * > **Note:**
324
+ * > Before using this endpoint, establish a connection with an external calendar using [Connect By Credentials](#connect-by-credentials) or [Connect By OAuth](#connect-by-o-auth).
325
+ */
326
+ function listEvents(payload) {
327
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listEventsRequest, {});
328
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listEventsResponse, {});
329
+ function __listEvents({ host }) {
330
+ const serializedData = toReq(payload);
331
+ const metadata = {
332
+ method: 'GET',
333
+ url: resolveComWixBookingsExternalcalendarApiV2ExternalCalendarServiceUrl({
334
+ protoPath: '/v2/external-calendars/events',
335
+ data: serializedData,
336
+ host,
337
+ }),
338
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
339
+ transformResponse: fromRes,
340
+ };
341
+ return metadata;
342
+ }
343
+ __listEvents.fromReq = fromReq;
344
+ return __listEvents;
345
+ }
346
+ exports.listEvents = listEvents;
347
+ //# sourceMappingURL=bookings-calendar-v2-external-calendar.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-calendar-v2-external-calendar.http.js","sourceRoot":"","sources":["../../../src/bookings-calendar-v2-external-calendar.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAwBhD,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AACzC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,wBAAwB,GAAG,EAAE,SAAS,EAAE,2BAA2B,E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M,EAAE,MAAa;YACrB,GAAG,EAAE,oEAAoE,CACvE;gBACE,SAAS,EACP,8DAA8D;gBAChE,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CACF;YACD,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/B,OAAO,YAAY,CAAC;AACtB,CAAC;AA/BD,gCA+BC;AAED;;;;;;;;GAQG;AACH,SAAgB,UAAU,CACxB,OAA0B;IAE1B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EACrD,kBAAkB,EAClB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAElE,SAAS,YAAY,CAAC,EAAE,IAAI,EAAO;QACjC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,KAAY;YACpB,GAAG,EAAE,oEAAoE,CACvE;gBACE,SAAS,EAAE,+BAA+B;gBAC1C,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CACF;YACD,MAAM,EAAE,IAAA,iCAAiB,EAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/B,OAAO,YAAY,CAAC;AACtB,CAAC;AA9BD,gCA8BC"}
@@ -0,0 +1,13 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { ConnectionSyncConfig, ListConnectionsOptions, ListEventsOptions, UpdateSyncConfigOptions } from './bookings-calendar-v2-external-calendar.universal';
3
+ export declare function listProviders(httpClient: HttpClient): () => Promise<import("./bookings-calendar-v2-external-calendar.universal").ListProvidersResponse>;
4
+ export declare function getConnection(httpClient: HttpClient): (connectionId: string | null) => Promise<import("./bookings-calendar-v2-external-calendar.universal").GetConnectionResponse>;
5
+ export declare function listConnections(httpClient: HttpClient): (options?: ListConnectionsOptions | undefined) => Promise<import("./bookings-calendar-v2-external-calendar.universal").ListConnectionsResponse>;
6
+ export declare function connectByOAuth(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, redirectUrl: string | null) => Promise<import("./bookings-calendar-v2-external-calendar.universal").ConnectByOAuthResponse>;
7
+ export declare function connectByCredentials(httpClient: HttpClient): (providerId: string | null, scheduleId: string | null, email: string | null, password: string | null) => Promise<import("./bookings-calendar-v2-external-calendar.universal").ConnectByCredentialsResponse>;
8
+ export declare function listCalendars(httpClient: HttpClient): (connectionId: string | null) => Promise<import("./bookings-calendar-v2-external-calendar.universal").ListCalendarsResponse>;
9
+ export declare function updateSyncConfig(httpClient: HttpClient): (connectionId: string | null, syncConfig: ConnectionSyncConfig, options?: UpdateSyncConfigOptions | undefined) => Promise<import("./bookings-calendar-v2-external-calendar.universal").UpdateSyncConfigResponse>;
10
+ export declare function disconnect(httpClient: HttpClient): (connectionId: string | null) => Promise<import("./bookings-calendar-v2-external-calendar.universal").DisconnectResponse>;
11
+ export declare function listEvents(httpClient: HttpClient): (options?: ListEventsOptions | undefined) => Promise<import("./bookings-calendar-v2-external-calendar.universal").ListEventsResponse>;
12
+ export { CalendarType, ConnectMethod, ListEventFromCalendars, SyncToCalendar, Status, ErrorReason, SyncToErrorReason, Day, Transparency, RecurringIntervalType, LocationType, LocationStatus, LocationsLocationType, DayOfWeek, ApprovalStatus, ScheduleStatus, ConferenceType, SessionStatus, SessionType, } from './bookings-calendar-v2-external-calendar.universal';
13
+ export { ExternalCalendar, ListProvidersRequest, ListProvidersResponse, Provider, ProviderFeatures, GetConnectionRequest, GetConnectionResponse, Connection, ConnectionSyncConfig, Calendar, PrimaryCalendar, Calendars, DedicatedCalendar, ConnectionSyncConfigListEventFromCalendars, ConnectionSyncConfigListEventFromCalendarsListFromOneOf, ConnectionSyncConfigSyncToCalendar, ConnectionSyncConfigSyncToCalendarSyncToOneOf, ListConnectionsRequest, ListConnectionsResponse, ConnectByOAuthRequest, ConnectByOAuthResponse, RawHttpRequest, PathParametersEntry, QueryParametersEntry, HeadersEntry, RawHttpResponse, ConnectByCredentialsRequest, ConnectByCredentialsResponse, ListCalendarsRequest, ListCalendarsResponse, UpdateSyncConfigRequest, UpdateSyncConfigResponse, DisconnectRequest, DisconnectResponse, ListEventsRequest, CursorPaging, ListEventsResponse, Event, CursorPagingMetadata, Cursors, ScheduleNotification, ScheduleNotificationEventOneOf, ScheduleCreated, Schedule, RecurringInterval, Interval, Frequency, LinkedSchedule, Location, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, LocationsLocation, LocationsAddress, LocationsStreetAddress, LocationsAddressLocation, BusinessSchedule, TimePeriod, SpecialHourPeriod, Rate, Price, Availability, AvailabilityConstraints, SplitInterval, Participant, ExternalCalendarOverrides, Version, ConferenceProvider, CalendarConference, ScheduleUpdated, RecurringSessionsUpdated, Session, CalendarDateTime, LocalDateTime, ExternalCalendarInfo, SessionVersion, ParticipantNotification, ScheduleCancelled, SessionCreated, SessionUpdated, SessionCancelled, AvailabilityPolicyUpdated, AvailabilityPolicy, IntervalSplit, RecurringSessionSplit, ScheduleUnassignedFromUser, MultipleSessionsCreated, ScheduleWithSessions, SitePropertiesOnScheduleCreation, MigrationEvent, MigrationData, StaffData, Empty, ListConnectionsOptions, UpdateSyncConfigOptions, ListEventsOptions, } from './bookings-calendar-v2-external-calendar.universal';
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SessionType = exports.SessionStatus = exports.ConferenceType = exports.ScheduleStatus = exports.ApprovalStatus = exports.DayOfWeek = exports.LocationsLocationType = exports.LocationStatus = exports.LocationType = exports.RecurringIntervalType = exports.Transparency = exports.Day = exports.SyncToErrorReason = exports.ErrorReason = exports.Status = exports.SyncToCalendar = exports.ListEventFromCalendars = exports.ConnectMethod = exports.CalendarType = exports.listEvents = exports.disconnect = exports.updateSyncConfig = exports.listCalendars = exports.connectByCredentials = exports.connectByOAuth = exports.listConnections = exports.getConnection = exports.listProviders = void 0;
4
+ const bookings_calendar_v2_external_calendar_universal_1 = require("./bookings-calendar-v2-external-calendar.universal");
5
+ function listProviders(httpClient) {
6
+ return () => (0, bookings_calendar_v2_external_calendar_universal_1.listProviders)(
7
+ // @ts-ignore
8
+ { httpClient });
9
+ }
10
+ exports.listProviders = listProviders;
11
+ function getConnection(httpClient) {
12
+ return (connectionId) => (0, bookings_calendar_v2_external_calendar_universal_1.getConnection)(connectionId,
13
+ // @ts-ignore
14
+ { httpClient });
15
+ }
16
+ exports.getConnection = getConnection;
17
+ function listConnections(httpClient) {
18
+ return (options) => (0, bookings_calendar_v2_external_calendar_universal_1.listConnections)(options,
19
+ // @ts-ignore
20
+ { httpClient });
21
+ }
22
+ exports.listConnections = listConnections;
23
+ function connectByOAuth(httpClient) {
24
+ return (providerId, scheduleId, redirectUrl) => (0, bookings_calendar_v2_external_calendar_universal_1.connectByOAuth)(providerId, scheduleId, redirectUrl,
25
+ // @ts-ignore
26
+ { httpClient });
27
+ }
28
+ exports.connectByOAuth = connectByOAuth;
29
+ function connectByCredentials(httpClient) {
30
+ return (providerId, scheduleId, email, password) => (0, bookings_calendar_v2_external_calendar_universal_1.connectByCredentials)(providerId, scheduleId, email, password,
31
+ // @ts-ignore
32
+ { httpClient });
33
+ }
34
+ exports.connectByCredentials = connectByCredentials;
35
+ function listCalendars(httpClient) {
36
+ return (connectionId) => (0, bookings_calendar_v2_external_calendar_universal_1.listCalendars)(connectionId,
37
+ // @ts-ignore
38
+ { httpClient });
39
+ }
40
+ exports.listCalendars = listCalendars;
41
+ function updateSyncConfig(httpClient) {
42
+ return (connectionId, syncConfig, options) => (0, bookings_calendar_v2_external_calendar_universal_1.updateSyncConfig)(connectionId, syncConfig, options,
43
+ // @ts-ignore
44
+ { httpClient });
45
+ }
46
+ exports.updateSyncConfig = updateSyncConfig;
47
+ function disconnect(httpClient) {
48
+ return (connectionId) => (0, bookings_calendar_v2_external_calendar_universal_1.disconnect)(connectionId,
49
+ // @ts-ignore
50
+ { httpClient });
51
+ }
52
+ exports.disconnect = disconnect;
53
+ function listEvents(httpClient) {
54
+ return (options) => (0, bookings_calendar_v2_external_calendar_universal_1.listEvents)(options,
55
+ // @ts-ignore
56
+ { httpClient });
57
+ }
58
+ exports.listEvents = listEvents;
59
+ var bookings_calendar_v2_external_calendar_universal_2 = require("./bookings-calendar-v2-external-calendar.universal");
60
+ Object.defineProperty(exports, "CalendarType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.CalendarType; } });
61
+ Object.defineProperty(exports, "ConnectMethod", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ConnectMethod; } });
62
+ Object.defineProperty(exports, "ListEventFromCalendars", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ListEventFromCalendars; } });
63
+ Object.defineProperty(exports, "SyncToCalendar", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.SyncToCalendar; } });
64
+ Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.Status; } });
65
+ Object.defineProperty(exports, "ErrorReason", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ErrorReason; } });
66
+ Object.defineProperty(exports, "SyncToErrorReason", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.SyncToErrorReason; } });
67
+ Object.defineProperty(exports, "Day", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.Day; } });
68
+ Object.defineProperty(exports, "Transparency", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.Transparency; } });
69
+ Object.defineProperty(exports, "RecurringIntervalType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.RecurringIntervalType; } });
70
+ Object.defineProperty(exports, "LocationType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.LocationType; } });
71
+ Object.defineProperty(exports, "LocationStatus", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.LocationStatus; } });
72
+ Object.defineProperty(exports, "LocationsLocationType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.LocationsLocationType; } });
73
+ Object.defineProperty(exports, "DayOfWeek", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.DayOfWeek; } });
74
+ Object.defineProperty(exports, "ApprovalStatus", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ApprovalStatus; } });
75
+ Object.defineProperty(exports, "ScheduleStatus", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ScheduleStatus; } });
76
+ Object.defineProperty(exports, "ConferenceType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.ConferenceType; } });
77
+ Object.defineProperty(exports, "SessionStatus", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.SessionStatus; } });
78
+ Object.defineProperty(exports, "SessionType", { enumerable: true, get: function () { return bookings_calendar_v2_external_calendar_universal_2.SessionType; } });
79
+ //# sourceMappingURL=bookings-calendar-v2-external-calendar.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-calendar-v2-external-calendar.public.js","sourceRoot":"","sources":["../../../src/bookings-calendar-v2-external-calendar.public.ts"],"names":[],"mappings":";;;AACA,yHAc4D;AAE5D,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,IAAA,gEAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAND,sCAMC;AAED,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,YAA2B,EAAE,EAAE,CACrC,IAAA,gEAAsB,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