@wix/auto_sdk_calendar_conferencing-provider 0.0.0-stage → 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 +7 -0
- package/build/cjs/index.js +272 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +111 -0
- package/build/cjs/index.typings.js +97 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/service-plugins-error-classes-DseVxS5K.d.ts +543 -0
- package/build/es/index.d.mts +7 -0
- package/build/es/index.mjs +242 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +111 -0
- package/build/es/index.typings.mjs +66 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/service-plugins-error-classes-DseVxS5K.d.mts +543 -0
- package/build/internal/cjs/index.d.ts +7 -0
- package/build/internal/cjs/index.typings.d.ts +111 -0
- package/build/internal/cjs/service-plugins-error-classes-DatC6cvo.d.ts +561 -0
- package/build/internal/es/index.d.mts +7 -0
- package/build/internal/es/index.typings.d.mts +111 -0
- package/build/internal/es/service-plugins-error-classes-DatC6cvo.d.mts +561 -0
- package/package.json +45 -3
- package/README.md +0 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { p as provideHandlers$1 } from './service-plugins-error-classes-DseVxS5K.js';
|
|
2
|
+
export { A as AlternativeUri, B as BadCredentialsWixError, a as Conference, o as ConferencingProviderConfig, l as ConnectByCredentialsRequest, m as ConnectByCredentialsResponse, j as ConnectByOAuthRequest, k as ConnectByOAuthResponse, g as Connection, i as ConnectionMethod, h as ConnectionStatus, q as Context, C as CreateConferenceRequest, b as CreateConferenceResponse, D as DeleteConferenceRequest, d as DeleteConferenceResponse, G as GetConferenceRequest, e as GetConferenceResponse, r as IdentificationData, s as IdentificationDataIdOneOf, I as IdentityType, L as ListConnectionsRequest, f as ListConnectionsResponse, M as MarkConnectionAsDisconnectedRequest, n as MarkConnectionAsDisconnectedResponse, R as ResourceNotConnectedWixError, S as SpiBaseUri, U as UpdateConferenceRequest, c as UpdateConferenceResponse } from './service-plugins-error-classes-DseVxS5K.js';
|
|
3
|
+
import { BuildServicePluginDefinition } from '@wix/sdk-types';
|
|
4
|
+
|
|
5
|
+
declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1> & typeof provideHandlers$1;
|
|
6
|
+
|
|
7
|
+
export { provideHandlers, provideHandlers$1 as publicProvideHandlers };
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
BadCredentialsWixError: () => BadCredentialsWixError,
|
|
24
|
+
ConnectionMethod: () => ConnectionMethod,
|
|
25
|
+
ConnectionStatus: () => ConnectionStatus,
|
|
26
|
+
IdentityType: () => IdentityType,
|
|
27
|
+
ResourceNotConnectedWixError: () => ResourceNotConnectedWixError,
|
|
28
|
+
provideHandlers: () => provideHandlers2,
|
|
29
|
+
publicProvideHandlers: () => provideHandlers
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
|
+
|
|
33
|
+
// src/service-plugins-types.ts
|
|
34
|
+
var ConnectionStatus = /* @__PURE__ */ ((ConnectionStatus2) => {
|
|
35
|
+
ConnectionStatus2["CONNECTED"] = "CONNECTED";
|
|
36
|
+
ConnectionStatus2["DISCONNECTED"] = "DISCONNECTED";
|
|
37
|
+
ConnectionStatus2["ERROR"] = "ERROR";
|
|
38
|
+
return ConnectionStatus2;
|
|
39
|
+
})(ConnectionStatus || {});
|
|
40
|
+
var ConnectionMethod = /* @__PURE__ */ ((ConnectionMethod2) => {
|
|
41
|
+
ConnectionMethod2["OAUTH"] = "OAUTH";
|
|
42
|
+
ConnectionMethod2["CREDENTIALS"] = "CREDENTIALS";
|
|
43
|
+
return ConnectionMethod2;
|
|
44
|
+
})(ConnectionMethod || {});
|
|
45
|
+
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
46
|
+
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
48
|
+
IdentityType2["MEMBER"] = "MEMBER";
|
|
49
|
+
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
50
|
+
IdentityType2["APP"] = "APP";
|
|
51
|
+
return IdentityType2;
|
|
52
|
+
})(IdentityType || {});
|
|
53
|
+
|
|
54
|
+
// src/interfaces-calendar-conferencing-v1-conferencing-provider.public.ts
|
|
55
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
56
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
57
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
58
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
59
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
60
|
+
var TRANSFORM_PATHS_0 = [{ path: "request.conference.startTime" }];
|
|
61
|
+
var TRANSFORM_PATHS_1 = [{ path: "conference.startTime" }];
|
|
62
|
+
var TRANSFORM_PATHS_2 = [{ path: "connections.connectedDate" }];
|
|
63
|
+
var TRANSFORM_PATHS_3 = [{ path: "connection.connectedDate" }];
|
|
64
|
+
var provideHandlers = (0, import_sdk_types.ServicePluginDefinition)("CALENDAR_CONFERENCING_PROVIDER", [
|
|
65
|
+
{
|
|
66
|
+
name: "createConference",
|
|
67
|
+
primaryHttpMappingPath: "/v1/create-conference",
|
|
68
|
+
transformations: {
|
|
69
|
+
toREST: (payload) => {
|
|
70
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
71
|
+
{
|
|
72
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
73
|
+
paths: TRANSFORM_PATHS_1
|
|
74
|
+
}
|
|
75
|
+
]);
|
|
76
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
77
|
+
},
|
|
78
|
+
fromREST: (payload) => {
|
|
79
|
+
const fromRestRequest = (0, import_transform_paths.transformPaths)(payload, [
|
|
80
|
+
{
|
|
81
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
82
|
+
paths: TRANSFORM_PATHS_0
|
|
83
|
+
}
|
|
84
|
+
]);
|
|
85
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "updateConference",
|
|
91
|
+
primaryHttpMappingPath: "/v1/update-conference",
|
|
92
|
+
transformations: {
|
|
93
|
+
toREST: (payload) => {
|
|
94
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
95
|
+
{
|
|
96
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
97
|
+
paths: TRANSFORM_PATHS_1
|
|
98
|
+
}
|
|
99
|
+
]);
|
|
100
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
101
|
+
},
|
|
102
|
+
fromREST: (payload) => {
|
|
103
|
+
const fromRestRequest = (0, import_transform_paths.transformPaths)(payload, [
|
|
104
|
+
{
|
|
105
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
106
|
+
paths: TRANSFORM_PATHS_0
|
|
107
|
+
}
|
|
108
|
+
]);
|
|
109
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "deleteConference",
|
|
115
|
+
primaryHttpMappingPath: "/v1/delete-conference",
|
|
116
|
+
transformations: {
|
|
117
|
+
toREST: (payload) => {
|
|
118
|
+
const toRestResponse = payload;
|
|
119
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
120
|
+
},
|
|
121
|
+
fromREST: (payload) => {
|
|
122
|
+
const fromRestRequest = payload;
|
|
123
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "getConference",
|
|
129
|
+
primaryHttpMappingPath: "/v1/get-conference",
|
|
130
|
+
transformations: {
|
|
131
|
+
toREST: (payload) => {
|
|
132
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
133
|
+
{
|
|
134
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
135
|
+
paths: TRANSFORM_PATHS_1
|
|
136
|
+
}
|
|
137
|
+
]);
|
|
138
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
139
|
+
},
|
|
140
|
+
fromREST: (payload) => {
|
|
141
|
+
const fromRestRequest = payload;
|
|
142
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "listConnections",
|
|
148
|
+
primaryHttpMappingPath: "/v1/list-connections",
|
|
149
|
+
transformations: {
|
|
150
|
+
toREST: (payload) => {
|
|
151
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
152
|
+
{
|
|
153
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
154
|
+
paths: TRANSFORM_PATHS_2
|
|
155
|
+
}
|
|
156
|
+
]);
|
|
157
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
158
|
+
},
|
|
159
|
+
fromREST: (payload) => {
|
|
160
|
+
const fromRestRequest = payload;
|
|
161
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "connectByOAuth",
|
|
167
|
+
primaryHttpMappingPath: "/v1/connect-by-oauth",
|
|
168
|
+
transformations: {
|
|
169
|
+
toREST: (payload) => {
|
|
170
|
+
const toRestResponse = payload;
|
|
171
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
172
|
+
},
|
|
173
|
+
fromREST: (payload) => {
|
|
174
|
+
const fromRestRequest = payload;
|
|
175
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "connectByCredentials",
|
|
181
|
+
primaryHttpMappingPath: "/v1/connect-by-credentials",
|
|
182
|
+
transformations: {
|
|
183
|
+
toREST: (payload) => {
|
|
184
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
185
|
+
{
|
|
186
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
187
|
+
paths: TRANSFORM_PATHS_3
|
|
188
|
+
}
|
|
189
|
+
]);
|
|
190
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
191
|
+
},
|
|
192
|
+
fromREST: (payload) => {
|
|
193
|
+
const fromRestRequest = payload;
|
|
194
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "markConnectionAsDisconnected",
|
|
200
|
+
primaryHttpMappingPath: "/v1/mark-connection-as-disconnected",
|
|
201
|
+
transformations: {
|
|
202
|
+
toREST: (payload) => {
|
|
203
|
+
const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
|
|
204
|
+
{
|
|
205
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
206
|
+
paths: TRANSFORM_PATHS_3
|
|
207
|
+
}
|
|
208
|
+
]);
|
|
209
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
|
|
210
|
+
},
|
|
211
|
+
fromREST: (payload) => {
|
|
212
|
+
const fromRestRequest = payload;
|
|
213
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
]);
|
|
218
|
+
|
|
219
|
+
// src/interfaces-calendar-conferencing-v1-conferencing-provider.context.ts
|
|
220
|
+
var import_service_plugin_modules = require("@wix/sdk-runtime/service-plugin-modules");
|
|
221
|
+
var provideHandlers2 = /* @__PURE__ */ (0, import_service_plugin_modules.createServicePluginModule)(
|
|
222
|
+
provideHandlers
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
// src/service-plugins-error-classes.ts
|
|
226
|
+
var ResourceNotConnectedWixError = class extends Error {
|
|
227
|
+
constructor() {
|
|
228
|
+
super("ResourceNotConnected");
|
|
229
|
+
this.httpCode = 428;
|
|
230
|
+
this.statusCode = "FAILED_PRECONDITION";
|
|
231
|
+
this.applicationCode = "RESOURCE_NOT_CONNECTED";
|
|
232
|
+
this.name = "ResourceNotConnected";
|
|
233
|
+
this.errorType = "SPI";
|
|
234
|
+
this.spiErrorData = {
|
|
235
|
+
name: "ResourceNotConnected",
|
|
236
|
+
applicationCode: "RESOURCE_NOT_CONNECTED"
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
static {
|
|
240
|
+
/** @hidden */
|
|
241
|
+
this.__type = "wix_spi_error";
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
var BadCredentialsWixError = class extends Error {
|
|
245
|
+
constructor() {
|
|
246
|
+
super("BadCredentials");
|
|
247
|
+
this.httpCode = 401;
|
|
248
|
+
this.statusCode = "UNAUTHENTICATED";
|
|
249
|
+
this.applicationCode = "BAD_CREDENTIALS";
|
|
250
|
+
this.name = "BadCredentials";
|
|
251
|
+
this.errorType = "SPI";
|
|
252
|
+
this.spiErrorData = {
|
|
253
|
+
name: "BadCredentials",
|
|
254
|
+
applicationCode: "BAD_CREDENTIALS"
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
static {
|
|
258
|
+
/** @hidden */
|
|
259
|
+
this.__type = "wix_spi_error";
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
263
|
+
0 && (module.exports = {
|
|
264
|
+
BadCredentialsWixError,
|
|
265
|
+
ConnectionMethod,
|
|
266
|
+
ConnectionStatus,
|
|
267
|
+
IdentityType,
|
|
268
|
+
ResourceNotConnectedWixError,
|
|
269
|
+
provideHandlers,
|
|
270
|
+
publicProvideHandlers
|
|
271
|
+
});
|
|
272
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/service-plugins-types.ts","../../src/interfaces-calendar-conferencing-v1-conferencing-provider.public.ts","../../src/interfaces-calendar-conferencing-v1-conferencing-provider.context.ts","../../src/service-plugins-error-classes.ts"],"sourcesContent":["export * from './src/service-plugins-types.js';\nexport * from './src/interfaces-calendar-conferencing-v1-conferencing-provider.context.js';\nexport * from './src/service-plugins-error-classes.js';\n","export interface CreateConferenceRequest {\n /** Conference to create. */\n conference?: Conference;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\n/**\n * A video conference created by your provider.\n *\n * This is a data transfer object exchanged between Wix and your provider. The conference itself is stored by your provider, not by Wix.\n */\nexport interface Conference {\n /**\n * Conference ID. Assigned by your provider, and used by Wix to reference the conference on later calls.\n * @readonly\n * @maxLength 100\n */\n _id?: string;\n /**\n * URL to join the conference. All participants use this URL to join.\n * @readonly\n * @maxLength 2048\n */\n url?: string;\n /**\n * URL for the host to start the conference. Set it only if your provider distinguishes a host URL, such as Zoom.\n * @readonly\n * @maxLength 2048\n */\n hostUrl?: string | null;\n /**\n * Password required to join the conference.\n * @readonly\n * @maxLength 100\n */\n password?: string | null;\n /**\n * Title or topic of the meeting.\n * @maxLength 500\n */\n title?: string | null;\n /** Scheduled start time of the meeting. */\n startTime?: Date | null;\n /** Duration of the meeting in minutes. */\n durationInMinutes?: number | null;\n /**\n * Time zone for the meeting in IANA Time Zone Database format. For example, `America/New_York`.\n * @maxLength 100\n */\n timezone?: string | null;\n /**\n * Human-readable description of the conference. Set it only if your provider exposes a description or agenda.\n * @maxLength 500\n */\n description?: string | null;\n}\n\nexport interface CreateConferenceResponse {\n /** Created conference. */\n conference?: Conference;\n}\n\nexport interface UpdateConferenceRequest {\n /** Conference to update. Must include `id`. */\n conference?: Conference;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface UpdateConferenceResponse {\n /** Updated conference. */\n conference?: Conference;\n}\n\nexport interface DeleteConferenceRequest {\n /**\n * ID of the conference to delete. The `id` you returned from Create Conference.\n * @maxLength 100\n */\n conferenceId?: string;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface DeleteConferenceResponse {}\n\nexport interface GetConferenceRequest {\n /**\n * ID of the conference to retrieve. The `id` you returned from Create Conference.\n * @maxLength 100\n */\n conferenceId?: string;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface GetConferenceResponse {\n /** Retrieved conference. */\n conference?: Conference;\n}\n\nexport interface ListConnectionsRequest {\n /**\n * IDs of the resources to return connections for. When empty, return all connections you store.\n * @format GUID\n * @maxSize 100\n */\n resourceIds?: string[];\n}\n\nexport interface ListConnectionsResponse {\n /** Connections you store for the requested resources. */\n connections?: Connection[];\n}\n\n/** A connection between a resource and your conferencing provider account. Your implementation stores connections and Wix reads them through List Connections. */\nexport interface Connection {\n /**\n * Connection ID. Generate a stable, unique ID for the connection. Wix passes it back to reference the connection later.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Connection status. */\n status?: ConnectionStatus;\n /**\n * Email associated with the connection.\n * @maxLength 320\n */\n email?: string;\n /** Method used to establish this connection. */\n connectionMethod?: ConnectionMethod;\n /**\n * Date and time the connection was established, in UTC. Set this on new connections.\n * @readonly\n */\n connectedDate?: Date | null;\n /**\n * ID of the resource this connection belongs to. Treat it as an opaque, stable Wix identifier. Replaces `accountOwnerId`.\n * @format GUID\n */\n resourceId?: string | null;\n}\n\nexport enum ConnectionStatus {\n /** The connection is usable now. */\n CONNECTED = 'CONNECTED',\n /** The user or your implementation intentionally disconnected the account. */\n DISCONNECTED = 'DISCONNECTED',\n /** The connection was established but is now broken, for example tokens were revoked or expired externally, and needs reconnection. */\n ERROR = 'ERROR',\n}\n\nexport enum ConnectionMethod {\n /** OAuth authorization flow. */\n OAUTH = 'OAUTH',\n /** Username and password authentication. */\n CREDENTIALS = 'CREDENTIALS',\n}\n\nexport interface ConnectByOAuthRequest {\n /**\n * URL to redirect the user to after OAuth completes, with `?connectionId=xxx` on success or `?error=xxx` on failure.\n * Either an `http` or `https` URL, or an app-scheme URL (`wixadmin://`, `wix://` or `branded.<metaSiteId>://`) when the flow starts in a mobile app.\n * @maxLength 2048\n */\n redirectUrl?: string;\n /**\n * ID of the resource to connect. Treat it as an opaque, stable Wix identifier that you key the connection by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface ConnectByOAuthResponse {\n /**\n * OAuth URL to redirect the user to.\n * @format WEB_URL\n */\n oauthUrl?: string;\n}\n\nexport interface ConnectByCredentialsRequest {\n /**\n * Username for the conferencing account. May be an email address or another identifier.\n * @maxLength 500\n */\n userName?: string;\n /**\n * Password for the conferencing account.\n * @maxLength 500\n */\n password?: string;\n /**\n * ID of the resource to connect. Treat it as an opaque, stable Wix identifier that you key the connection by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface ConnectByCredentialsResponse {\n /** Established connection. */\n connection?: Connection;\n}\n\nexport interface MarkConnectionAsDisconnectedRequest {\n /**\n * ID of the resource to disconnect. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface MarkConnectionAsDisconnectedResponse {\n /** Disconnected connection. */\n connection?: Connection;\n}\n\n/** Configuration for your conferencing provider service plugin. You set these values when you register the plugin. */\nexport interface ConferencingProviderConfig {\n /** Base URI where your service plugin is deployed. Wix sends requests to this URI. */\n deploymentUri?: SpiBaseUri;\n /**\n * Display name shown to users. For example, `Zoom` or `Google Meet`.\n * @maxLength 200\n */\n displayName?: string;\n /** Whether your provider supports updating conferences after creation. When false, Wix doesn't call Update Conference. */\n updateSupported?: boolean;\n /**\n * Connection methods your provider supports. Wix calls only the connect methods matching these values.\n * @maxSize 10\n */\n connectionMethods?: ConnectionMethod[];\n /**\n * Terms of service URL for your provider.\n * @format WEB_URL\n */\n termsUrl?: string | null;\n /**\n * Privacy policy URL for your provider.\n * @format WEB_URL\n */\n privacyUrl?: string | null;\n /**\n * URL of your provider's icon or logo image.\n * @format WEB_URL\n */\n iconUrl?: string | null;\n /**\n * Support page URL for your provider. For example, setup instructions, troubleshooting, or reconnection help.\n * @format WEB_URL\n */\n supportUrl?: string | null;\n}\n\n/** Base URI configuration for a service plugin. Wix uses these URIs to call your service plugin methods. */\nexport interface SpiBaseUri {\n /**\n * Base URI for your service plugin. Wix appends each method's path to this URI.\n *\n * For example, to receive requests at `https://my-app.com/v1/my-method`, set this field to `https://my-app.com/`.\n * @minLength 6\n * @maxLength 2048\n */\n baseUri?: string;\n /** Alternative URIs for specific methods. Use these to override the default URI for individual methods. */\n alternativeUris?: AlternativeUri[];\n}\n\n/** Custom URI for the specified service plugin method. */\nexport interface AlternativeUri {\n /**\n * Name of the method to call at the absolute URI, in PascalCase. For example, to call [Get Shipping Rates](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/shipping-rates/shipping-rates-integration-service-plugin/get-shipping-rates) on an alternative URI, specify `GetShippingRates`.\n * @minLength 3\n * @maxLength 128\n */\n methodName?: string;\n /**\n * Absolute URI that Wix calls for this method. Wix doesn't append any path to this URI.\n *\n * The URI must begin with `https://`, such as `https://my-app.com/v1/my-custom-method`.\n * @minLength 6\n * @maxLength 2048\n */\n absoluteUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Extension ID in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionId?: string | null;\n /**\n * Extension type in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionType?: string | null;\n /**\n * Invoked function.\n * @internal\n * @maxLength 256\n */\n functionName?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n CreateConferenceRequest,\n CreateConferenceResponse,\n UpdateConferenceRequest,\n UpdateConferenceResponse,\n DeleteConferenceRequest,\n DeleteConferenceResponse,\n GetConferenceRequest,\n GetConferenceResponse,\n ListConnectionsRequest,\n ListConnectionsResponse,\n ConnectByOAuthRequest,\n ConnectByOAuthResponse,\n ConnectByCredentialsRequest,\n ConnectByCredentialsResponse,\n MarkConnectionAsDisconnectedRequest,\n MarkConnectionAsDisconnectedResponse,\n} from './service-plugins-types.js';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'request.conference.startTime' }];\nconst TRANSFORM_PATHS_1 = [{ path: 'conference.startTime' }];\nconst TRANSFORM_PATHS_2 = [{ path: 'connections.connectedDate' }];\nconst TRANSFORM_PATHS_3 = [{ path: 'connection.connectedDate' }];\n\nexport interface CreateConferenceEnvelope {\n request: CreateConferenceRequest;\n metadata: Context;\n}\n\nexport interface UpdateConferenceEnvelope {\n request: UpdateConferenceRequest;\n metadata: Context;\n}\n\nexport interface DeleteConferenceEnvelope {\n request: DeleteConferenceRequest;\n metadata: Context;\n}\n\nexport interface GetConferenceEnvelope {\n request: GetConferenceRequest;\n metadata: Context;\n}\n\nexport interface ListConnectionsEnvelope {\n request: ListConnectionsRequest;\n metadata: Context;\n}\n\nexport interface ConnectByOAuthEnvelope {\n request: ConnectByOAuthRequest;\n metadata: Context;\n}\n\nexport interface ConnectByCredentialsEnvelope {\n request: ConnectByCredentialsRequest;\n metadata: Context;\n}\n\nexport interface MarkConnectionAsDisconnectedEnvelope {\n request: MarkConnectionAsDisconnectedRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * Creates a video conference with your provider.\n *\n * Wix calls this method when a conference is needed for a connected resource, for example when a booked appointment requires a meeting link.\n *\n * Wix uses the returned conference details, such as the join URL and password, and passes the conference `id` and `resourceId` back on later Get, Update, and Delete calls. Wix doesn't store the conference itself.\n *\n * *Your implementation should:**\n * - Look up the connection for the given `resourceId`.\n * - Create a distinct meeting in your provider and return its details.\n * - Be able to look the meeting up later by the `id` you return.\n *\n * Scheduling parameters (`title`, `startTime`, `duration`) are optional. Providers that don't support scheduling can ignore them.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller. */\n createConference(\n payload: CreateConferenceEnvelope\n ): CreateConferenceResponse | Promise<CreateConferenceResponse>;\n\n /**\n *\n * Updates an existing conference, for example to reschedule it.\n *\n * Wix calls this method only when your configuration sets `updateSupported = true`. When `updateSupported` is false, Wix returns an error to the caller without calling your implementation.\n *\n * Wix uses the returned conference details to reflect the updated meeting.\n *\n * *Your implementation should:**\n * - Look up the meeting by the conference `id` and `resourceId`.\n * - Apply the changes in your provider and return the updated details.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller. */\n updateConference(\n payload: UpdateConferenceEnvelope\n ): UpdateConferenceResponse | Promise<UpdateConferenceResponse>;\n\n /**\n *\n * Deletes a conference.\n *\n * Wix calls this method when a conference is no longer needed, for example when a booking is canceled.\n *\n * *Your implementation should:**\n * - Look up the meeting by the conference `id` and `resourceId`.\n * - End or cancel the meeting in your provider.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller. */\n deleteConference(\n payload: DeleteConferenceEnvelope\n ): DeleteConferenceResponse | Promise<DeleteConferenceResponse>;\n\n /**\n *\n * Retrieves a conference's details from your provider.\n *\n * Wix calls this method to read the current state of a meeting, identified by the conference `id` and `resourceId` Wix received when the conference was created.\n *\n * Wix uses the returned details to display the conference.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller. */\n getConference(\n payload: GetConferenceEnvelope\n ): GetConferenceResponse | Promise<GetConferenceResponse>;\n\n /**\n *\n * Retrieves the connections your implementation stores, optionally filtered by resource.\n *\n * Wix calls this method on demand to read the current connection state. Your implementation owns and stores connections; Wix doesn't persist them.\n *\n * Wix uses the returned connections to show connection status.\n *\n * *Your implementation should:**\n * - Return all connections you store for the given `resourceIds`, or all connections when none are specified. */\n listConnections(\n payload: ListConnectionsEnvelope\n ): ListConnectionsResponse | Promise<ListConnectionsResponse>;\n\n /**\n *\n * Starts an OAuth connection between a resource and your provider.\n *\n * Wix calls this method when a user chooses to connect their provider account by OAuth.\n *\n * Wix uses the returned `oauthUrl` to redirect the user to your provider's authorization screen.\n *\n * *Your implementation should:**\n * - Generate and return your provider's OAuth URL.\n * - Host the OAuth callback, create the connection (generating its `id`), and redirect the user back to `redirectUrl` with `?connectionId=<id>` on success, or `?error=<code>` on failure. Defined failure codes: `reject` (the user denied access), `missing_permissions` (the user didn't grant all required scopes), and `internal` (token exchange, user-info fetch, or other unexpected error). */\n connectByOAuth(\n payload: ConnectByOAuthEnvelope\n ): ConnectByOAuthResponse | Promise<ConnectByOAuthResponse>;\n\n /**\n *\n * Connects a resource to your provider using a username and password.\n *\n * Wix calls this method when a user connects an account by credentials, for providers that support credential-based authentication.\n *\n * Wix uses the returned connection to create conferences for the resource.\n *\n * *Your implementation should:**\n * - Validate the credentials with your provider and return the established connection. */\n connectByCredentials(\n payload: ConnectByCredentialsEnvelope\n ): ConnectByCredentialsResponse | Promise<ConnectByCredentialsResponse>;\n\n /**\n *\n * Disconnects a resource from your provider.\n *\n * Wix calls this method when a user disconnects their provider account.\n *\n * *Your implementation should:**\n * - Revoke or clean up your provider's tokens and any provider-side resources for the resource.\n * - Return the disconnected connection.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller. */\n markConnectionAsDisconnected(\n payload: MarkConnectionAsDisconnectedEnvelope\n ):\n | MarkConnectionAsDisconnectedResponse\n | Promise<MarkConnectionAsDisconnectedResponse>;\n}>('CALENDAR_CONFERENCING_PROVIDER', [\n {\n name: 'createConference',\n primaryHttpMappingPath: '/v1/create-conference',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'updateConference',\n primaryHttpMappingPath: '/v1/update-conference',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'deleteConference',\n primaryHttpMappingPath: '/v1/delete-conference',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'getConference',\n primaryHttpMappingPath: '/v1/get-conference',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'listConnections',\n primaryHttpMappingPath: '/v1/list-connections',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'connectByOAuth',\n primaryHttpMappingPath: '/v1/connect-by-oauth',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'connectByCredentials',\n primaryHttpMappingPath: '/v1/connect-by-credentials',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_3,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'markConnectionAsDisconnected',\n primaryHttpMappingPath: '/v1/mark-connection-as-disconnected',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_3,\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-calendar-conferencing-v1-conferencing-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-calendar-conferencing-v1-conferencing-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = /*#__PURE__*/ createServicePluginModule(\n publicProvideHandlers\n);\n","/**\n * The resource isn't connected to your provider.\n */\nexport class ResourceNotConnectedWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ResourceNotConnected');\n\n this.httpCode = 428;\n this.statusCode = 'FAILED_PRECONDITION';\n this.applicationCode = 'RESOURCE_NOT_CONNECTED';\n this.name = 'ResourceNotConnected';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ResourceNotConnected',\n applicationCode: 'RESOURCE_NOT_CONNECTED',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n\n/**\n * The provided credentials are invalid.\n */\nexport class BadCredentialsWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('BadCredentials');\n\n this.httpCode = 401;\n this.statusCode = 'UNAUTHENTICATED';\n this.applicationCode = 'BAD_CREDENTIALS';\n this.name = 'BadCredentials';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'BadCredentials',\n applicationCode: 'BAD_CREDENTIALS',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n"],"mappings":"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","names":["provideHandlers","ConnectionStatus","ConnectionMethod","IdentityType","import_timestamp","provideHandlers"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { t as CreateConferenceEnvelope, b as CreateConferenceResponse, u as UpdateConferenceEnvelope, c as UpdateConferenceResponse, v as DeleteConferenceEnvelope, d as DeleteConferenceResponse, w as GetConferenceEnvelope, e as GetConferenceResponse, x as ListConnectionsEnvelope, f as ListConnectionsResponse, y as ConnectByOAuthEnvelope, k as ConnectByOAuthResponse, z as ConnectByCredentialsEnvelope, m as ConnectByCredentialsResponse, E as MarkConnectionAsDisconnectedEnvelope, n as MarkConnectionAsDisconnectedResponse } from './service-plugins-error-classes-DseVxS5K.js';
|
|
2
|
+
export { A as AlternativeUri, B as BadCredentialsWixError, a as Conference, o as ConferencingProviderConfig, l as ConnectByCredentialsRequest, j as ConnectByOAuthRequest, g as Connection, i as ConnectionMethod, h as ConnectionStatus, q as Context, C as CreateConferenceRequest, D as DeleteConferenceRequest, G as GetConferenceRequest, r as IdentificationData, s as IdentificationDataIdOneOf, I as IdentityType, L as ListConnectionsRequest, M as MarkConnectionAsDisconnectedRequest, R as ResourceNotConnectedWixError, S as SpiBaseUri, U as UpdateConferenceRequest } from './service-plugins-error-classes-DseVxS5K.js';
|
|
3
|
+
import '@wix/sdk-types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates a video conference with your provider.
|
|
7
|
+
*
|
|
8
|
+
* Wix calls this method when a conference is needed for a connected resource, for example when a booked appointment requires a meeting link.
|
|
9
|
+
*
|
|
10
|
+
* Wix uses the returned conference details, such as the join URL and password, and passes the conference `id` and `resourceId` back on later Get, Update, and Delete calls. Wix doesn't store the conference itself.
|
|
11
|
+
*
|
|
12
|
+
* *Your implementation should:**
|
|
13
|
+
* - Look up the connection for the given `resourceId`.
|
|
14
|
+
* - Create a distinct meeting in your provider and return its details.
|
|
15
|
+
* - Be able to look the meeting up later by the `id` you return.
|
|
16
|
+
*
|
|
17
|
+
* Scheduling parameters (`title`, `startTime`, `duration`) are optional. Providers that don't support scheduling can ignore them.
|
|
18
|
+
*
|
|
19
|
+
* *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.
|
|
20
|
+
* @throws ResourceNotConnectedWixError
|
|
21
|
+
*/
|
|
22
|
+
declare function createConference(payload: CreateConferenceEnvelope): CreateConferenceResponse | Promise<CreateConferenceResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Updates an existing conference, for example to reschedule it.
|
|
25
|
+
*
|
|
26
|
+
* Wix calls this method only when your configuration sets `updateSupported = true`. When `updateSupported` is false, Wix returns an error to the caller without calling your implementation.
|
|
27
|
+
*
|
|
28
|
+
* Wix uses the returned conference details to reflect the updated meeting.
|
|
29
|
+
*
|
|
30
|
+
* *Your implementation should:**
|
|
31
|
+
* - Look up the meeting by the conference `id` and `resourceId`.
|
|
32
|
+
* - Apply the changes in your provider and return the updated details.
|
|
33
|
+
*
|
|
34
|
+
* *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.
|
|
35
|
+
* @throws ResourceNotConnectedWixError
|
|
36
|
+
*/
|
|
37
|
+
declare function updateConference(payload: UpdateConferenceEnvelope): UpdateConferenceResponse | Promise<UpdateConferenceResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Deletes a conference.
|
|
40
|
+
*
|
|
41
|
+
* Wix calls this method when a conference is no longer needed, for example when a booking is canceled.
|
|
42
|
+
*
|
|
43
|
+
* *Your implementation should:**
|
|
44
|
+
* - Look up the meeting by the conference `id` and `resourceId`.
|
|
45
|
+
* - End or cancel the meeting in your provider.
|
|
46
|
+
*
|
|
47
|
+
* *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.
|
|
48
|
+
* @throws ResourceNotConnectedWixError
|
|
49
|
+
*/
|
|
50
|
+
declare function deleteConference(payload: DeleteConferenceEnvelope): DeleteConferenceResponse | Promise<DeleteConferenceResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves a conference's details from your provider.
|
|
53
|
+
*
|
|
54
|
+
* Wix calls this method to read the current state of a meeting, identified by the conference `id` and `resourceId` Wix received when the conference was created.
|
|
55
|
+
*
|
|
56
|
+
* Wix uses the returned details to display the conference.
|
|
57
|
+
*
|
|
58
|
+
* *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.
|
|
59
|
+
* @throws ResourceNotConnectedWixError
|
|
60
|
+
*/
|
|
61
|
+
declare function getConference(payload: GetConferenceEnvelope): GetConferenceResponse | Promise<GetConferenceResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the connections your implementation stores, optionally filtered by resource.
|
|
64
|
+
*
|
|
65
|
+
* Wix calls this method on demand to read the current connection state. Your implementation owns and stores connections; Wix doesn't persist them.
|
|
66
|
+
*
|
|
67
|
+
* Wix uses the returned connections to show connection status.
|
|
68
|
+
*
|
|
69
|
+
* *Your implementation should:**
|
|
70
|
+
* - Return all connections you store for the given `resourceIds`, or all connections when none are specified.
|
|
71
|
+
*/
|
|
72
|
+
declare function listConnections(payload: ListConnectionsEnvelope): ListConnectionsResponse | Promise<ListConnectionsResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Starts an OAuth connection between a resource and your provider.
|
|
75
|
+
*
|
|
76
|
+
* Wix calls this method when a user chooses to connect their provider account by OAuth.
|
|
77
|
+
*
|
|
78
|
+
* Wix uses the returned `oauthUrl` to redirect the user to your provider's authorization screen.
|
|
79
|
+
*
|
|
80
|
+
* *Your implementation should:**
|
|
81
|
+
* - Generate and return your provider's OAuth URL.
|
|
82
|
+
* - Host the OAuth callback, create the connection (generating its `id`), and redirect the user back to `redirectUrl` with `?connectionId=<id>` on success, or `?error=<code>` on failure. Defined failure codes: `reject` (the user denied access), `missing_permissions` (the user didn't grant all required scopes), and `internal` (token exchange, user-info fetch, or other unexpected error).
|
|
83
|
+
*/
|
|
84
|
+
declare function connectByOAuth(payload: ConnectByOAuthEnvelope): ConnectByOAuthResponse | Promise<ConnectByOAuthResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Connects a resource to your provider using a username and password.
|
|
87
|
+
*
|
|
88
|
+
* Wix calls this method when a user connects an account by credentials, for providers that support credential-based authentication.
|
|
89
|
+
*
|
|
90
|
+
* Wix uses the returned connection to create conferences for the resource.
|
|
91
|
+
*
|
|
92
|
+
* *Your implementation should:**
|
|
93
|
+
* - Validate the credentials with your provider and return the established connection.
|
|
94
|
+
* @throws BadCredentialsWixError
|
|
95
|
+
*/
|
|
96
|
+
declare function connectByCredentials(payload: ConnectByCredentialsEnvelope): ConnectByCredentialsResponse | Promise<ConnectByCredentialsResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Disconnects a resource from your provider.
|
|
99
|
+
*
|
|
100
|
+
* Wix calls this method when a user disconnects their provider account.
|
|
101
|
+
*
|
|
102
|
+
* *Your implementation should:**
|
|
103
|
+
* - Revoke or clean up your provider's tokens and any provider-side resources for the resource.
|
|
104
|
+
* - Return the disconnected connection.
|
|
105
|
+
*
|
|
106
|
+
* *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.
|
|
107
|
+
* @throws ResourceNotConnectedWixError
|
|
108
|
+
*/
|
|
109
|
+
declare function markConnectionAsDisconnected(payload: MarkConnectionAsDisconnectedEnvelope): MarkConnectionAsDisconnectedResponse | Promise<MarkConnectionAsDisconnectedResponse>;
|
|
110
|
+
|
|
111
|
+
export { ConnectByCredentialsEnvelope, ConnectByCredentialsResponse, ConnectByOAuthEnvelope, ConnectByOAuthResponse, CreateConferenceEnvelope, CreateConferenceResponse, DeleteConferenceEnvelope, DeleteConferenceResponse, GetConferenceEnvelope, GetConferenceResponse, ListConnectionsEnvelope, ListConnectionsResponse, MarkConnectionAsDisconnectedEnvelope, MarkConnectionAsDisconnectedResponse, UpdateConferenceEnvelope, UpdateConferenceResponse, connectByCredentials, connectByOAuth, createConference, deleteConference, getConference, listConnections, markConnectionAsDisconnected, updateConference };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
BadCredentialsWixError: () => BadCredentialsWixError,
|
|
24
|
+
ConnectionMethod: () => ConnectionMethod,
|
|
25
|
+
ConnectionStatus: () => ConnectionStatus,
|
|
26
|
+
IdentityType: () => IdentityType,
|
|
27
|
+
ResourceNotConnectedWixError: () => ResourceNotConnectedWixError
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
30
|
+
|
|
31
|
+
// src/service-plugins-error-classes.ts
|
|
32
|
+
var ResourceNotConnectedWixError = class extends Error {
|
|
33
|
+
constructor() {
|
|
34
|
+
super("ResourceNotConnected");
|
|
35
|
+
this.httpCode = 428;
|
|
36
|
+
this.statusCode = "FAILED_PRECONDITION";
|
|
37
|
+
this.applicationCode = "RESOURCE_NOT_CONNECTED";
|
|
38
|
+
this.name = "ResourceNotConnected";
|
|
39
|
+
this.errorType = "SPI";
|
|
40
|
+
this.spiErrorData = {
|
|
41
|
+
name: "ResourceNotConnected",
|
|
42
|
+
applicationCode: "RESOURCE_NOT_CONNECTED"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
/** @hidden */
|
|
47
|
+
this.__type = "wix_spi_error";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
var BadCredentialsWixError = class extends Error {
|
|
51
|
+
constructor() {
|
|
52
|
+
super("BadCredentials");
|
|
53
|
+
this.httpCode = 401;
|
|
54
|
+
this.statusCode = "UNAUTHENTICATED";
|
|
55
|
+
this.applicationCode = "BAD_CREDENTIALS";
|
|
56
|
+
this.name = "BadCredentials";
|
|
57
|
+
this.errorType = "SPI";
|
|
58
|
+
this.spiErrorData = {
|
|
59
|
+
name: "BadCredentials",
|
|
60
|
+
applicationCode: "BAD_CREDENTIALS"
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static {
|
|
64
|
+
/** @hidden */
|
|
65
|
+
this.__type = "wix_spi_error";
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// src/service-plugins-types.ts
|
|
70
|
+
var ConnectionStatus = /* @__PURE__ */ ((ConnectionStatus2) => {
|
|
71
|
+
ConnectionStatus2["CONNECTED"] = "CONNECTED";
|
|
72
|
+
ConnectionStatus2["DISCONNECTED"] = "DISCONNECTED";
|
|
73
|
+
ConnectionStatus2["ERROR"] = "ERROR";
|
|
74
|
+
return ConnectionStatus2;
|
|
75
|
+
})(ConnectionStatus || {});
|
|
76
|
+
var ConnectionMethod = /* @__PURE__ */ ((ConnectionMethod2) => {
|
|
77
|
+
ConnectionMethod2["OAUTH"] = "OAUTH";
|
|
78
|
+
ConnectionMethod2["CREDENTIALS"] = "CREDENTIALS";
|
|
79
|
+
return ConnectionMethod2;
|
|
80
|
+
})(ConnectionMethod || {});
|
|
81
|
+
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
82
|
+
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
83
|
+
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
84
|
+
IdentityType2["MEMBER"] = "MEMBER";
|
|
85
|
+
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
86
|
+
IdentityType2["APP"] = "APP";
|
|
87
|
+
return IdentityType2;
|
|
88
|
+
})(IdentityType || {});
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
BadCredentialsWixError,
|
|
92
|
+
ConnectionMethod,
|
|
93
|
+
ConnectionStatus,
|
|
94
|
+
IdentityType,
|
|
95
|
+
ResourceNotConnectedWixError
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/service-plugins-error-classes.ts","../../src/service-plugins-types.ts"],"sourcesContent":["import {\n CreateConferenceResponse,\n UpdateConferenceResponse,\n DeleteConferenceResponse,\n GetConferenceResponse,\n ListConnectionsResponse,\n ConnectByOAuthResponse,\n ConnectByCredentialsResponse,\n MarkConnectionAsDisconnectedResponse,\n} from './src/service-plugins-types.js';\nimport {\n CreateConferenceEnvelope,\n UpdateConferenceEnvelope,\n DeleteConferenceEnvelope,\n GetConferenceEnvelope,\n ListConnectionsEnvelope,\n ConnectByOAuthEnvelope,\n ConnectByCredentialsEnvelope,\n MarkConnectionAsDisconnectedEnvelope,\n} from './src/interfaces-calendar-conferencing-v1-conferencing-provider.public.js';\n\nexport * from './src/service-plugins-error-classes';\nexport * from './src/service-plugins-types';\nexport {\n CreateConferenceEnvelope,\n UpdateConferenceEnvelope,\n DeleteConferenceEnvelope,\n GetConferenceEnvelope,\n ListConnectionsEnvelope,\n ConnectByOAuthEnvelope,\n ConnectByCredentialsEnvelope,\n MarkConnectionAsDisconnectedEnvelope,\n};\n\n/**\n * Creates a video conference with your provider.\n *\n * Wix calls this method when a conference is needed for a connected resource, for example when a booked appointment requires a meeting link.\n *\n * Wix uses the returned conference details, such as the join URL and password, and passes the conference `id` and `resourceId` back on later Get, Update, and Delete calls. Wix doesn't store the conference itself.\n *\n * *Your implementation should:**\n * - Look up the connection for the given `resourceId`.\n * - Create a distinct meeting in your provider and return its details.\n * - Be able to look the meeting up later by the `id` you return.\n *\n * Scheduling parameters (`title`, `startTime`, `duration`) are optional. Providers that don't support scheduling can ignore them.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.\n * @throws ResourceNotConnectedWixError\n */\nexport declare function createConference(\n payload: CreateConferenceEnvelope\n): CreateConferenceResponse | Promise<CreateConferenceResponse>;\n/**\n * Updates an existing conference, for example to reschedule it.\n *\n * Wix calls this method only when your configuration sets `updateSupported = true`. When `updateSupported` is false, Wix returns an error to the caller without calling your implementation.\n *\n * Wix uses the returned conference details to reflect the updated meeting.\n *\n * *Your implementation should:**\n * - Look up the meeting by the conference `id` and `resourceId`.\n * - Apply the changes in your provider and return the updated details.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.\n * @throws ResourceNotConnectedWixError\n */\nexport declare function updateConference(\n payload: UpdateConferenceEnvelope\n): UpdateConferenceResponse | Promise<UpdateConferenceResponse>;\n/**\n * Deletes a conference.\n *\n * Wix calls this method when a conference is no longer needed, for example when a booking is canceled.\n *\n * *Your implementation should:**\n * - Look up the meeting by the conference `id` and `resourceId`.\n * - End or cancel the meeting in your provider.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.\n * @throws ResourceNotConnectedWixError\n */\nexport declare function deleteConference(\n payload: DeleteConferenceEnvelope\n): DeleteConferenceResponse | Promise<DeleteConferenceResponse>;\n/**\n * Retrieves a conference's details from your provider.\n *\n * Wix calls this method to read the current state of a meeting, identified by the conference `id` and `resourceId` Wix received when the conference was created.\n *\n * Wix uses the returned details to display the conference.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.\n * @throws ResourceNotConnectedWixError\n */\nexport declare function getConference(\n payload: GetConferenceEnvelope\n): GetConferenceResponse | Promise<GetConferenceResponse>;\n/**\n * Retrieves the connections your implementation stores, optionally filtered by resource.\n *\n * Wix calls this method on demand to read the current connection state. Your implementation owns and stores connections; Wix doesn't persist them.\n *\n * Wix uses the returned connections to show connection status.\n *\n * *Your implementation should:**\n * - Return all connections you store for the given `resourceIds`, or all connections when none are specified.\n */\nexport declare function listConnections(\n payload: ListConnectionsEnvelope\n): ListConnectionsResponse | Promise<ListConnectionsResponse>;\n/**\n * Starts an OAuth connection between a resource and your provider.\n *\n * Wix calls this method when a user chooses to connect their provider account by OAuth.\n *\n * Wix uses the returned `oauthUrl` to redirect the user to your provider's authorization screen.\n *\n * *Your implementation should:**\n * - Generate and return your provider's OAuth URL.\n * - Host the OAuth callback, create the connection (generating its `id`), and redirect the user back to `redirectUrl` with `?connectionId=<id>` on success, or `?error=<code>` on failure. Defined failure codes: `reject` (the user denied access), `missing_permissions` (the user didn't grant all required scopes), and `internal` (token exchange, user-info fetch, or other unexpected error).\n */\nexport declare function connectByOAuth(\n payload: ConnectByOAuthEnvelope\n): ConnectByOAuthResponse | Promise<ConnectByOAuthResponse>;\n/**\n * Connects a resource to your provider using a username and password.\n *\n * Wix calls this method when a user connects an account by credentials, for providers that support credential-based authentication.\n *\n * Wix uses the returned connection to create conferences for the resource.\n *\n * *Your implementation should:**\n * - Validate the credentials with your provider and return the established connection.\n * @throws BadCredentialsWixError\n */\nexport declare function connectByCredentials(\n payload: ConnectByCredentialsEnvelope\n): ConnectByCredentialsResponse | Promise<ConnectByCredentialsResponse>;\n/**\n * Disconnects a resource from your provider.\n *\n * Wix calls this method when a user disconnects their provider account.\n *\n * *Your implementation should:**\n * - Revoke or clean up your provider's tokens and any provider-side resources for the resource.\n * - Return the disconnected connection.\n *\n * *Error handling:** If your implementation returns an error, Wix surfaces it to the caller.\n * @throws ResourceNotConnectedWixError\n */\nexport declare function markConnectionAsDisconnected(\n payload: MarkConnectionAsDisconnectedEnvelope\n):\n | MarkConnectionAsDisconnectedResponse\n | Promise<MarkConnectionAsDisconnectedResponse>;\n","/**\n * The resource isn't connected to your provider.\n */\nexport class ResourceNotConnectedWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ResourceNotConnected');\n\n this.httpCode = 428;\n this.statusCode = 'FAILED_PRECONDITION';\n this.applicationCode = 'RESOURCE_NOT_CONNECTED';\n this.name = 'ResourceNotConnected';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ResourceNotConnected',\n applicationCode: 'RESOURCE_NOT_CONNECTED',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n\n/**\n * The provided credentials are invalid.\n */\nexport class BadCredentialsWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('BadCredentials');\n\n this.httpCode = 401;\n this.statusCode = 'UNAUTHENTICATED';\n this.applicationCode = 'BAD_CREDENTIALS';\n this.name = 'BadCredentials';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'BadCredentials',\n applicationCode: 'BAD_CREDENTIALS',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n","export interface CreateConferenceRequest {\n /** Conference to create. */\n conference?: Conference;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\n/**\n * A video conference created by your provider.\n *\n * This is a data transfer object exchanged between Wix and your provider. The conference itself is stored by your provider, not by Wix.\n */\nexport interface Conference {\n /**\n * Conference ID. Assigned by your provider, and used by Wix to reference the conference on later calls.\n * @readonly\n * @maxLength 100\n */\n _id?: string;\n /**\n * URL to join the conference. All participants use this URL to join.\n * @readonly\n * @maxLength 2048\n */\n url?: string;\n /**\n * URL for the host to start the conference. Set it only if your provider distinguishes a host URL, such as Zoom.\n * @readonly\n * @maxLength 2048\n */\n hostUrl?: string | null;\n /**\n * Password required to join the conference.\n * @readonly\n * @maxLength 100\n */\n password?: string | null;\n /**\n * Title or topic of the meeting.\n * @maxLength 500\n */\n title?: string | null;\n /** Scheduled start time of the meeting. */\n startTime?: Date | null;\n /** Duration of the meeting in minutes. */\n durationInMinutes?: number | null;\n /**\n * Time zone for the meeting in IANA Time Zone Database format. For example, `America/New_York`.\n * @maxLength 100\n */\n timezone?: string | null;\n /**\n * Human-readable description of the conference. Set it only if your provider exposes a description or agenda.\n * @maxLength 500\n */\n description?: string | null;\n}\n\nexport interface CreateConferenceResponse {\n /** Created conference. */\n conference?: Conference;\n}\n\nexport interface UpdateConferenceRequest {\n /** Conference to update. Must include `id`. */\n conference?: Conference;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface UpdateConferenceResponse {\n /** Updated conference. */\n conference?: Conference;\n}\n\nexport interface DeleteConferenceRequest {\n /**\n * ID of the conference to delete. The `id` you returned from Create Conference.\n * @maxLength 100\n */\n conferenceId?: string;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface DeleteConferenceResponse {}\n\nexport interface GetConferenceRequest {\n /**\n * ID of the conference to retrieve. The `id` you returned from Create Conference.\n * @maxLength 100\n */\n conferenceId?: string;\n /**\n * ID of the resource whose account is used. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface GetConferenceResponse {\n /** Retrieved conference. */\n conference?: Conference;\n}\n\nexport interface ListConnectionsRequest {\n /**\n * IDs of the resources to return connections for. When empty, return all connections you store.\n * @format GUID\n * @maxSize 100\n */\n resourceIds?: string[];\n}\n\nexport interface ListConnectionsResponse {\n /** Connections you store for the requested resources. */\n connections?: Connection[];\n}\n\n/** A connection between a resource and your conferencing provider account. Your implementation stores connections and Wix reads them through List Connections. */\nexport interface Connection {\n /**\n * Connection ID. Generate a stable, unique ID for the connection. Wix passes it back to reference the connection later.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Connection status. */\n status?: ConnectionStatus;\n /**\n * Email associated with the connection.\n * @maxLength 320\n */\n email?: string;\n /** Method used to establish this connection. */\n connectionMethod?: ConnectionMethod;\n /**\n * Date and time the connection was established, in UTC. Set this on new connections.\n * @readonly\n */\n connectedDate?: Date | null;\n /**\n * ID of the resource this connection belongs to. Treat it as an opaque, stable Wix identifier. Replaces `accountOwnerId`.\n * @format GUID\n */\n resourceId?: string | null;\n}\n\nexport enum ConnectionStatus {\n /** The connection is usable now. */\n CONNECTED = 'CONNECTED',\n /** The user or your implementation intentionally disconnected the account. */\n DISCONNECTED = 'DISCONNECTED',\n /** The connection was established but is now broken, for example tokens were revoked or expired externally, and needs reconnection. */\n ERROR = 'ERROR',\n}\n\nexport enum ConnectionMethod {\n /** OAuth authorization flow. */\n OAUTH = 'OAUTH',\n /** Username and password authentication. */\n CREDENTIALS = 'CREDENTIALS',\n}\n\nexport interface ConnectByOAuthRequest {\n /**\n * URL to redirect the user to after OAuth completes, with `?connectionId=xxx` on success or `?error=xxx` on failure.\n * Either an `http` or `https` URL, or an app-scheme URL (`wixadmin://`, `wix://` or `branded.<metaSiteId>://`) when the flow starts in a mobile app.\n * @maxLength 2048\n */\n redirectUrl?: string;\n /**\n * ID of the resource to connect. Treat it as an opaque, stable Wix identifier that you key the connection by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface ConnectByOAuthResponse {\n /**\n * OAuth URL to redirect the user to.\n * @format WEB_URL\n */\n oauthUrl?: string;\n}\n\nexport interface ConnectByCredentialsRequest {\n /**\n * Username for the conferencing account. May be an email address or another identifier.\n * @maxLength 500\n */\n userName?: string;\n /**\n * Password for the conferencing account.\n * @maxLength 500\n */\n password?: string;\n /**\n * ID of the resource to connect. Treat it as an opaque, stable Wix identifier that you key the connection by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface ConnectByCredentialsResponse {\n /** Established connection. */\n connection?: Connection;\n}\n\nexport interface MarkConnectionAsDisconnectedRequest {\n /**\n * ID of the resource to disconnect. Treat it as an opaque, stable Wix identifier that you key connections by.\n * @format GUID\n */\n resourceId: string | null;\n}\n\nexport interface MarkConnectionAsDisconnectedResponse {\n /** Disconnected connection. */\n connection?: Connection;\n}\n\n/** Configuration for your conferencing provider service plugin. You set these values when you register the plugin. */\nexport interface ConferencingProviderConfig {\n /** Base URI where your service plugin is deployed. Wix sends requests to this URI. */\n deploymentUri?: SpiBaseUri;\n /**\n * Display name shown to users. For example, `Zoom` or `Google Meet`.\n * @maxLength 200\n */\n displayName?: string;\n /** Whether your provider supports updating conferences after creation. When false, Wix doesn't call Update Conference. */\n updateSupported?: boolean;\n /**\n * Connection methods your provider supports. Wix calls only the connect methods matching these values.\n * @maxSize 10\n */\n connectionMethods?: ConnectionMethod[];\n /**\n * Terms of service URL for your provider.\n * @format WEB_URL\n */\n termsUrl?: string | null;\n /**\n * Privacy policy URL for your provider.\n * @format WEB_URL\n */\n privacyUrl?: string | null;\n /**\n * URL of your provider's icon or logo image.\n * @format WEB_URL\n */\n iconUrl?: string | null;\n /**\n * Support page URL for your provider. For example, setup instructions, troubleshooting, or reconnection help.\n * @format WEB_URL\n */\n supportUrl?: string | null;\n}\n\n/** Base URI configuration for a service plugin. Wix uses these URIs to call your service plugin methods. */\nexport interface SpiBaseUri {\n /**\n * Base URI for your service plugin. Wix appends each method's path to this URI.\n *\n * For example, to receive requests at `https://my-app.com/v1/my-method`, set this field to `https://my-app.com/`.\n * @minLength 6\n * @maxLength 2048\n */\n baseUri?: string;\n /** Alternative URIs for specific methods. Use these to override the default URI for individual methods. */\n alternativeUris?: AlternativeUri[];\n}\n\n/** Custom URI for the specified service plugin method. */\nexport interface AlternativeUri {\n /**\n * Name of the method to call at the absolute URI, in PascalCase. For example, to call [Get Shipping Rates](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/shipping-rates/shipping-rates-integration-service-plugin/get-shipping-rates) on an alternative URI, specify `GetShippingRates`.\n * @minLength 3\n * @maxLength 128\n */\n methodName?: string;\n /**\n * Absolute URI that Wix calls for this method. Wix doesn't append any path to this URI.\n *\n * The URI must begin with `https://`, such as `https://my-app.com/v1/my-custom-method`.\n * @minLength 6\n * @maxLength 2048\n */\n absoluteUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Extension ID in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionId?: string | null;\n /**\n * Extension type in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionType?: string | null;\n /**\n * Invoked function.\n * @internal\n * @maxLength 256\n */\n functionName?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,+BAAN,cAA2C,MAAM;AAAA,EActD,cAAc;AACZ,UAAM,sBAAsB;AAE5B,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAGA;AAAA;AAAA,SAAgB,SAAS;AAAA;AAC3B;AAKO,IAAM,yBAAN,cAAqC,MAAM;AAAA,EAchD,cAAc;AACZ,UAAM,gBAAgB;AAEtB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAGA;AAAA;AAAA,SAAgB,SAAS;AAAA;AAC3B;;;ACyFO,IAAK,mBAAL,kBAAKA,sBAAL;AAEL,EAAAA,kBAAA,eAAY;AAEZ,EAAAA,kBAAA,kBAAe;AAEf,EAAAA,kBAAA,WAAQ;AANE,SAAAA;AAAA,GAAA;AASL,IAAK,mBAAL,kBAAKC,sBAAL;AAEL,EAAAA,kBAAA,WAAQ;AAER,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;AAyLL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionMethod","IdentityType"]}
|