@wix/groups 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.js +26 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/social-groups-v2-group-member.http.d.ts +45 -0
  5. package/build/cjs/src/social-groups-v2-group-member.http.js +350 -0
  6. package/build/cjs/src/social-groups-v2-group-member.http.js.map +1 -0
  7. package/build/cjs/src/social-groups-v2-group-member.public.d.ts +10 -0
  8. package/build/cjs/src/social-groups-v2-group-member.public.js +45 -0
  9. package/build/cjs/src/social-groups-v2-group-member.public.js.map +1 -0
  10. package/build/cjs/src/social-groups-v2-group-member.types.d.ts +245 -0
  11. package/build/cjs/src/social-groups-v2-group-member.types.js +25 -0
  12. package/build/cjs/src/social-groups-v2-group-member.types.js.map +1 -0
  13. package/build/cjs/src/social-groups-v2-group-member.universal.d.ts +353 -0
  14. package/build/cjs/src/social-groups-v2-group-member.universal.js +403 -0
  15. package/build/cjs/src/social-groups-v2-group-member.universal.js.map +1 -0
  16. package/build/cjs/src/social-groups-v2-group.http.d.ts +46 -0
  17. package/build/cjs/src/social-groups-v2-group.http.js +435 -0
  18. package/build/cjs/src/social-groups-v2-group.http.js.map +1 -0
  19. package/build/cjs/src/social-groups-v2-group.public.d.ts +11 -0
  20. package/build/cjs/src/social-groups-v2-group.public.js +52 -0
  21. package/build/cjs/src/social-groups-v2-group.public.js.map +1 -0
  22. package/build/cjs/src/social-groups-v2-group.types.d.ts +327 -0
  23. package/build/cjs/src/social-groups-v2-group.types.js +31 -0
  24. package/build/cjs/src/social-groups-v2-group.types.js.map +1 -0
  25. package/build/cjs/src/social-groups-v2-group.universal.d.ts +494 -0
  26. package/build/cjs/src/social-groups-v2-group.universal.js +429 -0
  27. package/build/cjs/src/social-groups-v2-group.universal.js.map +1 -0
  28. package/build/cjs/src/social-groups-v2-join-group-request.http.d.ts +27 -0
  29. package/build/cjs/src/social-groups-v2-join-group-request.http.js +298 -0
  30. package/build/cjs/src/social-groups-v2-join-group-request.http.js.map +1 -0
  31. package/build/cjs/src/social-groups-v2-join-group-request.public.d.ts +8 -0
  32. package/build/cjs/src/social-groups-v2-join-group-request.public.js +35 -0
  33. package/build/cjs/src/social-groups-v2-join-group-request.public.js.map +1 -0
  34. package/build/cjs/src/social-groups-v2-join-group-request.types.d.ts +274 -0
  35. package/build/cjs/src/social-groups-v2-join-group-request.types.js +48 -0
  36. package/build/cjs/src/social-groups-v2-join-group-request.types.js.map +1 -0
  37. package/build/cjs/src/social-groups-v2-join-group-request.universal.d.ts +349 -0
  38. package/build/cjs/src/social-groups-v2-join-group-request.universal.js +309 -0
  39. package/build/cjs/src/social-groups-v2-join-group-request.universal.js.map +1 -0
  40. package/build/es/index.d.ts +3 -0
  41. package/build/es/index.js +4 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/src/social-groups-v2-group-member.http.d.ts +45 -0
  44. package/build/es/src/social-groups-v2-group-member.http.js +341 -0
  45. package/build/es/src/social-groups-v2-group-member.http.js.map +1 -0
  46. package/build/es/src/social-groups-v2-group-member.public.d.ts +10 -0
  47. package/build/es/src/social-groups-v2-group-member.public.js +33 -0
  48. package/build/es/src/social-groups-v2-group-member.public.js.map +1 -0
  49. package/build/es/src/social-groups-v2-group-member.types.d.ts +245 -0
  50. package/build/es/src/social-groups-v2-group-member.types.js +22 -0
  51. package/build/es/src/social-groups-v2-group-member.types.js.map +1 -0
  52. package/build/es/src/social-groups-v2-group-member.universal.d.ts +353 -0
  53. package/build/es/src/social-groups-v2-group-member.universal.js +375 -0
  54. package/build/es/src/social-groups-v2-group-member.universal.js.map +1 -0
  55. package/build/es/src/social-groups-v2-group.http.d.ts +46 -0
  56. package/build/es/src/social-groups-v2-group.http.js +425 -0
  57. package/build/es/src/social-groups-v2-group.http.js.map +1 -0
  58. package/build/es/src/social-groups-v2-group.public.d.ts +11 -0
  59. package/build/es/src/social-groups-v2-group.public.js +38 -0
  60. package/build/es/src/social-groups-v2-group.public.js.map +1 -0
  61. package/build/es/src/social-groups-v2-group.types.d.ts +327 -0
  62. package/build/es/src/social-groups-v2-group.types.js +28 -0
  63. package/build/es/src/social-groups-v2-group.types.js.map +1 -0
  64. package/build/es/src/social-groups-v2-group.universal.d.ts +494 -0
  65. package/build/es/src/social-groups-v2-group.universal.js +400 -0
  66. package/build/es/src/social-groups-v2-group.universal.js.map +1 -0
  67. package/build/es/src/social-groups-v2-join-group-request.http.d.ts +27 -0
  68. package/build/es/src/social-groups-v2-join-group-request.http.js +291 -0
  69. package/build/es/src/social-groups-v2-join-group-request.http.js.map +1 -0
  70. package/build/es/src/social-groups-v2-join-group-request.public.d.ts +8 -0
  71. package/build/es/src/social-groups-v2-join-group-request.public.js +23 -0
  72. package/build/es/src/social-groups-v2-join-group-request.public.js.map +1 -0
  73. package/build/es/src/social-groups-v2-join-group-request.types.d.ts +274 -0
  74. package/build/es/src/social-groups-v2-join-group-request.types.js +45 -0
  75. package/build/es/src/social-groups-v2-join-group-request.types.js.map +1 -0
  76. package/build/es/src/social-groups-v2-join-group-request.universal.d.ts +349 -0
  77. package/build/es/src/social-groups-v2-join-group-request.universal.js +283 -0
  78. package/build/es/src/social-groups-v2-join-group-request.universal.js.map +1 -0
  79. package/package.json +37 -0
@@ -0,0 +1,327 @@
1
+ export interface Group {
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
+ * __Deprecated.__ Use `privacyStatus` instead.
11
+ * This property will be removed on June 30, 2022.
12
+ */
13
+ privacyLevel?: PrivacyStatus;
14
+ /**
15
+ * Group privacy status.
16
+ * - `PUBLIC` - Anyone can see the group and its content. Anyone can join the group.
17
+ * - `PRIVATE` - Anyone can see the group, but only members can see its content. New member must submit a `Join Group Request`.
18
+ * - `SECRET` - Only admins and members can see the group. New members can only be added by other members.
19
+ */
20
+ privacyStatus?: PrivacyStatus;
21
+ /**
22
+ * __Deprecated.__ Use `name` instead.
23
+ * This property will be removed on June 30, 2022.
24
+ */
25
+ title?: string | null;
26
+ /** Group name. */
27
+ name?: string | null;
28
+ /** Group description in DraftJS format. */
29
+ description?: string | null;
30
+ /** Group teaser. */
31
+ teaser?: string | null;
32
+ /**
33
+ * __Deprecated.__
34
+ * For `details.logo`, use `coverImage` instead.
35
+ * For `details.membersTitle`, `memberTitle` instead.
36
+ * This property will be removed on June 30, 2022.
37
+ */
38
+ details?: GroupDetails;
39
+ /** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
40
+ memberTitle?: string | null;
41
+ /** Cover image. You cannot upload your own cover image. */
42
+ coverImage?: CoverImage;
43
+ /** Group specific settings. Available to the site owners under `Admin Tools` in the Business Manager. */
44
+ settings?: GroupSettings;
45
+ /**
46
+ * Total count of current group members.
47
+ * @readonly
48
+ */
49
+ membersCount?: number | null;
50
+ /**
51
+ * __Deprecated.__ Use `ownerId` instead.
52
+ * This property will be removed on June 30, 2022.
53
+ * @readonly
54
+ */
55
+ createdBy?: Identity;
56
+ /**
57
+ * Group owner.
58
+ * @readonly
59
+ */
60
+ ownerId?: string | null;
61
+ /**
62
+ * Group creation date and time.
63
+ * @readonly
64
+ */
65
+ createdDate?: Date;
66
+ /**
67
+ * Date and time of the latest group update.
68
+ * @readonly
69
+ */
70
+ updatedDate?: Date;
71
+ /**
72
+ * __Deprecated.__ Use `lastActivityDate` instead.
73
+ * This property will be removed on June 30, 2022.
74
+ * @readonly
75
+ */
76
+ recentActivityDate?: Date;
77
+ /**
78
+ * Date and time of the most recent group activity, for example a post or comment.
79
+ * @readonly
80
+ */
81
+ lastActivityDate?: Date;
82
+ }
83
+ export declare enum Type {
84
+ UNKNOWN = "UNKNOWN",
85
+ ADMIN_APPROVAL = "ADMIN_APPROVAL",
86
+ PAID_PLANS = "PAID_PLANS",
87
+ EVENTS = "EVENTS"
88
+ }
89
+ export interface Events {
90
+ eventIds?: string[];
91
+ }
92
+ export interface Logo {
93
+ /** Logo image ID (for internal use). */
94
+ mediaId?: string | null;
95
+ /** Logo image width. */
96
+ width?: number | null;
97
+ /** Logo image height. */
98
+ height?: number | null;
99
+ }
100
+ export interface GroupDetailsPosition {
101
+ /** horizontal coordinate */
102
+ x?: number;
103
+ /** vertical coordinate */
104
+ y?: number;
105
+ }
106
+ export interface Image {
107
+ /** Image ID (for internal use). */
108
+ mediaId?: string | null;
109
+ /** Image width. */
110
+ width?: number | null;
111
+ /** Image height. */
112
+ height?: number | null;
113
+ }
114
+ export interface Position {
115
+ /** horizontal coordinate */
116
+ x?: number;
117
+ /** vertical coordinate */
118
+ y?: number;
119
+ }
120
+ export declare enum PrivacyStatus {
121
+ UNKNOWN = "UNKNOWN",
122
+ /** Anyone can see the group in the group list and view its content. Anyone can join. */
123
+ PUBLIC = "PUBLIC",
124
+ /** 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. */
125
+ PRIVATE = "PRIVATE",
126
+ /** Only group members and admins can see the group in the group list. New group members can only be added by existing group members. */
127
+ SECRET = "SECRET"
128
+ }
129
+ export interface AccessRestriction extends AccessRestrictionDataOneOf {
130
+ type?: Type;
131
+ events?: Events;
132
+ }
133
+ /** @oneof */
134
+ export interface AccessRestrictionDataOneOf {
135
+ events?: Events;
136
+ }
137
+ export interface GroupDetails {
138
+ /** Group logo. You cannot upload your own logo. */
139
+ logo?: Logo;
140
+ /** What group members are called, for example `Coworkers`, `Friends`, or `Students`. */
141
+ membersTitle?: string | null;
142
+ }
143
+ export interface CoverImage {
144
+ /** Cover image. */
145
+ image?: Image;
146
+ /** Position of the corner of the cover image (or logo). */
147
+ position?: Position;
148
+ /** Position of the corner of the cover image (or logo) for mobile browser. */
149
+ mobilePosition?: Position;
150
+ }
151
+ export interface GroupSettings {
152
+ /**
153
+ * __Deprecated.__ Use `membersCanInvite` instead.
154
+ * This property will be removed on June 30, 2022.
155
+ */
156
+ membersPermittedToInvite?: boolean | null;
157
+ /**
158
+ * Whether regular members are permitted to invite new members.
159
+ * If `false`, only admins can invite members. Defaults to `true`.
160
+ */
161
+ membersCanInvite?: boolean | null;
162
+ /**
163
+ * __Deprecated.__ Use `membersCanApprove` instead.
164
+ * This property will be removed on June 30, 2022.
165
+ */
166
+ membersPermittedToApprove?: boolean | null;
167
+ /**
168
+ * Whether all group members are permitted to approve join group requests.
169
+ * If `false`, member approval is limited to the admins.
170
+ */
171
+ membersCanApprove?: boolean | null;
172
+ /**
173
+ * __Deprecated.__ Use `welcomeMemberPostEnabled` instead.
174
+ * This property will be removed on June 30, 2022.
175
+ */
176
+ memberWelcomePostEnabled?: boolean | null;
177
+ /** Whether a daily post about new members is enabled. */
178
+ welcomeMemberPostEnabled?: boolean | null;
179
+ /** Whether an automatic post about changing the group details is enabled. */
180
+ groupDetailsChangedPostEnabled?: boolean | null;
181
+ /** Whether all members can see the full member list. */
182
+ showMemberList?: boolean | null;
183
+ }
184
+ export interface Identity {
185
+ /** Member ID of the group creator. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
186
+ id?: string | null;
187
+ identityType?: IdentityType;
188
+ }
189
+ export declare enum IdentityType {
190
+ USER = "USER",
191
+ MEMBER = "MEMBER"
192
+ }
193
+ export interface CreateGroupRequest {
194
+ /** Group to create. */
195
+ group?: Group;
196
+ /** ID of the member who created the group. This member will automatically become an admin. See [Members API](https://dev.wix.com/api/rest/members/members/about-wix-members) for more details. */
197
+ creatorId?: string | null;
198
+ }
199
+ export interface CreateGroupResponse {
200
+ /** Created group. */
201
+ group?: Group;
202
+ }
203
+ export interface UpdateGroupRequest {
204
+ /** Group to update. */
205
+ group?: Group;
206
+ }
207
+ export interface UpdateGroupResponse {
208
+ /** Updated group. */
209
+ group?: Group;
210
+ }
211
+ export interface GroupCoverChanged {
212
+ oldUrl?: string | null;
213
+ newUrl?: string | null;
214
+ }
215
+ export interface GroupDescriptionChanged {
216
+ oldDescription?: string | null;
217
+ newDescription?: string | null;
218
+ }
219
+ export interface DeleteGroupRequest {
220
+ /** ID of the group to delete. */
221
+ groupId: string;
222
+ }
223
+ export interface DeleteGroupResponse {
224
+ /** Deleted group. */
225
+ group?: Group;
226
+ }
227
+ export interface GetGroupRequest {
228
+ /** ID of the group to retrieve. */
229
+ groupId: string;
230
+ }
231
+ export interface GetGroupResponse {
232
+ /** Retrieved group. */
233
+ group?: Group;
234
+ }
235
+ export interface GetGroupBySlugRequest {
236
+ /** Unique part of the group's URL, for example `group-1` in `https:/example.com/groups/group-1`. Pass only the slug. Case-sensitive. */
237
+ slug: string;
238
+ }
239
+ export interface GetGroupBySlugResponse {
240
+ /** Retrieved group. */
241
+ group?: Group;
242
+ }
243
+ export interface ListGroupsRequest {
244
+ /** Number of items to load. Maximum `100`. */
245
+ limit?: number | null;
246
+ /** Number of items to skip in the current sort order. */
247
+ offset?: number | null;
248
+ }
249
+ export interface ListGroupsResponse {
250
+ /** Retrieved Groups. */
251
+ groups?: Group[];
252
+ metadata?: PagingMetadata;
253
+ }
254
+ export interface PagingMetadata {
255
+ /** Number of items returned in the response. */
256
+ count?: number | null;
257
+ /** Offset that was requested. */
258
+ offset?: number | null;
259
+ /** Total number of items that match the query. */
260
+ total?: number | null;
261
+ /** Flag that indicates the server failed to calculate the `total` field. */
262
+ tooManyToCount?: boolean | null;
263
+ }
264
+ export interface ListGroupsByUserIdRequest {
265
+ }
266
+ export interface ListGroupsByUserIdResponse {
267
+ groups?: GroupWithMsId[];
268
+ }
269
+ /** Retrieved Groups by metasite id */
270
+ export interface GroupWithMsId {
271
+ metaSiteId?: string;
272
+ groups?: Group[];
273
+ }
274
+ export interface QueryGroupsRequest {
275
+ query?: Query;
276
+ }
277
+ export interface Query {
278
+ /**
279
+ * Filter object in the following format:
280
+ * `"filter" : {
281
+ * "fieldName1": "value1",
282
+ * "fieldName2":{"$operator":"value2"}
283
+ * }`
284
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
285
+ */
286
+ filter?: any;
287
+ /**
288
+ * Sort object in the following format:
289
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
290
+ */
291
+ sort?: Sorting[];
292
+ /** Paging options to limit and skip the number of items. */
293
+ paging?: Paging;
294
+ /** 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. */
295
+ fields?: string[];
296
+ /** 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. */
297
+ fieldsets?: string[];
298
+ }
299
+ export interface Sorting {
300
+ /** Name of the field to sort by. */
301
+ fieldName?: string;
302
+ /** Sort order. */
303
+ order?: SortOrder;
304
+ }
305
+ export declare enum SortOrder {
306
+ ASC = "ASC",
307
+ DESC = "DESC"
308
+ }
309
+ export interface Paging {
310
+ /** Number of items to load. */
311
+ limit?: number | null;
312
+ /** Number of items to skip in the current sort order. */
313
+ offset?: number | null;
314
+ }
315
+ export interface QueryGroupsResponse {
316
+ /** Retrieved groups. */
317
+ groups?: Group[];
318
+ metadata?: PagingMetadata;
319
+ }
320
+ export interface QueryJoinedGroupsRequest {
321
+ query?: Query;
322
+ }
323
+ export interface QueryJoinedGroupsResponse {
324
+ /** Retrieved groups. */
325
+ groups?: Group[];
326
+ metadata?: PagingMetadata;
327
+ }
@@ -0,0 +1,28 @@
1
+ export var Type;
2
+ (function (Type) {
3
+ Type["UNKNOWN"] = "UNKNOWN";
4
+ Type["ADMIN_APPROVAL"] = "ADMIN_APPROVAL";
5
+ Type["PAID_PLANS"] = "PAID_PLANS";
6
+ Type["EVENTS"] = "EVENTS";
7
+ })(Type || (Type = {}));
8
+ export var PrivacyStatus;
9
+ (function (PrivacyStatus) {
10
+ PrivacyStatus["UNKNOWN"] = "UNKNOWN";
11
+ /** Anyone can see the group in the group list and view its content. Anyone can join. */
12
+ PrivacyStatus["PUBLIC"] = "PUBLIC";
13
+ /** 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. */
14
+ PrivacyStatus["PRIVATE"] = "PRIVATE";
15
+ /** Only group members and admins can see the group in the group list. New group members can only be added by existing group members. */
16
+ PrivacyStatus["SECRET"] = "SECRET";
17
+ })(PrivacyStatus || (PrivacyStatus = {}));
18
+ export var IdentityType;
19
+ (function (IdentityType) {
20
+ IdentityType["USER"] = "USER";
21
+ IdentityType["MEMBER"] = "MEMBER";
22
+ })(IdentityType || (IdentityType = {}));
23
+ export var SortOrder;
24
+ (function (SortOrder) {
25
+ SortOrder["ASC"] = "ASC";
26
+ SortOrder["DESC"] = "DESC";
27
+ })(SortOrder || (SortOrder = {}));
28
+ //# sourceMappingURL=social-groups-v2-group.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social-groups-v2-group.types.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group.types.ts"],"names":[],"mappings":"AAmFA,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,yCAAiC,CAAA;IACjC,iCAAyB,CAAA;IACzB,yBAAiB,CAAA;AACnB,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAsCD,MAAM,CAAN,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,wFAAwF;IACxF,kCAAiB,CAAA;IACjB,gKAAgK;IAChK,oCAAmB,CAAA;IACnB,wIAAwI;IACxI,kCAAiB,CAAA;AACnB,CAAC,EARW,aAAa,KAAb,aAAa,QAQxB;AAoED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAsID,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}