@wix/members 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/meta.d.ts +3 -0
- package/build/cjs/meta.js +26 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/badges-v3-badge.meta.d.ts +35 -0
- package/build/cjs/src/badges-v3-badge.meta.js +233 -0
- package/build/cjs/src/badges-v3-badge.meta.js.map +1 -0
- package/build/cjs/src/identity-members-v1-member.meta.d.ts +20 -0
- package/build/cjs/src/identity-members-v1-member.meta.js +138 -0
- package/build/cjs/src/identity-members-v1-member.meta.js.map +1 -0
- package/build/cjs/src/members-v1-member.http.d.ts +25 -54
- package/build/cjs/src/members-v1-member.http.js +25 -54
- package/build/cjs/src/members-v1-member.http.js.map +1 -1
- package/build/cjs/src/members-v1-member.meta.d.ts +37 -0
- package/build/cjs/src/members-v1-member.meta.js +271 -0
- package/build/cjs/src/members-v1-member.meta.js.map +1 -0
- package/build/cjs/src/members-v1-member.universal.d.ts +70 -132
- package/build/cjs/src/members-v1-member.universal.js +27 -64
- package/build/cjs/src/members-v1-member.universal.js.map +1 -1
- package/build/es/meta.d.ts +3 -0
- package/build/es/meta.js +4 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/badges-v3-badge.meta.d.ts +35 -0
- package/build/es/src/badges-v3-badge.meta.js +200 -0
- package/build/es/src/badges-v3-badge.meta.js.map +1 -0
- package/build/es/src/identity-members-v1-member.meta.d.ts +20 -0
- package/build/es/src/identity-members-v1-member.meta.js +110 -0
- package/build/es/src/identity-members-v1-member.meta.js.map +1 -0
- package/build/es/src/members-v1-member.http.d.ts +25 -54
- package/build/es/src/members-v1-member.http.js +25 -54
- package/build/es/src/members-v1-member.http.js.map +1 -1
- package/build/es/src/members-v1-member.meta.d.ts +37 -0
- package/build/es/src/members-v1-member.meta.js +236 -0
- package/build/es/src/members-v1-member.meta.js.map +1 -0
- package/build/es/src/members-v1-member.universal.d.ts +70 -132
- package/build/es/src/members-v1-member.universal.js +27 -64
- package/build/es/src/members-v1-member.universal.js.map +1 -1
- package/meta/package.json +6 -0
- package/package.json +4 -3
|
@@ -47,11 +47,6 @@ export interface Member {
|
|
|
47
47
|
/**
|
|
48
48
|
* Member's contact information. Contact information is stored in the
|
|
49
49
|
* [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).
|
|
50
|
-
*
|
|
51
|
-
* <!--ONLY:REST-->
|
|
52
|
-
* The full set of contact data can be accessed and managed with the
|
|
53
|
-
* [Contacts API](https://dev.wix.com/api/rest/contacts/contacts).
|
|
54
|
-
* <!--END:ONLY:REST-->
|
|
55
50
|
*/
|
|
56
51
|
contact?: Contact;
|
|
57
52
|
/** Profile display info. */
|
|
@@ -119,11 +114,8 @@ export declare enum Status {
|
|
|
119
114
|
/** Contact info associated with the member. */
|
|
120
115
|
export interface Contact {
|
|
121
116
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* > **Deprecation notice:**
|
|
125
|
-
* > This property has been replaced with `member.contactId`
|
|
126
|
-
* > and will be removed on June 11, 2021.
|
|
117
|
+
* @internal
|
|
118
|
+
* @internal
|
|
127
119
|
* @readonly
|
|
128
120
|
*/
|
|
129
121
|
contactId?: string | null;
|
|
@@ -148,9 +140,11 @@ export interface Contact {
|
|
|
148
140
|
/** Contact's job title. */
|
|
149
141
|
jobTitle?: string | null;
|
|
150
142
|
/**
|
|
151
|
-
* Custom fields
|
|
152
|
-
*
|
|
153
|
-
*
|
|
143
|
+
* Custom fields are structured as key:value pairs where each key is the field `name`, and each value is the field's `value` for the member.
|
|
144
|
+
*
|
|
145
|
+
* > **Notes:**
|
|
146
|
+
* > - Only custom fields added to the member profile in the Dashboard are available through the Members API. Empty fields are not returned.
|
|
147
|
+
* > - When updating a member, `name` is ignored.
|
|
154
148
|
*/
|
|
155
149
|
customFields?: Record<string, CustomField>;
|
|
156
150
|
}
|
|
@@ -405,25 +399,23 @@ export declare enum Set {
|
|
|
405
399
|
}
|
|
406
400
|
/** Member profile. */
|
|
407
401
|
export interface GetMyMemberResponse {
|
|
408
|
-
/** The
|
|
402
|
+
/** The logged-in member. */
|
|
409
403
|
member?: Member;
|
|
410
404
|
}
|
|
411
405
|
export interface GetMemberRequest {
|
|
412
406
|
/** Member ID. */
|
|
413
407
|
_id: string;
|
|
414
408
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
* Defaults to `PUBLIC`.
|
|
418
|
-
*
|
|
419
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
420
|
-
* This property will be removed on March 31, 2023.
|
|
421
|
-
*/
|
|
409
|
+
* @internal
|
|
410
|
+
* @internal */
|
|
422
411
|
fieldSet?: Set;
|
|
423
412
|
/**
|
|
424
|
-
* Predefined set of fields to return.
|
|
413
|
+
* Predefined set of fields to return. One of:
|
|
414
|
+
* - `"FULL"`: Returns all fields.
|
|
415
|
+
* - `"PUBLIC"`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.
|
|
416
|
+
* - `"EXTENDED"`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.
|
|
417
|
+
*
|
|
425
418
|
*
|
|
426
|
-
* Defaults to `PUBLIC`.
|
|
427
419
|
*/
|
|
428
420
|
fieldsets?: Set[];
|
|
429
421
|
}
|
|
@@ -438,18 +430,16 @@ export interface MemberToMemberBlockedPayload {
|
|
|
438
430
|
export interface ListMembersRequest {
|
|
439
431
|
paging?: Paging;
|
|
440
432
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
* Defaults to `PUBLIC`.
|
|
444
|
-
*
|
|
445
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
446
|
-
* This property will be removed on March 31, 2023.
|
|
447
|
-
*/
|
|
433
|
+
* @internal
|
|
434
|
+
* @internal */
|
|
448
435
|
fieldSet?: Set;
|
|
449
436
|
/**
|
|
450
|
-
* Predefined
|
|
437
|
+
* Predefined set of fields to return. One of:
|
|
438
|
+
* - `"FULL"`: Returns all fields.
|
|
439
|
+
* - `"PUBLIC"`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.
|
|
440
|
+
* - `"EXTENDED"`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.
|
|
451
441
|
*
|
|
452
|
-
*
|
|
442
|
+
* Default: `"PUBLIC"`.
|
|
453
443
|
*/
|
|
454
444
|
fieldsets?: Set[];
|
|
455
445
|
sorting?: Sorting[];
|
|
@@ -1320,7 +1310,6 @@ export interface DeleteMemberAddressesResponseNonNullableFields {
|
|
|
1320
1310
|
* Updates the currently logged in member's slug.
|
|
1321
1311
|
* @param slug - New slug.
|
|
1322
1312
|
* @public
|
|
1323
|
-
* @documentationMaturity preview
|
|
1324
1313
|
* @requiredField slug
|
|
1325
1314
|
* @permissionScope Manage Members
|
|
1326
1315
|
* @applicableIdentity APP
|
|
@@ -1335,7 +1324,6 @@ export declare function updateMySlug(slug: string): Promise<UpdateMySlugResponse
|
|
|
1335
1324
|
* features — such as chat, forum, and followers —
|
|
1336
1325
|
* and their profile is visible to other members and site visitors.
|
|
1337
1326
|
* @public
|
|
1338
|
-
* @documentationMaturity preview
|
|
1339
1327
|
* @applicableIdentity APP
|
|
1340
1328
|
* @applicableIdentity MEMBER
|
|
1341
1329
|
* @returns Member profile.
|
|
@@ -1353,7 +1341,6 @@ export declare function joinCommunity(): Promise<JoinCommunityResponse & JoinCom
|
|
|
1353
1341
|
* > **Note:**
|
|
1354
1342
|
* > If a member leaves the site's community, their content (such as forum posts and blog comments) remain publicly visible.
|
|
1355
1343
|
* @public
|
|
1356
|
-
* @documentationMaturity preview
|
|
1357
1344
|
* @applicableIdentity APP
|
|
1358
1345
|
* @applicableIdentity MEMBER
|
|
1359
1346
|
* @returns Member profile.
|
|
@@ -1373,7 +1360,7 @@ export declare function leaveCommunity(): Promise<LeaveCommunityResponse & Leave
|
|
|
1373
1360
|
* > [migration instructions](.wix-users-backend/currentuser#wix-users-backend_currentuser_migration-instructions).
|
|
1374
1361
|
* <!--END:ONLY:VELO-->
|
|
1375
1362
|
* @public
|
|
1376
|
-
* @
|
|
1363
|
+
* @param options - Fieldset options.
|
|
1377
1364
|
* @permissionScope Read Members
|
|
1378
1365
|
* @applicableIdentity APP
|
|
1379
1366
|
* @applicableIdentity MEMBER
|
|
@@ -1382,34 +1369,27 @@ export declare function leaveCommunity(): Promise<LeaveCommunityResponse & Leave
|
|
|
1382
1369
|
*/
|
|
1383
1370
|
export declare function getMyMember(options?: GetMyMemberOptions): Promise<GetMyMemberResponse & GetMyMemberResponseNonNullableFields>;
|
|
1384
1371
|
export interface GetMyMemberOptions {
|
|
1372
|
+
/** @internal */
|
|
1373
|
+
fieldSet?: Set;
|
|
1385
1374
|
/**
|
|
1386
|
-
* Predefined set of fields to return.
|
|
1387
|
-
*
|
|
1388
|
-
* <!--ONLY:VELO
|
|
1389
|
-
* One of:
|
|
1390
|
-
*
|
|
1375
|
+
* Predefined set of fields to return. One of:
|
|
1391
1376
|
* - `"FULL"`: Returns all fields.
|
|
1392
|
-
* - `"PUBLIC"`: Returns `
|
|
1377
|
+
* - `"PUBLIC"`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.
|
|
1378
|
+
* - `"EXTENDED"`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.
|
|
1393
1379
|
*
|
|
1394
|
-
*
|
|
1395
|
-
* > When returning the `"PUBLIC"` fieldset,
|
|
1396
|
-
* > `profile.status`, `profile.privacyStatus`, and `profile.activityStatus`
|
|
1397
|
-
* > are returned as `"UNKNOWN"`.
|
|
1398
|
-
* <!--END:ONLY:VELO-->
|
|
1380
|
+
* Default: `"PUBLIC"`.
|
|
1399
1381
|
*/
|
|
1400
|
-
fieldSet?: Set;
|
|
1401
1382
|
fieldsets?: Set[];
|
|
1402
1383
|
}
|
|
1403
1384
|
/**
|
|
1404
1385
|
* Retrieves a member by ID.
|
|
1405
1386
|
*
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1408
|
-
* - `FULL` fieldset returns all fields.
|
|
1387
|
+
* >**Note:** The returned Member object contains only the fields that were explicitly added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/site-members-customizing-your-member-profile-fields).
|
|
1388
|
+
*
|
|
1409
1389
|
* @param _id - Member ID.
|
|
1410
1390
|
* @public
|
|
1411
|
-
* @documentationMaturity preview
|
|
1412
1391
|
* @requiredField _id
|
|
1392
|
+
* @param options - Fieldset options.
|
|
1413
1393
|
* @permissionScope Read Members
|
|
1414
1394
|
* @applicableIdentity APP
|
|
1415
1395
|
* @applicableIdentity MEMBER
|
|
@@ -1418,19 +1398,15 @@ export interface GetMyMemberOptions {
|
|
|
1418
1398
|
*/
|
|
1419
1399
|
export declare function getMember(_id: string, options?: GetMemberOptions): Promise<Member & NonNullable<GetMemberResponseNonNullableFields>['member']>;
|
|
1420
1400
|
export interface GetMemberOptions {
|
|
1421
|
-
/**
|
|
1422
|
-
* Predefined set of fields to return.
|
|
1423
|
-
*
|
|
1424
|
-
* Defaults to `PUBLIC`.
|
|
1425
|
-
*
|
|
1426
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
1427
|
-
* This property will be removed on March 31, 2023.
|
|
1428
|
-
*/
|
|
1401
|
+
/** @internal */
|
|
1429
1402
|
fieldSet?: Set;
|
|
1430
1403
|
/**
|
|
1431
|
-
* Predefined set of fields to return.
|
|
1404
|
+
* Predefined set of fields to return. One of:
|
|
1405
|
+
* - `"FULL"`: Returns all fields.
|
|
1406
|
+
* - `"PUBLIC"`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.
|
|
1407
|
+
* - `"EXTENDED"`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.
|
|
1432
1408
|
*
|
|
1433
|
-
*
|
|
1409
|
+
* Default: `"PUBLIC"`.
|
|
1434
1410
|
*/
|
|
1435
1411
|
fieldsets?: Set[];
|
|
1436
1412
|
}
|
|
@@ -1448,50 +1424,43 @@ export interface GetMemberOptions {
|
|
|
1448
1424
|
*/
|
|
1449
1425
|
export declare function listMembers(options?: ListMembersOptions): Promise<ListMembersResponse & ListMembersResponseNonNullableFields>;
|
|
1450
1426
|
export interface ListMembersOptions {
|
|
1427
|
+
/** Paging options. */
|
|
1451
1428
|
paging?: Paging;
|
|
1452
1429
|
/**
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
* Defaults to `PUBLIC`.
|
|
1456
|
-
*
|
|
1457
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
1458
|
-
* This property will be removed on March 31, 2023.
|
|
1459
|
-
*/
|
|
1430
|
+
* @internal
|
|
1431
|
+
* @internal */
|
|
1460
1432
|
fieldSet?: Set;
|
|
1461
1433
|
/**
|
|
1462
|
-
* Predefined
|
|
1434
|
+
* Predefined set of fields to return. One of:
|
|
1435
|
+
* - `"FULL"`: Returns all fields.
|
|
1436
|
+
* - `"PUBLIC"`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.
|
|
1437
|
+
* - `"EXTENDED"`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.
|
|
1463
1438
|
*
|
|
1464
|
-
*
|
|
1439
|
+
* Default: `"PUBLIC"`.
|
|
1465
1440
|
*/
|
|
1466
1441
|
fieldsets?: Set[];
|
|
1442
|
+
/** Sorting options. */
|
|
1467
1443
|
sorting?: Sorting[];
|
|
1468
1444
|
}
|
|
1469
1445
|
/**
|
|
1470
|
-
* Retrieves a list of up to 100 members, given the provided filters, fieldsets, sorting and paging.
|
|
1446
|
+
* Retrieves a list of up to 100 members, given the provided filters, fieldsets, sorting and paging, and returns a [`MembersQueryBuilder`](#membersquerybuilder) object.
|
|
1471
1447
|
*
|
|
1472
|
-
*
|
|
1473
|
-
* - `FULL` fieldset returns all fields.
|
|
1448
|
+
* The returned object contains the query definition which is typically used to run the query using the [`find()`](#membersquerybuilder/find) function.
|
|
1474
1449
|
*
|
|
1475
|
-
*
|
|
1450
|
+
* You can refine the query by chaining `MembersQueryBuilder` functions onto the query. `MembersQueryBuilder` functions enable you to sort, filter, and control the results that `queryMembers()` returns. The functions that are chained to `queryMembers()` are applied in the order they are called.
|
|
1476
1451
|
*
|
|
1477
|
-
*
|
|
1478
|
-
* - `
|
|
1479
|
-
* - `
|
|
1480
|
-
* - `contact.firstName`
|
|
1481
|
-
* - `contact.lastName`
|
|
1482
|
-
* - `privacyStatus`
|
|
1483
|
-
* - `loginEmail`
|
|
1484
|
-
* - `createdDate`
|
|
1485
|
-
* - `status`
|
|
1486
|
-
* - `userId`
|
|
1452
|
+
* `queryMembers()` runs with the following `MembersQueryBuilder` defaults that you can override:
|
|
1453
|
+
* - [`skip`](#membersquerybuilder/skip): `0`
|
|
1454
|
+
* - [`limit`](#membersquerybuilder/limit): `50`
|
|
1487
1455
|
*
|
|
1488
1456
|
* Currently supported fields for sorting:
|
|
1489
|
-
*
|
|
1490
1457
|
* - `profile.nickname`
|
|
1491
1458
|
* - `contact.firstName`
|
|
1492
1459
|
* - `contact.lastName`
|
|
1493
1460
|
* - `createdDate`
|
|
1494
1461
|
* - `lastLoginDate`
|
|
1462
|
+
*
|
|
1463
|
+
* The following `MembersQueryBuilder` functions are supported for the `queryMembers()` function. For a full description of the Locations object, see the returned for the [`items`](#membersqueryresult/items) property in [`MembersQueryResult`](#membersqueryresult).
|
|
1495
1464
|
* @public
|
|
1496
1465
|
* @documentationMaturity preview
|
|
1497
1466
|
* @permissionScope Read Members
|
|
@@ -1571,10 +1540,9 @@ export interface MembersQueryBuilder {
|
|
|
1571
1540
|
find: () => Promise<MembersQueryResult>;
|
|
1572
1541
|
}
|
|
1573
1542
|
/**
|
|
1574
|
-
* Deletes a member
|
|
1543
|
+
* Deletes a member.
|
|
1575
1544
|
* @param _id - ID of the member to delete.
|
|
1576
1545
|
* @public
|
|
1577
|
-
* @documentationMaturity preview
|
|
1578
1546
|
* @requiredField _id
|
|
1579
1547
|
* @permissionScope Manage Members
|
|
1580
1548
|
* @applicableIdentity APP
|
|
@@ -1583,17 +1551,11 @@ export declare function deleteMember(_id: string): Promise<void>;
|
|
|
1583
1551
|
/**
|
|
1584
1552
|
* Creates a site member.
|
|
1585
1553
|
*
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
1588
|
-
* [Send Set Password Email](https://dev.wix.com/api/rest/members/member-authentication/send-set-password-email)
|
|
1589
|
-
* to email the member with a link to set their password.
|
|
1590
|
-
* The member can log in to the site
|
|
1591
|
-
* when they set their password for the first time.
|
|
1554
|
+
* After creation, you can use the `sendSetPasswordEmail()` in the Members Authentication API to email the member with a link to set their password.
|
|
1555
|
+
* The member can log in to the site once they set their password for the first time.
|
|
1592
1556
|
*
|
|
1593
1557
|
* > **Note:**
|
|
1594
|
-
* > When creating multiple members,
|
|
1595
|
-
* > set your requests at least 1 second apart to keep below rate limits.
|
|
1596
|
-
* <!--END:ONLY:REST-->
|
|
1558
|
+
* > When creating multiple members, set your requests at least 1 second apart to keep below rate limits.
|
|
1597
1559
|
* @param member - Member to create.
|
|
1598
1560
|
* @public
|
|
1599
1561
|
* @documentationMaturity preview
|
|
@@ -1606,19 +1568,18 @@ export declare function createMember(member: Member): Promise<CreateMemberRespon
|
|
|
1606
1568
|
/**
|
|
1607
1569
|
* Updates a member's properties.
|
|
1608
1570
|
*
|
|
1609
|
-
*
|
|
1571
|
+
* Only the requested fields are updated.
|
|
1610
1572
|
* To clear a field's value, set an empty value with an empty string `""`.
|
|
1611
1573
|
*
|
|
1612
|
-
*
|
|
1613
|
-
* use these endpoints:
|
|
1574
|
+
* > **Note:** Updating the `contact.addresses`, `contact.emails`, or `contact.phones` array overwrites the entire array, so any existing values you want to retain must be passed in the `updateMember()` call along with the new values to add.
|
|
1614
1575
|
*
|
|
1615
|
-
*
|
|
1616
|
-
*
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1576
|
+
* > However, passing an empty array will have no effect, and these functions must be used to clear all data from the respective array:
|
|
1577
|
+
*
|
|
1578
|
+
* >- To clear `contact.addresses`, use [`deleteMemberAddresses()`](#deletememberaddresses).
|
|
1579
|
+
* >- To clear `contact.emails`, use [`deleteMemberEmails()`](#deletememberemails).
|
|
1580
|
+
* >- To clear `contact.phones`, use [`deleteMemberPhones`](deletememberphones).
|
|
1619
1581
|
* @param _id - Member ID.
|
|
1620
1582
|
* @public
|
|
1621
|
-
* @documentationMaturity preview
|
|
1622
1583
|
* @requiredField _id
|
|
1623
1584
|
* @requiredField member
|
|
1624
1585
|
* @permissionScope Manage Members
|
|
@@ -1669,11 +1630,6 @@ export interface UpdateMember {
|
|
|
1669
1630
|
/**
|
|
1670
1631
|
* Member's contact information. Contact information is stored in the
|
|
1671
1632
|
* [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).
|
|
1672
|
-
*
|
|
1673
|
-
* <!--ONLY:REST-->
|
|
1674
|
-
* The full set of contact data can be accessed and managed with the
|
|
1675
|
-
* [Contacts API](https://dev.wix.com/api/rest/contacts/contacts).
|
|
1676
|
-
* <!--END:ONLY:REST-->
|
|
1677
1633
|
*/
|
|
1678
1634
|
contact?: Contact;
|
|
1679
1635
|
/** Profile display info. */
|
|
@@ -1734,15 +1690,9 @@ export interface UpdateMember {
|
|
|
1734
1690
|
/**
|
|
1735
1691
|
* Clears a member's phone numbers.
|
|
1736
1692
|
*
|
|
1737
|
-
*
|
|
1738
|
-
* This function returns a Promise that resolves to a member object
|
|
1739
|
-
* when the specified member's phone numbers are cleared.
|
|
1740
|
-
*
|
|
1741
|
-
* `deleteMemberPhones()` clears the `phones` array under the `contact` property.
|
|
1742
|
-
* <!--END:ONLY:VELO-->
|
|
1693
|
+
* The `deleteMemberPhones()` function clears the `phones` array under the `contact` property.
|
|
1743
1694
|
* @param _id - ID of the member whose phone numbers will be deleted.
|
|
1744
1695
|
* @public
|
|
1745
|
-
* @documentationMaturity preview
|
|
1746
1696
|
* @requiredField _id
|
|
1747
1697
|
* @permissionScope Manage Members
|
|
1748
1698
|
* @applicableIdentity APP
|
|
@@ -1752,21 +1702,13 @@ export declare function deleteMemberPhones(_id: string): Promise<DeleteMemberPho
|
|
|
1752
1702
|
/**
|
|
1753
1703
|
* Clears a member's email addresses.
|
|
1754
1704
|
*
|
|
1755
|
-
*
|
|
1756
|
-
* This function returns a Promise that resolves to a member object
|
|
1757
|
-
* when the specified member's email addresses are cleared.
|
|
1758
|
-
*
|
|
1759
|
-
* `deleteMemberEmails()` clears the `emails` array under the `contact` property.
|
|
1760
|
-
* Other member
|
|
1761
|
-
* [`updatedMember()`](.wix-members-backend/members-obj/updatemember)
|
|
1705
|
+
* The `deleteMemberEmails()` function clears the `emails` array under the `contact` property.
|
|
1762
1706
|
*
|
|
1763
1707
|
* > **Note:**
|
|
1764
|
-
* >
|
|
1708
|
+
* > A member can still log in with their `loginEmail`,
|
|
1765
1709
|
* > which is not cleared when this function is called.
|
|
1766
|
-
* <!--END:ONLY:VELO-->
|
|
1767
1710
|
* @param _id - ID of the member whose email addresses will be deleted.
|
|
1768
1711
|
* @public
|
|
1769
|
-
* @documentationMaturity preview
|
|
1770
1712
|
* @requiredField _id
|
|
1771
1713
|
* @permissionScope Manage Members
|
|
1772
1714
|
* @applicableIdentity APP
|
|
@@ -1776,14 +1718,10 @@ export declare function deleteMemberEmails(_id: string): Promise<DeleteMemberEma
|
|
|
1776
1718
|
/**
|
|
1777
1719
|
* Deletes a member's street addresses.
|
|
1778
1720
|
*
|
|
1779
|
-
* <!--ONLY:VELO
|
|
1780
|
-
* This function returns a Promise that resolves to a member object
|
|
1781
|
-
* when the specified member's addresses are cleared.
|
|
1782
1721
|
* The `deleteMemberAddresses()` function clears the `addresses` array under the `contact` property.
|
|
1783
|
-
*
|
|
1722
|
+
*
|
|
1784
1723
|
* @param _id - ID of the member whose street addresses will be deleted.
|
|
1785
1724
|
* @public
|
|
1786
|
-
* @documentationMaturity preview
|
|
1787
1725
|
* @requiredField _id
|
|
1788
1726
|
* @permissionScope Manage Members
|
|
1789
1727
|
* @applicableIdentity APP
|
|
@@ -173,7 +173,6 @@ const _updateMySlugResponse = {};
|
|
|
173
173
|
* Updates the currently logged in member's slug.
|
|
174
174
|
* @param slug - New slug.
|
|
175
175
|
* @public
|
|
176
|
-
* @documentationMaturity preview
|
|
177
176
|
* @requiredField slug
|
|
178
177
|
* @permissionScope Manage Members
|
|
179
178
|
* @applicableIdentity APP
|
|
@@ -230,7 +229,6 @@ export function updateMySlug(slug) {
|
|
|
230
229
|
* features — such as chat, forum, and followers —
|
|
231
230
|
* and their profile is visible to other members and site visitors.
|
|
232
231
|
* @public
|
|
233
|
-
* @documentationMaturity preview
|
|
234
232
|
* @applicableIdentity APP
|
|
235
233
|
* @applicableIdentity MEMBER
|
|
236
234
|
* @returns Member profile.
|
|
@@ -288,7 +286,6 @@ export function joinCommunity() {
|
|
|
288
286
|
* > **Note:**
|
|
289
287
|
* > If a member leaves the site's community, their content (such as forum posts and blog comments) remain publicly visible.
|
|
290
288
|
* @public
|
|
291
|
-
* @documentationMaturity preview
|
|
292
289
|
* @applicableIdentity APP
|
|
293
290
|
* @applicableIdentity MEMBER
|
|
294
291
|
* @returns Member profile.
|
|
@@ -348,7 +345,7 @@ export function leaveCommunity() {
|
|
|
348
345
|
* > [migration instructions](.wix-users-backend/currentuser#wix-users-backend_currentuser_migration-instructions).
|
|
349
346
|
* <!--END:ONLY:VELO-->
|
|
350
347
|
* @public
|
|
351
|
-
* @
|
|
348
|
+
* @param options - Fieldset options.
|
|
352
349
|
* @permissionScope Read Members
|
|
353
350
|
* @applicableIdentity APP
|
|
354
351
|
* @applicableIdentity MEMBER
|
|
@@ -404,13 +401,12 @@ export function getMyMember(options) {
|
|
|
404
401
|
/**
|
|
405
402
|
* Retrieves a member by ID.
|
|
406
403
|
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
* - `FULL` fieldset returns all fields.
|
|
404
|
+
* >**Note:** The returned Member object contains only the fields that were explicitly added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/site-members-customizing-your-member-profile-fields).
|
|
405
|
+
*
|
|
410
406
|
* @param _id - Member ID.
|
|
411
407
|
* @public
|
|
412
|
-
* @documentationMaturity preview
|
|
413
408
|
* @requiredField _id
|
|
409
|
+
* @param options - Fieldset options.
|
|
414
410
|
* @permissionScope Read Members
|
|
415
411
|
* @applicableIdentity APP
|
|
416
412
|
* @applicableIdentity MEMBER
|
|
@@ -526,31 +522,24 @@ export function listMembers(options) {
|
|
|
526
522
|
});
|
|
527
523
|
}
|
|
528
524
|
/**
|
|
529
|
-
* Retrieves a list of up to 100 members, given the provided filters, fieldsets, sorting and paging.
|
|
525
|
+
* Retrieves a list of up to 100 members, given the provided filters, fieldsets, sorting and paging, and returns a [`MembersQueryBuilder`](#membersquerybuilder) object.
|
|
530
526
|
*
|
|
531
|
-
*
|
|
532
|
-
* - `FULL` fieldset returns all fields.
|
|
527
|
+
* The returned object contains the query definition which is typically used to run the query using the [`find()`](#membersquerybuilder/find) function.
|
|
533
528
|
*
|
|
534
|
-
*
|
|
529
|
+
* You can refine the query by chaining `MembersQueryBuilder` functions onto the query. `MembersQueryBuilder` functions enable you to sort, filter, and control the results that `queryMembers()` returns. The functions that are chained to `queryMembers()` are applied in the order they are called.
|
|
535
530
|
*
|
|
536
|
-
*
|
|
537
|
-
* - `
|
|
538
|
-
* - `
|
|
539
|
-
* - `contact.firstName`
|
|
540
|
-
* - `contact.lastName`
|
|
541
|
-
* - `privacyStatus`
|
|
542
|
-
* - `loginEmail`
|
|
543
|
-
* - `createdDate`
|
|
544
|
-
* - `status`
|
|
545
|
-
* - `userId`
|
|
531
|
+
* `queryMembers()` runs with the following `MembersQueryBuilder` defaults that you can override:
|
|
532
|
+
* - [`skip`](#membersquerybuilder/skip): `0`
|
|
533
|
+
* - [`limit`](#membersquerybuilder/limit): `50`
|
|
546
534
|
*
|
|
547
535
|
* Currently supported fields for sorting:
|
|
548
|
-
*
|
|
549
536
|
* - `profile.nickname`
|
|
550
537
|
* - `contact.firstName`
|
|
551
538
|
* - `contact.lastName`
|
|
552
539
|
* - `createdDate`
|
|
553
540
|
* - `lastLoginDate`
|
|
541
|
+
*
|
|
542
|
+
* The following `MembersQueryBuilder` functions are supported for the `queryMembers()` function. For a full description of the Locations object, see the returned for the [`items`](#membersqueryresult/items) property in [`MembersQueryResult`](#membersqueryresult).
|
|
554
543
|
* @public
|
|
555
544
|
* @documentationMaturity preview
|
|
556
545
|
* @permissionScope Read Members
|
|
@@ -610,10 +599,9 @@ export function queryMembers(options) {
|
|
|
610
599
|
})({ cursorWithEmptyFilterAndSort: true });
|
|
611
600
|
}
|
|
612
601
|
/**
|
|
613
|
-
* Deletes a member
|
|
602
|
+
* Deletes a member.
|
|
614
603
|
* @param _id - ID of the member to delete.
|
|
615
604
|
* @public
|
|
616
|
-
* @documentationMaturity preview
|
|
617
605
|
* @requiredField _id
|
|
618
606
|
* @permissionScope Manage Members
|
|
619
607
|
* @applicableIdentity APP
|
|
@@ -664,17 +652,11 @@ export function deleteMember(_id) {
|
|
|
664
652
|
/**
|
|
665
653
|
* Creates a site member.
|
|
666
654
|
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
* [Send Set Password Email](https://dev.wix.com/api/rest/members/member-authentication/send-set-password-email)
|
|
670
|
-
* to email the member with a link to set their password.
|
|
671
|
-
* The member can log in to the site
|
|
672
|
-
* when they set their password for the first time.
|
|
655
|
+
* After creation, you can use the `sendSetPasswordEmail()` in the Members Authentication API to email the member with a link to set their password.
|
|
656
|
+
* The member can log in to the site once they set their password for the first time.
|
|
673
657
|
*
|
|
674
658
|
* > **Note:**
|
|
675
|
-
* > When creating multiple members,
|
|
676
|
-
* > set your requests at least 1 second apart to keep below rate limits.
|
|
677
|
-
* <!--END:ONLY:REST-->
|
|
659
|
+
* > When creating multiple members, set your requests at least 1 second apart to keep below rate limits.
|
|
678
660
|
* @param member - Member to create.
|
|
679
661
|
* @public
|
|
680
662
|
* @documentationMaturity preview
|
|
@@ -729,19 +711,18 @@ export function createMember(member) {
|
|
|
729
711
|
/**
|
|
730
712
|
* Updates a member's properties.
|
|
731
713
|
*
|
|
732
|
-
*
|
|
714
|
+
* Only the requested fields are updated.
|
|
733
715
|
* To clear a field's value, set an empty value with an empty string `""`.
|
|
734
716
|
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
717
|
+
* > **Note:** Updating the `contact.addresses`, `contact.emails`, or `contact.phones` array overwrites the entire array, so any existing values you want to retain must be passed in the `updateMember()` call along with the new values to add.
|
|
718
|
+
*
|
|
719
|
+
* > However, passing an empty array will have no effect, and these functions must be used to clear all data from the respective array:
|
|
737
720
|
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
* <!--END:ONLY:REST-->
|
|
721
|
+
* >- To clear `contact.addresses`, use [`deleteMemberAddresses()`](#deletememberaddresses).
|
|
722
|
+
* >- To clear `contact.emails`, use [`deleteMemberEmails()`](#deletememberemails).
|
|
723
|
+
* >- To clear `contact.phones`, use [`deleteMemberPhones`](deletememberphones).
|
|
742
724
|
* @param _id - Member ID.
|
|
743
725
|
* @public
|
|
744
|
-
* @documentationMaturity preview
|
|
745
726
|
* @requiredField _id
|
|
746
727
|
* @requiredField member
|
|
747
728
|
* @permissionScope Manage Members
|
|
@@ -795,15 +776,9 @@ export function updateMember(_id, member) {
|
|
|
795
776
|
/**
|
|
796
777
|
* Clears a member's phone numbers.
|
|
797
778
|
*
|
|
798
|
-
*
|
|
799
|
-
* This function returns a Promise that resolves to a member object
|
|
800
|
-
* when the specified member's phone numbers are cleared.
|
|
801
|
-
*
|
|
802
|
-
* `deleteMemberPhones()` clears the `phones` array under the `contact` property.
|
|
803
|
-
* <!--END:ONLY:VELO-->
|
|
779
|
+
* The `deleteMemberPhones()` function clears the `phones` array under the `contact` property.
|
|
804
780
|
* @param _id - ID of the member whose phone numbers will be deleted.
|
|
805
781
|
* @public
|
|
806
|
-
* @documentationMaturity preview
|
|
807
782
|
* @requiredField _id
|
|
808
783
|
* @permissionScope Manage Members
|
|
809
784
|
* @applicableIdentity APP
|
|
@@ -855,21 +830,13 @@ export function deleteMemberPhones(_id) {
|
|
|
855
830
|
/**
|
|
856
831
|
* Clears a member's email addresses.
|
|
857
832
|
*
|
|
858
|
-
*
|
|
859
|
-
* This function returns a Promise that resolves to a member object
|
|
860
|
-
* when the specified member's email addresses are cleared.
|
|
861
|
-
*
|
|
862
|
-
* `deleteMemberEmails()` clears the `emails` array under the `contact` property.
|
|
863
|
-
* Other member
|
|
864
|
-
* [`updatedMember()`](.wix-members-backend/members-obj/updatemember)
|
|
833
|
+
* The `deleteMemberEmails()` function clears the `emails` array under the `contact` property.
|
|
865
834
|
*
|
|
866
835
|
* > **Note:**
|
|
867
|
-
* >
|
|
836
|
+
* > A member can still log in with their `loginEmail`,
|
|
868
837
|
* > which is not cleared when this function is called.
|
|
869
|
-
* <!--END:ONLY:VELO-->
|
|
870
838
|
* @param _id - ID of the member whose email addresses will be deleted.
|
|
871
839
|
* @public
|
|
872
|
-
* @documentationMaturity preview
|
|
873
840
|
* @requiredField _id
|
|
874
841
|
* @permissionScope Manage Members
|
|
875
842
|
* @applicableIdentity APP
|
|
@@ -921,14 +888,10 @@ export function deleteMemberEmails(_id) {
|
|
|
921
888
|
/**
|
|
922
889
|
* Deletes a member's street addresses.
|
|
923
890
|
*
|
|
924
|
-
* <!--ONLY:VELO
|
|
925
|
-
* This function returns a Promise that resolves to a member object
|
|
926
|
-
* when the specified member's addresses are cleared.
|
|
927
891
|
* The `deleteMemberAddresses()` function clears the `addresses` array under the `contact` property.
|
|
928
|
-
*
|
|
892
|
+
*
|
|
929
893
|
* @param _id - ID of the member whose street addresses will be deleted.
|
|
930
894
|
* @public
|
|
931
|
-
* @documentationMaturity preview
|
|
932
895
|
* @requiredField _id
|
|
933
896
|
* @permissionScope Manage Members
|
|
934
897
|
* @applicableIdentity APP
|