@wix/groups 1.0.83 → 1.0.85
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/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +19 -13
- package/type-bundles/context.bundle.d.ts +3154 -0
- package/type-bundles/index.bundle.d.ts +5110 -0
- package/type-bundles/meta.bundle.d.ts +4950 -0
|
@@ -0,0 +1,3154 @@
|
|
|
1
|
+
interface Group$2 {
|
|
2
|
+
/**
|
|
3
|
+
* Group ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string | null;
|
|
7
|
+
/** A unique part of a group's URL, for example `https:/example.com/groups/slug`. */
|
|
8
|
+
slug?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* @internal
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
14
|
+
privacyLevel?: PrivacyStatus$2;
|
|
15
|
+
/**
|
|
16
|
+
* Group privacy status.
|
|
17
|
+
* - `PUBLIC` - Anyone can see the group and its content. Anyone can join the group.
|
|
18
|
+
* - `PRIVATE` - Anyone can see the group, but only members can see its content. New member must submit a `Join Group Request`.
|
|
19
|
+
* - `SECRET` - Only admins and members can see the group. New members can only be added by other members.
|
|
20
|
+
*/
|
|
21
|
+
privacyStatus?: PrivacyStatus$2;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
27
|
+
title?: string | null;
|
|
28
|
+
/** Group name. */
|
|
29
|
+
name?: string | null;
|
|
30
|
+
/** Group description in DraftJS format. */
|
|
31
|
+
description?: string | null;
|
|
32
|
+
/** Group teaser. */
|
|
33
|
+
teaser?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* @internal
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
39
|
+
details?: GroupDetails$2;
|
|
40
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
41
|
+
memberTitle?: string | null;
|
|
42
|
+
/** Cover image. You cannot upload your own cover image. */
|
|
43
|
+
coverImage?: CoverImage$2;
|
|
44
|
+
/** Group specific settings. Available to the site owners under `Admin Tools` in the dashboard. */
|
|
45
|
+
settings?: GroupSettings$2;
|
|
46
|
+
/**
|
|
47
|
+
* Total count of current group members.
|
|
48
|
+
* @readonly
|
|
49
|
+
*/
|
|
50
|
+
membersCount?: number | null;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @internal
|
|
54
|
+
* @readonly
|
|
55
|
+
* @deprecated
|
|
56
|
+
*/
|
|
57
|
+
createdBy?: Identity$2;
|
|
58
|
+
/**
|
|
59
|
+
* Group owner.
|
|
60
|
+
* @readonly
|
|
61
|
+
*/
|
|
62
|
+
ownerId?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Group creation date and time.
|
|
65
|
+
* @readonly
|
|
66
|
+
*/
|
|
67
|
+
_createdDate?: Date;
|
|
68
|
+
/**
|
|
69
|
+
* Date and time of the latest group update.
|
|
70
|
+
* @readonly
|
|
71
|
+
*/
|
|
72
|
+
_updatedDate?: Date;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @internal
|
|
76
|
+
* @readonly
|
|
77
|
+
* @deprecated
|
|
78
|
+
*/
|
|
79
|
+
recentActivityDate?: Date;
|
|
80
|
+
/**
|
|
81
|
+
* Date and time of the most recent group activity, for example a post or comment.
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
lastActivityDate?: Date;
|
|
85
|
+
}
|
|
86
|
+
interface Logo$2 {
|
|
87
|
+
/** Logo image ID (for internal use). */
|
|
88
|
+
mediaId?: string | null;
|
|
89
|
+
/** Logo image width. */
|
|
90
|
+
width?: number | null;
|
|
91
|
+
/** Logo image height. */
|
|
92
|
+
height?: number | null;
|
|
93
|
+
}
|
|
94
|
+
interface Image$2 {
|
|
95
|
+
/** Image ID (for internal use). */
|
|
96
|
+
mediaId?: string | null;
|
|
97
|
+
/** Image width. */
|
|
98
|
+
width?: number | null;
|
|
99
|
+
/** Image height. */
|
|
100
|
+
height?: number | null;
|
|
101
|
+
}
|
|
102
|
+
interface Position$2 {
|
|
103
|
+
/** horizontal coordinate */
|
|
104
|
+
x?: number;
|
|
105
|
+
/** vertical coordinate */
|
|
106
|
+
y?: number;
|
|
107
|
+
}
|
|
108
|
+
interface OnboardingStepSettings$2 {
|
|
109
|
+
stepKey?: StepKey$2;
|
|
110
|
+
visible?: boolean;
|
|
111
|
+
}
|
|
112
|
+
declare enum StepKey$2 {
|
|
113
|
+
UNKNOWN = "UNKNOWN",
|
|
114
|
+
CREATE_POST = "CREATE_POST",
|
|
115
|
+
REACT_TO_POST = "REACT_TO_POST",
|
|
116
|
+
INVITE_MEMBERS = "INVITE_MEMBERS"
|
|
117
|
+
}
|
|
118
|
+
declare enum PrivacyStatus$2 {
|
|
119
|
+
UNKNOWN = "UNKNOWN",
|
|
120
|
+
/** Anyone can see the group in the group list and view its content. Anyone can join. */
|
|
121
|
+
PUBLIC = "PUBLIC",
|
|
122
|
+
/** Anyone can see the group in the group list, but only group members can see its content. In order to join a group, a group join request must be submitted. */
|
|
123
|
+
PRIVATE = "PRIVATE",
|
|
124
|
+
/** Only group members and admins can see the group in the group list. New group members can only be added by existing group members. */
|
|
125
|
+
SECRET = "SECRET"
|
|
126
|
+
}
|
|
127
|
+
interface GroupDetails$2 {
|
|
128
|
+
/** Group logo. You cannot upload your own logo. */
|
|
129
|
+
logo?: Logo$2;
|
|
130
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
131
|
+
membersTitle?: string | null;
|
|
132
|
+
}
|
|
133
|
+
interface CoverImage$2 {
|
|
134
|
+
/** Cover image. */
|
|
135
|
+
image?: Image$2;
|
|
136
|
+
/** Position of the corner of the cover image (or logo). */
|
|
137
|
+
position?: Position$2;
|
|
138
|
+
/** Position of the corner of the cover image (or logo) for mobile browser. */
|
|
139
|
+
mobilePosition?: Position$2;
|
|
140
|
+
}
|
|
141
|
+
interface GroupSettings$2 {
|
|
142
|
+
/**
|
|
143
|
+
* __Deprecated.__ Use `allowedToInviteMembers` instead.
|
|
144
|
+
* Whether regular members are permitted to invite new members.
|
|
145
|
+
* If `false`, only admins can invite members. Defaults to `true`.
|
|
146
|
+
* @deprecated
|
|
147
|
+
*/
|
|
148
|
+
membersCanInvite?: boolean | null;
|
|
149
|
+
/**
|
|
150
|
+
* __Deprecated.__ Use `allowedToApproveJoinRequests` instead.
|
|
151
|
+
* Whether all group members are permitted to approve join group requests.
|
|
152
|
+
* If `false`, member approval is limited to the admins.
|
|
153
|
+
* @deprecated
|
|
154
|
+
*/
|
|
155
|
+
membersCanApprove?: boolean | null;
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
* @internal
|
|
159
|
+
* @deprecated
|
|
160
|
+
*/
|
|
161
|
+
memberWelcomePostEnabled?: boolean | null;
|
|
162
|
+
/** Whether a daily post about new members is enabled. */
|
|
163
|
+
welcomeMemberPostEnabled?: boolean | null;
|
|
164
|
+
/** Whether an automatic post about changing the group details is enabled. */
|
|
165
|
+
groupDetailsChangedPostEnabled?: boolean | null;
|
|
166
|
+
/** Whether all members can see the full member list. */
|
|
167
|
+
showMemberList?: boolean | null;
|
|
168
|
+
onboardingStepsSettings?: OnboardingStepSettings$2[];
|
|
169
|
+
}
|
|
170
|
+
interface Identity$2 {
|
|
171
|
+
/** Member ID of the group creator. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
|
|
172
|
+
_id?: string | null;
|
|
173
|
+
identityType?: IdentityType$2;
|
|
174
|
+
}
|
|
175
|
+
declare enum IdentityType$2 {
|
|
176
|
+
USER = "USER",
|
|
177
|
+
MEMBER = "MEMBER"
|
|
178
|
+
}
|
|
179
|
+
declare enum ContentType {
|
|
180
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
181
|
+
DRAFTJS = "DRAFTJS",
|
|
182
|
+
RICH_CONTENT = "RICH_CONTENT"
|
|
183
|
+
}
|
|
184
|
+
interface GroupCoverChanged {
|
|
185
|
+
oldUrl?: string | null;
|
|
186
|
+
newUrl?: string | null;
|
|
187
|
+
}
|
|
188
|
+
interface GroupDescriptionChanged {
|
|
189
|
+
oldDescription?: string | null;
|
|
190
|
+
newDescription?: string | null;
|
|
191
|
+
}
|
|
192
|
+
interface DeleteGroupResponse {
|
|
193
|
+
/** Deleted group. */
|
|
194
|
+
group?: Group$2;
|
|
195
|
+
}
|
|
196
|
+
interface GetGroupBySlugResponse {
|
|
197
|
+
/** Retrieved group. */
|
|
198
|
+
group?: Group$2;
|
|
199
|
+
}
|
|
200
|
+
interface ListGroupsResponse {
|
|
201
|
+
/** Retrieved Groups. */
|
|
202
|
+
groups?: Group$2[];
|
|
203
|
+
metadata?: PagingMetadata$6;
|
|
204
|
+
}
|
|
205
|
+
interface PagingMetadata$6 {
|
|
206
|
+
/** Number of items returned in the response. */
|
|
207
|
+
count?: number | null;
|
|
208
|
+
/** Offset that was requested. */
|
|
209
|
+
offset?: number | null;
|
|
210
|
+
/** Total number of items that match the query. */
|
|
211
|
+
total?: number | null;
|
|
212
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
213
|
+
tooManyToCount?: boolean | null;
|
|
214
|
+
}
|
|
215
|
+
interface IdentificationData$7 extends IdentificationDataIdOneOf$7 {
|
|
216
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
217
|
+
anonymousVisitorId?: string;
|
|
218
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
219
|
+
memberId?: string;
|
|
220
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
221
|
+
wixUserId?: string;
|
|
222
|
+
/** ID of an app. */
|
|
223
|
+
appId?: string;
|
|
224
|
+
/** @readonly */
|
|
225
|
+
identityType?: WebhookIdentityType$7;
|
|
226
|
+
}
|
|
227
|
+
/** @oneof */
|
|
228
|
+
interface IdentificationDataIdOneOf$7 {
|
|
229
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
230
|
+
anonymousVisitorId?: string;
|
|
231
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
232
|
+
memberId?: string;
|
|
233
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
234
|
+
wixUserId?: string;
|
|
235
|
+
/** ID of an app. */
|
|
236
|
+
appId?: string;
|
|
237
|
+
}
|
|
238
|
+
declare enum WebhookIdentityType$7 {
|
|
239
|
+
UNKNOWN = "UNKNOWN",
|
|
240
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
241
|
+
MEMBER = "MEMBER",
|
|
242
|
+
WIX_USER = "WIX_USER",
|
|
243
|
+
APP = "APP"
|
|
244
|
+
}
|
|
245
|
+
interface DeleteGroupResponseNonNullableFields {
|
|
246
|
+
group?: {
|
|
247
|
+
privacyLevel: PrivacyStatus$2;
|
|
248
|
+
privacyStatus: PrivacyStatus$2;
|
|
249
|
+
coverImage?: {
|
|
250
|
+
position?: {
|
|
251
|
+
x: number;
|
|
252
|
+
y: number;
|
|
253
|
+
};
|
|
254
|
+
mobilePosition?: {
|
|
255
|
+
x: number;
|
|
256
|
+
y: number;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
settings?: {
|
|
260
|
+
onboardingStepsSettings: {
|
|
261
|
+
stepKey: StepKey$2;
|
|
262
|
+
visible: boolean;
|
|
263
|
+
}[];
|
|
264
|
+
};
|
|
265
|
+
createdBy?: {
|
|
266
|
+
identityType: IdentityType$2;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
interface GetGroupBySlugResponseNonNullableFields {
|
|
271
|
+
group?: {
|
|
272
|
+
privacyLevel: PrivacyStatus$2;
|
|
273
|
+
privacyStatus: PrivacyStatus$2;
|
|
274
|
+
coverImage?: {
|
|
275
|
+
position?: {
|
|
276
|
+
x: number;
|
|
277
|
+
y: number;
|
|
278
|
+
};
|
|
279
|
+
mobilePosition?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
settings?: {
|
|
285
|
+
onboardingStepsSettings: {
|
|
286
|
+
stepKey: StepKey$2;
|
|
287
|
+
visible: boolean;
|
|
288
|
+
}[];
|
|
289
|
+
};
|
|
290
|
+
createdBy?: {
|
|
291
|
+
identityType: IdentityType$2;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
interface ListGroupsResponseNonNullableFields {
|
|
296
|
+
groups: {
|
|
297
|
+
privacyLevel: PrivacyStatus$2;
|
|
298
|
+
privacyStatus: PrivacyStatus$2;
|
|
299
|
+
coverImage?: {
|
|
300
|
+
position?: {
|
|
301
|
+
x: number;
|
|
302
|
+
y: number;
|
|
303
|
+
};
|
|
304
|
+
mobilePosition?: {
|
|
305
|
+
x: number;
|
|
306
|
+
y: number;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
settings?: {
|
|
310
|
+
onboardingStepsSettings: {
|
|
311
|
+
stepKey: StepKey$2;
|
|
312
|
+
visible: boolean;
|
|
313
|
+
}[];
|
|
314
|
+
};
|
|
315
|
+
createdBy?: {
|
|
316
|
+
identityType: IdentityType$2;
|
|
317
|
+
};
|
|
318
|
+
}[];
|
|
319
|
+
}
|
|
320
|
+
interface BaseEventMetadata$7 {
|
|
321
|
+
/** App instance ID. */
|
|
322
|
+
instanceId?: string | null;
|
|
323
|
+
/** Event type. */
|
|
324
|
+
eventType?: string;
|
|
325
|
+
/** The identification type and identity data. */
|
|
326
|
+
identity?: IdentificationData$7;
|
|
327
|
+
}
|
|
328
|
+
interface EventMetadata$7 extends BaseEventMetadata$7 {
|
|
329
|
+
/**
|
|
330
|
+
* Unique event ID.
|
|
331
|
+
* Allows clients to ignore duplicate webhooks.
|
|
332
|
+
*/
|
|
333
|
+
_id?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Assumes actions are also always typed to an entity_type
|
|
336
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
337
|
+
*/
|
|
338
|
+
entityFqdn?: string;
|
|
339
|
+
/**
|
|
340
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
341
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
342
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
343
|
+
*/
|
|
344
|
+
slug?: string;
|
|
345
|
+
/** ID of the entity associated with the event. */
|
|
346
|
+
entityId?: string;
|
|
347
|
+
/** Event timestamp. */
|
|
348
|
+
eventTime?: Date;
|
|
349
|
+
/**
|
|
350
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
351
|
+
* (for example, GDPR).
|
|
352
|
+
*/
|
|
353
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
354
|
+
/** If present, indicates the action that triggered the event. */
|
|
355
|
+
originatedFrom?: string | null;
|
|
356
|
+
/**
|
|
357
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
358
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
359
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
360
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
361
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
362
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
363
|
+
*/
|
|
364
|
+
entityEventSequence?: string | null;
|
|
365
|
+
}
|
|
366
|
+
interface GroupCreatedEnvelope {
|
|
367
|
+
entity: Group$2;
|
|
368
|
+
metadata: EventMetadata$7;
|
|
369
|
+
}
|
|
370
|
+
interface GroupUpdatedEnvelope {
|
|
371
|
+
entity: Group$2;
|
|
372
|
+
metadata: EventMetadata$7;
|
|
373
|
+
}
|
|
374
|
+
interface GroupCoverChangedEnvelope {
|
|
375
|
+
data: GroupCoverChanged;
|
|
376
|
+
metadata: EventMetadata$7;
|
|
377
|
+
}
|
|
378
|
+
interface GroupDescriptionChangedEnvelope {
|
|
379
|
+
data: GroupDescriptionChanged;
|
|
380
|
+
metadata: EventMetadata$7;
|
|
381
|
+
}
|
|
382
|
+
interface GroupDeletedEnvelope {
|
|
383
|
+
metadata: EventMetadata$7;
|
|
384
|
+
}
|
|
385
|
+
interface CreateGroupOptions {
|
|
386
|
+
/** ID of the member who created the group. This member will automatically become an admin. */
|
|
387
|
+
creatorId?: string | null;
|
|
388
|
+
/** Content Type */
|
|
389
|
+
contentType?: ContentType;
|
|
390
|
+
}
|
|
391
|
+
interface UpdateGroup {
|
|
392
|
+
/**
|
|
393
|
+
* Group ID.
|
|
394
|
+
* @readonly
|
|
395
|
+
*/
|
|
396
|
+
_id?: string | null;
|
|
397
|
+
/** A unique part of a group's URL, for example `https:/example.com/groups/slug`. */
|
|
398
|
+
slug?: string | null;
|
|
399
|
+
/**
|
|
400
|
+
* @internal
|
|
401
|
+
* @deprecated
|
|
402
|
+
*/
|
|
403
|
+
privacyLevel?: PrivacyStatus$2;
|
|
404
|
+
/**
|
|
405
|
+
* Group privacy status.
|
|
406
|
+
* - `PUBLIC` - Anyone can see the group and its content. Anyone can join the group.
|
|
407
|
+
* - `PRIVATE` - Anyone can see the group, but only members can see its content. New member must submit a `Join Group Request`.
|
|
408
|
+
* - `SECRET` - Only admins and members can see the group. New members can only be added by other members.
|
|
409
|
+
*/
|
|
410
|
+
privacyStatus?: PrivacyStatus$2;
|
|
411
|
+
/**
|
|
412
|
+
* @internal
|
|
413
|
+
* @deprecated
|
|
414
|
+
*/
|
|
415
|
+
title?: string | null;
|
|
416
|
+
/** Group name. */
|
|
417
|
+
name?: string | null;
|
|
418
|
+
/** Group description in DraftJS format. */
|
|
419
|
+
description?: string | null;
|
|
420
|
+
/** Group teaser. */
|
|
421
|
+
teaser?: string | null;
|
|
422
|
+
/**
|
|
423
|
+
* @internal
|
|
424
|
+
* @deprecated
|
|
425
|
+
*/
|
|
426
|
+
details?: GroupDetails$2;
|
|
427
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
428
|
+
memberTitle?: string | null;
|
|
429
|
+
/** Cover image. You cannot upload your own cover image. */
|
|
430
|
+
coverImage?: CoverImage$2;
|
|
431
|
+
/** Group specific settings. Available to the site owners under `Admin Tools` in the dashboard. */
|
|
432
|
+
settings?: GroupSettings$2;
|
|
433
|
+
/**
|
|
434
|
+
* Total count of current group members.
|
|
435
|
+
* @readonly
|
|
436
|
+
*/
|
|
437
|
+
membersCount?: number | null;
|
|
438
|
+
/**
|
|
439
|
+
* @internal
|
|
440
|
+
* @readonly
|
|
441
|
+
* @deprecated
|
|
442
|
+
*/
|
|
443
|
+
createdBy?: Identity$2;
|
|
444
|
+
/**
|
|
445
|
+
* Group owner.
|
|
446
|
+
* @readonly
|
|
447
|
+
*/
|
|
448
|
+
ownerId?: string | null;
|
|
449
|
+
/**
|
|
450
|
+
* Group creation date and time.
|
|
451
|
+
* @readonly
|
|
452
|
+
*/
|
|
453
|
+
_createdDate?: Date;
|
|
454
|
+
/**
|
|
455
|
+
* Date and time of the latest group update.
|
|
456
|
+
* @readonly
|
|
457
|
+
*/
|
|
458
|
+
_updatedDate?: Date;
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
* @readonly
|
|
462
|
+
* @deprecated
|
|
463
|
+
*/
|
|
464
|
+
recentActivityDate?: Date;
|
|
465
|
+
/**
|
|
466
|
+
* Date and time of the most recent group activity, for example a post or comment.
|
|
467
|
+
* @readonly
|
|
468
|
+
*/
|
|
469
|
+
lastActivityDate?: Date;
|
|
470
|
+
}
|
|
471
|
+
interface UpdateGroupOptions {
|
|
472
|
+
/** Content Type */
|
|
473
|
+
contentType?: ContentType;
|
|
474
|
+
}
|
|
475
|
+
interface GetGroupOptions {
|
|
476
|
+
/** Content type (PLAIN_TEXT returns content as it is) */
|
|
477
|
+
contentType?: ContentType;
|
|
478
|
+
}
|
|
479
|
+
interface GetGroupBySlugOptions {
|
|
480
|
+
autoInviteId?: string | null;
|
|
481
|
+
/** Content type (PLAIN_TEXT returns content as it is) */
|
|
482
|
+
contentType?: ContentType;
|
|
483
|
+
}
|
|
484
|
+
interface ListGroupsOptions {
|
|
485
|
+
/** Number of items to load. Maximum `100`. */
|
|
486
|
+
limit?: number | null;
|
|
487
|
+
/** Number of items to skip in the current sort order. */
|
|
488
|
+
offset?: number | null;
|
|
489
|
+
/** Content type (PLAIN_TEXT returns content as it is) */
|
|
490
|
+
contentType?: ContentType;
|
|
491
|
+
}
|
|
492
|
+
interface QueryGroupsOptions {
|
|
493
|
+
/** Content type (PLAIN_TEXT returns content as it is) */
|
|
494
|
+
contentType?: ContentType | undefined;
|
|
495
|
+
}
|
|
496
|
+
interface QueryOffsetResult$3 {
|
|
497
|
+
currentPage: number | undefined;
|
|
498
|
+
totalPages: number | undefined;
|
|
499
|
+
totalCount: number | undefined;
|
|
500
|
+
hasNext: () => boolean;
|
|
501
|
+
hasPrev: () => boolean;
|
|
502
|
+
length: number;
|
|
503
|
+
pageSize: number;
|
|
504
|
+
}
|
|
505
|
+
interface GroupsQueryResult extends QueryOffsetResult$3 {
|
|
506
|
+
items: Group$2[];
|
|
507
|
+
query: GroupsQueryBuilder;
|
|
508
|
+
next: () => Promise<GroupsQueryResult>;
|
|
509
|
+
prev: () => Promise<GroupsQueryResult>;
|
|
510
|
+
}
|
|
511
|
+
interface GroupsQueryBuilder {
|
|
512
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
513
|
+
* @param value - Value to compare against.
|
|
514
|
+
*/
|
|
515
|
+
eq: (propertyName: 'title', value: any) => GroupsQueryBuilder;
|
|
516
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
517
|
+
* @param value - Value to compare against.
|
|
518
|
+
*/
|
|
519
|
+
ne: (propertyName: 'title', value: any) => GroupsQueryBuilder;
|
|
520
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
521
|
+
* @param string - String to compare against. Case-insensitive.
|
|
522
|
+
*/
|
|
523
|
+
startsWith: (propertyName: 'title', value: string) => GroupsQueryBuilder;
|
|
524
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
525
|
+
* @param values - List of values to compare against.
|
|
526
|
+
*/
|
|
527
|
+
hasSome: (propertyName: 'title', value: any[]) => GroupsQueryBuilder;
|
|
528
|
+
in: (propertyName: 'title', value: any) => GroupsQueryBuilder;
|
|
529
|
+
exists: (propertyName: 'title', value: boolean) => GroupsQueryBuilder;
|
|
530
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
531
|
+
ascending: (...propertyNames: Array<'title' | 'membersCount' | '_createdDate' | 'recentActivityDate'>) => GroupsQueryBuilder;
|
|
532
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
533
|
+
descending: (...propertyNames: Array<'title' | 'membersCount' | '_createdDate' | 'recentActivityDate'>) => GroupsQueryBuilder;
|
|
534
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
535
|
+
limit: (limit: number) => GroupsQueryBuilder;
|
|
536
|
+
/** @param skip - Number of items to skip in the query results before returning the results. */
|
|
537
|
+
skip: (skip: number) => GroupsQueryBuilder;
|
|
538
|
+
find: () => Promise<GroupsQueryResult>;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
542
|
+
interface HttpClient {
|
|
543
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
544
|
+
}
|
|
545
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
546
|
+
type HttpResponse<T = any> = {
|
|
547
|
+
data: T;
|
|
548
|
+
status: number;
|
|
549
|
+
statusText: string;
|
|
550
|
+
headers: any;
|
|
551
|
+
request?: any;
|
|
552
|
+
};
|
|
553
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
554
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
555
|
+
url: string;
|
|
556
|
+
data?: Data;
|
|
557
|
+
params?: URLSearchParams;
|
|
558
|
+
} & APIMetadata;
|
|
559
|
+
type APIMetadata = {
|
|
560
|
+
methodFqn?: string;
|
|
561
|
+
entityFqdn?: string;
|
|
562
|
+
packageName?: string;
|
|
563
|
+
};
|
|
564
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
565
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
566
|
+
__type: 'event-definition';
|
|
567
|
+
type: Type;
|
|
568
|
+
isDomainEvent?: boolean;
|
|
569
|
+
transformations?: unknown;
|
|
570
|
+
__payload: Payload;
|
|
571
|
+
};
|
|
572
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
573
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
574
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
575
|
+
|
|
576
|
+
declare function createGroup$1(httpClient: HttpClient): (group: Group$2, options?: CreateGroupOptions) => Promise<Group$2 & {
|
|
577
|
+
privacyLevel: PrivacyStatus$2;
|
|
578
|
+
privacyStatus: PrivacyStatus$2;
|
|
579
|
+
coverImage?: {
|
|
580
|
+
position?: {
|
|
581
|
+
x: number;
|
|
582
|
+
y: number;
|
|
583
|
+
} | undefined;
|
|
584
|
+
mobilePosition?: {
|
|
585
|
+
x: number;
|
|
586
|
+
y: number;
|
|
587
|
+
} | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
settings?: {
|
|
590
|
+
onboardingStepsSettings: {
|
|
591
|
+
stepKey: StepKey$2;
|
|
592
|
+
visible: boolean;
|
|
593
|
+
}[];
|
|
594
|
+
} | undefined;
|
|
595
|
+
createdBy?: {
|
|
596
|
+
identityType: IdentityType$2;
|
|
597
|
+
} | undefined;
|
|
598
|
+
}>;
|
|
599
|
+
declare function updateGroup$1(httpClient: HttpClient): (_id: string | null, group: UpdateGroup, options?: UpdateGroupOptions) => Promise<Group$2 & {
|
|
600
|
+
privacyLevel: PrivacyStatus$2;
|
|
601
|
+
privacyStatus: PrivacyStatus$2;
|
|
602
|
+
coverImage?: {
|
|
603
|
+
position?: {
|
|
604
|
+
x: number;
|
|
605
|
+
y: number;
|
|
606
|
+
} | undefined;
|
|
607
|
+
mobilePosition?: {
|
|
608
|
+
x: number;
|
|
609
|
+
y: number;
|
|
610
|
+
} | undefined;
|
|
611
|
+
} | undefined;
|
|
612
|
+
settings?: {
|
|
613
|
+
onboardingStepsSettings: {
|
|
614
|
+
stepKey: StepKey$2;
|
|
615
|
+
visible: boolean;
|
|
616
|
+
}[];
|
|
617
|
+
} | undefined;
|
|
618
|
+
createdBy?: {
|
|
619
|
+
identityType: IdentityType$2;
|
|
620
|
+
} | undefined;
|
|
621
|
+
}>;
|
|
622
|
+
declare function deleteGroup$1(httpClient: HttpClient): (groupId: string) => Promise<DeleteGroupResponse & DeleteGroupResponseNonNullableFields>;
|
|
623
|
+
declare function getGroup$1(httpClient: HttpClient): (groupId: string, options?: GetGroupOptions) => Promise<Group$2 & {
|
|
624
|
+
privacyLevel: PrivacyStatus$2;
|
|
625
|
+
privacyStatus: PrivacyStatus$2;
|
|
626
|
+
coverImage?: {
|
|
627
|
+
position?: {
|
|
628
|
+
x: number;
|
|
629
|
+
y: number;
|
|
630
|
+
} | undefined;
|
|
631
|
+
mobilePosition?: {
|
|
632
|
+
x: number;
|
|
633
|
+
y: number;
|
|
634
|
+
} | undefined;
|
|
635
|
+
} | undefined;
|
|
636
|
+
settings?: {
|
|
637
|
+
onboardingStepsSettings: {
|
|
638
|
+
stepKey: StepKey$2;
|
|
639
|
+
visible: boolean;
|
|
640
|
+
}[];
|
|
641
|
+
} | undefined;
|
|
642
|
+
createdBy?: {
|
|
643
|
+
identityType: IdentityType$2;
|
|
644
|
+
} | undefined;
|
|
645
|
+
}>;
|
|
646
|
+
declare function getGroupBySlug$1(httpClient: HttpClient): (slug: string, options?: GetGroupBySlugOptions) => Promise<GetGroupBySlugResponse & GetGroupBySlugResponseNonNullableFields>;
|
|
647
|
+
declare function listGroups$1(httpClient: HttpClient): (options?: ListGroupsOptions) => Promise<ListGroupsResponse & ListGroupsResponseNonNullableFields>;
|
|
648
|
+
declare function queryGroups$1(httpClient: HttpClient): (options?: QueryGroupsOptions) => GroupsQueryBuilder;
|
|
649
|
+
declare const onGroupCreated$1: EventDefinition<GroupCreatedEnvelope, "wix.social_groups.v2.group_created">;
|
|
650
|
+
declare const onGroupUpdated$1: EventDefinition<GroupUpdatedEnvelope, "wix.social_groups.v2.group_updated">;
|
|
651
|
+
declare const onGroupCoverChanged$1: EventDefinition<GroupCoverChangedEnvelope, "wix.social_groups.v2.group_group_cover_changed">;
|
|
652
|
+
declare const onGroupDescriptionChanged$1: EventDefinition<GroupDescriptionChangedEnvelope, "wix.social_groups.v2.group_group_description_changed">;
|
|
653
|
+
declare const onGroupDeleted$1: EventDefinition<GroupDeletedEnvelope, "wix.social_groups.v2.group_deleted">;
|
|
654
|
+
|
|
655
|
+
declare const createGroup: BuildRESTFunction<typeof createGroup$1>;
|
|
656
|
+
declare const updateGroup: BuildRESTFunction<typeof updateGroup$1>;
|
|
657
|
+
declare const deleteGroup: BuildRESTFunction<typeof deleteGroup$1>;
|
|
658
|
+
declare const getGroup: BuildRESTFunction<typeof getGroup$1>;
|
|
659
|
+
declare const getGroupBySlug: BuildRESTFunction<typeof getGroupBySlug$1>;
|
|
660
|
+
declare const listGroups: BuildRESTFunction<typeof listGroups$1>;
|
|
661
|
+
declare const queryGroups: BuildRESTFunction<typeof queryGroups$1>;
|
|
662
|
+
declare const onGroupCreated: BuildEventDefinition<typeof onGroupCreated$1>;
|
|
663
|
+
declare const onGroupUpdated: BuildEventDefinition<typeof onGroupUpdated$1>;
|
|
664
|
+
declare const onGroupCoverChanged: BuildEventDefinition<typeof onGroupCoverChanged$1>;
|
|
665
|
+
declare const onGroupDescriptionChanged: BuildEventDefinition<typeof onGroupDescriptionChanged$1>;
|
|
666
|
+
declare const onGroupDeleted: BuildEventDefinition<typeof onGroupDeleted$1>;
|
|
667
|
+
|
|
668
|
+
declare const context$8_createGroup: typeof createGroup;
|
|
669
|
+
declare const context$8_deleteGroup: typeof deleteGroup;
|
|
670
|
+
declare const context$8_getGroup: typeof getGroup;
|
|
671
|
+
declare const context$8_getGroupBySlug: typeof getGroupBySlug;
|
|
672
|
+
declare const context$8_listGroups: typeof listGroups;
|
|
673
|
+
declare const context$8_onGroupCoverChanged: typeof onGroupCoverChanged;
|
|
674
|
+
declare const context$8_onGroupCreated: typeof onGroupCreated;
|
|
675
|
+
declare const context$8_onGroupDeleted: typeof onGroupDeleted;
|
|
676
|
+
declare const context$8_onGroupDescriptionChanged: typeof onGroupDescriptionChanged;
|
|
677
|
+
declare const context$8_onGroupUpdated: typeof onGroupUpdated;
|
|
678
|
+
declare const context$8_queryGroups: typeof queryGroups;
|
|
679
|
+
declare const context$8_updateGroup: typeof updateGroup;
|
|
680
|
+
declare namespace context$8 {
|
|
681
|
+
export { context$8_createGroup as createGroup, context$8_deleteGroup as deleteGroup, context$8_getGroup as getGroup, context$8_getGroupBySlug as getGroupBySlug, context$8_listGroups as listGroups, context$8_onGroupCoverChanged as onGroupCoverChanged, context$8_onGroupCreated as onGroupCreated, context$8_onGroupDeleted as onGroupDeleted, context$8_onGroupDescriptionChanged as onGroupDescriptionChanged, context$8_onGroupUpdated as onGroupUpdated, context$8_queryGroups as queryGroups, context$8_updateGroup as updateGroup };
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
interface GroupMember$1 {
|
|
685
|
+
/**
|
|
686
|
+
* @internal
|
|
687
|
+
* @internal
|
|
688
|
+
* @readonly
|
|
689
|
+
* @deprecated
|
|
690
|
+
*/
|
|
691
|
+
siteMemberId?: string;
|
|
692
|
+
/**
|
|
693
|
+
* Site member ID.
|
|
694
|
+
* @readonly
|
|
695
|
+
*/
|
|
696
|
+
memberId?: string;
|
|
697
|
+
/** Group Member Role. */
|
|
698
|
+
role?: GroupRole$1;
|
|
699
|
+
/**
|
|
700
|
+
* Date and time the group Member joined the group.
|
|
701
|
+
* @readonly
|
|
702
|
+
*/
|
|
703
|
+
joinedDate?: Date;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* A group member may have multiple roles in a single group.
|
|
707
|
+
* Currently, only `MEMBER` and `ADMIN` roles are supported, but more roles may be available in the future.
|
|
708
|
+
*/
|
|
709
|
+
interface GroupRole$1 {
|
|
710
|
+
/**
|
|
711
|
+
* Group member role. One of:
|
|
712
|
+
* - `"MEMBER"` - Regular group member.
|
|
713
|
+
* - `"ADMIN"` - Group administrator.
|
|
714
|
+
*/
|
|
715
|
+
value?: Role$1;
|
|
716
|
+
}
|
|
717
|
+
declare enum Role$1 {
|
|
718
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
719
|
+
/** Regular group member. */
|
|
720
|
+
MEMBER = "MEMBER",
|
|
721
|
+
/** Group administrator. */
|
|
722
|
+
ADMIN = "ADMIN"
|
|
723
|
+
}
|
|
724
|
+
interface AddGroupMembersResponse {
|
|
725
|
+
/** New members. */
|
|
726
|
+
members?: GroupMember$1[];
|
|
727
|
+
}
|
|
728
|
+
interface MemberAdded {
|
|
729
|
+
/** Group ID that member was added to. */
|
|
730
|
+
groupId?: string;
|
|
731
|
+
/** Added group member. */
|
|
732
|
+
groupMember?: GroupMember$1;
|
|
733
|
+
}
|
|
734
|
+
interface MemberRemoved {
|
|
735
|
+
/** Group ID that member was removed from. */
|
|
736
|
+
groupId?: string;
|
|
737
|
+
/** Removed group member. */
|
|
738
|
+
groupMember?: GroupMember$1;
|
|
739
|
+
}
|
|
740
|
+
interface ListGroupMembersResponse {
|
|
741
|
+
/** Retrieved members. */
|
|
742
|
+
members?: GroupMember$1[];
|
|
743
|
+
/** Paging information. */
|
|
744
|
+
metadata?: PagingMetadata$5;
|
|
745
|
+
}
|
|
746
|
+
interface PagingMetadata$5 {
|
|
747
|
+
/** Number of items returned in the response. */
|
|
748
|
+
count?: number | null;
|
|
749
|
+
/** Offset that was requested. */
|
|
750
|
+
offset?: number | null;
|
|
751
|
+
/** Total number of items that match the query. */
|
|
752
|
+
total?: number | null;
|
|
753
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
754
|
+
tooManyToCount?: boolean | null;
|
|
755
|
+
}
|
|
756
|
+
interface Query$2 {
|
|
757
|
+
/**
|
|
758
|
+
* Filter object in the following format:
|
|
759
|
+
* `"filter" : {
|
|
760
|
+
* "fieldName1": "value1",
|
|
761
|
+
* "fieldName2":{"$operator":"value2"}
|
|
762
|
+
* }`
|
|
763
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
764
|
+
*/
|
|
765
|
+
filter?: any;
|
|
766
|
+
/**
|
|
767
|
+
* Sort object in the following format:
|
|
768
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
769
|
+
*/
|
|
770
|
+
sort?: Sorting$2[];
|
|
771
|
+
/** Paging options to limit and skip the number of items. */
|
|
772
|
+
paging?: Paging$3;
|
|
773
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
774
|
+
fields?: string[];
|
|
775
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
776
|
+
fieldsets?: string[];
|
|
777
|
+
}
|
|
778
|
+
interface Sorting$2 {
|
|
779
|
+
/** Name of the field to sort by. */
|
|
780
|
+
fieldName?: string;
|
|
781
|
+
/** Sort order. */
|
|
782
|
+
order?: SortOrder$2;
|
|
783
|
+
}
|
|
784
|
+
declare enum SortOrder$2 {
|
|
785
|
+
ASC = "ASC",
|
|
786
|
+
DESC = "DESC"
|
|
787
|
+
}
|
|
788
|
+
interface Paging$3 {
|
|
789
|
+
/** Number of items to load. */
|
|
790
|
+
limit?: number | null;
|
|
791
|
+
/** Number of items to skip in the current sort order. */
|
|
792
|
+
offset?: number | null;
|
|
793
|
+
}
|
|
794
|
+
interface ListMembershipsResponse {
|
|
795
|
+
/** Site member's memberships. */
|
|
796
|
+
memberships?: Membership[];
|
|
797
|
+
/** Paging information. */
|
|
798
|
+
metadata?: PagingMetadata$5;
|
|
799
|
+
}
|
|
800
|
+
interface Membership {
|
|
801
|
+
/**
|
|
802
|
+
* Group ID.
|
|
803
|
+
* @readonly
|
|
804
|
+
*/
|
|
805
|
+
groupId?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Membership status with Group
|
|
808
|
+
* - `"JOINED"` - Site member is a group member.
|
|
809
|
+
* - `"PENDING"` - Site member has submitted a Join Request for this group that is still `"PENDING"`.
|
|
810
|
+
*/
|
|
811
|
+
status?: MembershipStatus;
|
|
812
|
+
/** Group member role. When membership status is not `JOINED`, this is empty. */
|
|
813
|
+
role?: GroupRole$1;
|
|
814
|
+
}
|
|
815
|
+
declare enum MembershipStatus {
|
|
816
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
817
|
+
/** Site member is a group member. */
|
|
818
|
+
JOINED = "JOINED",
|
|
819
|
+
/** Site member has join group request with `PENDING` status for this group. */
|
|
820
|
+
PENDING = "PENDING"
|
|
821
|
+
}
|
|
822
|
+
interface QueryMembershipsResponse {
|
|
823
|
+
/** Site member's memberships. */
|
|
824
|
+
memberships?: Membership[];
|
|
825
|
+
/** Paging information. */
|
|
826
|
+
metadata?: PagingMetadata$5;
|
|
827
|
+
}
|
|
828
|
+
interface IdentificationData$6 extends IdentificationDataIdOneOf$6 {
|
|
829
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
830
|
+
anonymousVisitorId?: string;
|
|
831
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
832
|
+
memberId?: string;
|
|
833
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
834
|
+
wixUserId?: string;
|
|
835
|
+
/** ID of an app. */
|
|
836
|
+
appId?: string;
|
|
837
|
+
/** @readonly */
|
|
838
|
+
identityType?: WebhookIdentityType$6;
|
|
839
|
+
}
|
|
840
|
+
/** @oneof */
|
|
841
|
+
interface IdentificationDataIdOneOf$6 {
|
|
842
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
843
|
+
anonymousVisitorId?: string;
|
|
844
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
845
|
+
memberId?: string;
|
|
846
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
847
|
+
wixUserId?: string;
|
|
848
|
+
/** ID of an app. */
|
|
849
|
+
appId?: string;
|
|
850
|
+
}
|
|
851
|
+
declare enum WebhookIdentityType$6 {
|
|
852
|
+
UNKNOWN = "UNKNOWN",
|
|
853
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
854
|
+
MEMBER = "MEMBER",
|
|
855
|
+
WIX_USER = "WIX_USER",
|
|
856
|
+
APP = "APP"
|
|
857
|
+
}
|
|
858
|
+
interface AddGroupMembersResponseNonNullableFields {
|
|
859
|
+
members: {
|
|
860
|
+
siteMemberId: string;
|
|
861
|
+
memberId: string;
|
|
862
|
+
role?: {
|
|
863
|
+
value: Role$1;
|
|
864
|
+
};
|
|
865
|
+
}[];
|
|
866
|
+
}
|
|
867
|
+
interface ListGroupMembersResponseNonNullableFields {
|
|
868
|
+
members: {
|
|
869
|
+
siteMemberId: string;
|
|
870
|
+
memberId: string;
|
|
871
|
+
role?: {
|
|
872
|
+
value: Role$1;
|
|
873
|
+
};
|
|
874
|
+
}[];
|
|
875
|
+
}
|
|
876
|
+
interface ListMembershipsResponseNonNullableFields {
|
|
877
|
+
memberships: {
|
|
878
|
+
groupId: string;
|
|
879
|
+
status: MembershipStatus;
|
|
880
|
+
role?: {
|
|
881
|
+
value: Role$1;
|
|
882
|
+
};
|
|
883
|
+
}[];
|
|
884
|
+
}
|
|
885
|
+
interface QueryMembershipsResponseNonNullableFields {
|
|
886
|
+
memberships: {
|
|
887
|
+
groupId: string;
|
|
888
|
+
status: MembershipStatus;
|
|
889
|
+
role?: {
|
|
890
|
+
value: Role$1;
|
|
891
|
+
};
|
|
892
|
+
}[];
|
|
893
|
+
}
|
|
894
|
+
interface BaseEventMetadata$6 {
|
|
895
|
+
/** App instance ID. */
|
|
896
|
+
instanceId?: string | null;
|
|
897
|
+
/** Event type. */
|
|
898
|
+
eventType?: string;
|
|
899
|
+
/** The identification type and identity data. */
|
|
900
|
+
identity?: IdentificationData$6;
|
|
901
|
+
}
|
|
902
|
+
interface EventMetadata$6 extends BaseEventMetadata$6 {
|
|
903
|
+
/**
|
|
904
|
+
* Unique event ID.
|
|
905
|
+
* Allows clients to ignore duplicate webhooks.
|
|
906
|
+
*/
|
|
907
|
+
_id?: string;
|
|
908
|
+
/**
|
|
909
|
+
* Assumes actions are also always typed to an entity_type
|
|
910
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
911
|
+
*/
|
|
912
|
+
entityFqdn?: string;
|
|
913
|
+
/**
|
|
914
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
915
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
916
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
917
|
+
*/
|
|
918
|
+
slug?: string;
|
|
919
|
+
/** ID of the entity associated with the event. */
|
|
920
|
+
entityId?: string;
|
|
921
|
+
/** Event timestamp. */
|
|
922
|
+
eventTime?: Date;
|
|
923
|
+
/**
|
|
924
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
925
|
+
* (for example, GDPR).
|
|
926
|
+
*/
|
|
927
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
928
|
+
/** If present, indicates the action that triggered the event. */
|
|
929
|
+
originatedFrom?: string | null;
|
|
930
|
+
/**
|
|
931
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
932
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
933
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
934
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
935
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
936
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
937
|
+
*/
|
|
938
|
+
entityEventSequence?: string | null;
|
|
939
|
+
}
|
|
940
|
+
interface GroupMemberAddedEnvelope {
|
|
941
|
+
data: MemberAdded;
|
|
942
|
+
metadata: EventMetadata$6;
|
|
943
|
+
}
|
|
944
|
+
interface GroupMemberRemovedEnvelope {
|
|
945
|
+
data: MemberRemoved;
|
|
946
|
+
metadata: EventMetadata$6;
|
|
947
|
+
}
|
|
948
|
+
interface AddGroupMembersOptions {
|
|
949
|
+
/**
|
|
950
|
+
* @internal
|
|
951
|
+
* @internal
|
|
952
|
+
* @deprecated
|
|
953
|
+
*/
|
|
954
|
+
siteMemberIds?: string[];
|
|
955
|
+
}
|
|
956
|
+
interface RemoveGroupMembersOptions {
|
|
957
|
+
/**
|
|
958
|
+
* @internal
|
|
959
|
+
* @internal
|
|
960
|
+
* @deprecated
|
|
961
|
+
*/
|
|
962
|
+
siteMemberIds?: string[];
|
|
963
|
+
}
|
|
964
|
+
interface ListGroupMembersOptions {
|
|
965
|
+
/** Maximum number of group members to retrieve. Defaults to 100. */
|
|
966
|
+
limit?: number | null;
|
|
967
|
+
/** Number of group members to skip in the list. */
|
|
968
|
+
offset?: number | null;
|
|
969
|
+
}
|
|
970
|
+
interface QueryOffsetResult$2 {
|
|
971
|
+
currentPage: number | undefined;
|
|
972
|
+
totalPages: number | undefined;
|
|
973
|
+
totalCount: number | undefined;
|
|
974
|
+
hasNext: () => boolean;
|
|
975
|
+
hasPrev: () => boolean;
|
|
976
|
+
length: number;
|
|
977
|
+
pageSize: number;
|
|
978
|
+
}
|
|
979
|
+
interface MembersQueryResult extends QueryOffsetResult$2 {
|
|
980
|
+
items: GroupMember$1[];
|
|
981
|
+
query: MembersQueryBuilder;
|
|
982
|
+
next: () => Promise<MembersQueryResult>;
|
|
983
|
+
prev: () => Promise<MembersQueryResult>;
|
|
984
|
+
}
|
|
985
|
+
interface MembersQueryBuilder {
|
|
986
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
987
|
+
* @param value - Value to compare against.
|
|
988
|
+
*/
|
|
989
|
+
eq: (propertyName: 'role', value: any) => MembersQueryBuilder;
|
|
990
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
991
|
+
* @param value - Value to compare against.
|
|
992
|
+
*/
|
|
993
|
+
ne: (propertyName: 'role', value: any) => MembersQueryBuilder;
|
|
994
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
995
|
+
* @param values - List of values to compare against.
|
|
996
|
+
*/
|
|
997
|
+
hasSome: (propertyName: 'role', value: any[]) => MembersQueryBuilder;
|
|
998
|
+
in: (propertyName: 'role', value: any) => MembersQueryBuilder;
|
|
999
|
+
exists: (propertyName: 'role', value: boolean) => MembersQueryBuilder;
|
|
1000
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
1001
|
+
ascending: (...propertyNames: Array<'role' | 'joinedDate'>) => MembersQueryBuilder;
|
|
1002
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
1003
|
+
descending: (...propertyNames: Array<'role' | 'joinedDate'>) => MembersQueryBuilder;
|
|
1004
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
1005
|
+
limit: (limit: number) => MembersQueryBuilder;
|
|
1006
|
+
/** @param skip - Number of items to skip in the query results before returning the results. */
|
|
1007
|
+
skip: (skip: number) => MembersQueryBuilder;
|
|
1008
|
+
find: () => Promise<MembersQueryResult>;
|
|
1009
|
+
}
|
|
1010
|
+
interface ListMembershipsOptions {
|
|
1011
|
+
/** Maximum number of memberships to retrieve. Defaults to 100. */
|
|
1012
|
+
limit?: number | null;
|
|
1013
|
+
/** Number of memberships to skip in the list. */
|
|
1014
|
+
offset?: number | null;
|
|
1015
|
+
}
|
|
1016
|
+
interface QueryMembershipsOptions {
|
|
1017
|
+
/**
|
|
1018
|
+
* @internal
|
|
1019
|
+
* @internal
|
|
1020
|
+
* @deprecated
|
|
1021
|
+
*/
|
|
1022
|
+
siteMemberId?: string | null;
|
|
1023
|
+
query?: Query$2;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
declare function addGroupMembers$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: AddGroupMembersOptions) => Promise<AddGroupMembersResponse & AddGroupMembersResponseNonNullableFields>;
|
|
1027
|
+
declare function removeGroupMembers$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: RemoveGroupMembersOptions) => Promise<void>;
|
|
1028
|
+
declare function listGroupMembers$1(httpClient: HttpClient): (groupId: string, options?: ListGroupMembersOptions) => Promise<ListGroupMembersResponse & ListGroupMembersResponseNonNullableFields>;
|
|
1029
|
+
declare function queryGroupMembers$1(httpClient: HttpClient): (groupId: string) => MembersQueryBuilder;
|
|
1030
|
+
declare function listMemberships$1(httpClient: HttpClient): (memberId: string | null, options?: ListMembershipsOptions) => Promise<ListMembershipsResponse & ListMembershipsResponseNonNullableFields>;
|
|
1031
|
+
declare function queryMemberships$1(httpClient: HttpClient): (memberId: string | null, options?: QueryMembershipsOptions) => Promise<QueryMembershipsResponse & QueryMembershipsResponseNonNullableFields>;
|
|
1032
|
+
declare const onGroupMemberAdded$1: EventDefinition<GroupMemberAddedEnvelope, "wix.social_groups.v2.group_member_added">;
|
|
1033
|
+
declare const onGroupMemberRemoved$1: EventDefinition<GroupMemberRemovedEnvelope, "wix.social_groups.v2.group_member_removed">;
|
|
1034
|
+
|
|
1035
|
+
declare const addGroupMembers: BuildRESTFunction<typeof addGroupMembers$1>;
|
|
1036
|
+
declare const removeGroupMembers: BuildRESTFunction<typeof removeGroupMembers$1>;
|
|
1037
|
+
declare const listGroupMembers: BuildRESTFunction<typeof listGroupMembers$1>;
|
|
1038
|
+
declare const queryGroupMembers: BuildRESTFunction<typeof queryGroupMembers$1>;
|
|
1039
|
+
declare const listMemberships: BuildRESTFunction<typeof listMemberships$1>;
|
|
1040
|
+
declare const queryMemberships: BuildRESTFunction<typeof queryMemberships$1>;
|
|
1041
|
+
declare const onGroupMemberAdded: BuildEventDefinition<typeof onGroupMemberAdded$1>;
|
|
1042
|
+
declare const onGroupMemberRemoved: BuildEventDefinition<typeof onGroupMemberRemoved$1>;
|
|
1043
|
+
|
|
1044
|
+
declare const context$7_addGroupMembers: typeof addGroupMembers;
|
|
1045
|
+
declare const context$7_listGroupMembers: typeof listGroupMembers;
|
|
1046
|
+
declare const context$7_listMemberships: typeof listMemberships;
|
|
1047
|
+
declare const context$7_onGroupMemberAdded: typeof onGroupMemberAdded;
|
|
1048
|
+
declare const context$7_onGroupMemberRemoved: typeof onGroupMemberRemoved;
|
|
1049
|
+
declare const context$7_queryGroupMembers: typeof queryGroupMembers;
|
|
1050
|
+
declare const context$7_queryMemberships: typeof queryMemberships;
|
|
1051
|
+
declare const context$7_removeGroupMembers: typeof removeGroupMembers;
|
|
1052
|
+
declare namespace context$7 {
|
|
1053
|
+
export { context$7_addGroupMembers as addGroupMembers, context$7_listGroupMembers as listGroupMembers, context$7_listMemberships as listMemberships, context$7_onGroupMemberAdded as onGroupMemberAdded, context$7_onGroupMemberRemoved as onGroupMemberRemoved, context$7_queryGroupMembers as queryGroupMembers, context$7_queryMemberships as queryMemberships, context$7_removeGroupMembers as removeGroupMembers };
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* >**Notes:**
|
|
1058
|
+
* > + Site owners may set that members are not permitted to create groups in the Wix Groups application settings.
|
|
1059
|
+
* > + In this situation, site members have to submit a Group Request to create a new group.
|
|
1060
|
+
* > + Group Requests can be approved or rejected by an admin.
|
|
1061
|
+
* > + After a Group Request has been approved, the new group is added to the Group List in the Wix Groups app home page.
|
|
1062
|
+
* > + See [Introduction](https://dev.wix.com/api/rest/wix-groups/groups/introduction#wix-groups_groups_introduction_terminology) for more details.
|
|
1063
|
+
*/
|
|
1064
|
+
interface GroupRequest {
|
|
1065
|
+
/**
|
|
1066
|
+
* ID of the request to create a group. Same as group ID.
|
|
1067
|
+
* @readonly
|
|
1068
|
+
*/
|
|
1069
|
+
_id?: string | null;
|
|
1070
|
+
/** Group requested to create. */
|
|
1071
|
+
group?: Group$1;
|
|
1072
|
+
/**
|
|
1073
|
+
* Status of the request to create a group. One of:
|
|
1074
|
+
* - `"PENDING"` - Pending group request.
|
|
1075
|
+
* - `"APPROVED"` - Approved group request.
|
|
1076
|
+
* - `"REJECTED"` - Rejected group request.
|
|
1077
|
+
* - `"CANCELED"` - Canceled group request.
|
|
1078
|
+
*/
|
|
1079
|
+
status?: RequestStatus$3;
|
|
1080
|
+
/** Details of request to create a group. */
|
|
1081
|
+
requestDetails?: RequestDetails$3;
|
|
1082
|
+
}
|
|
1083
|
+
interface Group$1 {
|
|
1084
|
+
/**
|
|
1085
|
+
* Group ID.
|
|
1086
|
+
* @readonly
|
|
1087
|
+
*/
|
|
1088
|
+
_id?: string | null;
|
|
1089
|
+
/**
|
|
1090
|
+
* Part of a group's URL.
|
|
1091
|
+
*
|
|
1092
|
+
* For example, `'https:/example.com/groups/{my-group-slug}'`. Generally based on the group name, but for secret groups it is an autogenerated string of characters, for example, `'https:/example.com/groups/{5D3yTX}'`. It is case-sensitive.
|
|
1093
|
+
*/
|
|
1094
|
+
slug?: string | null;
|
|
1095
|
+
/**
|
|
1096
|
+
* @internal
|
|
1097
|
+
* @internal
|
|
1098
|
+
* @deprecated
|
|
1099
|
+
*/
|
|
1100
|
+
privacyLevel?: PrivacyStatus$1;
|
|
1101
|
+
/**
|
|
1102
|
+
* Group privacy status.
|
|
1103
|
+
* - `"PUBLIC"` - Site visitors can see the group and its content in the list of groups. Members can join the group.
|
|
1104
|
+
* - `"PRIVATE"` - Site visitors can see the group in the list of groups, but only site members can see its content. Members can request to join the group.
|
|
1105
|
+
* - `"SECRET"` - Only admins and group members can see the group and its content in the list of groups. Members can only join a group if invited by group admins, or other group members.
|
|
1106
|
+
*/
|
|
1107
|
+
privacyStatus?: PrivacyStatus$1;
|
|
1108
|
+
/**
|
|
1109
|
+
* @interal
|
|
1110
|
+
* @interal
|
|
1111
|
+
* @deprecated
|
|
1112
|
+
*/
|
|
1113
|
+
title?: string | null;
|
|
1114
|
+
/** Group name. */
|
|
1115
|
+
name?: string | null;
|
|
1116
|
+
/** Group Description. */
|
|
1117
|
+
description?: string | null;
|
|
1118
|
+
/** Group teaser. */
|
|
1119
|
+
teaser?: string | null;
|
|
1120
|
+
/**
|
|
1121
|
+
* @internal
|
|
1122
|
+
* @internal
|
|
1123
|
+
* @deprecated
|
|
1124
|
+
*/
|
|
1125
|
+
details?: GroupDetails$1;
|
|
1126
|
+
/**
|
|
1127
|
+
* What group members are called.
|
|
1128
|
+
*
|
|
1129
|
+
* For example, 'Coworkers', 'Friends', or 'Students'.
|
|
1130
|
+
*/
|
|
1131
|
+
memberTitle?: string | null;
|
|
1132
|
+
/**
|
|
1133
|
+
* Group cover image. You cannot upload your own cover image.
|
|
1134
|
+
*
|
|
1135
|
+
*/
|
|
1136
|
+
coverImage?: CoverImage$1;
|
|
1137
|
+
/** Group settings. */
|
|
1138
|
+
settings?: GroupSettings$1;
|
|
1139
|
+
/**
|
|
1140
|
+
* Total number of members in the group.
|
|
1141
|
+
* @readonly
|
|
1142
|
+
*/
|
|
1143
|
+
membersCount?: number | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* @internal
|
|
1146
|
+
* @internal
|
|
1147
|
+
* @readonly
|
|
1148
|
+
* @deprecated
|
|
1149
|
+
*/
|
|
1150
|
+
createdBy?: Identity$1;
|
|
1151
|
+
/**
|
|
1152
|
+
* Member ID of the group creator.
|
|
1153
|
+
* @readonly
|
|
1154
|
+
*/
|
|
1155
|
+
ownerId?: string | null;
|
|
1156
|
+
/**
|
|
1157
|
+
* Date and time the group was created.
|
|
1158
|
+
* @readonly
|
|
1159
|
+
*/
|
|
1160
|
+
_createdDate?: Date;
|
|
1161
|
+
/**
|
|
1162
|
+
* Date and time the group was last updated.
|
|
1163
|
+
* @readonly
|
|
1164
|
+
*/
|
|
1165
|
+
_updatedDate?: Date;
|
|
1166
|
+
/**
|
|
1167
|
+
* @internal
|
|
1168
|
+
* @internal
|
|
1169
|
+
* @readonly
|
|
1170
|
+
* @deprecated
|
|
1171
|
+
*/
|
|
1172
|
+
recentActivityDate?: Date;
|
|
1173
|
+
/**
|
|
1174
|
+
* Date and time the group was last active.
|
|
1175
|
+
*
|
|
1176
|
+
* For example, a post or comment made in the group.
|
|
1177
|
+
* @readonly
|
|
1178
|
+
*/
|
|
1179
|
+
lastActivityDate?: Date;
|
|
1180
|
+
}
|
|
1181
|
+
interface Logo$1 {
|
|
1182
|
+
/** Logo image ID (for internal use). */
|
|
1183
|
+
mediaId?: string | null;
|
|
1184
|
+
/** Logo image width. */
|
|
1185
|
+
width?: number | null;
|
|
1186
|
+
/** Logo image height. */
|
|
1187
|
+
height?: number | null;
|
|
1188
|
+
}
|
|
1189
|
+
interface Image$1 {
|
|
1190
|
+
/** Image ID (for internal use). */
|
|
1191
|
+
mediaId?: string | null;
|
|
1192
|
+
/** Image width. */
|
|
1193
|
+
width?: number | null;
|
|
1194
|
+
/** Image height. */
|
|
1195
|
+
height?: number | null;
|
|
1196
|
+
}
|
|
1197
|
+
interface Position$1 {
|
|
1198
|
+
/** horizontal coordinate */
|
|
1199
|
+
x?: number;
|
|
1200
|
+
/** vertical coordinate */
|
|
1201
|
+
y?: number;
|
|
1202
|
+
}
|
|
1203
|
+
interface OnboardingStepSettings$1 {
|
|
1204
|
+
stepKey?: StepKey$1;
|
|
1205
|
+
visible?: boolean;
|
|
1206
|
+
}
|
|
1207
|
+
declare enum StepKey$1 {
|
|
1208
|
+
UNKNOWN = "UNKNOWN",
|
|
1209
|
+
CREATE_POST = "CREATE_POST",
|
|
1210
|
+
REACT_TO_POST = "REACT_TO_POST",
|
|
1211
|
+
INVITE_MEMBERS = "INVITE_MEMBERS"
|
|
1212
|
+
}
|
|
1213
|
+
declare enum PrivacyStatus$1 {
|
|
1214
|
+
UNKNOWN = "UNKNOWN",
|
|
1215
|
+
/** Anyone can see the group in the group list and view its content. Anyone can join. */
|
|
1216
|
+
PUBLIC = "PUBLIC",
|
|
1217
|
+
/** Anyone can see the group in the group list, but only group members can see its content. In order to join a group, a group join request must be submitted. */
|
|
1218
|
+
PRIVATE = "PRIVATE",
|
|
1219
|
+
/** Only group members and admins can see the group in the group list. New group members can only be added by existing group members. */
|
|
1220
|
+
SECRET = "SECRET"
|
|
1221
|
+
}
|
|
1222
|
+
interface GroupDetails$1 {
|
|
1223
|
+
/** Group logo. You cannot upload your own logo. */
|
|
1224
|
+
logo?: Logo$1;
|
|
1225
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
1226
|
+
membersTitle?: string | null;
|
|
1227
|
+
}
|
|
1228
|
+
interface CoverImage$1 {
|
|
1229
|
+
/** Cover image. */
|
|
1230
|
+
image?: Image$1;
|
|
1231
|
+
/** Position of the corner of the cover image (or logo). */
|
|
1232
|
+
position?: Position$1;
|
|
1233
|
+
/** Position of the corner of the cover image (or logo) for mobile browser. */
|
|
1234
|
+
mobilePosition?: Position$1;
|
|
1235
|
+
}
|
|
1236
|
+
interface GroupSettings$1 {
|
|
1237
|
+
/**
|
|
1238
|
+
* Whether group members can send an email inviting others to join the group. When `false`, only site admins and group admins can invite others to join the group.
|
|
1239
|
+
*
|
|
1240
|
+
* Default: `false`
|
|
1241
|
+
* @deprecated
|
|
1242
|
+
*/
|
|
1243
|
+
membersCanInvite?: boolean | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* Whether group members can approve or reject requests to join a group. When `false`, only site admins and group admins can approve or reject requests to join a group.
|
|
1246
|
+
*
|
|
1247
|
+
* Default: `false`
|
|
1248
|
+
* @deprecated
|
|
1249
|
+
*/
|
|
1250
|
+
membersCanApprove?: boolean | null;
|
|
1251
|
+
/**
|
|
1252
|
+
* @internal
|
|
1253
|
+
* @internal
|
|
1254
|
+
* @deprecated
|
|
1255
|
+
*/
|
|
1256
|
+
memberWelcomePostEnabled?: boolean | null;
|
|
1257
|
+
/**
|
|
1258
|
+
* Whether to create a daily group post welcoming new members.
|
|
1259
|
+
*
|
|
1260
|
+
* Default: `true`
|
|
1261
|
+
*/
|
|
1262
|
+
welcomeMemberPostEnabled?: boolean | null;
|
|
1263
|
+
/**
|
|
1264
|
+
* Whether to create an automatic group post when group details are changed.
|
|
1265
|
+
*
|
|
1266
|
+
* Default: `true`
|
|
1267
|
+
*/
|
|
1268
|
+
groupDetailsChangedPostEnabled?: boolean | null;
|
|
1269
|
+
/**
|
|
1270
|
+
* Whether all group members can view the full list of group members.
|
|
1271
|
+
*
|
|
1272
|
+
* Default: `true`
|
|
1273
|
+
*/
|
|
1274
|
+
showMemberList?: boolean | null;
|
|
1275
|
+
onboardingStepsSettings?: OnboardingStepSettings$1[];
|
|
1276
|
+
}
|
|
1277
|
+
interface Identity$1 {
|
|
1278
|
+
/** Member ID of the group creator. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
|
|
1279
|
+
_id?: string | null;
|
|
1280
|
+
identityType?: IdentityType$1;
|
|
1281
|
+
}
|
|
1282
|
+
declare enum IdentityType$1 {
|
|
1283
|
+
USER = "USER",
|
|
1284
|
+
MEMBER = "MEMBER"
|
|
1285
|
+
}
|
|
1286
|
+
declare enum RequestStatus$3 {
|
|
1287
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
1288
|
+
/** Pending request. */
|
|
1289
|
+
PENDING = "PENDING",
|
|
1290
|
+
/** Approved request. */
|
|
1291
|
+
APPROVED = "APPROVED",
|
|
1292
|
+
/** Rejected request. */
|
|
1293
|
+
REJECTED = "REJECTED",
|
|
1294
|
+
/** Cancelled request. */
|
|
1295
|
+
CANCELLED = "CANCELLED",
|
|
1296
|
+
/** Canceled request. */
|
|
1297
|
+
CANCELED = "CANCELED"
|
|
1298
|
+
}
|
|
1299
|
+
interface RequestDetails$3 {
|
|
1300
|
+
/** Reason the request to create a group is rejected. */
|
|
1301
|
+
rejectionReason?: string | null;
|
|
1302
|
+
}
|
|
1303
|
+
interface ApproveGroupRequestsResponse {
|
|
1304
|
+
/** Approved request to create a group. */
|
|
1305
|
+
groupRequest?: GroupRequest[];
|
|
1306
|
+
}
|
|
1307
|
+
interface GroupRequestApproved {
|
|
1308
|
+
/** Approved group request. */
|
|
1309
|
+
groupRequest?: GroupRequest;
|
|
1310
|
+
}
|
|
1311
|
+
interface Rejection$3 {
|
|
1312
|
+
/**
|
|
1313
|
+
* ID of the requests to create groups to reject.
|
|
1314
|
+
*
|
|
1315
|
+
*/
|
|
1316
|
+
groupRequestId?: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* Reason the request to create a group is rejected. This text is displayed to the creator of the rejected request.
|
|
1319
|
+
*
|
|
1320
|
+
* Max: 1,000 characters.
|
|
1321
|
+
*/
|
|
1322
|
+
reason?: string | null;
|
|
1323
|
+
}
|
|
1324
|
+
interface RejectGroupRequestsResponse {
|
|
1325
|
+
/** Rejected Group Requests. */
|
|
1326
|
+
groupRequest?: GroupRequest[];
|
|
1327
|
+
}
|
|
1328
|
+
interface GroupRequestRejected {
|
|
1329
|
+
/** Rejected group request. */
|
|
1330
|
+
groupRequest?: GroupRequest;
|
|
1331
|
+
}
|
|
1332
|
+
interface ListGroupRequestsResponse {
|
|
1333
|
+
/** List of requests to create a group. */
|
|
1334
|
+
groupRequests?: GroupRequest[];
|
|
1335
|
+
/** Paging information. */
|
|
1336
|
+
metadata?: PagingMetadata$4;
|
|
1337
|
+
}
|
|
1338
|
+
interface PagingMetadata$4 {
|
|
1339
|
+
/** Number of items returned in the response. */
|
|
1340
|
+
count?: number | null;
|
|
1341
|
+
/** Offset that was requested. */
|
|
1342
|
+
offset?: number | null;
|
|
1343
|
+
/** Total number of items that match the query. */
|
|
1344
|
+
total?: number | null;
|
|
1345
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1346
|
+
tooManyToCount?: boolean | null;
|
|
1347
|
+
}
|
|
1348
|
+
interface IdentificationData$5 extends IdentificationDataIdOneOf$5 {
|
|
1349
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1350
|
+
anonymousVisitorId?: string;
|
|
1351
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1352
|
+
memberId?: string;
|
|
1353
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1354
|
+
wixUserId?: string;
|
|
1355
|
+
/** ID of an app. */
|
|
1356
|
+
appId?: string;
|
|
1357
|
+
/** @readonly */
|
|
1358
|
+
identityType?: WebhookIdentityType$5;
|
|
1359
|
+
}
|
|
1360
|
+
/** @oneof */
|
|
1361
|
+
interface IdentificationDataIdOneOf$5 {
|
|
1362
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1363
|
+
anonymousVisitorId?: string;
|
|
1364
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1365
|
+
memberId?: string;
|
|
1366
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1367
|
+
wixUserId?: string;
|
|
1368
|
+
/** ID of an app. */
|
|
1369
|
+
appId?: string;
|
|
1370
|
+
}
|
|
1371
|
+
declare enum WebhookIdentityType$5 {
|
|
1372
|
+
UNKNOWN = "UNKNOWN",
|
|
1373
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1374
|
+
MEMBER = "MEMBER",
|
|
1375
|
+
WIX_USER = "WIX_USER",
|
|
1376
|
+
APP = "APP"
|
|
1377
|
+
}
|
|
1378
|
+
interface ApproveGroupRequestsResponseNonNullableFields {
|
|
1379
|
+
groupRequest: {
|
|
1380
|
+
group?: {
|
|
1381
|
+
privacyLevel: PrivacyStatus$1;
|
|
1382
|
+
privacyStatus: PrivacyStatus$1;
|
|
1383
|
+
coverImage?: {
|
|
1384
|
+
position?: {
|
|
1385
|
+
x: number;
|
|
1386
|
+
y: number;
|
|
1387
|
+
};
|
|
1388
|
+
mobilePosition?: {
|
|
1389
|
+
x: number;
|
|
1390
|
+
y: number;
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
settings?: {
|
|
1394
|
+
onboardingStepsSettings: {
|
|
1395
|
+
stepKey: StepKey$1;
|
|
1396
|
+
visible: boolean;
|
|
1397
|
+
}[];
|
|
1398
|
+
};
|
|
1399
|
+
createdBy?: {
|
|
1400
|
+
identityType: IdentityType$1;
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
status: RequestStatus$3;
|
|
1404
|
+
}[];
|
|
1405
|
+
}
|
|
1406
|
+
interface RejectGroupRequestsResponseNonNullableFields {
|
|
1407
|
+
groupRequest: {
|
|
1408
|
+
group?: {
|
|
1409
|
+
privacyLevel: PrivacyStatus$1;
|
|
1410
|
+
privacyStatus: PrivacyStatus$1;
|
|
1411
|
+
coverImage?: {
|
|
1412
|
+
position?: {
|
|
1413
|
+
x: number;
|
|
1414
|
+
y: number;
|
|
1415
|
+
};
|
|
1416
|
+
mobilePosition?: {
|
|
1417
|
+
x: number;
|
|
1418
|
+
y: number;
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
settings?: {
|
|
1422
|
+
onboardingStepsSettings: {
|
|
1423
|
+
stepKey: StepKey$1;
|
|
1424
|
+
visible: boolean;
|
|
1425
|
+
}[];
|
|
1426
|
+
};
|
|
1427
|
+
createdBy?: {
|
|
1428
|
+
identityType: IdentityType$1;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
status: RequestStatus$3;
|
|
1432
|
+
}[];
|
|
1433
|
+
}
|
|
1434
|
+
interface ListGroupRequestsResponseNonNullableFields {
|
|
1435
|
+
groupRequests: {
|
|
1436
|
+
group?: {
|
|
1437
|
+
privacyLevel: PrivacyStatus$1;
|
|
1438
|
+
privacyStatus: PrivacyStatus$1;
|
|
1439
|
+
coverImage?: {
|
|
1440
|
+
position?: {
|
|
1441
|
+
x: number;
|
|
1442
|
+
y: number;
|
|
1443
|
+
};
|
|
1444
|
+
mobilePosition?: {
|
|
1445
|
+
x: number;
|
|
1446
|
+
y: number;
|
|
1447
|
+
};
|
|
1448
|
+
};
|
|
1449
|
+
settings?: {
|
|
1450
|
+
onboardingStepsSettings: {
|
|
1451
|
+
stepKey: StepKey$1;
|
|
1452
|
+
visible: boolean;
|
|
1453
|
+
}[];
|
|
1454
|
+
};
|
|
1455
|
+
createdBy?: {
|
|
1456
|
+
identityType: IdentityType$1;
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
status: RequestStatus$3;
|
|
1460
|
+
}[];
|
|
1461
|
+
}
|
|
1462
|
+
interface BaseEventMetadata$5 {
|
|
1463
|
+
/** App instance ID. */
|
|
1464
|
+
instanceId?: string | null;
|
|
1465
|
+
/** Event type. */
|
|
1466
|
+
eventType?: string;
|
|
1467
|
+
/** The identification type and identity data. */
|
|
1468
|
+
identity?: IdentificationData$5;
|
|
1469
|
+
}
|
|
1470
|
+
interface EventMetadata$5 extends BaseEventMetadata$5 {
|
|
1471
|
+
/**
|
|
1472
|
+
* Unique event ID.
|
|
1473
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1474
|
+
*/
|
|
1475
|
+
_id?: string;
|
|
1476
|
+
/**
|
|
1477
|
+
* Assumes actions are also always typed to an entity_type
|
|
1478
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1479
|
+
*/
|
|
1480
|
+
entityFqdn?: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1483
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1484
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1485
|
+
*/
|
|
1486
|
+
slug?: string;
|
|
1487
|
+
/** ID of the entity associated with the event. */
|
|
1488
|
+
entityId?: string;
|
|
1489
|
+
/** Event timestamp. */
|
|
1490
|
+
eventTime?: Date;
|
|
1491
|
+
/**
|
|
1492
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1493
|
+
* (for example, GDPR).
|
|
1494
|
+
*/
|
|
1495
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1496
|
+
/** If present, indicates the action that triggered the event. */
|
|
1497
|
+
originatedFrom?: string | null;
|
|
1498
|
+
/**
|
|
1499
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1500
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1501
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1502
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1503
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1504
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1505
|
+
*/
|
|
1506
|
+
entityEventSequence?: string | null;
|
|
1507
|
+
}
|
|
1508
|
+
interface GroupRequestCreatedEnvelope {
|
|
1509
|
+
entity: GroupRequest;
|
|
1510
|
+
metadata: EventMetadata$5;
|
|
1511
|
+
}
|
|
1512
|
+
interface GroupRequestApprovedEnvelope {
|
|
1513
|
+
data: GroupRequestApproved;
|
|
1514
|
+
metadata: EventMetadata$5;
|
|
1515
|
+
}
|
|
1516
|
+
interface GroupRequestRejectedEnvelope {
|
|
1517
|
+
data: GroupRequestRejected;
|
|
1518
|
+
metadata: EventMetadata$5;
|
|
1519
|
+
}
|
|
1520
|
+
interface ListGroupRequestsOptions {
|
|
1521
|
+
/**
|
|
1522
|
+
* Number of items to load.
|
|
1523
|
+
*
|
|
1524
|
+
* Max: `100`
|
|
1525
|
+
*
|
|
1526
|
+
*/
|
|
1527
|
+
limit?: number | null;
|
|
1528
|
+
/** Number of items to skip in the current sort order. */
|
|
1529
|
+
offset?: number | null;
|
|
1530
|
+
}
|
|
1531
|
+
interface QueryGroupRequestsOptions {
|
|
1532
|
+
}
|
|
1533
|
+
interface QueryOffsetResult$1 {
|
|
1534
|
+
currentPage: number | undefined;
|
|
1535
|
+
totalPages: number | undefined;
|
|
1536
|
+
totalCount: number | undefined;
|
|
1537
|
+
hasNext: () => boolean;
|
|
1538
|
+
hasPrev: () => boolean;
|
|
1539
|
+
length: number;
|
|
1540
|
+
pageSize: number;
|
|
1541
|
+
}
|
|
1542
|
+
interface GroupRequestsQueryResult extends QueryOffsetResult$1 {
|
|
1543
|
+
items: GroupRequest[];
|
|
1544
|
+
query: GroupRequestsQueryBuilder;
|
|
1545
|
+
next: () => Promise<GroupRequestsQueryResult>;
|
|
1546
|
+
prev: () => Promise<GroupRequestsQueryResult>;
|
|
1547
|
+
}
|
|
1548
|
+
interface GroupRequestsQueryBuilder {
|
|
1549
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1550
|
+
* @param value - Value to compare against.
|
|
1551
|
+
* @documentationMaturity preview
|
|
1552
|
+
*/
|
|
1553
|
+
eq: (propertyName: 'status', value: any) => GroupRequestsQueryBuilder;
|
|
1554
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1555
|
+
* @param value - Value to compare against.
|
|
1556
|
+
* @documentationMaturity preview
|
|
1557
|
+
*/
|
|
1558
|
+
ne: (propertyName: 'status', value: any) => GroupRequestsQueryBuilder;
|
|
1559
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
1560
|
+
* @param values - List of values to compare against.
|
|
1561
|
+
* @documentationMaturity preview
|
|
1562
|
+
*/
|
|
1563
|
+
hasSome: (propertyName: 'status', value: any[]) => GroupRequestsQueryBuilder;
|
|
1564
|
+
/** @documentationMaturity preview */
|
|
1565
|
+
in: (propertyName: 'status', value: any) => GroupRequestsQueryBuilder;
|
|
1566
|
+
/** @documentationMaturity preview */
|
|
1567
|
+
exists: (propertyName: 'status', value: boolean) => GroupRequestsQueryBuilder;
|
|
1568
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1569
|
+
* @documentationMaturity preview
|
|
1570
|
+
*/
|
|
1571
|
+
limit: (limit: number) => GroupRequestsQueryBuilder;
|
|
1572
|
+
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
1573
|
+
* @documentationMaturity preview
|
|
1574
|
+
*/
|
|
1575
|
+
skip: (skip: number) => GroupRequestsQueryBuilder;
|
|
1576
|
+
/** @documentationMaturity preview */
|
|
1577
|
+
find: () => Promise<GroupRequestsQueryResult>;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
declare function approveGroupRequests$1(httpClient: HttpClient): (groupRequestIds: string[]) => Promise<ApproveGroupRequestsResponse & ApproveGroupRequestsResponseNonNullableFields>;
|
|
1581
|
+
declare function rejectGroupRequests$1(httpClient: HttpClient): (rejections: Rejection$3[]) => Promise<RejectGroupRequestsResponse & RejectGroupRequestsResponseNonNullableFields>;
|
|
1582
|
+
declare function listGroupRequests$1(httpClient: HttpClient): (options?: ListGroupRequestsOptions) => Promise<ListGroupRequestsResponse & ListGroupRequestsResponseNonNullableFields>;
|
|
1583
|
+
declare function queryGroupRequests$1(httpClient: HttpClient): (options?: QueryGroupRequestsOptions) => GroupRequestsQueryBuilder;
|
|
1584
|
+
declare const onGroupRequestCreated$1: EventDefinition<GroupRequestCreatedEnvelope, "wix.social_groups.v2.group_request_created">;
|
|
1585
|
+
declare const onGroupRequestApproved$1: EventDefinition<GroupRequestApprovedEnvelope, "wix.social_groups.v2.group_request_approved">;
|
|
1586
|
+
declare const onGroupRequestRejected$1: EventDefinition<GroupRequestRejectedEnvelope, "wix.social_groups.v2.group_request_rejected">;
|
|
1587
|
+
|
|
1588
|
+
declare const approveGroupRequests: BuildRESTFunction<typeof approveGroupRequests$1>;
|
|
1589
|
+
declare const rejectGroupRequests: BuildRESTFunction<typeof rejectGroupRequests$1>;
|
|
1590
|
+
declare const listGroupRequests: BuildRESTFunction<typeof listGroupRequests$1>;
|
|
1591
|
+
declare const queryGroupRequests: BuildRESTFunction<typeof queryGroupRequests$1>;
|
|
1592
|
+
declare const onGroupRequestCreated: BuildEventDefinition<typeof onGroupRequestCreated$1>;
|
|
1593
|
+
declare const onGroupRequestApproved: BuildEventDefinition<typeof onGroupRequestApproved$1>;
|
|
1594
|
+
declare const onGroupRequestRejected: BuildEventDefinition<typeof onGroupRequestRejected$1>;
|
|
1595
|
+
|
|
1596
|
+
declare const context$6_approveGroupRequests: typeof approveGroupRequests;
|
|
1597
|
+
declare const context$6_listGroupRequests: typeof listGroupRequests;
|
|
1598
|
+
declare const context$6_onGroupRequestApproved: typeof onGroupRequestApproved;
|
|
1599
|
+
declare const context$6_onGroupRequestCreated: typeof onGroupRequestCreated;
|
|
1600
|
+
declare const context$6_onGroupRequestRejected: typeof onGroupRequestRejected;
|
|
1601
|
+
declare const context$6_queryGroupRequests: typeof queryGroupRequests;
|
|
1602
|
+
declare const context$6_rejectGroupRequests: typeof rejectGroupRequests;
|
|
1603
|
+
declare namespace context$6 {
|
|
1604
|
+
export { context$6_approveGroupRequests as approveGroupRequests, context$6_listGroupRequests as listGroupRequests, context$6_onGroupRequestApproved as onGroupRequestApproved, context$6_onGroupRequestCreated as onGroupRequestCreated, context$6_onGroupRequestRejected as onGroupRequestRejected, context$6_queryGroupRequests as queryGroupRequests, context$6_rejectGroupRequests as rejectGroupRequests };
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* A group member may have multiple roles in a single group.
|
|
1609
|
+
* Currently, only `MEMBER` and `ADMIN` roles are supported, but more roles may be available in the future.
|
|
1610
|
+
*/
|
|
1611
|
+
interface GroupRole {
|
|
1612
|
+
/**
|
|
1613
|
+
* Member's role.
|
|
1614
|
+
* - `MEMBER` - Regular group member.
|
|
1615
|
+
* - `ADMIN` - Group administrator.
|
|
1616
|
+
*/
|
|
1617
|
+
value?: Role;
|
|
1618
|
+
}
|
|
1619
|
+
declare enum Role {
|
|
1620
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
1621
|
+
/** Regular group member. */
|
|
1622
|
+
MEMBER = "MEMBER",
|
|
1623
|
+
/** Group administrator. */
|
|
1624
|
+
ADMIN = "ADMIN"
|
|
1625
|
+
}
|
|
1626
|
+
interface AssignRoleResponse {
|
|
1627
|
+
/** Group ID. */
|
|
1628
|
+
groupId?: string;
|
|
1629
|
+
/**
|
|
1630
|
+
* @internal
|
|
1631
|
+
* @internal
|
|
1632
|
+
* @deprecated
|
|
1633
|
+
*/
|
|
1634
|
+
siteMemberIds?: string[];
|
|
1635
|
+
/** Member IDs */
|
|
1636
|
+
memberIds?: string[];
|
|
1637
|
+
/** Assigned role. */
|
|
1638
|
+
role?: GroupRole;
|
|
1639
|
+
}
|
|
1640
|
+
interface RoleAssignedToGroupMember {
|
|
1641
|
+
/** Group ID in which role was assigned. */
|
|
1642
|
+
groupId?: string;
|
|
1643
|
+
/** Group member to whom the role was assigned. */
|
|
1644
|
+
groupMember?: GroupMember;
|
|
1645
|
+
/** Assigned group role. */
|
|
1646
|
+
role?: GroupRole;
|
|
1647
|
+
/** ID of site member who assigned the role. It can be empty if the role was assigned by a third-party application. */
|
|
1648
|
+
assignedById?: string | null;
|
|
1649
|
+
}
|
|
1650
|
+
interface GroupMember {
|
|
1651
|
+
/**
|
|
1652
|
+
* __Deprecated.__ Use `memberId` instead.
|
|
1653
|
+
* This property will be removed on June 30, 2022.
|
|
1654
|
+
* @readonly
|
|
1655
|
+
* @deprecated
|
|
1656
|
+
*/
|
|
1657
|
+
siteMemberId?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* Member ID. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details.
|
|
1660
|
+
* @readonly
|
|
1661
|
+
*/
|
|
1662
|
+
memberId?: string;
|
|
1663
|
+
/** Group Member Role. */
|
|
1664
|
+
role?: GroupRole;
|
|
1665
|
+
/**
|
|
1666
|
+
* Date and time the group Member joined the group.
|
|
1667
|
+
* @readonly
|
|
1668
|
+
*/
|
|
1669
|
+
joinedDate?: Date;
|
|
1670
|
+
}
|
|
1671
|
+
interface UnassignRoleResponse {
|
|
1672
|
+
/** Group ID. */
|
|
1673
|
+
groupId?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* @internal
|
|
1676
|
+
* @internal
|
|
1677
|
+
* @deprecated
|
|
1678
|
+
*/
|
|
1679
|
+
siteMemberIds?: string[];
|
|
1680
|
+
/** Member IDs. */
|
|
1681
|
+
memberIds?: string[];
|
|
1682
|
+
/** Unassigned role. */
|
|
1683
|
+
role?: GroupRole;
|
|
1684
|
+
}
|
|
1685
|
+
interface RoleUnassignedFromGroupMember {
|
|
1686
|
+
/** Group ID in which role was unassigned. */
|
|
1687
|
+
groupId?: string;
|
|
1688
|
+
/** Group member from whom role was removed. */
|
|
1689
|
+
groupMember?: GroupMember;
|
|
1690
|
+
/** Unassigned group role. */
|
|
1691
|
+
role?: GroupRole;
|
|
1692
|
+
/** ID of site member who unassigned the role. It can be empty if the role was assigned by a third-party application. */
|
|
1693
|
+
unassignedById?: string | null;
|
|
1694
|
+
}
|
|
1695
|
+
interface IdentificationData$4 extends IdentificationDataIdOneOf$4 {
|
|
1696
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1697
|
+
anonymousVisitorId?: string;
|
|
1698
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1699
|
+
memberId?: string;
|
|
1700
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1701
|
+
wixUserId?: string;
|
|
1702
|
+
/** ID of an app. */
|
|
1703
|
+
appId?: string;
|
|
1704
|
+
/** @readonly */
|
|
1705
|
+
identityType?: WebhookIdentityType$4;
|
|
1706
|
+
}
|
|
1707
|
+
/** @oneof */
|
|
1708
|
+
interface IdentificationDataIdOneOf$4 {
|
|
1709
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1710
|
+
anonymousVisitorId?: string;
|
|
1711
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1712
|
+
memberId?: string;
|
|
1713
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1714
|
+
wixUserId?: string;
|
|
1715
|
+
/** ID of an app. */
|
|
1716
|
+
appId?: string;
|
|
1717
|
+
}
|
|
1718
|
+
declare enum WebhookIdentityType$4 {
|
|
1719
|
+
UNKNOWN = "UNKNOWN",
|
|
1720
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1721
|
+
MEMBER = "MEMBER",
|
|
1722
|
+
WIX_USER = "WIX_USER",
|
|
1723
|
+
APP = "APP"
|
|
1724
|
+
}
|
|
1725
|
+
interface AssignRoleResponseNonNullableFields {
|
|
1726
|
+
groupId: string;
|
|
1727
|
+
siteMemberIds: string[];
|
|
1728
|
+
memberIds: string[];
|
|
1729
|
+
role?: {
|
|
1730
|
+
value: Role;
|
|
1731
|
+
};
|
|
1732
|
+
}
|
|
1733
|
+
interface UnassignRoleResponseNonNullableFields {
|
|
1734
|
+
groupId: string;
|
|
1735
|
+
siteMemberIds: string[];
|
|
1736
|
+
memberIds: string[];
|
|
1737
|
+
role?: {
|
|
1738
|
+
value: Role;
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
interface BaseEventMetadata$4 {
|
|
1742
|
+
/** App instance ID. */
|
|
1743
|
+
instanceId?: string | null;
|
|
1744
|
+
/** Event type. */
|
|
1745
|
+
eventType?: string;
|
|
1746
|
+
/** The identification type and identity data. */
|
|
1747
|
+
identity?: IdentificationData$4;
|
|
1748
|
+
}
|
|
1749
|
+
interface EventMetadata$4 extends BaseEventMetadata$4 {
|
|
1750
|
+
/**
|
|
1751
|
+
* Unique event ID.
|
|
1752
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1753
|
+
*/
|
|
1754
|
+
_id?: string;
|
|
1755
|
+
/**
|
|
1756
|
+
* Assumes actions are also always typed to an entity_type
|
|
1757
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1758
|
+
*/
|
|
1759
|
+
entityFqdn?: string;
|
|
1760
|
+
/**
|
|
1761
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1762
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1763
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1764
|
+
*/
|
|
1765
|
+
slug?: string;
|
|
1766
|
+
/** ID of the entity associated with the event. */
|
|
1767
|
+
entityId?: string;
|
|
1768
|
+
/** Event timestamp. */
|
|
1769
|
+
eventTime?: Date;
|
|
1770
|
+
/**
|
|
1771
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1772
|
+
* (for example, GDPR).
|
|
1773
|
+
*/
|
|
1774
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1775
|
+
/** If present, indicates the action that triggered the event. */
|
|
1776
|
+
originatedFrom?: string | null;
|
|
1777
|
+
/**
|
|
1778
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1779
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1780
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1781
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1782
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1783
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1784
|
+
*/
|
|
1785
|
+
entityEventSequence?: string | null;
|
|
1786
|
+
}
|
|
1787
|
+
interface GroupRoleAssignedEnvelope {
|
|
1788
|
+
data: RoleAssignedToGroupMember;
|
|
1789
|
+
metadata: EventMetadata$4;
|
|
1790
|
+
}
|
|
1791
|
+
interface GroupRoleUnassignedEnvelope {
|
|
1792
|
+
data: RoleUnassignedFromGroupMember;
|
|
1793
|
+
metadata: EventMetadata$4;
|
|
1794
|
+
}
|
|
1795
|
+
interface AssignRoleOptions {
|
|
1796
|
+
/**
|
|
1797
|
+
* @internal
|
|
1798
|
+
* @deprecated
|
|
1799
|
+
*/
|
|
1800
|
+
siteMemberIds?: string[];
|
|
1801
|
+
}
|
|
1802
|
+
interface UnassignRoleOptions {
|
|
1803
|
+
/**
|
|
1804
|
+
* @internal
|
|
1805
|
+
* @deprecated
|
|
1806
|
+
*/
|
|
1807
|
+
siteMemberIds?: string[];
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
declare function assignRole$1(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: AssignRoleOptions) => Promise<AssignRoleResponse & AssignRoleResponseNonNullableFields>;
|
|
1811
|
+
declare function unassignRole$1(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions) => Promise<UnassignRoleResponse & UnassignRoleResponseNonNullableFields>;
|
|
1812
|
+
declare const onGroupRoleAssigned$1: EventDefinition<GroupRoleAssignedEnvelope, "wix.social_groups.v2.group_role_assigned">;
|
|
1813
|
+
declare const onGroupRoleUnassigned$1: EventDefinition<GroupRoleUnassignedEnvelope, "wix.social_groups.v2.group_role_unassigned">;
|
|
1814
|
+
|
|
1815
|
+
declare const assignRole: BuildRESTFunction<typeof assignRole$1>;
|
|
1816
|
+
declare const unassignRole: BuildRESTFunction<typeof unassignRole$1>;
|
|
1817
|
+
declare const onGroupRoleAssigned: BuildEventDefinition<typeof onGroupRoleAssigned$1>;
|
|
1818
|
+
declare const onGroupRoleUnassigned: BuildEventDefinition<typeof onGroupRoleUnassigned$1>;
|
|
1819
|
+
|
|
1820
|
+
declare const context$5_assignRole: typeof assignRole;
|
|
1821
|
+
declare const context$5_onGroupRoleAssigned: typeof onGroupRoleAssigned;
|
|
1822
|
+
declare const context$5_onGroupRoleUnassigned: typeof onGroupRoleUnassigned;
|
|
1823
|
+
declare const context$5_unassignRole: typeof unassignRole;
|
|
1824
|
+
declare namespace context$5 {
|
|
1825
|
+
export { context$5_assignRole as assignRole, context$5_onGroupRoleAssigned as onGroupRoleAssigned, context$5_onGroupRoleUnassigned as onGroupRoleUnassigned, context$5_unassignRole as unassignRole };
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Guidelines ensuring that members post responsibly and respectfully. Site owners can set up Group Rules in the dashboard.
|
|
1830
|
+
* >**Note:** Only admins can update the group rules.
|
|
1831
|
+
*/
|
|
1832
|
+
interface GroupRules {
|
|
1833
|
+
/** Group rules. */
|
|
1834
|
+
rules?: GroupRule[];
|
|
1835
|
+
}
|
|
1836
|
+
interface GroupRule {
|
|
1837
|
+
/** Rule title. */
|
|
1838
|
+
title?: string;
|
|
1839
|
+
/** Rule description. */
|
|
1840
|
+
description?: string;
|
|
1841
|
+
}
|
|
1842
|
+
interface ListRulesResponse {
|
|
1843
|
+
/** Retrieved rules. */
|
|
1844
|
+
rules?: GroupRule[];
|
|
1845
|
+
}
|
|
1846
|
+
interface CreateOrReplaceAllRulesResponse {
|
|
1847
|
+
/** Group ID. */
|
|
1848
|
+
groupId?: string;
|
|
1849
|
+
/** Rules. */
|
|
1850
|
+
rules?: GroupRule[];
|
|
1851
|
+
}
|
|
1852
|
+
interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
|
|
1853
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1854
|
+
anonymousVisitorId?: string;
|
|
1855
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1856
|
+
memberId?: string;
|
|
1857
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1858
|
+
wixUserId?: string;
|
|
1859
|
+
/** ID of an app. */
|
|
1860
|
+
appId?: string;
|
|
1861
|
+
/** @readonly */
|
|
1862
|
+
identityType?: WebhookIdentityType$3;
|
|
1863
|
+
}
|
|
1864
|
+
/** @oneof */
|
|
1865
|
+
interface IdentificationDataIdOneOf$3 {
|
|
1866
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1867
|
+
anonymousVisitorId?: string;
|
|
1868
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1869
|
+
memberId?: string;
|
|
1870
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1871
|
+
wixUserId?: string;
|
|
1872
|
+
/** ID of an app. */
|
|
1873
|
+
appId?: string;
|
|
1874
|
+
}
|
|
1875
|
+
declare enum WebhookIdentityType$3 {
|
|
1876
|
+
UNKNOWN = "UNKNOWN",
|
|
1877
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1878
|
+
MEMBER = "MEMBER",
|
|
1879
|
+
WIX_USER = "WIX_USER",
|
|
1880
|
+
APP = "APP"
|
|
1881
|
+
}
|
|
1882
|
+
interface ListRulesResponseNonNullableFields {
|
|
1883
|
+
rules: {
|
|
1884
|
+
title: string;
|
|
1885
|
+
description: string;
|
|
1886
|
+
}[];
|
|
1887
|
+
}
|
|
1888
|
+
interface CreateOrReplaceAllRulesResponseNonNullableFields {
|
|
1889
|
+
groupId: string;
|
|
1890
|
+
rules: {
|
|
1891
|
+
title: string;
|
|
1892
|
+
description: string;
|
|
1893
|
+
}[];
|
|
1894
|
+
}
|
|
1895
|
+
interface BaseEventMetadata$3 {
|
|
1896
|
+
/** App instance ID. */
|
|
1897
|
+
instanceId?: string | null;
|
|
1898
|
+
/** Event type. */
|
|
1899
|
+
eventType?: string;
|
|
1900
|
+
/** The identification type and identity data. */
|
|
1901
|
+
identity?: IdentificationData$3;
|
|
1902
|
+
}
|
|
1903
|
+
interface EventMetadata$3 extends BaseEventMetadata$3 {
|
|
1904
|
+
/**
|
|
1905
|
+
* Unique event ID.
|
|
1906
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1907
|
+
*/
|
|
1908
|
+
_id?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* Assumes actions are also always typed to an entity_type
|
|
1911
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1912
|
+
*/
|
|
1913
|
+
entityFqdn?: string;
|
|
1914
|
+
/**
|
|
1915
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1916
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1917
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1918
|
+
*/
|
|
1919
|
+
slug?: string;
|
|
1920
|
+
/** ID of the entity associated with the event. */
|
|
1921
|
+
entityId?: string;
|
|
1922
|
+
/** Event timestamp. */
|
|
1923
|
+
eventTime?: Date;
|
|
1924
|
+
/**
|
|
1925
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1926
|
+
* (for example, GDPR).
|
|
1927
|
+
*/
|
|
1928
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1929
|
+
/** If present, indicates the action that triggered the event. */
|
|
1930
|
+
originatedFrom?: string | null;
|
|
1931
|
+
/**
|
|
1932
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1933
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1934
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1935
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1936
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1937
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1938
|
+
*/
|
|
1939
|
+
entityEventSequence?: string | null;
|
|
1940
|
+
}
|
|
1941
|
+
interface GroupRulesUpdatedEnvelope {
|
|
1942
|
+
entity: GroupRules;
|
|
1943
|
+
metadata: EventMetadata$3;
|
|
1944
|
+
}
|
|
1945
|
+
interface CreateOrReplaceAllRulesOptions {
|
|
1946
|
+
/** New rules. */
|
|
1947
|
+
rules?: GroupRule[];
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
declare function listRules$1(httpClient: HttpClient): (groupId: string) => Promise<ListRulesResponse & ListRulesResponseNonNullableFields>;
|
|
1951
|
+
declare function createOrReplaceAllRules$1(httpClient: HttpClient): (groupId: string, options?: CreateOrReplaceAllRulesOptions) => Promise<CreateOrReplaceAllRulesResponse & CreateOrReplaceAllRulesResponseNonNullableFields>;
|
|
1952
|
+
declare const onGroupRulesUpdated$1: EventDefinition<GroupRulesUpdatedEnvelope, "wix.social_groups.v2.group_rules_updated">;
|
|
1953
|
+
|
|
1954
|
+
declare const listRules: BuildRESTFunction<typeof listRules$1>;
|
|
1955
|
+
declare const createOrReplaceAllRules: BuildRESTFunction<typeof createOrReplaceAllRules$1>;
|
|
1956
|
+
declare const onGroupRulesUpdated: BuildEventDefinition<typeof onGroupRulesUpdated$1>;
|
|
1957
|
+
|
|
1958
|
+
declare const context$4_createOrReplaceAllRules: typeof createOrReplaceAllRules;
|
|
1959
|
+
declare const context$4_listRules: typeof listRules;
|
|
1960
|
+
declare const context$4_onGroupRulesUpdated: typeof onGroupRulesUpdated;
|
|
1961
|
+
declare namespace context$4 {
|
|
1962
|
+
export { context$4_createOrReplaceAllRules as createOrReplaceAllRules, context$4_listRules as listRules, context$4_onGroupRulesUpdated as onGroupRulesUpdated };
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* To join a private group, a site member must submit a Join Request, which can be approved or rejected by an admin.
|
|
1967
|
+
* When the request is approved, the site member becomes a group member.
|
|
1968
|
+
*/
|
|
1969
|
+
interface JoinGroupRequest {
|
|
1970
|
+
/**
|
|
1971
|
+
* Site member ID of the requester.
|
|
1972
|
+
* @readonly
|
|
1973
|
+
*/
|
|
1974
|
+
siteMemberId?: string;
|
|
1975
|
+
/** @readonly */
|
|
1976
|
+
contactId?: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Status of the request to join a group.
|
|
1979
|
+
*
|
|
1980
|
+
* One of:
|
|
1981
|
+
* - `"PENDING"`
|
|
1982
|
+
* - `"APPROVED"`
|
|
1983
|
+
* - `"REJECTED"`
|
|
1984
|
+
*/
|
|
1985
|
+
status?: RequestStatus$2;
|
|
1986
|
+
/** Join group request details. */
|
|
1987
|
+
requestDetails?: RequestDetails$2;
|
|
1988
|
+
}
|
|
1989
|
+
declare enum RequestStatus$2 {
|
|
1990
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
1991
|
+
/** Pending request. */
|
|
1992
|
+
PENDING = "PENDING",
|
|
1993
|
+
/** Approved request. */
|
|
1994
|
+
APPROVED = "APPROVED",
|
|
1995
|
+
/** Rejected request. */
|
|
1996
|
+
REJECTED = "REJECTED",
|
|
1997
|
+
/** Cancelled request. */
|
|
1998
|
+
CANCELLED = "CANCELLED",
|
|
1999
|
+
/** Canceled request. */
|
|
2000
|
+
CANCELED = "CANCELED"
|
|
2001
|
+
}
|
|
2002
|
+
interface RequestDetails$2 {
|
|
2003
|
+
/** Reason the request to join a group was rejected. */
|
|
2004
|
+
rejectionReason?: string | null;
|
|
2005
|
+
}
|
|
2006
|
+
interface ApproveJoinGroupRequestsResponse {
|
|
2007
|
+
/** Approved join group requests. */
|
|
2008
|
+
joinGroupRequests?: JoinGroupRequest[];
|
|
2009
|
+
}
|
|
2010
|
+
interface JoinGroupRequestApproved {
|
|
2011
|
+
/** Group ID for which join request was approved. */
|
|
2012
|
+
groupId?: string;
|
|
2013
|
+
/** Approved join group request. */
|
|
2014
|
+
joinGroupRequest?: JoinGroupRequest;
|
|
2015
|
+
}
|
|
2016
|
+
interface Rejection$2 {
|
|
2017
|
+
/** Member ID to reject. */
|
|
2018
|
+
memberId?: string;
|
|
2019
|
+
/** Reason the request to join a group was rejected. Text written by the request reviewer that is displayed when the group is rejected (max 1,000 characters). */
|
|
2020
|
+
reason?: string | null;
|
|
2021
|
+
}
|
|
2022
|
+
interface RejectJoinGroupRequestsResponse {
|
|
2023
|
+
/** Rejected join group requests. */
|
|
2024
|
+
joinGroupRequests?: JoinGroupRequest[];
|
|
2025
|
+
}
|
|
2026
|
+
interface JoinGroupRequestRejected {
|
|
2027
|
+
/** Group ID for which join request was rejected. */
|
|
2028
|
+
groupId?: string;
|
|
2029
|
+
/** Rejected join group request. */
|
|
2030
|
+
joinGroupRequest?: JoinGroupRequest;
|
|
2031
|
+
}
|
|
2032
|
+
interface ListJoinGroupRequestsResponse {
|
|
2033
|
+
/** Join group requests. */
|
|
2034
|
+
joinGroupRequests?: JoinGroupRequest[];
|
|
2035
|
+
metadata?: PagingMetadata$3;
|
|
2036
|
+
}
|
|
2037
|
+
interface PagingMetadata$3 {
|
|
2038
|
+
/** Number of items in the current results page. */
|
|
2039
|
+
count?: number | null;
|
|
2040
|
+
/** Offset that was requested. */
|
|
2041
|
+
offset?: number | null;
|
|
2042
|
+
/** Total number of items that match the query. */
|
|
2043
|
+
total?: number | null;
|
|
2044
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2045
|
+
tooManyToCount?: boolean | null;
|
|
2046
|
+
}
|
|
2047
|
+
interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
|
|
2048
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2049
|
+
anonymousVisitorId?: string;
|
|
2050
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2051
|
+
memberId?: string;
|
|
2052
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2053
|
+
wixUserId?: string;
|
|
2054
|
+
/** ID of an app. */
|
|
2055
|
+
appId?: string;
|
|
2056
|
+
/** @readonly */
|
|
2057
|
+
identityType?: WebhookIdentityType$2;
|
|
2058
|
+
}
|
|
2059
|
+
/** @oneof */
|
|
2060
|
+
interface IdentificationDataIdOneOf$2 {
|
|
2061
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2062
|
+
anonymousVisitorId?: string;
|
|
2063
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2064
|
+
memberId?: string;
|
|
2065
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2066
|
+
wixUserId?: string;
|
|
2067
|
+
/** ID of an app. */
|
|
2068
|
+
appId?: string;
|
|
2069
|
+
}
|
|
2070
|
+
declare enum WebhookIdentityType$2 {
|
|
2071
|
+
UNKNOWN = "UNKNOWN",
|
|
2072
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
2073
|
+
MEMBER = "MEMBER",
|
|
2074
|
+
WIX_USER = "WIX_USER",
|
|
2075
|
+
APP = "APP"
|
|
2076
|
+
}
|
|
2077
|
+
interface ApproveJoinGroupRequestsResponseNonNullableFields {
|
|
2078
|
+
joinGroupRequests: {
|
|
2079
|
+
siteMemberId: string;
|
|
2080
|
+
contactId: string;
|
|
2081
|
+
status: RequestStatus$2;
|
|
2082
|
+
}[];
|
|
2083
|
+
}
|
|
2084
|
+
interface RejectJoinGroupRequestsResponseNonNullableFields {
|
|
2085
|
+
joinGroupRequests: {
|
|
2086
|
+
siteMemberId: string;
|
|
2087
|
+
contactId: string;
|
|
2088
|
+
status: RequestStatus$2;
|
|
2089
|
+
}[];
|
|
2090
|
+
}
|
|
2091
|
+
interface ListJoinGroupRequestsResponseNonNullableFields {
|
|
2092
|
+
joinGroupRequests: {
|
|
2093
|
+
siteMemberId: string;
|
|
2094
|
+
contactId: string;
|
|
2095
|
+
status: RequestStatus$2;
|
|
2096
|
+
}[];
|
|
2097
|
+
}
|
|
2098
|
+
interface BaseEventMetadata$2 {
|
|
2099
|
+
/** App instance ID. */
|
|
2100
|
+
instanceId?: string | null;
|
|
2101
|
+
/** Event type. */
|
|
2102
|
+
eventType?: string;
|
|
2103
|
+
/** The identification type and identity data. */
|
|
2104
|
+
identity?: IdentificationData$2;
|
|
2105
|
+
}
|
|
2106
|
+
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
2107
|
+
/**
|
|
2108
|
+
* Unique event ID.
|
|
2109
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2110
|
+
*/
|
|
2111
|
+
_id?: string;
|
|
2112
|
+
/**
|
|
2113
|
+
* Assumes actions are also always typed to an entity_type
|
|
2114
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2115
|
+
*/
|
|
2116
|
+
entityFqdn?: string;
|
|
2117
|
+
/**
|
|
2118
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2119
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2120
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2121
|
+
*/
|
|
2122
|
+
slug?: string;
|
|
2123
|
+
/** ID of the entity associated with the event. */
|
|
2124
|
+
entityId?: string;
|
|
2125
|
+
/** Event timestamp. */
|
|
2126
|
+
eventTime?: Date;
|
|
2127
|
+
/**
|
|
2128
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2129
|
+
* (for example, GDPR).
|
|
2130
|
+
*/
|
|
2131
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2132
|
+
/** If present, indicates the action that triggered the event. */
|
|
2133
|
+
originatedFrom?: string | null;
|
|
2134
|
+
/**
|
|
2135
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2136
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2137
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2138
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2139
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2140
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2141
|
+
*/
|
|
2142
|
+
entityEventSequence?: string | null;
|
|
2143
|
+
}
|
|
2144
|
+
interface JoinGroupRequestCreatedEnvelope {
|
|
2145
|
+
entity: JoinGroupRequest;
|
|
2146
|
+
metadata: EventMetadata$2;
|
|
2147
|
+
}
|
|
2148
|
+
interface JoinGroupRequestApprovedEnvelope {
|
|
2149
|
+
data: JoinGroupRequestApproved;
|
|
2150
|
+
metadata: EventMetadata$2;
|
|
2151
|
+
}
|
|
2152
|
+
interface JoinGroupRequestRejectedEnvelope {
|
|
2153
|
+
data: JoinGroupRequestRejected;
|
|
2154
|
+
metadata: EventMetadata$2;
|
|
2155
|
+
}
|
|
2156
|
+
interface ApproveJoinGroupRequestsOptions {
|
|
2157
|
+
/**
|
|
2158
|
+
* @Internal
|
|
2159
|
+
* @Internal
|
|
2160
|
+
* @deprecated
|
|
2161
|
+
*/
|
|
2162
|
+
siteMemberIds?: string[];
|
|
2163
|
+
}
|
|
2164
|
+
interface ListJoinGroupRequestsOptions {
|
|
2165
|
+
limit?: number | null;
|
|
2166
|
+
offset?: number | null;
|
|
2167
|
+
}
|
|
2168
|
+
interface QueryJoinGroupRequestsOptions {
|
|
2169
|
+
}
|
|
2170
|
+
interface QueryOffsetResult {
|
|
2171
|
+
currentPage: number | undefined;
|
|
2172
|
+
totalPages: number | undefined;
|
|
2173
|
+
totalCount: number | undefined;
|
|
2174
|
+
hasNext: () => boolean;
|
|
2175
|
+
hasPrev: () => boolean;
|
|
2176
|
+
length: number;
|
|
2177
|
+
pageSize: number;
|
|
2178
|
+
}
|
|
2179
|
+
interface JoinGroupRequestsQueryResult extends QueryOffsetResult {
|
|
2180
|
+
items: JoinGroupRequest[];
|
|
2181
|
+
query: JoinGroupRequestsQueryBuilder;
|
|
2182
|
+
next: () => Promise<JoinGroupRequestsQueryResult>;
|
|
2183
|
+
prev: () => Promise<JoinGroupRequestsQueryResult>;
|
|
2184
|
+
}
|
|
2185
|
+
interface JoinGroupRequestsQueryBuilder {
|
|
2186
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2187
|
+
* @param value - Value to compare against.
|
|
2188
|
+
*/
|
|
2189
|
+
eq: (propertyName: 'status', value: any) => JoinGroupRequestsQueryBuilder;
|
|
2190
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2191
|
+
* @param value - Value to compare against.
|
|
2192
|
+
*/
|
|
2193
|
+
ne: (propertyName: 'status', value: any) => JoinGroupRequestsQueryBuilder;
|
|
2194
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
2195
|
+
* @param values - List of values to compare against.
|
|
2196
|
+
*/
|
|
2197
|
+
hasSome: (propertyName: 'status', value: any[]) => JoinGroupRequestsQueryBuilder;
|
|
2198
|
+
in: (propertyName: 'status', value: any) => JoinGroupRequestsQueryBuilder;
|
|
2199
|
+
exists: (propertyName: 'status', value: boolean) => JoinGroupRequestsQueryBuilder;
|
|
2200
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
2201
|
+
limit: (limit: number) => JoinGroupRequestsQueryBuilder;
|
|
2202
|
+
/** @param skip - Number of items to skip in the query results before returning the results. */
|
|
2203
|
+
skip: (skip: number) => JoinGroupRequestsQueryBuilder;
|
|
2204
|
+
find: () => Promise<JoinGroupRequestsQueryResult>;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
declare function approveJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, memberIds: string[], options?: ApproveJoinGroupRequestsOptions) => Promise<ApproveJoinGroupRequestsResponse & ApproveJoinGroupRequestsResponseNonNullableFields>;
|
|
2208
|
+
declare function rejectJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, rejections: Rejection$2[]) => Promise<RejectJoinGroupRequestsResponse & RejectJoinGroupRequestsResponseNonNullableFields>;
|
|
2209
|
+
declare function listJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, options?: ListJoinGroupRequestsOptions) => Promise<ListJoinGroupRequestsResponse & ListJoinGroupRequestsResponseNonNullableFields>;
|
|
2210
|
+
declare function queryJoinGroupRequests$1(httpClient: HttpClient): (groupId: string, options?: QueryJoinGroupRequestsOptions) => JoinGroupRequestsQueryBuilder;
|
|
2211
|
+
declare const onJoinGroupRequestCreated$1: EventDefinition<JoinGroupRequestCreatedEnvelope, "wix.social_groups.v2.join_group_request_created">;
|
|
2212
|
+
declare const onJoinGroupRequestApproved$1: EventDefinition<JoinGroupRequestApprovedEnvelope, "wix.social_groups.v2.join_group_request_approved">;
|
|
2213
|
+
declare const onJoinGroupRequestRejected$1: EventDefinition<JoinGroupRequestRejectedEnvelope, "wix.social_groups.v2.join_group_request_rejected">;
|
|
2214
|
+
|
|
2215
|
+
declare const approveJoinGroupRequests: BuildRESTFunction<typeof approveJoinGroupRequests$1>;
|
|
2216
|
+
declare const rejectJoinGroupRequests: BuildRESTFunction<typeof rejectJoinGroupRequests$1>;
|
|
2217
|
+
declare const listJoinGroupRequests: BuildRESTFunction<typeof listJoinGroupRequests$1>;
|
|
2218
|
+
declare const queryJoinGroupRequests: BuildRESTFunction<typeof queryJoinGroupRequests$1>;
|
|
2219
|
+
declare const onJoinGroupRequestCreated: BuildEventDefinition<typeof onJoinGroupRequestCreated$1>;
|
|
2220
|
+
declare const onJoinGroupRequestApproved: BuildEventDefinition<typeof onJoinGroupRequestApproved$1>;
|
|
2221
|
+
declare const onJoinGroupRequestRejected: BuildEventDefinition<typeof onJoinGroupRequestRejected$1>;
|
|
2222
|
+
|
|
2223
|
+
declare const context$3_approveJoinGroupRequests: typeof approveJoinGroupRequests;
|
|
2224
|
+
declare const context$3_listJoinGroupRequests: typeof listJoinGroupRequests;
|
|
2225
|
+
declare const context$3_onJoinGroupRequestApproved: typeof onJoinGroupRequestApproved;
|
|
2226
|
+
declare const context$3_onJoinGroupRequestCreated: typeof onJoinGroupRequestCreated;
|
|
2227
|
+
declare const context$3_onJoinGroupRequestRejected: typeof onJoinGroupRequestRejected;
|
|
2228
|
+
declare const context$3_queryJoinGroupRequests: typeof queryJoinGroupRequests;
|
|
2229
|
+
declare const context$3_rejectJoinGroupRequests: typeof rejectJoinGroupRequests;
|
|
2230
|
+
declare namespace context$3 {
|
|
2231
|
+
export { context$3_approveJoinGroupRequests as approveJoinGroupRequests, context$3_listJoinGroupRequests as listJoinGroupRequests, context$3_onJoinGroupRequestApproved as onJoinGroupRequestApproved, context$3_onJoinGroupRequestCreated as onJoinGroupRequestCreated, context$3_onJoinGroupRequestRejected as onJoinGroupRequestRejected, context$3_queryJoinGroupRequests as queryJoinGroupRequests, context$3_rejectJoinGroupRequests as rejectJoinGroupRequests };
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* Question asked to members when joining a group. Site owners can set whether it is required to answer the question in the dashboard.
|
|
2236
|
+
* > **Note:** Only admins can create or update membership questions.
|
|
2237
|
+
*/
|
|
2238
|
+
interface MembershipQuestion {
|
|
2239
|
+
/**
|
|
2240
|
+
* Question ID.
|
|
2241
|
+
* @readonly
|
|
2242
|
+
*/
|
|
2243
|
+
_id?: string | null;
|
|
2244
|
+
/** Whether a member must answer this question when joining the group. */
|
|
2245
|
+
required?: boolean;
|
|
2246
|
+
/** Question text. */
|
|
2247
|
+
text?: string;
|
|
2248
|
+
}
|
|
2249
|
+
interface ListMembershipQuestionsResponse {
|
|
2250
|
+
/** Membership questions. */
|
|
2251
|
+
questions?: MembershipQuestion[];
|
|
2252
|
+
}
|
|
2253
|
+
interface CreateOrReplaceAllMembershipQuestionsResponse {
|
|
2254
|
+
/** Membership questions. */
|
|
2255
|
+
questions?: MembershipQuestion[];
|
|
2256
|
+
}
|
|
2257
|
+
interface Paging$2 {
|
|
2258
|
+
/** Number of items to load. */
|
|
2259
|
+
limit?: number | null;
|
|
2260
|
+
/** Number of items to skip in the current sort order. */
|
|
2261
|
+
offset?: number | null;
|
|
2262
|
+
}
|
|
2263
|
+
interface ListAnswersResponse {
|
|
2264
|
+
/** Answers to the membership questions, grouped by member. */
|
|
2265
|
+
memberAnswers?: MemberMembershipQuestionAnswers[];
|
|
2266
|
+
/** Membership questions by question ID. Inludes only questions that have been answered by the specified members. */
|
|
2267
|
+
questions?: Record<string, MembershipQuestion>;
|
|
2268
|
+
metadata?: PagingMetadata$2;
|
|
2269
|
+
}
|
|
2270
|
+
interface MemberMembershipQuestionAnswers {
|
|
2271
|
+
/** Member ID. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
|
|
2272
|
+
memberId?: string;
|
|
2273
|
+
/** Answers to the membership question. */
|
|
2274
|
+
answers?: MembershipQuestionAnswer[];
|
|
2275
|
+
}
|
|
2276
|
+
/** Answer to a membership question. */
|
|
2277
|
+
interface MembershipQuestionAnswer {
|
|
2278
|
+
/** Question ID. */
|
|
2279
|
+
_id?: string;
|
|
2280
|
+
/** Answer text. */
|
|
2281
|
+
text?: string | null;
|
|
2282
|
+
}
|
|
2283
|
+
interface PagingMetadata$2 {
|
|
2284
|
+
/** Number of items returned in the response. */
|
|
2285
|
+
count?: number | null;
|
|
2286
|
+
/** Offset that was requested. */
|
|
2287
|
+
offset?: number | null;
|
|
2288
|
+
/** Total number of items that match the query. */
|
|
2289
|
+
total?: number | null;
|
|
2290
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2291
|
+
tooManyToCount?: boolean | null;
|
|
2292
|
+
}
|
|
2293
|
+
interface ListMembershipQuestionsResponseNonNullableFields {
|
|
2294
|
+
questions: {
|
|
2295
|
+
required: boolean;
|
|
2296
|
+
text: string;
|
|
2297
|
+
}[];
|
|
2298
|
+
}
|
|
2299
|
+
interface CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields {
|
|
2300
|
+
questions: {
|
|
2301
|
+
required: boolean;
|
|
2302
|
+
text: string;
|
|
2303
|
+
}[];
|
|
2304
|
+
}
|
|
2305
|
+
interface ListAnswersResponseNonNullableFields {
|
|
2306
|
+
memberAnswers: {
|
|
2307
|
+
memberId: string;
|
|
2308
|
+
answers: {
|
|
2309
|
+
_id: string;
|
|
2310
|
+
}[];
|
|
2311
|
+
}[];
|
|
2312
|
+
questions?: {
|
|
2313
|
+
required: boolean;
|
|
2314
|
+
text: string;
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
interface CreateOrReplaceAllMembershipQuestionsOptions {
|
|
2318
|
+
/** New membership questions. */
|
|
2319
|
+
questions?: MembershipQuestion[];
|
|
2320
|
+
}
|
|
2321
|
+
interface ListAnswersOptions {
|
|
2322
|
+
/** Member IDs. If no member ID is provided, answers for all members will be returned. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
|
|
2323
|
+
memberIds?: string[];
|
|
2324
|
+
paging?: Paging$2;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
declare function listMembershipQuestions$1(httpClient: HttpClient): (groupId: string) => Promise<ListMembershipQuestionsResponse & ListMembershipQuestionsResponseNonNullableFields>;
|
|
2328
|
+
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): (groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions) => Promise<CreateOrReplaceAllMembershipQuestionsResponse & CreateOrReplaceAllMembershipQuestionsResponseNonNullableFields>;
|
|
2329
|
+
declare function listAnswers$1(httpClient: HttpClient): (groupId: string, options?: ListAnswersOptions) => Promise<ListAnswersResponse & ListAnswersResponseNonNullableFields>;
|
|
2330
|
+
|
|
2331
|
+
declare const listMembershipQuestions: BuildRESTFunction<typeof listMembershipQuestions$1>;
|
|
2332
|
+
declare const createOrReplaceAllMembershipQuestions: BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1>;
|
|
2333
|
+
declare const listAnswers: BuildRESTFunction<typeof listAnswers$1>;
|
|
2334
|
+
|
|
2335
|
+
declare const context$2_createOrReplaceAllMembershipQuestions: typeof createOrReplaceAllMembershipQuestions;
|
|
2336
|
+
declare const context$2_listAnswers: typeof listAnswers;
|
|
2337
|
+
declare const context$2_listMembershipQuestions: typeof listMembershipQuestions;
|
|
2338
|
+
declare namespace context$2 {
|
|
2339
|
+
export { context$2_createOrReplaceAllMembershipQuestions as createOrReplaceAllMembershipQuestions, context$2_listAnswers as listAnswers, context$2_listMembershipQuestions as listMembershipQuestions };
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
/**
|
|
2343
|
+
* >**Notes:**
|
|
2344
|
+
* > + Site owners may set that members are not permitted to create groups in the Wix Groups application settings.
|
|
2345
|
+
* > + In this situation, site members have to submit a Create Request to create a new group.
|
|
2346
|
+
* > + Create Requests can be approved or rejected by an admin.
|
|
2347
|
+
* > + After a Create Request has been approved, the new group is added to the Group List in the Wix Groups app home page.
|
|
2348
|
+
* > + See [Introduction](https://dev.wix.com/api/rest/wix-groups/groups/introduction#wix-groups_groups_introduction_terminology) for more details.
|
|
2349
|
+
*/
|
|
2350
|
+
interface CreateRequest {
|
|
2351
|
+
/**
|
|
2352
|
+
* Create request ID
|
|
2353
|
+
* @readonly
|
|
2354
|
+
*/
|
|
2355
|
+
_id?: string | null;
|
|
2356
|
+
/** Group requested for creation. */
|
|
2357
|
+
group?: Group;
|
|
2358
|
+
/**
|
|
2359
|
+
* Status of request.
|
|
2360
|
+
* - `PENDING` - Pending request.
|
|
2361
|
+
* - `APPROVED` - Approved request.
|
|
2362
|
+
* - `REJECTED` - Rejected request.
|
|
2363
|
+
* - `CANCELED` - Canceled request.
|
|
2364
|
+
*/
|
|
2365
|
+
status?: RequestStatus$1;
|
|
2366
|
+
/** Request details. */
|
|
2367
|
+
requestDetails?: RequestDetails$1;
|
|
2368
|
+
}
|
|
2369
|
+
interface Group {
|
|
2370
|
+
/**
|
|
2371
|
+
* Group ID.
|
|
2372
|
+
* @readonly
|
|
2373
|
+
*/
|
|
2374
|
+
_id?: string | null;
|
|
2375
|
+
/** A unique part of a group's URL, for example `https:/example.com/groups/slug`. */
|
|
2376
|
+
slug?: string | null;
|
|
2377
|
+
/**
|
|
2378
|
+
* __Deprecated.__ Use `privacyStatus` instead.
|
|
2379
|
+
* This property will be removed on June 30, 2022.
|
|
2380
|
+
* @deprecated
|
|
2381
|
+
*/
|
|
2382
|
+
privacyLevel?: PrivacyStatus;
|
|
2383
|
+
/**
|
|
2384
|
+
* Group privacy status.
|
|
2385
|
+
* - `PUBLIC` - Anyone can see the group and its content. Anyone can join the group.
|
|
2386
|
+
* - `PRIVATE` - Anyone can see the group, but only members can see its content. New member must submit a `Join Group Request`.
|
|
2387
|
+
* - `SECRET` - Only admins and members can see the group. New members can only be added by other members.
|
|
2388
|
+
*/
|
|
2389
|
+
privacyStatus?: PrivacyStatus;
|
|
2390
|
+
/**
|
|
2391
|
+
* __Deprecated.__ Use `name` instead.
|
|
2392
|
+
* This property will be removed on June 30, 2022.
|
|
2393
|
+
* @deprecated
|
|
2394
|
+
*/
|
|
2395
|
+
title?: string | null;
|
|
2396
|
+
/** Group name. */
|
|
2397
|
+
name?: string | null;
|
|
2398
|
+
/** Group description in DraftJS format. */
|
|
2399
|
+
description?: string | null;
|
|
2400
|
+
/** Group teaser. */
|
|
2401
|
+
teaser?: string | null;
|
|
2402
|
+
/**
|
|
2403
|
+
* __Deprecated.__
|
|
2404
|
+
* For `details.logo`, use `coverImage` instead.
|
|
2405
|
+
* For `details.membersTitle`, `memberTitle` instead.
|
|
2406
|
+
* This property will be removed on June 30, 2022.
|
|
2407
|
+
* @deprecated
|
|
2408
|
+
*/
|
|
2409
|
+
details?: GroupDetails;
|
|
2410
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
2411
|
+
memberTitle?: string | null;
|
|
2412
|
+
/** Cover image. You cannot upload your own cover image. */
|
|
2413
|
+
coverImage?: CoverImage;
|
|
2414
|
+
/** Group specific settings. Available to the site owners under `Admin Tools` in the dashboard. */
|
|
2415
|
+
settings?: GroupSettings;
|
|
2416
|
+
/**
|
|
2417
|
+
* Total count of current group members.
|
|
2418
|
+
* @readonly
|
|
2419
|
+
*/
|
|
2420
|
+
membersCount?: number | null;
|
|
2421
|
+
/**
|
|
2422
|
+
* __Deprecated.__ Use `ownerId` instead.
|
|
2423
|
+
* This property will be removed on June 30, 2022.
|
|
2424
|
+
* @readonly
|
|
2425
|
+
* @deprecated
|
|
2426
|
+
*/
|
|
2427
|
+
createdBy?: Identity;
|
|
2428
|
+
/**
|
|
2429
|
+
* Group owner.
|
|
2430
|
+
* @readonly
|
|
2431
|
+
*/
|
|
2432
|
+
ownerId?: string | null;
|
|
2433
|
+
/**
|
|
2434
|
+
* Group creation date and time.
|
|
2435
|
+
* @readonly
|
|
2436
|
+
*/
|
|
2437
|
+
_createdDate?: Date;
|
|
2438
|
+
/**
|
|
2439
|
+
* Date and time of the latest group update.
|
|
2440
|
+
* @readonly
|
|
2441
|
+
*/
|
|
2442
|
+
_updatedDate?: Date;
|
|
2443
|
+
/**
|
|
2444
|
+
* __Deprecated.__ Use `lastActivityDate` instead.
|
|
2445
|
+
* This property will be removed on June 30, 2022.
|
|
2446
|
+
* @readonly
|
|
2447
|
+
* @deprecated
|
|
2448
|
+
*/
|
|
2449
|
+
recentActivityDate?: Date;
|
|
2450
|
+
/**
|
|
2451
|
+
* Date and time of the most recent group activity, for example a post or comment.
|
|
2452
|
+
* @readonly
|
|
2453
|
+
*/
|
|
2454
|
+
lastActivityDate?: Date;
|
|
2455
|
+
}
|
|
2456
|
+
interface Logo {
|
|
2457
|
+
/** Logo image ID (for internal use). */
|
|
2458
|
+
mediaId?: string | null;
|
|
2459
|
+
/** Logo image width. */
|
|
2460
|
+
width?: number | null;
|
|
2461
|
+
/** Logo image height. */
|
|
2462
|
+
height?: number | null;
|
|
2463
|
+
}
|
|
2464
|
+
interface Image {
|
|
2465
|
+
/** Image ID (for internal use). */
|
|
2466
|
+
mediaId?: string | null;
|
|
2467
|
+
/** Image width. */
|
|
2468
|
+
width?: number | null;
|
|
2469
|
+
/** Image height. */
|
|
2470
|
+
height?: number | null;
|
|
2471
|
+
}
|
|
2472
|
+
interface Position {
|
|
2473
|
+
/** horizontal coordinate */
|
|
2474
|
+
x?: number;
|
|
2475
|
+
/** vertical coordinate */
|
|
2476
|
+
y?: number;
|
|
2477
|
+
}
|
|
2478
|
+
interface OnboardingStepSettings {
|
|
2479
|
+
stepKey?: StepKey;
|
|
2480
|
+
visible?: boolean;
|
|
2481
|
+
}
|
|
2482
|
+
declare enum StepKey {
|
|
2483
|
+
UNKNOWN = "UNKNOWN",
|
|
2484
|
+
CREATE_POST = "CREATE_POST",
|
|
2485
|
+
REACT_TO_POST = "REACT_TO_POST",
|
|
2486
|
+
INVITE_MEMBERS = "INVITE_MEMBERS"
|
|
2487
|
+
}
|
|
2488
|
+
declare enum PrivacyStatus {
|
|
2489
|
+
UNKNOWN = "UNKNOWN",
|
|
2490
|
+
/** Anyone can see the group in the group list and view its content. Anyone can join. */
|
|
2491
|
+
PUBLIC = "PUBLIC",
|
|
2492
|
+
/** Anyone can see the group in the group list, but only group members can see its content. In order to join a group, a group join request must be submitted. */
|
|
2493
|
+
PRIVATE = "PRIVATE",
|
|
2494
|
+
/** Only group members and admins can see the group in the group list. New group members can only be added by existing group members. */
|
|
2495
|
+
SECRET = "SECRET"
|
|
2496
|
+
}
|
|
2497
|
+
interface GroupDetails {
|
|
2498
|
+
/** Group logo. You cannot upload your own logo. */
|
|
2499
|
+
logo?: Logo;
|
|
2500
|
+
/** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
|
|
2501
|
+
membersTitle?: string | null;
|
|
2502
|
+
}
|
|
2503
|
+
interface CoverImage {
|
|
2504
|
+
/** Cover image. */
|
|
2505
|
+
image?: Image;
|
|
2506
|
+
/** Position of the corner of the cover image (or logo). */
|
|
2507
|
+
position?: Position;
|
|
2508
|
+
/** Position of the corner of the cover image (or logo) for mobile browser. */
|
|
2509
|
+
mobilePosition?: Position;
|
|
2510
|
+
}
|
|
2511
|
+
interface GroupSettings {
|
|
2512
|
+
/**
|
|
2513
|
+
* __Deprecated.__ Use `allowedToInviteMembers` instead.
|
|
2514
|
+
* Whether regular members are permitted to invite new members.
|
|
2515
|
+
* If `false`, only admins can invite members. Defaults to `true`.
|
|
2516
|
+
* @deprecated
|
|
2517
|
+
*/
|
|
2518
|
+
membersCanInvite?: boolean | null;
|
|
2519
|
+
/**
|
|
2520
|
+
* __Deprecated.__ Use `allowedToApproveJoinRequests` instead.
|
|
2521
|
+
* Whether all group members are permitted to approve join group requests.
|
|
2522
|
+
* If `false`, member approval is limited to the admins.
|
|
2523
|
+
* @deprecated
|
|
2524
|
+
*/
|
|
2525
|
+
membersCanApprove?: boolean | null;
|
|
2526
|
+
/**
|
|
2527
|
+
* __Deprecated.__ Use `welcomeMemberPostEnabled` instead.
|
|
2528
|
+
* This property will be removed on June 30, 2022.
|
|
2529
|
+
* @deprecated
|
|
2530
|
+
*/
|
|
2531
|
+
memberWelcomePostEnabled?: boolean | null;
|
|
2532
|
+
/** Whether a daily post about new members is enabled. */
|
|
2533
|
+
welcomeMemberPostEnabled?: boolean | null;
|
|
2534
|
+
/** Whether an automatic post about changing the group details is enabled. */
|
|
2535
|
+
groupDetailsChangedPostEnabled?: boolean | null;
|
|
2536
|
+
/** Whether all members can see the full member list. */
|
|
2537
|
+
showMemberList?: boolean | null;
|
|
2538
|
+
onboardingStepsSettings?: OnboardingStepSettings[];
|
|
2539
|
+
}
|
|
2540
|
+
interface Identity {
|
|
2541
|
+
/** Member ID of the group creator. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
|
|
2542
|
+
_id?: string | null;
|
|
2543
|
+
identityType?: IdentityType;
|
|
2544
|
+
}
|
|
2545
|
+
declare enum IdentityType {
|
|
2546
|
+
USER = "USER",
|
|
2547
|
+
MEMBER = "MEMBER"
|
|
2548
|
+
}
|
|
2549
|
+
declare enum RequestStatus$1 {
|
|
2550
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
2551
|
+
/** Pending request. */
|
|
2552
|
+
PENDING = "PENDING",
|
|
2553
|
+
/** Approved request. */
|
|
2554
|
+
APPROVED = "APPROVED",
|
|
2555
|
+
/** Rejected request. */
|
|
2556
|
+
REJECTED = "REJECTED",
|
|
2557
|
+
/** Cancelled request. */
|
|
2558
|
+
CANCELLED = "CANCELLED",
|
|
2559
|
+
/** Canceled request. */
|
|
2560
|
+
CANCELED = "CANCELED"
|
|
2561
|
+
}
|
|
2562
|
+
interface RequestDetails$1 {
|
|
2563
|
+
/** Reason the request has been rejected. */
|
|
2564
|
+
rejectionReason?: string | null;
|
|
2565
|
+
}
|
|
2566
|
+
interface ApproveCreateRequestsResponse {
|
|
2567
|
+
/** Approved Create Requests. */
|
|
2568
|
+
createRequest?: CreateRequest[];
|
|
2569
|
+
}
|
|
2570
|
+
interface CreateRequestApproved {
|
|
2571
|
+
/** Approved create request. */
|
|
2572
|
+
createRequest?: CreateRequest;
|
|
2573
|
+
}
|
|
2574
|
+
interface Rejection$1 {
|
|
2575
|
+
/** ID of the Create Request to reject. */
|
|
2576
|
+
createRequestId?: string;
|
|
2577
|
+
/** Rejection reason. Free text displayed to the creator of the rejected Create Request. Limited to 1,000 characters. */
|
|
2578
|
+
reason?: string | null;
|
|
2579
|
+
}
|
|
2580
|
+
interface RejectCreateRequestsResponse {
|
|
2581
|
+
/** Rejected Create Requests. */
|
|
2582
|
+
createRequest?: CreateRequest[];
|
|
2583
|
+
}
|
|
2584
|
+
interface CreateRequestRejected {
|
|
2585
|
+
/** Rejected create request. */
|
|
2586
|
+
createRequest?: CreateRequest;
|
|
2587
|
+
}
|
|
2588
|
+
interface ListCreateRequestsResponse {
|
|
2589
|
+
/** Create Requests. */
|
|
2590
|
+
createRequests?: CreateRequest[];
|
|
2591
|
+
metadata?: PagingMetadata$1;
|
|
2592
|
+
}
|
|
2593
|
+
interface PagingMetadata$1 {
|
|
2594
|
+
/** Number of items returned in the response. */
|
|
2595
|
+
count?: number | null;
|
|
2596
|
+
/** Offset that was requested. */
|
|
2597
|
+
offset?: number | null;
|
|
2598
|
+
/** Total number of items that match the query. */
|
|
2599
|
+
total?: number | null;
|
|
2600
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2601
|
+
tooManyToCount?: boolean | null;
|
|
2602
|
+
}
|
|
2603
|
+
interface Query$1 {
|
|
2604
|
+
/**
|
|
2605
|
+
* Filter object in the following format:
|
|
2606
|
+
* `"filter" : {
|
|
2607
|
+
* "fieldName1": "value1",
|
|
2608
|
+
* "fieldName2":{"$operator":"value2"}
|
|
2609
|
+
* }`
|
|
2610
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2611
|
+
*/
|
|
2612
|
+
filter?: any;
|
|
2613
|
+
/**
|
|
2614
|
+
* Sort object in the following format:
|
|
2615
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2616
|
+
*/
|
|
2617
|
+
sort?: Sorting$1[];
|
|
2618
|
+
/** Paging options to limit and skip the number of items. */
|
|
2619
|
+
paging?: Paging$1;
|
|
2620
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
2621
|
+
fields?: string[];
|
|
2622
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
2623
|
+
fieldsets?: string[];
|
|
2624
|
+
}
|
|
2625
|
+
interface Sorting$1 {
|
|
2626
|
+
/** Name of the field to sort by. */
|
|
2627
|
+
fieldName?: string;
|
|
2628
|
+
/** Sort order. */
|
|
2629
|
+
order?: SortOrder$1;
|
|
2630
|
+
}
|
|
2631
|
+
declare enum SortOrder$1 {
|
|
2632
|
+
ASC = "ASC",
|
|
2633
|
+
DESC = "DESC"
|
|
2634
|
+
}
|
|
2635
|
+
interface Paging$1 {
|
|
2636
|
+
/** Number of items to load. */
|
|
2637
|
+
limit?: number | null;
|
|
2638
|
+
/** Number of items to skip in the current sort order. */
|
|
2639
|
+
offset?: number | null;
|
|
2640
|
+
}
|
|
2641
|
+
interface QueryCreateRequestsResponse {
|
|
2642
|
+
/** Retrieved Create Requests. */
|
|
2643
|
+
createRequests?: CreateRequest[];
|
|
2644
|
+
metadata?: PagingMetadata$1;
|
|
2645
|
+
}
|
|
2646
|
+
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
2647
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2648
|
+
anonymousVisitorId?: string;
|
|
2649
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2650
|
+
memberId?: string;
|
|
2651
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2652
|
+
wixUserId?: string;
|
|
2653
|
+
/** ID of an app. */
|
|
2654
|
+
appId?: string;
|
|
2655
|
+
/** @readonly */
|
|
2656
|
+
identityType?: WebhookIdentityType$1;
|
|
2657
|
+
}
|
|
2658
|
+
/** @oneof */
|
|
2659
|
+
interface IdentificationDataIdOneOf$1 {
|
|
2660
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2661
|
+
anonymousVisitorId?: string;
|
|
2662
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2663
|
+
memberId?: string;
|
|
2664
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2665
|
+
wixUserId?: string;
|
|
2666
|
+
/** ID of an app. */
|
|
2667
|
+
appId?: string;
|
|
2668
|
+
}
|
|
2669
|
+
declare enum WebhookIdentityType$1 {
|
|
2670
|
+
UNKNOWN = "UNKNOWN",
|
|
2671
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
2672
|
+
MEMBER = "MEMBER",
|
|
2673
|
+
WIX_USER = "WIX_USER",
|
|
2674
|
+
APP = "APP"
|
|
2675
|
+
}
|
|
2676
|
+
interface ApproveCreateRequestsResponseNonNullableFields {
|
|
2677
|
+
createRequest: {
|
|
2678
|
+
group?: {
|
|
2679
|
+
privacyLevel: PrivacyStatus;
|
|
2680
|
+
privacyStatus: PrivacyStatus;
|
|
2681
|
+
coverImage?: {
|
|
2682
|
+
position?: {
|
|
2683
|
+
x: number;
|
|
2684
|
+
y: number;
|
|
2685
|
+
};
|
|
2686
|
+
mobilePosition?: {
|
|
2687
|
+
x: number;
|
|
2688
|
+
y: number;
|
|
2689
|
+
};
|
|
2690
|
+
};
|
|
2691
|
+
settings?: {
|
|
2692
|
+
onboardingStepsSettings: {
|
|
2693
|
+
stepKey: StepKey;
|
|
2694
|
+
visible: boolean;
|
|
2695
|
+
}[];
|
|
2696
|
+
};
|
|
2697
|
+
createdBy?: {
|
|
2698
|
+
identityType: IdentityType;
|
|
2699
|
+
};
|
|
2700
|
+
};
|
|
2701
|
+
status: RequestStatus$1;
|
|
2702
|
+
}[];
|
|
2703
|
+
}
|
|
2704
|
+
interface RejectCreateRequestsResponseNonNullableFields {
|
|
2705
|
+
createRequest: {
|
|
2706
|
+
group?: {
|
|
2707
|
+
privacyLevel: PrivacyStatus;
|
|
2708
|
+
privacyStatus: PrivacyStatus;
|
|
2709
|
+
coverImage?: {
|
|
2710
|
+
position?: {
|
|
2711
|
+
x: number;
|
|
2712
|
+
y: number;
|
|
2713
|
+
};
|
|
2714
|
+
mobilePosition?: {
|
|
2715
|
+
x: number;
|
|
2716
|
+
y: number;
|
|
2717
|
+
};
|
|
2718
|
+
};
|
|
2719
|
+
settings?: {
|
|
2720
|
+
onboardingStepsSettings: {
|
|
2721
|
+
stepKey: StepKey;
|
|
2722
|
+
visible: boolean;
|
|
2723
|
+
}[];
|
|
2724
|
+
};
|
|
2725
|
+
createdBy?: {
|
|
2726
|
+
identityType: IdentityType;
|
|
2727
|
+
};
|
|
2728
|
+
};
|
|
2729
|
+
status: RequestStatus$1;
|
|
2730
|
+
}[];
|
|
2731
|
+
}
|
|
2732
|
+
interface ListCreateRequestsResponseNonNullableFields {
|
|
2733
|
+
createRequests: {
|
|
2734
|
+
group?: {
|
|
2735
|
+
privacyLevel: PrivacyStatus;
|
|
2736
|
+
privacyStatus: PrivacyStatus;
|
|
2737
|
+
coverImage?: {
|
|
2738
|
+
position?: {
|
|
2739
|
+
x: number;
|
|
2740
|
+
y: number;
|
|
2741
|
+
};
|
|
2742
|
+
mobilePosition?: {
|
|
2743
|
+
x: number;
|
|
2744
|
+
y: number;
|
|
2745
|
+
};
|
|
2746
|
+
};
|
|
2747
|
+
settings?: {
|
|
2748
|
+
onboardingStepsSettings: {
|
|
2749
|
+
stepKey: StepKey;
|
|
2750
|
+
visible: boolean;
|
|
2751
|
+
}[];
|
|
2752
|
+
};
|
|
2753
|
+
createdBy?: {
|
|
2754
|
+
identityType: IdentityType;
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
status: RequestStatus$1;
|
|
2758
|
+
}[];
|
|
2759
|
+
}
|
|
2760
|
+
interface QueryCreateRequestsResponseNonNullableFields {
|
|
2761
|
+
createRequests: {
|
|
2762
|
+
group?: {
|
|
2763
|
+
privacyLevel: PrivacyStatus;
|
|
2764
|
+
privacyStatus: PrivacyStatus;
|
|
2765
|
+
coverImage?: {
|
|
2766
|
+
position?: {
|
|
2767
|
+
x: number;
|
|
2768
|
+
y: number;
|
|
2769
|
+
};
|
|
2770
|
+
mobilePosition?: {
|
|
2771
|
+
x: number;
|
|
2772
|
+
y: number;
|
|
2773
|
+
};
|
|
2774
|
+
};
|
|
2775
|
+
settings?: {
|
|
2776
|
+
onboardingStepsSettings: {
|
|
2777
|
+
stepKey: StepKey;
|
|
2778
|
+
visible: boolean;
|
|
2779
|
+
}[];
|
|
2780
|
+
};
|
|
2781
|
+
createdBy?: {
|
|
2782
|
+
identityType: IdentityType;
|
|
2783
|
+
};
|
|
2784
|
+
};
|
|
2785
|
+
status: RequestStatus$1;
|
|
2786
|
+
}[];
|
|
2787
|
+
}
|
|
2788
|
+
interface BaseEventMetadata$1 {
|
|
2789
|
+
/** App instance ID. */
|
|
2790
|
+
instanceId?: string | null;
|
|
2791
|
+
/** Event type. */
|
|
2792
|
+
eventType?: string;
|
|
2793
|
+
/** The identification type and identity data. */
|
|
2794
|
+
identity?: IdentificationData$1;
|
|
2795
|
+
}
|
|
2796
|
+
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
2797
|
+
/**
|
|
2798
|
+
* Unique event ID.
|
|
2799
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2800
|
+
*/
|
|
2801
|
+
_id?: string;
|
|
2802
|
+
/**
|
|
2803
|
+
* Assumes actions are also always typed to an entity_type
|
|
2804
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2805
|
+
*/
|
|
2806
|
+
entityFqdn?: string;
|
|
2807
|
+
/**
|
|
2808
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2809
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2810
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2811
|
+
*/
|
|
2812
|
+
slug?: string;
|
|
2813
|
+
/** ID of the entity associated with the event. */
|
|
2814
|
+
entityId?: string;
|
|
2815
|
+
/** Event timestamp. */
|
|
2816
|
+
eventTime?: Date;
|
|
2817
|
+
/**
|
|
2818
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2819
|
+
* (for example, GDPR).
|
|
2820
|
+
*/
|
|
2821
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2822
|
+
/** If present, indicates the action that triggered the event. */
|
|
2823
|
+
originatedFrom?: string | null;
|
|
2824
|
+
/**
|
|
2825
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2826
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2827
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2828
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2829
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2830
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2831
|
+
*/
|
|
2832
|
+
entityEventSequence?: string | null;
|
|
2833
|
+
}
|
|
2834
|
+
interface CreateRequestApprovedEnvelope {
|
|
2835
|
+
data: CreateRequestApproved;
|
|
2836
|
+
metadata: EventMetadata$1;
|
|
2837
|
+
}
|
|
2838
|
+
interface CreateRequestRejectedEnvelope {
|
|
2839
|
+
data: CreateRequestRejected;
|
|
2840
|
+
metadata: EventMetadata$1;
|
|
2841
|
+
}
|
|
2842
|
+
interface ApproveCreateRequestsOptions {
|
|
2843
|
+
/** Create Request IDs to approve. Limited to `100`. */
|
|
2844
|
+
createRequestIds?: string[];
|
|
2845
|
+
}
|
|
2846
|
+
interface RejectCreateRequestsOptions {
|
|
2847
|
+
/** Rejection data. */
|
|
2848
|
+
rejections?: Rejection$1[];
|
|
2849
|
+
}
|
|
2850
|
+
interface ListCreateRequestsOptions {
|
|
2851
|
+
/** Number of items to load. Maximum `100`. */
|
|
2852
|
+
limit?: number | null;
|
|
2853
|
+
/** Number of items to skip in the current sort order. */
|
|
2854
|
+
offset?: number | null;
|
|
2855
|
+
}
|
|
2856
|
+
interface QueryCreateRequestsOptions {
|
|
2857
|
+
query?: Query$1;
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
declare function approveCreateRequests$1(httpClient: HttpClient): (options?: ApproveCreateRequestsOptions) => Promise<ApproveCreateRequestsResponse & ApproveCreateRequestsResponseNonNullableFields>;
|
|
2861
|
+
declare function rejectCreateRequests$1(httpClient: HttpClient): (options?: RejectCreateRequestsOptions) => Promise<RejectCreateRequestsResponse & RejectCreateRequestsResponseNonNullableFields>;
|
|
2862
|
+
declare function listCreateRequests$1(httpClient: HttpClient): (options?: ListCreateRequestsOptions) => Promise<ListCreateRequestsResponse & ListCreateRequestsResponseNonNullableFields>;
|
|
2863
|
+
declare function queryCreateRequests$1(httpClient: HttpClient): (options?: QueryCreateRequestsOptions) => Promise<QueryCreateRequestsResponse & QueryCreateRequestsResponseNonNullableFields>;
|
|
2864
|
+
declare const onCreateRequestApproved$1: EventDefinition<CreateRequestApprovedEnvelope, "wix.social_groups.v3.create_request_approved">;
|
|
2865
|
+
declare const onCreateRequestRejected$1: EventDefinition<CreateRequestRejectedEnvelope, "wix.social_groups.v3.create_request_rejected">;
|
|
2866
|
+
|
|
2867
|
+
declare const approveCreateRequests: BuildRESTFunction<typeof approveCreateRequests$1>;
|
|
2868
|
+
declare const rejectCreateRequests: BuildRESTFunction<typeof rejectCreateRequests$1>;
|
|
2869
|
+
declare const listCreateRequests: BuildRESTFunction<typeof listCreateRequests$1>;
|
|
2870
|
+
declare const queryCreateRequests: BuildRESTFunction<typeof queryCreateRequests$1>;
|
|
2871
|
+
declare const onCreateRequestApproved: BuildEventDefinition<typeof onCreateRequestApproved$1>;
|
|
2872
|
+
declare const onCreateRequestRejected: BuildEventDefinition<typeof onCreateRequestRejected$1>;
|
|
2873
|
+
|
|
2874
|
+
declare const context$1_approveCreateRequests: typeof approveCreateRequests;
|
|
2875
|
+
declare const context$1_listCreateRequests: typeof listCreateRequests;
|
|
2876
|
+
declare const context$1_onCreateRequestApproved: typeof onCreateRequestApproved;
|
|
2877
|
+
declare const context$1_onCreateRequestRejected: typeof onCreateRequestRejected;
|
|
2878
|
+
declare const context$1_queryCreateRequests: typeof queryCreateRequests;
|
|
2879
|
+
declare const context$1_rejectCreateRequests: typeof rejectCreateRequests;
|
|
2880
|
+
declare namespace context$1 {
|
|
2881
|
+
export { context$1_approveCreateRequests as approveCreateRequests, context$1_listCreateRequests as listCreateRequests, context$1_onCreateRequestApproved as onCreateRequestApproved, context$1_onCreateRequestRejected as onCreateRequestRejected, context$1_queryCreateRequests as queryCreateRequests, context$1_rejectCreateRequests as rejectCreateRequests };
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* To join a private group, a site member must submit a Join Request, which can be approved or rejected by an admin.
|
|
2886
|
+
* When the request is approved, the site member becomes a group member.
|
|
2887
|
+
*/
|
|
2888
|
+
interface JoinRequest {
|
|
2889
|
+
/**
|
|
2890
|
+
* Member ID. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details.
|
|
2891
|
+
* @readonly
|
|
2892
|
+
*/
|
|
2893
|
+
memberId?: string;
|
|
2894
|
+
/**
|
|
2895
|
+
* Join request status.
|
|
2896
|
+
* - `PENDING` - Pending join request.
|
|
2897
|
+
* - `APPROVED` - Approved join request.
|
|
2898
|
+
* - `REJECTED` - Rejected join request.
|
|
2899
|
+
* - `CANCELED` - Canceled join request.
|
|
2900
|
+
*/
|
|
2901
|
+
status?: RequestStatus;
|
|
2902
|
+
/** Join request details. */
|
|
2903
|
+
requestDetails?: RequestDetails;
|
|
2904
|
+
}
|
|
2905
|
+
declare enum RequestStatus {
|
|
2906
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
2907
|
+
/** Pending request. */
|
|
2908
|
+
PENDING = "PENDING",
|
|
2909
|
+
/** Approved request. */
|
|
2910
|
+
APPROVED = "APPROVED",
|
|
2911
|
+
/** Rejected request. */
|
|
2912
|
+
REJECTED = "REJECTED",
|
|
2913
|
+
/** Cancelled request. */
|
|
2914
|
+
CANCELLED = "CANCELLED",
|
|
2915
|
+
/** Canceled request. */
|
|
2916
|
+
CANCELED = "CANCELED"
|
|
2917
|
+
}
|
|
2918
|
+
interface RequestDetails {
|
|
2919
|
+
/** Reason the request has been rejected. */
|
|
2920
|
+
rejectionReason?: string | null;
|
|
2921
|
+
}
|
|
2922
|
+
interface ApproveJoinRequestsResponse {
|
|
2923
|
+
/** Approved join requests. */
|
|
2924
|
+
joinRequests?: JoinRequest[];
|
|
2925
|
+
}
|
|
2926
|
+
interface JoinRequestApproved {
|
|
2927
|
+
/** Group ID for which join request was approved. */
|
|
2928
|
+
groupId?: string;
|
|
2929
|
+
/** Approved join request. */
|
|
2930
|
+
joinRequest?: JoinRequest;
|
|
2931
|
+
}
|
|
2932
|
+
interface Rejection {
|
|
2933
|
+
/** Member ID to reject. */
|
|
2934
|
+
memberId?: string;
|
|
2935
|
+
/** Rejection reason. Free text that will be displayed to the rejected site member (max 1,000 characters). */
|
|
2936
|
+
reason?: string | null;
|
|
2937
|
+
}
|
|
2938
|
+
interface RejectJoinRequestsResponse {
|
|
2939
|
+
/** Rejected join requests. */
|
|
2940
|
+
joinRequests?: JoinRequest[];
|
|
2941
|
+
}
|
|
2942
|
+
interface JoinRequestRejected {
|
|
2943
|
+
/** Group ID for which join request was rejected. */
|
|
2944
|
+
groupId?: string;
|
|
2945
|
+
/** Rejected join request. */
|
|
2946
|
+
joinRequest?: JoinRequest;
|
|
2947
|
+
}
|
|
2948
|
+
interface ListJoinRequestsResponse {
|
|
2949
|
+
/** Join requests. */
|
|
2950
|
+
joinRequests?: JoinRequest[];
|
|
2951
|
+
metadata?: PagingMetadata;
|
|
2952
|
+
}
|
|
2953
|
+
interface PagingMetadata {
|
|
2954
|
+
/** Number of items returned in the response. */
|
|
2955
|
+
count?: number | null;
|
|
2956
|
+
/** Offset that was requested. */
|
|
2957
|
+
offset?: number | null;
|
|
2958
|
+
/** Total number of items that match the query. */
|
|
2959
|
+
total?: number | null;
|
|
2960
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2961
|
+
tooManyToCount?: boolean | null;
|
|
2962
|
+
}
|
|
2963
|
+
interface Query {
|
|
2964
|
+
/**
|
|
2965
|
+
* Filter object in the following format:
|
|
2966
|
+
* `"filter" : {
|
|
2967
|
+
* "fieldName1": "value1",
|
|
2968
|
+
* "fieldName2":{"$operator":"value2"}
|
|
2969
|
+
* }`
|
|
2970
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2971
|
+
*/
|
|
2972
|
+
filter?: any;
|
|
2973
|
+
/**
|
|
2974
|
+
* Sort object in the following format:
|
|
2975
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2976
|
+
*/
|
|
2977
|
+
sort?: Sorting[];
|
|
2978
|
+
/** Paging options to limit and skip the number of items. */
|
|
2979
|
+
paging?: Paging;
|
|
2980
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
2981
|
+
fields?: string[];
|
|
2982
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
2983
|
+
fieldsets?: string[];
|
|
2984
|
+
}
|
|
2985
|
+
interface Sorting {
|
|
2986
|
+
/** Name of the field to sort by. */
|
|
2987
|
+
fieldName?: string;
|
|
2988
|
+
/** Sort order. */
|
|
2989
|
+
order?: SortOrder;
|
|
2990
|
+
}
|
|
2991
|
+
declare enum SortOrder {
|
|
2992
|
+
ASC = "ASC",
|
|
2993
|
+
DESC = "DESC"
|
|
2994
|
+
}
|
|
2995
|
+
interface Paging {
|
|
2996
|
+
/** Number of items to load. */
|
|
2997
|
+
limit?: number | null;
|
|
2998
|
+
/** Number of items to skip in the current sort order. */
|
|
2999
|
+
offset?: number | null;
|
|
3000
|
+
}
|
|
3001
|
+
interface QueryJoinRequestsResponse {
|
|
3002
|
+
/** Join requests. */
|
|
3003
|
+
joinRequests?: JoinRequest[];
|
|
3004
|
+
metadata?: PagingMetadata;
|
|
3005
|
+
}
|
|
3006
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3007
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3008
|
+
anonymousVisitorId?: string;
|
|
3009
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3010
|
+
memberId?: string;
|
|
3011
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3012
|
+
wixUserId?: string;
|
|
3013
|
+
/** ID of an app. */
|
|
3014
|
+
appId?: string;
|
|
3015
|
+
/** @readonly */
|
|
3016
|
+
identityType?: WebhookIdentityType;
|
|
3017
|
+
}
|
|
3018
|
+
/** @oneof */
|
|
3019
|
+
interface IdentificationDataIdOneOf {
|
|
3020
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3021
|
+
anonymousVisitorId?: string;
|
|
3022
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3023
|
+
memberId?: string;
|
|
3024
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3025
|
+
wixUserId?: string;
|
|
3026
|
+
/** ID of an app. */
|
|
3027
|
+
appId?: string;
|
|
3028
|
+
}
|
|
3029
|
+
declare enum WebhookIdentityType {
|
|
3030
|
+
UNKNOWN = "UNKNOWN",
|
|
3031
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3032
|
+
MEMBER = "MEMBER",
|
|
3033
|
+
WIX_USER = "WIX_USER",
|
|
3034
|
+
APP = "APP"
|
|
3035
|
+
}
|
|
3036
|
+
interface ApproveJoinRequestsResponseNonNullableFields {
|
|
3037
|
+
joinRequests: {
|
|
3038
|
+
memberId: string;
|
|
3039
|
+
status: RequestStatus;
|
|
3040
|
+
}[];
|
|
3041
|
+
}
|
|
3042
|
+
interface RejectJoinRequestsResponseNonNullableFields {
|
|
3043
|
+
joinRequests: {
|
|
3044
|
+
memberId: string;
|
|
3045
|
+
status: RequestStatus;
|
|
3046
|
+
}[];
|
|
3047
|
+
}
|
|
3048
|
+
interface ListJoinRequestsResponseNonNullableFields {
|
|
3049
|
+
joinRequests: {
|
|
3050
|
+
memberId: string;
|
|
3051
|
+
status: RequestStatus;
|
|
3052
|
+
}[];
|
|
3053
|
+
}
|
|
3054
|
+
interface QueryJoinRequestsResponseNonNullableFields {
|
|
3055
|
+
joinRequests: {
|
|
3056
|
+
memberId: string;
|
|
3057
|
+
status: RequestStatus;
|
|
3058
|
+
}[];
|
|
3059
|
+
}
|
|
3060
|
+
interface BaseEventMetadata {
|
|
3061
|
+
/** App instance ID. */
|
|
3062
|
+
instanceId?: string | null;
|
|
3063
|
+
/** Event type. */
|
|
3064
|
+
eventType?: string;
|
|
3065
|
+
/** The identification type and identity data. */
|
|
3066
|
+
identity?: IdentificationData;
|
|
3067
|
+
}
|
|
3068
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
3069
|
+
/**
|
|
3070
|
+
* Unique event ID.
|
|
3071
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3072
|
+
*/
|
|
3073
|
+
_id?: string;
|
|
3074
|
+
/**
|
|
3075
|
+
* Assumes actions are also always typed to an entity_type
|
|
3076
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3077
|
+
*/
|
|
3078
|
+
entityFqdn?: string;
|
|
3079
|
+
/**
|
|
3080
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3081
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3082
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3083
|
+
*/
|
|
3084
|
+
slug?: string;
|
|
3085
|
+
/** ID of the entity associated with the event. */
|
|
3086
|
+
entityId?: string;
|
|
3087
|
+
/** Event timestamp. */
|
|
3088
|
+
eventTime?: Date;
|
|
3089
|
+
/**
|
|
3090
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3091
|
+
* (for example, GDPR).
|
|
3092
|
+
*/
|
|
3093
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3094
|
+
/** If present, indicates the action that triggered the event. */
|
|
3095
|
+
originatedFrom?: string | null;
|
|
3096
|
+
/**
|
|
3097
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3098
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3099
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3100
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3101
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3102
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3103
|
+
*/
|
|
3104
|
+
entityEventSequence?: string | null;
|
|
3105
|
+
}
|
|
3106
|
+
interface JoinRequestApprovedEnvelope {
|
|
3107
|
+
data: JoinRequestApproved;
|
|
3108
|
+
metadata: EventMetadata;
|
|
3109
|
+
}
|
|
3110
|
+
interface JoinRequestRejectedEnvelope {
|
|
3111
|
+
data: JoinRequestRejected;
|
|
3112
|
+
metadata: EventMetadata;
|
|
3113
|
+
}
|
|
3114
|
+
interface ApproveJoinRequestsOptions {
|
|
3115
|
+
/** Member IDs to approve. */
|
|
3116
|
+
memberIds: string[];
|
|
3117
|
+
}
|
|
3118
|
+
interface RejectJoinRequestsOptions {
|
|
3119
|
+
/** Rejection data. */
|
|
3120
|
+
rejections?: Rejection[];
|
|
3121
|
+
}
|
|
3122
|
+
interface ListJoinRequestsOptions {
|
|
3123
|
+
limit?: number | null;
|
|
3124
|
+
offset?: number | null;
|
|
3125
|
+
}
|
|
3126
|
+
interface QueryJoinRequestsOptions {
|
|
3127
|
+
query?: Query;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
declare function approveJoinRequests$1(httpClient: HttpClient): (groupId: string, options: ApproveJoinRequestsOptions) => Promise<ApproveJoinRequestsResponse & ApproveJoinRequestsResponseNonNullableFields>;
|
|
3131
|
+
declare function rejectJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: RejectJoinRequestsOptions) => Promise<RejectJoinRequestsResponse & RejectJoinRequestsResponseNonNullableFields>;
|
|
3132
|
+
declare function listJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: ListJoinRequestsOptions) => Promise<ListJoinRequestsResponse & ListJoinRequestsResponseNonNullableFields>;
|
|
3133
|
+
declare function queryJoinRequests$1(httpClient: HttpClient): (groupId: string, options?: QueryJoinRequestsOptions) => Promise<QueryJoinRequestsResponse & QueryJoinRequestsResponseNonNullableFields>;
|
|
3134
|
+
declare const onJoinRequestApproved$1: EventDefinition<JoinRequestApprovedEnvelope, "wix.social_groups.v3.join_request_approved">;
|
|
3135
|
+
declare const onJoinRequestRejected$1: EventDefinition<JoinRequestRejectedEnvelope, "wix.social_groups.v3.join_request_rejected">;
|
|
3136
|
+
|
|
3137
|
+
declare const approveJoinRequests: BuildRESTFunction<typeof approveJoinRequests$1>;
|
|
3138
|
+
declare const rejectJoinRequests: BuildRESTFunction<typeof rejectJoinRequests$1>;
|
|
3139
|
+
declare const listJoinRequests: BuildRESTFunction<typeof listJoinRequests$1>;
|
|
3140
|
+
declare const queryJoinRequests: BuildRESTFunction<typeof queryJoinRequests$1>;
|
|
3141
|
+
declare const onJoinRequestApproved: BuildEventDefinition<typeof onJoinRequestApproved$1>;
|
|
3142
|
+
declare const onJoinRequestRejected: BuildEventDefinition<typeof onJoinRequestRejected$1>;
|
|
3143
|
+
|
|
3144
|
+
declare const context_approveJoinRequests: typeof approveJoinRequests;
|
|
3145
|
+
declare const context_listJoinRequests: typeof listJoinRequests;
|
|
3146
|
+
declare const context_onJoinRequestApproved: typeof onJoinRequestApproved;
|
|
3147
|
+
declare const context_onJoinRequestRejected: typeof onJoinRequestRejected;
|
|
3148
|
+
declare const context_queryJoinRequests: typeof queryJoinRequests;
|
|
3149
|
+
declare const context_rejectJoinRequests: typeof rejectJoinRequests;
|
|
3150
|
+
declare namespace context {
|
|
3151
|
+
export { context_approveJoinRequests as approveJoinRequests, context_listJoinRequests as listJoinRequests, context_onJoinRequestApproved as onJoinRequestApproved, context_onJoinRequestRejected as onJoinRequestRejected, context_queryJoinRequests as queryJoinRequests, context_rejectJoinRequests as rejectJoinRequests };
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3154
|
+
export { context$1 as createRequests, context$6 as groupRequests, context$8 as groups, context$3 as joinGroupRequests, context as joinRequests, context$7 as members, context$2 as membershipQuestions, context$5 as roles, context$4 as rules };
|